/* 2026-10-02: re-issued (new file hash) so browsers drop a copy the external
   proxy delivered brotli-mangled -- see config/storage.py. */
/* Golf Club system — base stylesheet. Mobile-first; no build step (no Node
   toolchain — PLAN.md decision). Real visual design comes with each
   module's UI in later phases; this is just enough to prove the layout
   works and stays usable at phone width. */

:root {
  color-scheme: light;
  /* Sembawang Country Club colours, from the club logo (SCC_Logo.png).
     Text-bearing shades are the logo's own colours, deepened only where
     white text on them would otherwise fall below WCAG AA (4.5:1). */
  --gc-green: #005030;       /* logo: deep hill green (buttons, club name) */
  --gc-green-dark: #003a22;  /* hover / pressed */
  --gc-green-mid: #2f7a2a;   /* logo mid green, deepened for white text */
  --gc-fairway: #60b828;     /* logo fairway green (decoration only) */
  --gc-red: #d80030;         /* logo flag red */
  --gc-blue: #1f6fb0;        /* logo sky blue, deepened for white text */
  --gc-sky: #3890d0;         /* logo sky blue (decoration only) */
  --gc-navy: #302060;        /* logo wave navy/purple */
  --gc-bg: #f7f7f5;
  --gc-text: #1a1a1a;
  --gc-border: #d9d9d4;
}

* { box-sizing: border-box; }

/* Form controls don't inherit text colour, and a phone's own button
   styling (iOS Safari, notably in dark mode) can paint white text on the
   white backgrounds used here -- the Logout button rendered as a blank
   square (2026-09-25). Buttons with their own colour still override this. */
button, input, select, textarea { color: var(--gc-text); }

body {
  margin: 0;
  padding-inline: 16px;
  background: var(--gc-bg);
  color: var(--gc-text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.5;
}

header.gc-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-block: 10px;
  flex-wrap: nowrap;  /* one row at every width (PLAN-layout P-1) */
  /* the four wave colours at the base of the club crest */
  border-bottom: 4px solid transparent;
  border-image: linear-gradient(to right, var(--gc-fairway) 0 25%, var(--gc-red) 25% 50%, var(--gc-sky) 50% 75%, var(--gc-navy) 75% 100%) 1;
}

header.gc-header .gc-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  font-weight: 700;
  color: var(--gc-green-dark);
}

/* a long club name gives way to the controls on the right */
.gc-brand-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Club crest (static/img/scc-crest.png, from the club's SCC_Logo.png) */
.gc-brand-crest { height: 40px; width: auto; flex: none; }

form.gc-lang-switch select {
  font: inherit;
  padding: 4px 6px;
}

a.gc-brand { text-decoration: none; }

/* "Home" on every sub page (base.html header) — back to the portal. */
.gc-header-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

a.gc-home-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border: 1px solid var(--gc-border);
  border-radius: 999px;
  color: var(--gc-green-dark);
  text-decoration: none;
  white-space: nowrap;
}

a.gc-home-link:hover { border-color: var(--gc-green-dark); }

.gc-home-svg { width: 16px; height: 16px; }

.gc-header-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: none;
}

.gc-welcome {
  color: var(--gc-text);
  white-space: nowrap;
}

/* the language switcher: full names on a wide screen, short on a phone */
.gc-lang-short { display: none; }
.gc-lang-short select { width: 4.8em; }

@media (max-width: 599px) {
  .gc-welcome, .gc-lang-long { display: none; }
  .gc-lang-short { display: block; }
}

/* a small phone: Home is its icon, the crest stands for the club name */
@media (max-width: 400px) {
  .gc-home-text { display: none; }
  a.gc-home-link { padding: 6px 8px; }
  .gc-header-left:has(.gc-home-link) .gc-brand-name { display: none; }
}

form.gc-logout button {
  -webkit-appearance: none;
  appearance: none;
  font: inherit;
  white-space: nowrap;
  color: var(--gc-text);
  padding: 4px 10px;
  border: 1px solid var(--gc-border);
  border-radius: 4px;
  background: #fff;
  cursor: pointer;
}

