/* Friends Golf Academy — lesson booking UI prototype (shared tokens + components)
   Direction: Mindbody's calm, practical booking UI, carried in Friends Golf's own colours
   (logo black, white, and the site's lime used only to mark "booked / now"). */

:root {
  --ink: #231f20;          /* Friends Golf logo black */
  --ink-2: #57524f;
  --ink-3: #8b8683;
  --line: #e3e3dd;
  --line-2: #d2d2ca;
  --paper: #ffffff;
  --mist: #f3f4f0;
  --fairway: #1e5e44;      /* primary action */
  --fairway-hover: #174b36;
  --fairway-soft: #e2efe7;
  --lime: #d8ec51;         /* friendsgolf.sg accent */
  --lime-soft: #f4f8d6;
  --work: #eef2e3;         /* coach working hours on the calendar */

  --hold: #8a5a00;      --hold-bg: #fdf0d2;
  --activate: #1e5e44;  --activate-bg: #e2efe7;
  --complete: #384659;  --complete-bg: #e7ebf1;
  --expired: #8f3a2b;   --expired-bg: #f6e4df;  --expired-dot: #d0402b;
  --refund: #5a3d8a;    --refund-bg: #ece5f6;
  --cancel: #67625f;    --cancel-bg: #ecebe8;
  --reopen: #c2410c;
  --alert-red: #c7362b;
  --alert-yellow: #b98900;

  --t-private: #1e5e44;  --t-private-bg: #e2efe7;
  --t-junior: #23629c;   --t-junior-bg: #e1ecf8;
  --t-group: #6a3f97;    --t-group-bg: #eee6f7;
  --t-trial: #4d5a00;    --t-trial-bg: #eef6c0;

  --r-sheet: 22px;
  --r-card: 14px;
  --r-ctl: 10px;
  --shadow-lift: 0 1px 2px rgba(35, 31, 32, .06), 0 8px 24px rgba(35, 31, 32, .07);

  /* Latin fallbacks before Korean ones: Korean system fonts set Latin punctuation wide */
  --font: "Schibsted Grotesk", "Segoe UI", Roboto, "Helvetica Neue", Arial, "Pretendard Variable", Pretendard, sans-serif;
  /* type scale (pt-style ladder): 12 13 15 17 21 28 36 */
  --fs-xs: 12px; --fs-sm: 13px; --fs-md: 15px; --fs-lg: 17px; --fs-xl: 21px; --fs-2xl: 28px; --fs-3xl: 36px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: var(--fs-md);
  line-height: 1.45;
  color: var(--ink);
  background: var(--mist);
}
/* no tabular figures: in Schibsted Grotesk tnum also widens , . : — right-align number columns instead */
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--fairway); }
:focus-visible { outline: 3px solid var(--lime); outline-offset: 2px; border-radius: 6px; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 18px; border-radius: 999px; border: 1px solid transparent;
  font-weight: 600; font-size: var(--fs-md); cursor: pointer; text-decoration: none; white-space: nowrap;
}
.btn-primary { background: var(--fairway); color: #fff; }
.btn-primary:hover { background: var(--fairway-hover); }
.btn-quiet { background: var(--paper); border-color: var(--line-2); color: var(--ink); }
.btn-quiet:hover { border-color: var(--ink-3); }
.btn-ghost { background: transparent; color: var(--fairway); padding: 0 6px; }
.btn-danger { background: var(--paper); border-color: #e6c3bd; color: var(--expired); }
.btn-block { width: 100%; }
.btn-sm { min-height: 34px; padding: 0 12px; font-size: var(--fs-sm); }
.btn[disabled] { opacity: .45; cursor: not-allowed; }

/* ---------- status chips ---------- */
.chip {
  display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px;
  border-radius: 999px; font-size: var(--fs-xs); font-weight: 600; white-space: nowrap;
}
.chip::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.st-Hold { color: var(--hold); background: var(--hold-bg); }
.st-Activate { color: var(--activate); background: var(--activate-bg); }
.st-Complete { color: var(--complete); background: var(--complete-bg); }
.st-Expired { color: var(--expired); background: var(--expired-bg); }
.st-Refund { color: var(--refund); background: var(--refund-bg); }
.st-Cancel { color: var(--cancel); background: var(--cancel-bg); }
.tag-reopen {
  display: inline-flex; align-items: center; height: 20px; padding: 0 7px; border-radius: 6px;
  border: 1.5px solid var(--reopen); color: var(--reopen); font-size: 11px; font-weight: 700;
}

/* ---------- scorecard: one dot per lesson ----------
   filled ink = attended, ink with slash = no-show (still counts), lime = booked,
   empty ring = still to book, orange ring = reopened lesson */
.scorecard { display: grid; grid-template-columns: repeat(10, 1fr); gap: 6px; max-width: 300px; }
.scorecard.compact { gap: 3px; max-width: 150px; }
.dot {
  aspect-ratio: 1; border-radius: 50%; border: 1.5px solid var(--line-2); background: var(--paper);
  display: grid; place-items: center; font-size: 9px; font-weight: 700; color: var(--ink-3); position: relative;
}
.dot.done { background: var(--ink); border-color: var(--ink); color: #fff; }
.dot.noshow { background: var(--ink); border-color: var(--ink); color: #fff; }
.dot.noshow::after {
  content: ""; position: absolute; inset: 45% 12%; height: 1.5px; background: var(--lime); transform: rotate(-45deg);
}
.dot.booked { background: var(--lime); border-color: #b9cc2f; color: var(--ink); }
.dot.expired { background: var(--expired-bg); border-color: var(--expired-dot); border-width: 2px; }
.dot.reopen { border-color: var(--reopen); border-width: 2px; color: var(--reopen); }
.dot.reopen.booked { background: var(--lime); }
.scorecard.compact .dot { font-size: 0; border-width: 1px; }

.legend { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: var(--fs-xs); color: var(--ink-2); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend .dot { width: 12px; }

/* ---------- forms ---------- */
.field { display: grid; gap: 6px; align-content: start; }   /* a field next to a taller one (with a hint) keeps its input at the top, same size */
.field label { font-size: var(--fs-sm); font-weight: 600; color: var(--ink-2); }
.field .hint { font-size: var(--fs-xs); color: var(--ink-3); }
.input, .select, .textarea {
  width: 100%; min-height: 44px; padding: 10px 12px; border-radius: var(--r-ctl);
  border: 1px solid var(--line-2); background: var(--paper);
}
.textarea { min-height: 84px; resize: vertical; }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--fairway); box-shadow: 0 0 0 3px var(--fairway-soft); }
.req { color: var(--expired); }

.avatar {
  width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; flex: none;
  background: var(--fairway-soft); color: var(--fairway); font-weight: 700; font-size: var(--fs-sm);
}
.avatar.lg { width: 56px; height: 56px; font-size: var(--fs-lg); }
.muted { color: var(--ink-2); }
.faint { color: var(--ink-3); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
