/* ============================================================
   TDNB Booking — Shared Stylesheet
   Design: warm minimal, mobile-first, classy nail salon
   ============================================================ */

/* ── Custom Fonts ─────────────────────────────────────────── */
@font-face {
  font-family: 'TAN Aegean';
  src: url('TAN - AEGEAN Regular.ttf') format('truetype');
  font-weight: normal; font-style: normal; font-display: block;
}
@font-face {
  font-family: 'Buffalo';
  src: url('Buffalo.otf') format('opentype');
  font-weight: normal; font-style: normal; font-display: block;
}
@font-face {
  font-family: 'Noah';
  src: url('noah-regular.ttf') format('truetype');
  font-weight: normal; font-style: normal; font-display: block;
}

/* ── Design Tokens ────────────────────────────────────────── */
:root {
  /* Colours */
  --cream:          #FAFAF7;
  --white:          #FFFFFF;
  --gold:           #C9A96E;
  --gold-dark:      #B8955A;
  --gold-light:     #F5ECD7;
  --gold-glow:      rgba(201,169,110,0.18);
  --text:           #1A1A1A;
  --text-secondary: #6B6B6B;
  --text-muted:     #9CA3AF;
  --border:         #EBEBEB;
  --border-focus:   #C9A96E;
  --surface:        #FFFFFF;
  --success:        #2D6A4F;
  --success-bg:     #D8F3DC;
  --error:          #B91C1C;
  --error-bg:       #FEE2E2;
  --info-bg:        #F0F4FF;

  /* Spacing */
  --space-xs: .375rem;
  --space-sm: .75rem;
  --space-md: 1.25rem;
  --space-lg: 2rem;

  /* Shape */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;

  /* Shadow */
  --shadow-card: 0 2px 8px rgba(0,0,0,.05), 0 8px 32px rgba(0,0,0,.07);
  --shadow-btn:  0 2px 8px rgba(201,169,110,.25);

  /* Typography */
  --font:         'Noah', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-heading: 'TAN Aegean', Georgia, serif;
  --font-script:  'Buffalo', cursive;
  --text-xs:   .75rem;
  --text-sm:   .875rem;
  --text-base: 1rem;
  --text-lg:   1.125rem;
  --text-xl:   1.35rem;
  --text-2xl:  1.65rem;
}

/* ── Reset ────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ── Base ─────────────────────────────────────────────────── */
html {
  font-family: var(--font);
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* ── Typography ───────────────────────────────────────────── */
h1 { font-family: var(--font-heading); font-size: var(--text-2xl); font-weight: normal; letter-spacing: .04em; line-height: 1.2; color: var(--text); }
h2 { font-family: var(--font-heading); font-size: var(--text-xl);  font-weight: normal; letter-spacing: .03em; color: var(--text); }
h3 { font-family: var(--font-heading); font-size: var(--text-lg);  font-weight: normal; color: var(--text); }
p  { line-height: 1.6; }

.subtitle { font-size: var(--text-sm); color: var(--text-secondary); margin-top: .25rem; margin-bottom: var(--space-lg); line-height: 1.5; }
.text-muted  { color: var(--text-muted);     font-size: var(--text-sm); }
.text-center { text-align: center; }
.text-sm     { font-size: var(--text-sm); }
.text-xs     { font-size: var(--text-xs); }

/* ── Card / Panel ─────────────────────────────────────────── */
.panel {
  background: var(--white);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-card);
  padding: var(--space-lg) var(--space-md);
  width: 100%;
  max-width: 400px;
}
.panel-wide { max-width: 520px; }

/* ── Form ─────────────────────────────────────────────────── */
.form-group { margin-bottom: var(--space-md); }

label {
  display: block;
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text);
  margin-bottom: .4rem;
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="password"],
input[type="number"],
input[type="date"],
input[type="time"],
select,
textarea {
  width: 100%;
  padding: .7rem 1rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: var(--text-base);
  font-family: var(--font);
  color: var(--text);
  background: var(--white);
  transition: border-color .15s ease, box-shadow .15s ease;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}

input::placeholder, textarea::placeholder { color: var(--text-muted); }