form.gc-logout button:hover {
  background: var(--gc-bg);
}

main {
  padding-block: 20px;
  max-width: 100%;
}

/* One title size per level on every portal page (PLAN-layout §2.1). */
main h1 { font-size: 1.35rem; line-height: 1.25; margin: 0 0 12px; }
main h2 { font-size: 1.05rem; margin: 18px 0 8px; }
main h3 { font-size: 1rem; margin: 14px 0 6px; }

/* The way back to a page's parent: one link, top of the card, above the title. */
a.gc-back {
  display: inline-block;
  margin-bottom: 8px;
  color: var(--gc-green-dark);
  text-decoration: none;
  font-weight: 600;
}
a.gc-back:hover { text-decoration: underline; }

/* A group of related fields in a form. */
.gc-fieldset { border: 0; padding: 0; margin: 0 0 14px; min-width: 0; }
.gc-fieldset > legend { padding: 0; margin-bottom: 4px; font-weight: 700; font-size: 0.95rem; color: var(--gc-green-dark); }

/* A select and its Save on one line (Profile: two-factor method). */
.gc-inline-field p { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.gc-inline-field label { flex-basis: 100%; }
.gc-card .gc-inline-field select { flex: 1 1 12em; width: auto; }
.gc-helptext, .gc-card .helptext { display: block; color: #666; font-size: 0.85em; }

/* Country code + mobile number on one row */
.gc-phone-row { display: grid; grid-template-columns: minmax(0, 7em) minmax(0, 1fr); gap: 8px; max-width: 320px; }
.gc-phone-row p { margin-block: 8px; }
.gc-muted { color: #666; }

/* Recovery codes: two columns of monospace codes */
.gc-codes { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(2, max-content); gap: 6px 24px; }
.gc-codes code { font-size: 1.05em; }

/* Sign-in page: the language switcher under the card's links */
.gc-login-lang { display: flex; justify-content: center; margin-top: 14px; }
.gc-login-lang .gc-lang-long { display: block; }
.gc-login-lang .gc-lang-short { display: none; }

/* Stacked cards on one page keep apart. */
.gc-card + .gc-card { margin-top: 12px; }

.gc-card {
  background: #fff;
  border: 1px solid var(--gc-border);
  border-radius: 8px;
  padding: 16px;
  max-width: 640px;
}

.gc-error {
  color: #b3261e;
  font-weight: 600;
}

.gc-card form p {
  margin-block: 8px;
}

.gc-card input, .gc-card select {
  font: inherit;
  padding: 6px 8px;
  width: 100%;
  max-width: 320px;
}

/* Checkboxes/radios keep their natural size, beside their label (the rule
   above stretched them full width, stranding each box far from its name). */
.gc-card input[type="checkbox"], .gc-card input[type="radio"] {
  width: auto;
  padding: 0;
  margin: 0 6px 0 0;
}
.gc-card label:has(> input[type="checkbox"]), .gc-card label:has(> input[type="radio"]) {
  display: inline-flex;
  align-items: center;
  margin: 2px 14px 2px 0;
}

/* Buttons: primary (green) by default in a card, or .gc-btn anywhere;
   .gc-btn-secondary (white) and .gc-btn-danger (red) beside it. */
.gc-card button, .gc-btn {
  display: inline-block;
  font: inherit;
  background: var(--gc-green);
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 8px 16px;
  cursor: pointer;
  text-decoration: none;
}

.gc-card button:hover, .gc-btn:hover {
  background: var(--gc-green-dark);
}

.gc-list {
  list-style: none;
  padding: 0;
}

.gc-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  border-bottom: 1px solid var(--gc-border);
}

/* Booking grid — colours follow the current system's own legend
   (guide Screen 13), plus three states it didn't need to name because
   its grid only ever showed already-released days. */
.gc-banner, .gc-message-error {
  background: #fdecea;
  color: #7a1f14;
  padding: 10px 14px;
  border-radius: 6px;
  font-weight: 600;
}

/* Open dates across the top of a date's tee sheet: one row that scrolls
   sideways on a narrow phone rather than wrapping or squashing. */
.gc-date-strip {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  padding-bottom: 4px;
  margin-bottom: 12px;
}

.gc-date-chip {
  flex: 1 0 58px;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 6px 4px;
  border: 1px solid var(--gc-border);
  border-radius: 8px;
  background: #fff;
  color: var(--gc-text);
  text-decoration: none;
  line-height: 1.2;
  scroll-snap-align: start;
}

.gc-date-chip:hover {
  border-color: var(--gc-green-dark);
}

.gc-date-chip-day {
  font-size: 0.75em;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--gc-green-dark);
}

.gc-date-chip-date {
  font-size: 0.9em;
  font-weight: 700;
  white-space: nowrap;
}

/* Empty flights left that day: green while any remain, red at none —
   same colours as the open-dates cards. */
/* Empty flights split AM over PM, one small pill each. */
.gc-date-chip-split {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 2px;
  margin-top: 3px;
}

.gc-date-chip-empty {
  padding: 1px 6px;
  text-align: center;
  border-radius: 999px;
  background: var(--gc-green-mid);
  color: #fff;
  font-size: 0.7em;
  font-weight: 700;
  white-space: nowrap;
}

.gc-date-chip-empty-none {
  background: var(--gc-red);
}

.gc-date-chip-current .gc-date-chip-empty {
  box-shadow: 0 0 0 1px #fff;
}

.gc-date-chip-full {
  background: #f7f7f5;
  color: #999;
}

.gc-date-chip-full .gc-date-chip-day {
  color: var(--gc-red);
}

.gc-date-chip-current,
.gc-date-chip-current .gc-date-chip-day {
  background: var(--gc-green-dark);
  border-color: var(--gc-green-dark);
  color: #fff;
}

.gc-grid-scroll {
  overflow-x: auto;
  margin-block: 8px;
}

/* Fixed layout: a narrow Time column, and every nine's column the same
   width regardless of what's in it (balls, names, nothing). */
.gc-tee-grid {
  border-collapse: collapse;
  width: 100%;
  min-width: 320px;
  table-layout: fixed;
}

.gc-tee-grid col.gc-col-time { width: 5.6em; }

.gc-tee-grid th, .gc-tee-grid td {
  border: 1px solid var(--gc-border);
  padding: 6px 10px;
  text-align: center;
  white-space: nowrap;
}

.gc-tee-grid th {
  background: #f0f0ec;
}

.gc-cell-none {
  background: transparent;
  border: none;
}

.gc-cell-available        { background: #1e88e5; }  /* bright blue — empty, book it */
.gc-cell-my_reservation   { background: #8fd18f; }  /* deeper green — mine, vs light green joinable */
.gc-cell-participating    { background: #fff3b0; }  /* yellow */
.gc-cell-in_use           { background: #ffd6a5; }  /* orange */
.gc-cell-selected         { background: #b0c4ff; }  /* blue-violet */
.gc-cell-secondary_booker { background: #c9ecc9; }  /* light green — room left to join */
.gc-cell-booked           { background: #d9d9d4; color: #666; }
.gc-cell-reserved         { background: #f4a3a3; }
.gc-cell-not_yet_open     { background: #f7f7f5; color: #999; }
.gc-cell-passed           { background: #eeeeea; color: #aaa; }

/* Clickable cells (empty, or with room to join): the whole cell is the
   link, via an overlay, so it stays tappable however little it shows. */
.gc-cell { position: relative; }

.gc-cell-link {
  position: absolute;
  inset: 0;
}

.gc-cell-clickable { cursor: pointer; }
.gc-cell-clickable:hover { filter: brightness(0.93); }

.gc-cell-balls {
  display: inline-flex;
  gap: 3px;
  vertical-align: middle;
}

.gc-ball { display: inline-flex; }

.gc-ball-svg {
  width: 15px;
  height: 15px;
}

/* A flight the viewer is in lists every player — let it wrap. */
/* Phones: both nines should fit without sideways scrolling. */
@media (max-width: 480px) {
  .gc-card:has(.gc-tee-grid) { padding: 10px; }
  .gc-tee-grid { min-width: 0; }
  .gc-tee-grid th, .gc-tee-grid td { padding: 5px 4px; }
  .gc-cell-balls { gap: 1px; }
}

.gc-cell-names {
  list-style: none;
  margin: 0;
  padding: 0;
  white-space: normal;
  font-size: 0.8em;
  line-height: 1.3;
}

.gc-flight-players {
  list-style: none;
  padding: 0;
  margin: 0;
}

.gc-flight-players li {
  display: flex;
  align-items: center;
  gap: 6px;
  padding-block: 2px;
}

.gc-messages {
  list-style: none;
  padding: 0;
  margin: 0 0 12px;
}

.gc-message {
  padding: 10px 14px;
  border-radius: 6px;
  font-weight: 600;
  margin-bottom: 6px;
}

.gc-message-success { background: #e3f4e6; color: var(--gc-green); }

.gc-countdown {
  font-weight: 600;
  margin-block: 8px;
}

.gc-countdown-time {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 1.2em;
  color: var(--gc-green-dark);
}

.gc-countdown-low .gc-countdown-time { color: var(--gc-red); }

.gc-flight-errors {
  margin: 8px 0;
  padding-left: 30px;
}

.gc-flight-roster {
  list-style: none;
  padding: 0;
  margin: 0;
}

.gc-flight-roster li {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  border-bottom: 1px solid var(--gc-border);
}

.gc-roster-name {
  flex: 1;
  min-width: 0;
  overflow-wrap: anywhere;
}

.gc-roster-name small {
  display: block;
  color: #666;
}

/* the roster's small × (a danger button, compact) */
.gc-card button.gc-btn-remove {
  background: var(--gc-red);
  padding: 2px 10px;
  font-size: 1.1em;
  line-height: 1.4;
}

.gc-card button.gc-btn-secondary, .gc-btn-secondary {
  background: #fff;
  color: var(--gc-text);
  border: 1px solid var(--gc-border);
}

.gc-card button.gc-btn-secondary:hover, .gc-btn-secondary:hover { background: var(--gc-bg); }

.gc-card button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.gc-add-row {
  display: flex;
  gap: 6px;
  margin-block: 6px;
}

.gc-card .gc-add-row input,
.gc-card .gc-add-row select {
  flex: 1;
  min-width: 0;
  max-width: none;
}

.gc-choice-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}

/* Add-players type-ahead: capped so a long list never pushes Book off a phone screen. */
.gc-suggest {
  max-height: 40vh;
  overflow-y: auto;
}

.gc-suggest .gc-flight-actions { align-items: center; flex-wrap: wrap; }

.gc-card button.gc-btn-danger, .gc-btn-danger { background: var(--gc-red); color: #fff; }
.gc-card button.gc-btn-danger:hover, .gc-btn-danger:hover { background: #a02f3c; }

.gc-flight-actions {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-top: 16px;
}

.gc-flight-note {
  margin-block: 4px;
  color: #666;
  font-style: italic;
}

.gc-legend {
  list-style: none;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.gc-legend li {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.9em;
}

.gc-swatch {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 1px solid var(--gc-border);
  border-radius: 3px;
}

/* Which deployment answered this request — dev vs uat can otherwise look
   identical, and have been mixed up more than once (an external proxy
   silently forwarding to the wrong one, a stale not-yet-restarted
   process, ...). Fixed corner, low-contrast until hovered, never covers
   interactive content. */
.gc-env-badge {
  position: fixed;
  right: 8px;
  bottom: 8px;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 0.75em;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  opacity: 0.55;
  pointer-events: none;
  z-index: 1000;
}

.gc-env-badge:hover {
  opacity: 1;
}

.gc-env-dev {
  background: #fde68a;
  color: #7c4a03;
}

.gc-env-uat {
  background: #bbf7d0;
  color: #14532d;
}

.gc-readonly-fields {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 4px 12px;
  margin-block: 12px;
}

.gc-readonly-fields dt {
  color: #666;
}

.gc-readonly-fields dd {
  margin: 0;
}

/* Login page — matches the legacy member portal's layout (see
   Resources/Screenshots/Member's Portal/Login Screen.png): full-bleed
   backdrop, one centered card, placeholder-only fields, no header. */
.gc-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

body.gc-login-body {
  padding-inline: 0;
  margin: 0;
}

main.gc-login-main {
  padding-block: 0;
}

.gc-login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  background:
    linear-gradient(to bottom, rgba(0, 80, 48, 0.12), rgba(0, 80, 48, 0.5)),
    linear-gradient(160deg, #cfe6f7 0%, var(--gc-sky) 32%, var(--gc-fairway) 58%, var(--gc-green) 100%);
}

.gc-login-card {
  width: 100%;
  max-width: 360px;
  background: #fff;
  border-radius: 10px;
  padding: 28px 24px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.gc-login-brand {
  text-align: center;
  margin-bottom: 20px;
}

.gc-login-logo {
  display: block;
  width: 100%;
  max-width: 300px;
  height: auto;
  margin: 0 auto;
}

.gc-login-field {
  margin-bottom: 14px;
}

input.gc-login-input {
  font: inherit;
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--gc-border);
  border-radius: 6px;
  background: #fff;
}

input.gc-login-input:focus {
  outline: 2px solid var(--gc-green);
  outline-offset: 1px;
}

.gc-login-forgot {
  text-align: right;
  margin: 0 0 16px;
  font-size: 0.9em;
}

.gc-login-forgot a {
  color: var(--gc-green-dark);
}

button.gc-login-submit {
  font: inherit;
  width: 100%;
  background: var(--gc-green);
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 12px;
  font-weight: 600;
  cursor: pointer;
}

button.gc-login-submit:hover {
  background: var(--gc-green-dark);
}

.gc-login-register {
  text-align: center;
  margin: 18px 0 0;
  font-size: 0.9em;
  color: #555;
}

/* Home / member dashboard — matches the legacy portal's tile layout (see
   Resources/Screenshots/Member's Portal/02-Homepage01.png): a title bar,
   a row of coloured icon tiles, then an announcements panel. */
.gc-portal-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: #f0f0ec;
  border: 1px solid var(--gc-border);
  border-radius: 6px;
  padding: 10px 16px;
  margin-bottom: 16px;
}

.gc-portal-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  color: var(--gc-text);
}

/* the member's name and number, beside / under the title */
.gc-portal-who {
  display: block;
  font-weight: 400;
  font-size: 0.9rem;
  color: #444;
}

.gc-portal-clock {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  color: #555;
  white-space: nowrap;
}

/* Grid, not flex-wrap: every tile shares equal, shrinkable width, so the
   row(s) always exactly fill the screen's width — never a fixed 108px
   tile overflowing a narrow phone, never a ragged leftover gap. */
.gc-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(88px, 1fr));
  gap: 6px;
  margin-bottom: 20px;
}

.gc-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  height: 68px;
  border-radius: 8px;
  color: #fff;
  text-decoration: none;
  text-align: center;
  padding: 4px 2px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
  transition: transform 0.1s ease, box-shadow 0.1s ease;
}

a.gc-tile:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

/* the section the page belongs to */
.gc-tile-current,
a.gc-tile-current:hover { box-shadow: inset 0 0 0 2px #fff, 0 0 0 2px var(--gc-text); }

/* Below home on a phone: one row of the tiles that open something, so the
   page itself starts near the top (PLAN-layout P-2); staff's extra tiles
   scroll sideways. Home keeps the full grid at every width. */
@media (max-width: 599px) {
  .gc-tiles-compact {
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: minmax(64px, 1fr);
    overflow-x: auto;
    padding: 3px;  /* room for the current tile's ring */
    margin: 0 -3px 12px;
  }
  .gc-tiles-compact .gc-tile-disabled { display: none; }
  .gc-tiles-compact .gc-tile { height: 50px; gap: 2px; }
  .gc-tiles-compact .gc-tile-icon { width: 16px; height: 16px; }
  .gc-tiles-compact .gc-tile-label { font-size: 0.74em; }
}

.gc-tile-disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.gc-tile-icon {
  width: 20px;
  height: 20px;
}

.gc-tile-svg {
  width: 100%;
  height: 100%;
}

.gc-tile-label {
  font-size: 0.86em;
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.1;
  max-width: 100%;
  overflow-wrap: anywhere; /* last resort: never spill out of a narrow tile */
}

/* Home: a titled panel (games, announcements) */
.gc-section,
.gc-announcements {
  border: 1px solid var(--gc-border);
  border-radius: 6px;
  overflow: hidden;
  max-width: 900px;
}

main h2.gc-section-header { margin: 0; font-size: 1rem; }

.gc-section-header {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--gc-navy);
  color: #fff;
  padding: 10px 16px;
  font-weight: 600;
}

.gc-section-count {
  background: rgba(255, 255, 255, 0.25);
  border-radius: 999px;
  padding: 1px 9px;
  font-size: 0.85em;
}

.gc-announcements-list {
  list-style: none;
  margin: 0;
  padding: 12px 16px;
  background: #fff;
}

.gc-announcements-list li {
  padding: 6px 0;
  border-bottom: 1px solid var(--gc-border);
}

.gc-announcements-list li:last-child {
  border-bottom: none;
}

/* Home page: today's game (opens the eScorecard) and upcoming games
   (open the flight page). Names wrap freely — no fixed widths — so a
   four-player flight still fits a 320px phone. */
.gc-games {
  display: grid;
  gap: 12px;
  max-width: 900px;
  margin-bottom: 16px;
}

.gc-game-today {
  display: grid;
  gap: 2px;
  padding: 14px 16px;
  border-radius: 6px;
  background: var(--gc-green);
  color: #fff;
  text-decoration: none;
}

.gc-game-today:hover,
.gc-game-today:focus-visible { background: var(--gc-green-dark); }

.gc-game-today-label {
  font-size: 0.8em;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: rgba(255, 255, 255, 0.85);
}

.gc-game-today .gc-game-when { font-size: 1.25em; font-weight: 700; }

.gc-game-players { overflow-wrap: anywhere; }

.gc-game-action { margin-top: 6px; font-weight: 600; }

/* Scorecard state badge on a home-page game: In progress / Completed / Washed out. */
.gc-game-state {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 8px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: none;
  white-space: nowrap;
  vertical-align: middle;
}

.gc-game-state-in-progress { background: #fff4d6; color: #7a5200; }
.gc-game-state-completed { background: #dff3e6; color: var(--gc-green); }
.gc-game-state-washed-out { background: #e3e8f0; color: #33415c; }

.gc-games-list {
  list-style: none;
  margin: 0;
  padding: 0;
  background: #fff;
}

.gc-games-list li + li { border-top: 1px solid var(--gc-border); }

.gc-games-list .gc-games-more { padding: 8px 16px; text-align: center; }

.gc-games-list .gc-games-more button {
  -webkit-appearance: none;
  appearance: none;
  font: inherit;
  font-weight: 600;
  color: var(--gc-green-dark);
  background: none;
  border: 0;
  padding: 6px 12px;
  cursor: pointer;
}

.gc-games-list .gc-games-more button:hover { text-decoration: underline; }

.gc-games-list a {
  display: grid;
  gap: 2px;
  padding: 10px 16px;
  color: inherit;
  text-decoration: none;
}

.gc-games-list a:hover,
.gc-games-list a:focus-visible { background: #f0f0ec; }

.gc-games-list .gc-game-when { font-weight: 600; }

.gc-games-list .gc-game-players { color: #555; font-size: 0.9em; }

/* A finished game's result: strokes per player, or holes completed */
.gc-game-result { font-size: 0.9em; overflow-wrap: anywhere; }
.gc-games-list .gc-game-result { color: #333; }

/* Booking landing page (Resources/Screenshots/Member's Portal/07-Booking01.png,
   with a change: an overview of open dates + flight-availability counts,
   rather than jumping straight into one date's tee sheet). */
.gc-booking-toolbar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  margin-block: 16px;
}

.gc-refresh-btn {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--gc-green);
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 8px 14px;
  font-weight: 700;
  text-decoration: none;
}

.gc-refresh-btn:hover {
  background: var(--gc-green-dark);
}

.gc-refresh-icon {
  display: inline-block;
  width: 18px;
  height: 18px;
}

.gc-digital-clock {
  justify-self: center;
  background: #14231b;
  color: #6dffb0;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-variant-numeric: tabular-nums;
  font-size: 1.05em;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 7px 16px;
  border-radius: 6px;
}

.gc-dates-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(184px, 1fr));
  gap: 11px;
  margin-block: 16px;
}

.gc-date-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: #fff;
  border: 1px solid var(--gc-border);
  border-radius: 10px;
  padding: 11px 13px;
  text-decoration: none;
  color: var(--gc-text);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  transition: transform 0.1s ease, box-shadow 0.1s ease;
}

.gc-date-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.12);
}

.gc-date-card-head {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.gc-date-card-day {
  font-weight: 700;
  color: var(--gc-green-dark);
  text-transform: uppercase;
  font-size: 0.85em;
}

.gc-date-card-date {
  font-weight: 700;
  font-size: 0.95em;
}

.gc-flight-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
}

.gc-flight-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  border-radius: 7px;
  padding: 8px 4px;
  color: #fff;
}

/* AM over PM under each label — kept small so the card stays compact. */
.gc-flight-stat-split {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  font-size: 0.85em;
  line-height: 1.15;
}

.gc-flight-stat-half {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  min-width: 4em;
  white-space: nowrap;
}
.gc-flight-stat-half small { font-size: 0.8em; font-weight: 600; opacity: 0.85; }
.gc-flight-stat-half b { font-weight: 800; }

.gc-flight-stat-label {
  font-size: 0.7em;
  line-height: 1.25;
  font-weight: 600;
  text-align: center;
  letter-spacing: 0.01em;
}

/* Green = nobody's booked yet, amber = someone has but there's still
   room to join — the colour alone tells the two apart, no legend needed. */
.gc-flight-stat-empty    { background: var(--gc-green-mid); }
.gc-flight-stat-not-full { background: #d98a2f; }

.gc-flight-stat-zero {
  background: #e9e9e4;
  color: #999;
}

/* No empty flights left that day — red, not grey, so it stands out. */
.gc-flight-stat-empty.gc-flight-stat-zero {
  background: var(--gc-red);
  color: #fff;
}

.gc-date-card-cta {
  align-self: flex-end;
  font-weight: 700;
  color: var(--gc-green-dark);
  font-size: 0.8em;
}

.gc-date-card-full {
  background: #f7f7f5;
}

.gc-date-card-full-msg {
  margin: 0;
  color: #888;
  font-style: italic;
}

.gc-dates-empty {
  text-align: center;
  color: #666;
}

/* Tee sheet: balloon with a booked flight's players (booking/grid.html) */
.gc-balloon {
  position: fixed;
  z-index: 50;
  max-width: min(260px, calc(100vw - 16px));
  padding: 8px 12px;
  border-radius: 10px;
  background: var(--gc-navy);
  color: #fff;
  font-size: 0.85rem;
  line-height: 1.4;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
  pointer-events: none;
}
.gc-balloon[hidden] { display: none; }
.gc-balloon ul { margin: 4px 0 0; padding: 0; list-style: none; }
.gc-balloon strong { font-size: 0.8rem; opacity: 0.85; }
/* the pointer: under the balloon, or on top when it opens below the cell */
.gc-balloon::after {
  content: "";
  position: absolute;
  left: var(--gc-balloon-tip, 50%);
  top: 100%;
  margin-left: -7px;
  border: 7px solid transparent;
  border-top-color: var(--gc-navy);
}
.gc-balloon-below::after { top: auto; bottom: 100%; border-top-color: transparent; border-bottom-color: var(--gc-navy); }
