/*
 * Design tokens — the PADUM design system (padum_booking/css/tokens.css),
 * trimmed to what PaCode Forms uses. PaCode's logo is built from the same
 * palette: navy #244D78, coral #D2564E, sun #FAC669.
 *
 * Colour roles, kept from the source so the meaning travels with the hue:
 *   brand   navigation, headings, primary buttons
 *   accent  the CI yellow — a FILL with dark text only, never white text
 *   danger  coral: a person has to do something (destructive, blocking)
 *   success "done and needs nothing from you"
 */

:root {
  --brand:        #244D78;
  --brand-dark:   #1A3A5C;
  --brand-mid:    #346B8F;
  --brand-soft:   #539DB8;
  --brand-pale:   #95D1EB;
  --brand-wash:   #E8F2F8;

  --accent:       #FAC669;
  --accent-wash:  #FEF4E0;
  --accent-ink:   #7A4E06;

  --danger:       #D2564E;
  --danger-wash:  #FBEDEC;
  --danger-ink:   #96322B;

  --warn:         #B45309;
  --warn-wash:    #FEF3C7;

  --success:      #1F8A5F;
  --success-wash: #E4F5EE;
  --success-ink:  #15613F;

  /* LINE's own login green, used only on the "Continue with LINE" button. */
  --line-green:   #06C755;

  --bg:           #F6F6F6;
  --surface:      #FFFFFF;
  --surface-alt:  #EEF1F5;
  --border:       #DDE2E8;
  --border-strong:#C3CCD6;
  --text:         #1B2733;
  --text-muted:   #5C6577;
  --text-faint:   #8A94A3;

  --font-head: 'Barlow Condensed', 'IBM Plex Sans Thai', 'Arial Narrow', sans-serif;
  --font-body: 'IBM Plex Sans', 'IBM Plex Sans Thai', system-ui, -apple-system, sans-serif;

  --fs-page:  1.8rem;
  --fs-head:  1.25rem;
  --fs-sub:   1rem;
  --fs-body:  .9375rem;
  --fs-meta:  .8125rem;
  --fs-micro: .6875rem;

  --radius:      8px;
  --radius-lg:   14px;
  --radius-pill: 999px;
  --shadow:      0 1px 2px rgba(27, 39, 51, .06), 0 1px 3px rgba(27, 39, 51, .10);
  --shadow-lg:   0 8px 28px rgba(27, 39, 51, .16);

  --topbar-h: 56px;
}

*, *::before, *::after { box-sizing: border-box; }

/* An explicit `display` beats the UA's `[hidden] { display: none }`; this
   restores `hidden` as a reliable switch. */
[hidden] { display: none !important; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-text-size-adjust: 100%;
}

h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: .015em;
  margin: 0 0 .4em;
}
h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.15rem; }

a { color: var(--brand); }

.pill {
  display: inline-flex;
  align-items: center;
  gap: .35em;
  padding: .18em .7em;
  border-radius: var(--radius-pill);
  font-size: var(--fs-meta);
  font-weight: 600;
  line-height: 1.5;
  white-space: nowrap;
}
.pill--brand   { background: var(--brand-wash);   color: var(--brand-dark); }
.pill--accent  { background: var(--accent-wash);  color: var(--accent-ink); }
.pill--danger  { background: var(--danger-wash);  color: var(--danger-ink); }
.pill--warn    { background: var(--warn-wash);    color: var(--warn); }
.pill--success { background: var(--success-wash); color: var(--success-ink); }
.pill--muted   { background: var(--surface-alt);  color: var(--text-muted); }

.btn {
  font: inherit;
  font-size: var(--fs-body);
  font-weight: 600;
  padding: .6rem 1.1rem;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .45rem;
  text-decoration: none;
  line-height: 1.2;
}
.btn--primary { background: var(--brand); color: #fff; }
.btn--primary:hover { background: var(--brand-dark); }
.btn--ghost {
  background: var(--surface);
  color: var(--brand);
  border-color: var(--border-strong);
}
.btn--ghost:hover { background: var(--brand-wash); }
.btn--danger { background: var(--danger); color: #fff; }
.btn--danger:hover { background: var(--danger-ink); }
.btn--danger-ghost { background: var(--surface); color: var(--danger-ink); border-color: var(--danger-tint, #F8CFCB); }
.btn--danger-ghost:hover { background: var(--danger-wash); }
.btn--sm { min-height: 36px; padding: .35rem .8rem; font-size: var(--fs-meta); }
.btn--link {
  background: none;
  border: 0;
  color: var(--brand);
  padding: .25rem .2rem;
  min-height: 32px;
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.btn:disabled, .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; }
.btn:focus-visible {
  outline: 3px solid var(--brand-soft);
  outline-offset: 2px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
}