input:focus, select:focus, textarea:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px var(--gold-glow);
}

.field-hint { font-size: var(--text-xs); color: var(--text-muted); margin-top: .3rem; }

/* ── Buttons ──────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  width: 100%;
  padding: .8rem 1.5rem;
  border: none;
  border-radius: var(--radius-sm);
  font-size: var(--text-base);
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  text-decoration: none;
  transition: background .15s ease, box-shadow .15s ease, transform .1s ease, opacity .15s ease;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}
.btn:active:not(:disabled) { transform: scale(.98); }
.btn:disabled { opacity: .55; cursor: not-allowed; }

.btn-primary { background: var(--gold); color: var(--text); box-shadow: var(--shadow-btn); }
.btn-primary:hover:not(:disabled) { background: var(--gold-dark); box-shadow: 0 4px 16px rgba(201,169,110,.35); }

.btn-secondary {
  background: transparent;
  color: var(--text-secondary);
  border: 1.5px solid var(--border);
  box-shadow: none;
  width: auto;
  padding: .55rem 1rem;
  font-size: var(--text-sm);
}
.btn-secondary:hover:not(:disabled) { border-color: #C4C4C4; background: #F5F5F5; }

.btn-danger { background: var(--error); color: #fff; box-shadow: 0 2px 8px rgba(185,28,28,.2); }
.btn-danger:hover:not(:disabled) { background: #991b1b; }

.btn-link {
  background: none; border: none;
  color: var(--gold-dark);
  font-size: var(--text-sm); font-weight: 500;
  cursor: pointer; font-family: var(--font);
  text-decoration: underline; text-underline-offset: 2px;
  width: auto; padding: 0;
}

/* ── Alert / Message ──────────────────────────────────────── */
.alert {
  display: none;
  padding: .75rem 1rem;
  border-radius: var(--radius-sm);
  font-size: var(--text-sm);
  line-height: 1.5;
  margin-top: var(--space-sm);
}
.alert.show    { display: block; }
.alert-success { background: var(--success-bg); color: var(--success); }
.alert-error   { background: var(--error-bg);   color: var(--error); }
.alert-info    { background: var(--info-bg);    color: #1d4ed8; }

/* ── Badge ────────────────────────────────────────────────── */
.badge {
  display: inline-block;
  padding: .2rem .65rem;
  border-radius: 99px;
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: .02em;
}
.badge-gold    { background: var(--gold-light); color: #92620A; }
.badge-success { background: var(--success-bg); color: var(--success); }
.badge-neutral { background: #F3F4F6;           color: var(--text-secondary); }
.badge-error   { background: var(--error-bg);   color: var(--error); }

/* ── Loading Spinner ──────────────────────────────────────── */
.spinner {
  width: 18px; height: 18px;
  border: 2.5px solid rgba(0,0,0,.15);
  border-top-color: var(--text);
  border-radius: 50%;
  animation: spin .65s linear infinite;
  display: inline-block; flex-shrink: 0;
}
.btn-primary .spinner { border-color: rgba(0,0,0,.2); border-top-color: var(--text); }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Divider ──────────────────────────────────────────────── */
.divider, .card-divider { border: none; border-top: 1px solid var(--border); margin: 1.25rem 0; }

/* ── Utilities ────────────────────────────────────────────── */
.hidden           { display: none !important; }
.mt-1             { margin-top: var(--space-xs); }
.mt-2             { margin-top: var(--space-sm); }
.mt-3             { margin-top: var(--space-md); }
.mb-1             { margin-bottom: var(--space-xs); }
.mb-2             { margin-bottom: var(--space-sm); }
.mb-3             { margin-bottom: var(--space-md); }
.w-full           { width: 100%; }
.flex             { display: flex; }
.items-center     { align-items: center; }
.justify-between  { justify-content: space-between; }
.gap-sm           { gap: var(--space-sm); }

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 390px) {
  :root { --text-2xl: 1.45rem; --text-xl: 1.2rem; }
  .panel { padding: 1.5rem 1rem; }
}
@media (min-width: 640px) {
  .btn { width: auto; min-width: 200px; }
  .btn.w-full { width: 100%; }
}
