/* ======================================================
   1. Base / Reset
====================================================== */

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

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    Roboto, Helvetica, Arial, sans-serif;
  background: #eef1f5;
  color: #111;
}

h1, h2, h3 {
  margin: 0 0 12px 0;
  font-weight: 600;
}

p {
  margin: 0 0 8px 0;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

/* ======================================================
   2. App Layout
====================================================== */

.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 12px;
}

.card {
  background: #fff;
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 12px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.06);
}

.row {
  display: flex;
  gap: 12px;
}

.row.gap {
  gap: 16px;
}

.actions {
  display: flex;
  width: 100%;                 /* 👈 critical */
  justify-content: flex-end;   /* 👈 push contents right */
  gap: 12px;
  margin-top: 12px;
  align-items: center;
}



/* ======================================================
   3. Header
====================================================== */
/* =========================
   New Game header (title + jump link)
========================= */

.newGameHeader {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

/* Jump link styling */
.jumpToGames {
  display: none;              /* hidden on desktop */
  font-size: 0.9rem;
  font-weight: 600;
  color: #4f46e5;
  text-decoration: none;
  white-space: nowrap;
}

.jumpToGames:hover {
  text-decoration: underline;
}

/* Mobile only */
@media (max-width: 640px) {
  .jumpToGames {
    display: inline-block;
  }
}

.appHeader {
  display: flex;
  /*justify-content: space-between;*/
  align-items: center;
  padding: 10px 14px;
  background: #fff;
  border-bottom: 1px solid #ddd;
}

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
}

.brandIcon {
  font-size: 20px;
}

.headerActions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.headerCrest {
  height: 36px;
}

/* ======================================================
   4. Forms (Mobile-first)
====================================================== */

.formGrid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.formField {
  display: flex;
  flex-direction: column;
}

.formField label {
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 4px;
}

input[type="text"],
input[type="password"],
input[type="file"],
select {
  padding: 8px 10px;
  font-size: 14px;
  border-radius: 10px;
  border: 1px solid #d1d5db;
  background: #fff;
}

/*
input:focus,
select:focus {
  outline: none;
  border-color: #4f46e5;
}
*/
.field-error {
  color: #b91c1c;
  font-size: 13px;
  margin-top: 4px;
}

.muted {
  color: #555;
  font-size: 14px;
}

@media (max-width: 640px) {

  /* Player row: simplify grid for mobile */
  .game-page .playerRow {
    grid-template-columns: 32px 1fr;
    grid-template-areas:
      "jersey name"
      ". goals"
      ". points";
    row-gap: 8px;
  }

  .game-page .jersey {
    grid-area: jersey;
  }

  .game-page .playerName {
    grid-area: name;
  }

  .game-page .playerStat:nth-of-type(1) {
    grid-area: goals;
  }

  .game-page .playerStat:nth-of-type(2) {
    grid-area: points;
  }
}


/* ======================================================
   Start Game Action Bar (FINAL)
====================================================== */

.startGameActions {
  display: flex;
  align-items: center;
  /*justify-content: flex-end;   /* 👈 everything to the right */
  gap: 12px;
}

.pinWrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pinIcon {
  flex: 0 0 auto;
}

.pinInput {
  width: 96px;
  min-width: 96px;
  text-align: center;
  letter-spacing: 4px;
  font-weight: 600;
}

.startGameBtn {
  flex: 0 0 auto;
  white-space: nowrap;
}


@media (max-width: 640px) {

  .startGameActions {
    flex-direction: column;
    align-items: stretch;
  }

  .pinWrap {
    width: 100%;
  }

  .pinInput {
    width: 100%;
    min-width: 0;
  }

  .startGameBtn {
    width: 100%;
  }
}


/* ======================================================
   5. Radio Group (FIXED & STABLE)
====================================================== */

.radioGroup {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
}

.radioOption {
  display: flex;
  align-items: center;
  gap: 12px;

  padding: 12px;
  border-radius: 10px;
  background: #f6f7f9;
}

.radioOption input[type="radio"] {
  margin: 0;
  transform: scale(1.1);
}

.radioOption span {
  line-height: 1.4;
}

/* ======================================================
   6. Team Sheet Upload Help var(--accent, var(--club-primary) #c7d2fe
====================================================== */

.teamsheetHelp {
  background: #f8fafc;
  border-left: 4px solid var(--club-primary);
  padding: 10px 12px;
  border-radius: 8px;
  margin-top: 10px;
  font-size: 14px;
}

.teamsheetHelp code {
  display: inline-block;
  background: #e5e7eb;
  padding: 2px 6px;
  border-radius: 6px;
  margin-top: 4px;
}

/* ======================================================
   7. Buttons
====================================================== */

.btn {
  padding: 10px 14px;
  border-radius: 10px;
  border: none;
  font-size: 15px;
  cursor: pointer;
}

.btn.primary {
  background: #4f46e5;
  color: #fff;
}

.btn.outline {
  background: transparent;
  border: 1px solid #c7d2fe;
}

.btn.danger {
  background: #dc2626;
  color: #fff;
}

button.small {
  padding: 6px 10px;
}

/* ======================================================
   8. Teamsheet Creation Page
====================================================== */

.sheet .row {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
}

.sheet select {
  width: 64px;
}

.sheet input {
  flex: 1;
}

/* ======================================================
   9. Stats / Game UI (kept minimal & safe)
====================================================== */

.statList {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.statCheck {
  display: flex;
  align-items: center;
  gap: 8px;
}

.games-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.game-row {
  background: #f6f7f9;
  padding: 10px;
  border-radius: 10px;
}

.game-badge {
  font-size: 12px;
  padding: 2px 6px;
  border-radius: 6px;
}

.statRow .btn,
.statBtn {
  width: 36px;
  height: 36px;
}

.statBtn {
  display: flex;
  align-items: center;
  justify-content: center;

  line-height: 1;
  padding: 0;
}

.game-badge.live {
  background: #dc2626;
  color: #fff;
}

.game-badge.ft {
  background: #6b7280;
  color: #fff;
}

/* Ensure +/- icons are perfectly centred on iOS */
.statRow .btn,
.controls .btn {
  display: flex;
  align-items: center;
  justify-content: center;

  line-height: 1;
  padding: 0;

  font-size: 1.2rem;
  font-weight: 600;
}


/* ======================================================
   10. Mobile-first → Desktop Enhancements
====================================================== */

@media (min-width: 641px) {
  .startGameActions {
    /*margin-left: auto;    /*👈 pushes the whole block to the right */
  }
}



@media (min-width: 768px) {

  .container {
    padding: 20px;
  }

  .formGrid {
    grid-template-columns: repeat(2, 1fr);
  }

  .row {
    align-items: flex-start;
  }

  .actions {
    /*justify-content: space-between;*/
  }
}


/* ---- FORCE consistent "nice" inputs (index.html + all forms) ---- */
/* Nice inputs (textual only) */
/* I remove <.formField input[type="date"],> from the below */
.formField input[type="text"],
.formField input[type="password"],
.formField input:not([type]),
.formField select,
.formField textarea {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid #cfd6e4;
  background: #fff;
  font-size: 15px;

  -webkit-appearance: auto;
  appearance: auto;
}

/*
.formField input:focus,
.formField select:focus,
.formField textarea:focus {
  outline: none;
  border-color: #4f46e5;
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15);
}
*/
/* ======================================================
   GAME PAGE (scoped)
====================================================== */

.game-page .match-top-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.game-page .match-header {
  flex: 1;
}

.game-page .match-controls {
  flex: 0 0 auto;
  text-align: right;
}

/* Score layout */
.game-page .score-teams {
  display: flex;
  gap: 24px;
  justify-content: flex-end;
}

/* Live score (main score) */
#homeScore,
#awayScore {
  font-size: 1.7rem;     /* bump it up */
  font-weight: 700;      /* strong emphasis */
  line-height: 1.2;
}

@media (max-width: 640px) {
  #homeScore,
  #awayScore {
    font-size: 1.55rem;
  }
}

.halftime-score {
  margin-top: 2px;

  font-size: 0.85rem;     /* almost same as live */
  font-weight: 400;      /* lighter */
  color: #9ca3af;        /* very subtle */

  line-height: 1.2;
}

.game-page .team-score {
  text-align: center;
}

/* Timer bar */
.game-page .timerBar {
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 8px;
}

.game-page .timerActions {
  display: flex;
  gap: 6px;
}


/* When toggle is ON, show 2 columns (desktop/tablet) */
/*@media (min-width: 768px) {
  .game-page #statsContainer.two-col {
    grid-template-columns: 1fr 1fr;
    gap: 16px;
  }
}*/


/* Individual stat row */
.game-page .statRow {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.game-page .statRow .label {
  flex: 1;
}

.game-page .statRow .controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Player scoring */
.game-page .playerRow {
  display: grid;
  grid-template-columns: 40px 1fr auto auto;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

/* GOALS (first scoring block) */
.game-page .playerRow .playerStat:nth-of-type(1) .statBtn {
  background: #ecfdf5;
  border: 1px solid #10b981;
  color: #065f46;
}

/* POINTS (second scoring block) */
.game-page .playerRow .playerStat:nth-of-type(2) .statBtn {
  background: #eff6ff;
  border: 1px solid #3b82f6;
  color: #1e3a8a;
}

.game-page .playerStat .statValue {
  min-width: 22px;
  text-align: center;
  font-weight: 600;
}

.game-page .playerStat {
  display: flex;
  align-items: center;
  gap: 6px;
  
  justify-content: flex-start; /* 👈 aligns buttons consistently */
}

.game-page .playerStat .statLabel {
  width: 16px;
  text-align: center;
  font-weight: 600;
}

/* Desktop only width lock */
@media (min-width: 768px) {
  .game-page .playerStat {
    min-width: 120px;
  }
}

@media (max-width: 640px) {
  .game-page .playerStat::before {
    content: attr(data-label);
    font-size: 0.75rem;
    font-weight: 600;
    color: #6b7280;
    margin-right: 6px;
  }
}

@media (max-width: 640px) {
  .game-page .playerStat.goals {
    grid-area: goals;
  }

  .game-page .playerStat.points {
    grid-area: points;
  }
}

/* Opposition scorers */
.game-page .oppGrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(56px, 1fr));
  gap: 8px;
}

.game-page .oppTile {
  position: relative;

  height: 56px;
  border-radius: 12px;
  background: #f3f4f6;
  border: none;

  display: flex;
  align-items: center;
  justify-content: center;

  cursor: pointer;
}

/* Jersey number (primary) */
.game-page .oppTile .num {
  font-size: 1.4rem;
  font-weight: 700;
  line-height: 1;
  color: #111827;
}

/* Score count (secondary badge) */
.game-page .oppTile .count {
  position: absolute;
  top: 6px;
  right: 6px;

  min-width: 18px;
  height: 18px;
  padding: 0 5px;

  font-size: 0.7rem;
  font-weight: 700;
  line-height: 18px;

  background: #0000FF; 
  color: #ffffff;
  border-radius: 999px;

  display: flex;
  align-items: center;
  justify-content: center;
}

.game-page .oppTile[data-count="0"] .count {
  display: none;
}


/* Actions (bottom of game page) */
.game-page .actions {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 16px;
}

.game-page .actionBtns {
  display: flex;
  gap: 8px;
}

/* Prevent text selection & native long-press on opposition scorer tiles */
.oppTile,
.oppTile * {
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  touch-action: manipulation;
}

/* ======================================================
   GAME PAGE – MOBILE
====================================================== */

@media (max-width: 640px) {

  .game-page .match-top-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .game-page .match-controls {
    width: 100%;
    text-align: left;
  }

  .game-page .score-teams {
    justify-content: space-between;
  }


  .game-page .actions {
    flex-direction: column;
    align-items: stretch;
  }

  .game-page .actionBtns {
    flex-direction: column;
  }
}

/* Home / Away stats toggle 
.game-page #statsContainer {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
*/
/*.game-page #statsContainer.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}*/
/*
.game-page #statsContainer.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

@media (max-width: 900px) {
  .game-page #statsContainer.two-col {
    display: grid;
    grid-template-columns: 1fr 1fr !important;
    gap: 12px;
  }
}*/

/* ======================================================
   GAME PAGE – Action buttons (Share / Game Over)
====================================================== */

.game-page .actions {
  margin-top: 16px;
}

.game-page .actionBtns {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Shared button base */
.game-page .btnAction {
  width: 100%;
  padding: 14px 16px;
  font-size: 16px;
  border-radius: 12px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

/* Share Live Link (outline) */
.game-page .btn.outline.btnAction {
  background: #ffffff;
  border: 2px solid #111827;
  color: #111827;
}

.game-page .btn.outline.btnAction:hover {
  background: #f9fafb;
}

/* Game Over (danger / primary action) */
.game-page .btn.danger.btnAction {
  background: #c0392b;
  border: none;
  color: #ffffff;
}

.game-page .btn.danger.btnAction:hover {
  background: #a93226;
}

/* Desktop: keep buttons stacked but tighter */
@media (min-width: 768px) {
  .game-page .actionBtns {
    max-width: 360px;
  }
}

/* ======================================================
   GAME PAGE – Action buttons layout
====================================================== */

/* Mobile default: stacked (already correct) */
.game-page .actionBtns {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Desktop: side-by-side */
@media (min-width: 768px) {
  .game-page .actionBtns {
    flex-direction: row;
    align-items: stretch;
  }

  .game-page .btnAction {
    width: auto;              /* 👈 stop full-width */
    min-width: 180px;
    padding: 12px 18px;
  }
}
/* ======================================================
   GAME PAGE – Equal-sized action buttons (desktop)
====================================================== */

@media (min-width: 768px) {
  .game-page .actionBtns {
    align-items: stretch; /* 👈 force equal height */
  }

  .game-page .btnAction {
    min-width: 190px;     /* 👈 same width baseline */
    height: 48px;         /* 👈 lock height */
    padding: 0 20px;      /* 👈 consistent horizontal padding */
    white-space: nowrap; /* 👈 prevent wrapping */
  }

  .game-page .btnAction span,
  .game-page .btnAction {
    line-height: 1;
  }
}

/* ======================================================
   GAME PAGE – Player Scoring layout
====================================================== */

/* -------- MOBILE (default – keep what you have) -------- */
/* Your current stacked layout is fine for mobile */


/* -------- DESKTOP: restore compact row layout -------- */
@media (min-width: 768px) {

  .game-page .playerTable {
    display: flex;
    flex-direction: column;
    gap: 6px;
  }

  .game-page .playerRow {
    display: grid;
    grid-template-columns: 36px 1fr auto auto;
    align-items: center;
    gap: 12px;
    padding: 6px 4px;
    background: transparent;
  }

  .game-page .playerRow:not(:last-child) {
    border-bottom: 1px solid #e5e7eb;
  }

  .game-page .jersey {
    text-align: right;
    font-weight: 600;
    color: #374151;
  }

  .game-page .playerName {
    font-weight: 500;
    white-space: nowrap;
  }

  .game-page .playerStat .statLabel {
    font-weight: 600;
    width: 14px;
    text-align: center;
  }

  .game-page .statBtn {
    width: 28px;
    height: 28px;
    padding: 0;
    border-radius: 6px;
    font-size: 16px;
  }

  .game-page .statValue {
    min-width: 18px;
    text-align: center;
    font-weight: 500;
  }
}

/* =========================
   Player Scoring +/- buttons
   Match Home/Away Stats style
========================= */

.game-page .statBtn {
  width: 40px;
  height: 40px;

  display: flex;
  align-items: center;
  justify-content: center;

  font-size: 18px;
  font-weight: 600;
  line-height: 1;

  border: none;                    /* 👈 remove outline look */
  border-radius: 10px;             /* 👈 same as stat buttons */
  background: #f3f4f6;             /* 👈 soft grey */
  color: #111827;

  cursor: pointer;
}

/* Hover / active feedback */
.game-page .statBtn:active {
  transform: scale(0.96);
}

/* Disabled state */
.game-page .statBtn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* ======================================================
   GAME PAGE – Player row backgrounds
====================================================== */

/* MOBILE: keep card-style background (already stacked) */
.game-page .playerRow {
  background: #f1f5f9;        /* light slate */
  border-radius: 10px;
  padding: 10px;
  margin-bottom: 10px;
}

/* DESKTOP: subtle alternating row backgrounds */
@media (min-width: 768px) {

  .game-page .playerRow {
    background: transparent;
    border-radius: 0;
    padding: 6px 4px;
    margin-bottom: 0;
  }

  .game-page .playerRow:nth-child(odd) {
    background: #f9fafb;      /* very light grey */
  }

  .game-page .playerRow:nth-child(even) {
    background: #ffffff;
  }

  .game-page .playerRow {
    border-radius: 6px;
  }
}


/* ======================================================
   GAME PAGE – Home / Away stats readability
====================================================== */

/* -------- MOBILE FIRST -------- */

.game-page .statRow {
  background: #f1f5f9;              /* soft slate */
  border-radius: 12px;
  padding: 10px 12px;
  margin-bottom: 10px;

  display: flex;
  flex-direction: column;
  gap: 8px;
}

.game-page .statRow .label {
  font-weight: 600;
  color: #111827;
}

.game-page .statRow .controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

.game-page .statRow .controls button {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  font-size: 18px;
}

.game-page .statRow .controls div {
  min-width: 24px;
  text-align: center;
  font-weight: 600;
}

/* -------- DESKTOP: compact table-like -------- */

@media (min-width: 768px) {

  .game-page .statRow {
    background: transparent;
    border-radius: 0;
    padding: 6px 0;
    margin-bottom: 0;

    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }

  .game-page .statRow:not(:last-child) {
    border-bottom: 1px solid #e5e7eb;
  }

  .game-page .statRow .controls button {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    font-size: 16px;
  }
}


/* ===========================
   Stats layout toggle spacing
=========================== */

.statsToggle {
  margin-bottom: 16px;   /* 👈 space before Home/Away columns */
}

@media (max-width: 600px) {
  .statsToggle {
    margin-bottom: 20px; /* a bit more breathing room on mobile */
  }
}

/* =========================
   Summary watermark
========================= */

.summaryCapture {
  position: relative; /* creates stacking context */
}

.watermark {
  position: absolute;
  top: 12px;
  right: 12px;

  width: 120px;
  max-width: 28vw;

  opacity: 0.07;
  pointer-events: none;

}
.summaryHeader {
  position: relative;
  z-index: 2;
}

.watermark {
  z-index: 1;
}

/* Ensure all summary content sits above watermark */
.summaryCapture > * {
  position: relative;
  z-index: 1;
}

.finalScoreCard {
  position: relative;
  overflow: hidden;
}

.finalScoreWatermark {
  position: absolute;
  top: 50%;
  right: 12%;
  transform: translateY(-50%);

  width: 220px;
  opacity: 0.06;

  pointer-events: none;
  z-index: 0;
}

.finalScoreCard > * {
  position: relative;
  z-index: 1;
}


@media (max-width: 640px) {
  .summaryCapture .watermark {
    width: 90px;
    top: 10px;
    right: 10px;
  }
}


/* =========================
   Final Score
========================= */

.finalScoreRow {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  text-align: center;
}

.teamScore {
  background: #f8fafc;
  border-radius: 14px;
  padding: 1rem;
}

.teamScore strong {
  display: block;
  font-size: 1.1rem;
  margin-bottom: 0.25rem;
}

.ftScore {
  font-size: 1.6rem;
  font-weight: 700;
}

.htScore {
  margin-top: 0.25rem;
  font-size: 0.85rem;
  color: #64748b;
}

/* =========================
   Summary stat list
========================= */

.summaryStats {
  display: grid;
  gap: 0.5rem;
}

.summaryStats li {
  display: flex;
  justify-content: space-between;
  align-items: center;

  background: #f8fafc;
  border-radius: 10px;
  padding: 0.5rem 0.75rem;

  font-size: 0.9rem;
}

.summaryStats strong {
  font-weight: 700;
}


/* =========================
   Opposition threats
========================= */

.oppThreats li {
  display: flex;
  align-items: center;
  gap: 0.5rem;

  background: #fff7ed;
  border-radius: 10px;
  padding: 0.5rem 0.75rem;
  font-size: 0.9rem;
}

.oppThreats strong {
  background: #fb923c;
  color: #ffffff;

  display: inline-block;

  min-width: 32px;
  height: 22px;

  padding: 0;

  border-radius: 999px;

  font-size: 0.75rem;
  font-weight: 700;

  line-height: 22px;   /* 👈 THIS is the critical fix */
  text-align: center;

  vertical-align: middle;
}



/* =========================
   Player summary table
========================= */

.playerSummary {
  width: 100%;
  border-collapse: collapse;
}

.playerSummary th {
  font-size: 0.75rem;
  text-transform: uppercase;
  color: #64748b;
  padding: 0.5rem;
  border-bottom: 1px solid #e5e7eb;
}

.playerSummary td {
  padding: 0.5rem;
  border-bottom: 1px solid #f1f5f9;
}

.playerSummary tr:nth-child(even) {
  background: #f8fafc;
}

.playerSummary .num {
  text-align: center;
  font-weight: 600;
}


/* =========================
   Summary page spacing
========================= */

.summaryCapture > h1 {
  margin-bottom: 0.25rem;
}

.summaryCapture .muted {
  margin-bottom: 1.25rem;
}

.summaryCapture .card {
  margin-bottom: 1rem;
}


/* =========================
   Summary Page Actions
========================= */

.summaryActions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 24px;
}

.summaryActions .btn {
  height: 44px;
  padding: 0 16px;
  font-size: 0.95rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}

/* Emphasise Publish button */
.summaryActions .btn.primary {
  min-width: 200px;
}

/* WhatsApp styling (if not already defined) */
.btn.whatsapp {
  background: #25d366;
  color: white;
  border: none;
}

.btn.whatsapp:hover {
  background: #1ebc59;
}

/* Ghost back button */
.btn.ghost {
  background: transparent;
  border: none;
  color: #555;
}

/* =========================
   Mobile behaviour
========================= */

@media (max-width: 600px) {
  .summaryActions {
    flex-direction: column;
    align-items: stretch;
  }

  .summaryActions .btn {
    width: 100%;
  }
}


/* ============================
   Team Sheet Actions
============================ */

.teamSheetActions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 14px;
  flex-wrap: wrap;
}

/* Base button reset (safe) */
.teamSheetActions .btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;

  height: 40px;
  padding: 0 14px;

  border-radius: 10px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
}

/* Add Player (secondary) */
.btnAddPlayer {
  background: #ffffff;
  border: 2px dashed #c7d2fe;
  color: #4f46e5;
}

.btnAddPlayer:hover {
  background: #eef2ff;
}

/* Save Team Sheet (primary) */
.btnSaveSheet {
  background: #4f46e5;
  color: #ffffff;
  border: none;
  box-shadow: 0 4px 10px rgba(79, 70, 229, 0.25);
}

.btnSaveSheet:hover {
  background: #4338ca;
}

/* ============================
   Player Row Delete Button
============================ */

.playerRow .deleteBtn,
.sheet .deleteBtn {
  width: 34px;
  height: 34px;

  border-radius: 8px;
  border: 1px solid #e5e7eb;
  background: #ffffff;

  font-size: 18px;
  line-height: 1;
  cursor: pointer;

  display: flex;
  align-items: center;
  justify-content: center;

  color: #6b7280;
}

.playerRow .deleteBtn:hover,
.sheet .deleteBtn:hover {
  background: #fee2e2;
  border-color: #ef4444;
  color: #b91c1c;
}

@media (max-width: 600px) {
  .teamSheetActions {
    justify-content: stretch;
  }

  .teamSheetActions .btn {
    flex: 1;
    justify-content: center;
  }
}


/* ============================
   Custom File Upload
============================ */

.fileUpload {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 6px;
}

.fileBtn {
  display: inline-flex;
  align-items: center;
  gap: 6px;

  padding: 10px 14px;
  border-radius: 10px;
  border: 2px dashed #c7d2fe;

  background: #ffffff;
  color: #4f46e5;
  font-weight: 600;
  cursor: pointer;
}

.fileBtn:hover {
  background: #eef2ff;
}

.fileName {
  font-size: 0.9rem;
  color: #6b7280;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 200px;
}

/* =========================
   Help Page
========================= */

.help-page h1 {
  font-size: 1.6rem;
  margin-bottom: 0.5rem;
}

.help-page h2 {
  font-size: 1.25rem;
  margin-bottom: 0.4rem;
}

.help-page h3 {
  font-size: 1.05rem;
  margin-top: 1rem;
  margin-bottom: 0.3rem;
}

.help-page p {
  line-height: 1.55;
}

.help-page ul,
.help-page ol {
  padding-left: 1.2rem;
}

.help-page li {
  margin-bottom: 0.4rem;
}

.card.warning {
  border-left: 4px solid #f59e0b;
  background: #fff7ed;
}

.card.warning h2 {
  color: #b45309;
}

.codeBlock {
  background: #0f172a;
  color: #e5e7eb;
  padding: 0.75rem;
  border-radius: 6px;
  font-size: 0.9rem;
  overflow-x: auto;
  margin: 0.5rem 0 0.75rem;
}

.help-image {
  margin-top: 0.75rem;
  text-align: center;
}

.help-image img {
  max-width: 100%;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
}

.help-page .card {
  margin-bottom: 1rem;
}


/* =========================
   Stats to Track
========================= */

.statList {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.statCheck {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  padding: 0.55rem 0.6rem;
  border-radius: 8px;
  background: #f8fafc;
  border: 1px solid #e5e7eb;
  cursor: pointer;
}

.statCheck input {
  margin-top: 0.2rem;
  transform: scale(1.1);
}

.statCheck input:checked + span {
  font-weight: 600;
}

.statCheck:has(input:checked) {
  background: #eef6ff;
  border-color: #c7ddff;
}

.statCheck span {
  line-height: 1.35;
}

.statCheck em {
  font-style: italic;
  color: #475569;
  font-size: 0.9em;
}

.card h2 {
  margin-bottom: 0.6rem;
}

@media (max-width: 640px) {

  .statCheck {
    padding: 0.7rem 0.75rem;
    gap: 0.75rem;
  }

  .statCheck input {
    transform: scale(1.2);
  }

}
/* =========================
   Index page – Mobile layout
   Stack Stats + Last Games
========================= */

@media (max-width: 640px) {

  /* The row that wraps Stats to Track + Last 10 Games */
  .row.gap {
    flex-direction: column;
  }

  /* Ensure cards take full width */
  .row.gap > div {
    width: 100%;
  }
}

/* =========================
   Mobile: Jump to Last Games
========================= */

.jumpToGames {
  display: none;              /* hidden by default (desktop) */

  margin: 4px 0 10px;
  font-size: 0.9rem;
  font-weight: 600;
  color: #4f46e5;
  text-decoration: none;

  text-align: right;          /* 👈 right-align text */
}

@media (max-width: 640px) {
  .jumpToGames {
    display: block;
  }
}

.jumpToGames:hover {
  text-decoration: underline;
}


html {
  scroll-behavior: smooth;
}

@media (max-width: 640px) {
  a.jumpToGames {
    display: block !important;
  }
}

@media (min-width: 640px) {
  .row.gap {
    flex-direction: row;
    align-items: flex-start;
  }

  .row.gap > div {
    flex: 1;
  }
}
@media (min-width: 1024px) {
  .row.gap > div:first-child {
    flex: 1.2;
  }
  .row.gap > div:last-child {
    flex: 0.8;
  }
}

/* ======================================================
   INDEX PAGE – Mobile-only reordering
   Move Start Game above Last 10 Games
====================================================== */

@media (max-width: 640px) {

  /* Make the main sections stack */
  .indexMain {
    display: flex;
    flex-direction: column;
  }

  /* Stats to Track (stays first) */
  .indexMain > div:nth-child(1) {
    order: 1;
  }

  /* Start Game actions (PIN + button) */
  .startGameActions {
    order: 2;
    margin-top: 8px;
  }

  /* Last 10 Games (moves below Start Game) */
  #last-games {
    order: 3;
  }
}

/* ======================================================
   Last 10 Games – higher contrast rows
====================================================== */

#last-games .card {
  background: #fff4e6;              /* slightly darker orange base */
  border: 1px solid #fbbf24;        /* stronger orange border */
}

#last-games .game-row {
  background: #ffffff;              /* white rows = max contrast */
  border: 1px solid #fde68a;        /* subtle but visible separator */
  border-radius: 8px;

  margin-bottom: 8px;
  padding: 10px 12px;

  transition: background 0.15s ease, transform 0.1s ease;
}

/* Remove margin on last row */
#last-games .game-row:last-child {
  margin-bottom: 0;
}

/* Hover / tap feedback */
#last-games .game-row:hover {
  background: #fff7ed;
  transform: translateY(-1px);
}

#last-games h2 {
  color: #9a3412;
}

/* Unassigned jersey dropdown */
.jersey-unassigned {
  background-color: #fff7ed;   /* soft orange */
  border: 2px solid #fb923c;   /* clear but friendly */
  color: #9a3412;
}

.jersey-help {
  margin-bottom: 8px;
  font-size: 0.85rem;
}

.jersey-warning {
  font-size: 0.75rem;
  color: #c2410c;
  margin-left: 6px;
}

.jersey-help.info {
  display: flex;
  align-items: flex-start;
  gap: 6px;
}

.jersey-help .infoIcon {
  background: #e0f2fe;
  color: #075985;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
}

.badge.coach {
  display: inline-block;
  margin-left: 0.5rem;
  padding: 0.15rem 0.5rem;

  font-size: 0.7em;        /* smaller than title */
  font-weight: 600;
  line-height: 1;

  color: #065f46;          /* dark green */
  background: #d1fae5;     /* soft green */
  border: 1px solid #6ee7b7;
  border-radius: 999px;   /* pill shape */

  vertical-align: middle;
  white-space: nowrap;
}

.halftime-score {
  font-size: 0.85rem;
  color: #6b7280;
  margin-top: 2px;
}


/* =========================
   Player scoring buttons
========================= */

.statBtn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 20px;
  font-weight: 700;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  cursor: pointer;
  transition: transform 0.05s ease, box-shadow 0.05s ease;
}

/* Minus button */
.statBtn.minus {
  background: #f8d7da;
  color: #842029;
}

/* Plus button */
.statBtn.plus {
  background: #d1e7dd;
  color: #0f5132;
}

/* Press feedback */
.statBtn:active {
  transform: scale(0.92);
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.2);
}

/* Disabled state */
.statBtn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ======================================================
   Player Scoring – Distinguish Goals (G) vs Points (P)
====================================================== */

/* Common label styling */
.game-page .playerStat .statLabel {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  width: 28px;
  height: 28px;
  border-radius: 6px;

  font-weight: 800;
  font-size: 14px;
  margin-right: 6px;

  flex-shrink: 0;
}

/* Goals (G) – blue */
.game-page .playerStat.goals .statLabel {
  background: #dbeafe;     /* light blue */
  color: #1e40af;          /* dark blue */
}

/* 2 Pointers (2) – amber #fef3c7 and #92400e */
.game-page .playerStat.twoPointers .statLabel {
  background: #dbeafe; 
  color: #1e40af;
}

/* Points (P) – purple #ede9fe #5b21b6*/
.game-page .playerStat.points .statLabel {
  background: #dbeafe;     /* light purple */
  color: #1e40af;
}


/* ======================================================
   Game Timer – Make it prominent for coaches
====================================================== */

.game-page .timerBar {
  background: #fff;
  border: 2px solid #2563eb;        /* blue emphasis */
  border-radius: 12px;
  padding: 10px 14px;
  margin-top: 8px;

  display: flex;
  align-items: center;
  gap: 12px;

  box-shadow: 0 4px 10px rgba(0,0,0,0.08);
}

.game-page .timerTime {
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: 1px;
  color: #1e293b;
  min-width: 64px;
  text-align: center;
}

.game-page .timerBtn#startPauseTimer {
  background: #2563eb;
  color: #fff;
  border: none;

  width: 44px;
  height: 44px;
  border-radius: 10px;

  font-size: 18px;
  font-weight: 700;

  display: flex;
  align-items: center;
  justify-content: center;

  box-shadow: 0 3px 6px rgba(37,99,235,0.4);
}

.game-page .timerBtn#startPauseTimer:active {
  transform: scale(0.94);
}

@keyframes pulseBorder {
  0%   { box-shadow: 0 0 0 0 rgba(37,99,235,0.5); }
  70%  { box-shadow: 0 0 0 6px rgba(37,99,235,0); }
  100% { box-shadow: 0 0 0 0 rgba(37,99,235,0); }
}

/* Timer before start */
.game-page .timerBar:not(.running) {
  animation: pulseBorder 2s infinite;
}

/* ======================================================
   Half Time (HT) Button – Clear & deliberate
====================================================== */

.game-page .timerBtn.htBtn {
  background: #f59e0b;          /* amber */
  color: #1f2937;

  border: none;
  border-radius: 10px;

  padding: 0 12px;
  height: 44px;

  font-size: 14px;
  font-weight: 800;

  display: inline-flex;
  align-items: center;
  gap: 6px;

  box-shadow: 0 3px 6px rgba(245,158,11,0.45);
}

/* Subtle press feedback */
.game-page .timerBtn.htBtn:active {
  transform: scale(0.95);
}

/* Disabled = clearly unavailable */
.game-page .timerBtn.htBtn:disabled {
  background: #e5e7eb;
  color: #9ca3af;
  box-shadow: none;
}

/* ======================================================
   Home/Away STATS +/- buttons – match Player Scoring colours
====================================================== */

/* Minus (pink) */
.game-page .statRow .controls .btn[data-delta="-1"] {
  background: #f8d7da;
  color: #842029;
  border: none;
}

/* Plus (green) */
.game-page .statRow .controls .btn[data-delta="1"] {
  background: #d1e7dd;
  color: #0f5132;
  border: none;
}

/* Optional: keep disabled look consistent */
.game-page .statRow .controls .btn:disabled {
  opacity: 0.45;
}

/* ======================================================
   Summary Page – Improve stat readability on mobile
====================================================== */

/* Base style for summary stat rows */
.summaryStats li {
  background: #f8fafc;            /* very light neutral */
  border: 1px solid #e5e7eb;
  border-radius: 10px;

  padding: 10px 14px;
  margin-bottom: 10px;

  display: flex;
  justify-content: space-between;
  align-items: center;

  font-size: 0.95rem;
}

/* Left accent for structure */
/*
.summaryStats li {
  border-left: 5px solid #3b82f6;
}
*/

/* Make values stand out */
.summaryStats li strong {
  font-size: 1rem;
  font-weight: 800;
  color: #111827;
}

/* Reduce visual noise in labels */
.summaryStats li {
  color: #374151;
}

/* Mobile-only: increase contrast & spacing */
@media (max-width: 640px) {
  .summaryStats li {
    background: #ffffff;          /* pure white on mobile */
    border-color: #3b82f6;
    padding: 12px 14px;
  }

  .summaryStats li strong {
    font-size: 1.05rem;
  }
}

.csvHint {
  background: #fff7ed;
  border-left: 5px solid #f59e0b;
  font-weight: 600;
}



/* ======================================================
   Team Sheet Summary – Mobile-first redesign
====================================================== */

.playerSummary {
  width: 100%;
  border-collapse: collapse;
}

@media (max-width: 900px) {
  .playerSummary tbody tr {
    position: relative;
  }

  .playerSummary tbody tr::after {
    content: attr(data-gp);
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);

    font-weight: 700;
    font-size: 0.9rem;
    color: #111827;
  }
}
/* SAFARI FIX — prevents rogue "<" */
@media (max-width: 900px) {
  .playerSummary tbody tr::before {
    display: none !important;
    content: none !important;
  }
}
/* ======================================================
   Team Sheet Summary – Mobile cards (SAFE VERSION)
====================================================== */

@media (max-width: 900px) {

  .playerSummary thead {
    display: none;
  }

  .playerSummary tbody tr {
    display: flex;
    align-items: center;
    gap: 12px;

    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;

    padding: 12px;
    margin-bottom: 10px;

    position: relative;
  }

  /* Jersey badge */
  .playerSummary td.num {
    background: #e0f2fe;
    color: #075985;

    width: 36px;
    height: 36px;
    border-radius: 50%;

    display: flex;
    align-items: center;
    justify-content: center;

    font-weight: 800;
    flex-shrink: 0;
  }

  /* Name */
  .playerSummary td:nth-child(2) {
    flex: 1;
    font-weight: 700;
  }

  /* Hide original stat columns */
  .playerSummary td:nth-child(3),
  .playerSummary td:nth-child(4),
  .playerSummary td:nth-child(5) {
    display: none;
  }

  /* Combined stats (RIGHT side) */
  .playerSummary tbody tr::after {
    content: attr(data-gp);
    font-weight: 700;
    font-size: 0.9rem;
    color: #111827;
    white-space: nowrap;
  }

  /* 🚫 ABSOLUTE SAFETY: kill any rogue pseudo-content */
  .playerSummary tbody tr::before {
    content: none !important;
    display: none !important;
  }
}
/* ======================================================
   Team Sheet Summary – Row contrast (Mobile / Tablet)
====================================================== */

@media (max-width: 900px) {

  /* Base row background */
  .playerSummary tbody tr {
    background: #ffffff;
  }

  /* Stronger contrast for every 2nd row */
  .playerSummary tbody tr:nth-child(even) {
    background: #f1f5f9; /* slate-100 */
  }

  /* Optional: extra separation to improve readability */
  .playerSummary tbody tr {
    box-shadow: inset 0 0 0 1px #e2e8f0;
  }

}



/* ======================================================
   Player Scoring – FINAL layout (clean & predictable)
====================================================== */

/* -------- DESKTOP -------- */
/*@media (min-width: 769px) {

  .game-page .playerRow {
    display: grid;
    grid-template-columns: 40px 1fr auto;
    align-items: center;
    gap: 12px;
  }

  .game-page .playerStats {
    display: grid;
    grid-template-columns: repeat(2, minmax(110px, auto));
    gap: 12px;
  }

  .game-page .playerStats.has-two {
    grid-template-columns: repeat(3, minmax(110px, auto));
  }

  .game-page .playerStat {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    white-space: nowrap;
  }
}
*/

/* =========================
   Player Scoring – MOBILE (FIXED)
========================= */
@media (max-width: 768px) {

  .game-page .playerStats {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 6px;
  }

  .game-page .playerStat {
    display: grid;
    grid-template-columns: 1fr 28px 36px 24px 36px;
    align-items: center;
    column-gap: 6px;
    row-gap: 0;
    width: 100%;
  }

  /* Left text label */
  .game-page .playerStat[data-label]::before {
    content: attr(data-label);
    font-size: 0.75rem;
    font-weight: 600;
    color: #6b7280;
  }

  /* Badge (G / 2 / P) */
  .game-page .playerStat .statLabel {
    margin: 0;
  }

  /* Prevent wrapping */
  .game-page .playerStat * {
    white-space: nowrap;
  }
}


/* =========================
   Player Scoring – Buttons
========================= */

/* Minus buttons – red */
.game-page .playerStat .statBtn.minus {
  background: #fee2e2;        /* red-100 */
  color: #991b1b;             /* red-800 */
  border: none;
}

/* Plus buttons – green */
.game-page .playerStat .statBtn.plus {
  background: #dcfce7;        /* green-100 */
  color: #166534;             /* green-800 */
  border: none;
}

/* Hover states */
.game-page .playerStat .statBtn.minus:hover {
  background: #fecaca;
}

.game-page .playerStat .statBtn.plus:hover {
  background: #bbf7d0;
}
/* =========================
   FINAL OVERRIDE – Player Scoring Buttons
========================= */

.game-page .playerStat .statBtn.minus {
  background-color: #f8d7da !important;
  color: #842029 !important;
  border: none !important;
}

.game-page .playerStat .statBtn.plus {
  background-color: #d1e7dd !important;
  color: #0f5132 !important;
  border: none !important;
}

/* =========================
   Player Scoring – MOBILE name above stats
========================= */
@media (max-width: 640px) {

  .game-page .playerRow {
    display: grid;
    grid-template-columns: 32px 1fr;
    grid-template-areas:
      "jersey name"
      "stats  stats";
    row-gap: 6px;
  }

  .game-page .jersey {
    grid-area: jersey;
  }

  .game-page .playerName {
    grid-area: name;
    font-weight: 600;
  }

  .game-page .playerStats {
    grid-area: stats;
    margin-top: 4px;
  }
}
@media (max-width: 640px) {
  .game-page .playerStats {
    gap: 8px;
  }
}

/* =========================
   Player Scoring – TABLET (iPad Mini fix)
========================= */
@media (min-width: 641px) and (max-width: 1024px) {

  .game-page .playerStats {
    display: grid;
    grid-template-columns: repeat(3, minmax(110px, auto));
    gap: 12px;
    justify-content: start;
  }

  .game-page .playerStat {
    justify-content: start;
    white-space: nowrap;
  }
}

/* Index page – input left accent */
/*
.index-page .formField input,
.index-page .formField select {
  border-left: 4px solid #3b82f6; 
  padding-left: 10px;            
}

.index-page .formField input:focus,
.index-page .formField select:focus {
  border-left-color: #2563eb; 
}*/

/* ======================================================
   Team Sheet Summary – Mobile: hide G / 2 / P columns
====================================================== */
@media (max-width: 900px) {

  /* Hide Goals, 2 Pointers, Points columns */
  .playerSummary td:nth-child(3),
  .playerSummary td:nth-child(4),
  .playerSummary td:nth-child(5) {
    display: none;
  }

  /* Keep jersey, name, and summary aligned nicely */
  .playerSummary tbody tr {
    display: flex;
    align-items: center;
    gap: 12px;
  }

  .playerSummary td.num:first-child {
    flex: 0 0 36px; /* jersey bubble */
  }

  .playerSummary td:nth-child(2) {
    flex: 1; /* player name */
    font-weight: 700;
  }

  /* Summary column (1-3 (6 pts)) */
  .playerSummary td:last-child {
    font-weight: 700;
    white-space: nowrap;
  }
}


@media (max-width: 900px) {

  .playerSummary thead {
    display: none;
  }

  .playerSummary tbody tr {
    display: flex;
    align-items: center;
    gap: 12px;

    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;

    padding: 12px;
    margin-bottom: 10px;

    position: relative;
  }

  /* Jersey bubble */
  .playerSummary td.num:first-child {
    background: #e0f2fe;
    color: #075985;

    width: 36px;
    height: 36px;
    border-radius: 50%;

    display: flex;
    align-items: center;
    justify-content: center;

    font-weight: 800;
    flex-shrink: 0;
  }

  /* Name */
  .playerSummary td:nth-child(2) {
    flex: 1;
    font-weight: 700;
  }

  /* Hide G / 2 / P / Total columns */
  .playerSummary td:nth-child(3),
  .playerSummary td:nth-child(4),
  .playerSummary td:nth-child(5),
  .playerSummary td:nth-child(6) {
    display: none;
  }

  /* Combined summary on right */
  .playerSummary tbody tr::after {
    content: attr(data-gp);
    font-weight: 800;
    font-size: 0.9rem;
    color: #111827;
    white-space: nowrap;
  }

  /* Absolute safety */
  .playerSummary tbody tr::before {
    content: none !important;
  }
}


/* Desktop clarity for Player Scoring */
@media (min-width: 768px) {

  .game-page .playerStats {
    display: flex;
    align-items: center;
    gap: 16px;           /* equal spacing between groups */
    flex-wrap: nowrap;  /* 🔑 prevent wrapping */
  }

  .game-page .playerStat {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 10px;
    background: #f8fafc;
    white-space: nowrap;
  }

  .game-page .statSeparator {
    font-size: 18px;
    opacity: 0.35;
    line-height: 1;
    margin: 0 2px;
    user-select: none;
  }
  
  .statSeparator {
  pointer-events: none;
  }

}

/* =========================
   Player Scoring – MOBILE (restore original)
========================= */
@media (max-width: 767px) {

  .game-page .playerStats {
    display: flex;
    flex-direction: column;
    gap: 8px;
  }

  .game-page .statSeparator {
    display: none;
  }

  .game-page .playerStat {
    background: transparent;
    padding: 0;
    border-radius: 0;
  }
}

/* =========================
   Home / Away Stats Layout
========================= */

/* Default: TWO columns (mobile + desktop) */
/*.game-page #statsContainer {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}*/

/* Desktop ONLY: allow single-column when toggled OFF */
/*@media (min-width: 768px) {
  .game-page #statsContainer.single-col {
    grid-template-columns: 1fr;
  }
}*/


/* =========================
   Opposition Scorers – Improved Tiles
========================= */

.game-page .oppGrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(56px, 1fr));
  gap: 10px;
}

/* Base tile */
.game-page .oppTile {
  position: relative;

  height: 56px;
  border-radius: 14px;

  background: linear-gradient(180deg, #ffffff, #f3f4f6);
  border: 1px solid #e5e7eb;

  display: flex;
  align-items: center;
  justify-content: center;

  cursor: pointer;
  transition:
    transform 0.08s ease,
    box-shadow 0.08s ease,
    border-color 0.08s ease;
}

/* Jersey number */
.game-page .oppTile .num {
  font-size: 1.35rem;
  font-weight: 800;
  color: #111827;
}

/* Count badge */
/*.game-page .oppTile .count {
  position: absolute;
  top: 6px;
  right: 6px;

  min-width: 18px;
  height: 18px;
  padding: 0 6px;

  font-size: 0.7rem;
  font-weight: 800;
  line-height: 18px;

  background: #2563eb;      
  color: #ffffff;
  border-radius: 999px;

  display: flex;
  align-items: center;
  justify-content: center;
}*/

/* === HAS SCORES === 
.game-page .oppTile:has(.count) {
  border-color: #2563eb;
  box-shadow: 0 0 0 1px rgba(37,99,235,0.25);
}*/

/* === TAP / PRESS FEEDBACK === */
.game-page .oppTile:active {
  transform: scale(0.94);
  box-shadow: inset 0 3px 6px rgba(0,0,0,0.15);
}

/* === HOVER (desktop) === */
@media (hover: hover) {
  .game-page .oppTile:hover {
    border-color: #2563eb;
    box-shadow: 0 6px 14px rgba(0,0,0,0.12);
    transform: translateY(-1px);
  }
}

/* === DISABLED === */
.game-page .oppTile:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}
.game-page .oppTile .count {
  animation: popIn 0.15s ease;
}

@keyframes popIn {
  from {
    transform: scale(0.6);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}
/* =========================
   Opposition Scorers – Colour by Volume
========================= */

/* 1–2 scores → GREEN */
.game-page .oppTile[data-count="1"],
.game-page .oppTile[data-count="2"] {
  border-color: #16a34a;
  background: #ecfdf5;
}

/* 3–4 scores → ORANGE */
.game-page .oppTile[data-count="3"],
.game-page .oppTile[data-count="4"] {
  border-color: #ea580c;
  background: #fff7ed;
}

/* 5+ scores → RED */
.game-page .oppTile[data-count="5"],
.game-page .oppTile[data-count="6"],
.game-page .oppTile[data-count="7"],
.game-page .oppTile[data-count="8"],
.game-page .oppTile[data-count="9"],
.game-page .oppTile[data-count="10"],
.game-page .oppTile[data-count="11"],
.game-page .oppTile[data-count="12"],
.game-page .oppTile[data-count="13"],
.game-page .oppTile[data-count="14"],
.game-page .oppTile[data-count="15"] {
  animation: dangerPulse 1.6s infinite ease-in-out;
  border-color: #dc2626;
  background: #fef2f2;
}

/* Badge colour – 1–2 scores → GREEN */
.game-page .oppTile[data-count="1"] .count,
.game-page .oppTile[data-count="2"] .count {
  background: #16a34a;   /* green */
}

/* Badge colour follows threat level */
.game-page .oppTile[data-count="3"] .count,
.game-page .oppTile[data-count="4"] .count {
  background: #ea580c;
}

.game-page .oppTile[data-count="5"] .count,
.game-page .oppTile[data-count="6"] .count,
.game-page .oppTile[data-count="7"] .count,
.game-page .oppTile[data-count="8"] .count,
.game-page .oppTile[data-count="9"] .count,
.game-page .oppTile[data-count="10"] .count,
.game-page .oppTile[data-count="11"] .count,
.game-page .oppTile[data-count="12"] .count,
.game-page .oppTile[data-count="13"] .count,
.game-page .oppTile[data-count="14"] .count,
.game-page .oppTile[data-count="15"] .count {
  background: #dc2626;
}

/* Pulse for dangerous scorers */
@keyframes dangerPulse {
  0%   { box-shadow: 0 0 0 0 rgba(220,38,38,0.35); }
  70%  { box-shadow: 0 0 0 10px rgba(220,38,38,0); }
  100% { box-shadow: 0 0 0 0 rgba(220,38,38,0); }
}


/* =========================
   Feedback Section (Help)
========================= */

.feedback-card {
  border-left: 5px solid #3b82f6;
  background: linear-gradient(180deg, #f8fbff, #ffffff);
}

.feedback-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 0.25rem;
}

.feedback-intro {
  margin-bottom: 1.25rem;
  max-width: 720px;
}

/* Form layout refinement */
.feedback-card .formGrid {
  gap: 16px;
}

.feedback-card .formField label {
  font-weight: 600;
  color: #1f2937;
}

.feedback-card input,
.feedback-card textarea,
.feedback-card select {
  border-radius: 8px;
  border: 1px solid #d1d5db;
  padding: 10px 12px;
  font-size: 0.95rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

/* Focus states */
.feedback-card input:focus,
.feedback-card textarea:focus,
.feedback-card select:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

/* Message textarea */
.feedback-card textarea {
  resize: vertical;
  min-height: 110px;
}

/* Submit button */
.feedback-card .actions {
  margin-top: 0.5rem;
}

.feedback-card .btn.primary {
  padding: 10px 18px;
  font-weight: 600;
}

/* Helper note */
.feedback-card .muted {
  font-size: 0.85rem;
}

/* Mobile polish */
@media (max-width: 640px) {
  .feedback-title {
    font-size: 1.2rem;
  }

  .feedback-card {
    padding: 1rem;
  }
}
/* Delete button */
.delete-btn {
  background: #dc2626;
  color: #ffffff;
  border: none;
}

.delete-btn:hover {
  background: #b91c1c;
}

/* =========================
   Admin Feedback Page
========================= */

.admin-header {
  border-left: 5px solid #6366f1;
  background: linear-gradient(180deg, #f8f9ff, #ffffff);
}

/* List container */
.feedback-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* Individual feedback card */
.feedback-item {
  padding: 1rem 1.25rem;
  position: relative;
}

/* Unread indicator */
.feedback-item.unread {
  border-left: 5px solid #3b82f6;
  background: #f8fbff;
}

/* Meta row */
.feedback-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

/* Type pill */
.feedback-type {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 999px;
  letter-spacing: 0.04em;
}

/* Type colours */
.feedback-type.feedback {
  background: #e0f2fe;
  color: #0369a1;
}

.feedback-type.bug {
  background: #fee2e2;
  color: #991b1b;
}

.feedback-type.access {
  background: #ecfeff;
  color: #0f766e;
}

.feedback-type.pin_reset {
  background: #f3b60d;
  color: #5C4033;
}
.feedback-type.subscription {
  background: #9f0df3;
  color: #ffffff;
}
/* Date */
.feedback-date {
  font-size: 0.8rem;
  color: #6b7280;
  white-space: nowrap;
}

/* Author */
.feedback-author {
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
}

/* Message */
.feedback-message {
  white-space: pre-wrap;
  line-height: 1.45;
  font-size: 0.95rem;
  color: #111827;
}

/* Mobile tweaks */
@media (max-width: 640px) {
  .feedback-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }
}

/* Right-side meta container */
.feedback-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Status buttons */
.feedback-item .btn.small {
  padding: 4px 10px;
  font-size: 0.7rem;
  font-weight: 600;
  border-radius: 999px;
}

/* New badge */
.new-btn {
  background: #2563eb;
  color: #ffffff;
  border: none;
}

/* Reviewed badge */
.reviewed-btn {
  border: 1px solid #d1d5db;
  color: #374151;
  background: #ffffff;
}

/* Hover polish */
.new-btn:hover {
  background: #1d4ed8;
}

.reviewed-btn:hover {
  background: #f3f4f6;
}


.char-hint {
  margin-top: 4px;
  font-size: 0.75rem;
  color: #6b7280;
}

.alert.error {
  background: #fee2e2;
  border-left: 5px solid #dc2626;
  color: #7f1d1d;
  padding: 12px 16px;
  border-radius: 6px;
  font-weight: 600;
  margin-bottom: 1rem;
}
.alert.success {
  background: #ecfdf5;          /* soft green */
  border-left: 5px solid #16a34a;
  color: #065f46;
  padding: 12px 16px;
  border-radius: 6px;
  font-weight: 600;
  margin-bottom: 1rem;
}

.feedback-flash {
  margin-bottom: 1rem;
}

.feedback-flash .alert {
  margin-bottom: 0;
}

/* =========================
   Feedback Success Message
========================= */

.feedback-flash .alert.success {
  background: linear-gradient(135deg, #dcfce7, #bbf7d0);
  border-left: 6px solid #16a34a;
  color: #065f46;
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(22, 163, 74, 0.15);
}

.feedback-flash .alert.success::before {
  content: "✅";
  margin-right: 8px;
}

.alert.success::before {
  content: "✅ ";
}
.alert.success {
  box-shadow: 0 2px 6px rgba(22, 163, 74, 0.15);
}

/* =========================
   Admin – Game Visibility
========================= */

.admin-game-tools {
  margin-top: 2rem;
  border-left: 4px solid #dc2626; /* red accent */
}

.admin-section-title {
  margin-bottom: 0.25rem;
}

.admin-game-form {
  margin-top: 1rem;
}

.admin-actions {
  display: flex;
  gap: 12px;
  margin-top: 1rem;
  flex-wrap: wrap;
}

.admin-actions .btn {
  min-width: 160px;
}

/* Mobile */
@media (max-width: 640px) {
  .admin-actions {
    flex-direction: column;
  }

  .admin-actions .btn {
    width: 100%;
  }
}
/* =========================
   Admin Input – match index.html
========================= */

.admin-input {
  width: 100%;
  padding: 10px 12px;
  font-size: 0.95rem;
  border-radius: 8px;
  border: 1px solid #d1d5db;      /* light gray */
  background: #ffffff;
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease;
}

.admin-input::placeholder {
  color: #9ca3af;
}

.admin-input:focus {
  outline: none;
  border-color: #3b82f6;          /* same blue as index */
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

/* Keep spacing consistent with index forms */
.admin-game-form .formField {
  margin-bottom: 0.75rem;
}
/* =========================
   Admin Input – Left Accent
========================= */

.admin-input-wrap {
  position: relative;
  padding-left: 12px;
}


/* When input is focused, strengthen accent */
.admin-input-wrap:focus-within::before {
  opacity: 1;
}

/* Subtle spacing consistency */
.admin-input-wrap label {
  display: block;
  margin-bottom: 4px;
}

/* Admin – match index input left accent */
.admin-game-tools .formField input,
.admin-game-tools .formField select {
  border-left: 4px solid #3b82f6;
  padding-left: 10px;
}

.admin-game-tools .formField input:focus,
.admin-game-tools .formField select:focus {
  border-left-color: #2563eb;
}


/* =========================
   Summary header layout
========================= */

/* Header crest watermark */
.summaryHeader {
  position: relative;
}

.summary-header-crest {
  position: absolute;
  top: 8px;
  right: 12px;

  max-height: 80px;      /* 👈 controls size */
  width: 80px;

  opacity: 0.3;         /* watermark effect */
  pointer-events: none;

  z-index: 0;
}


@media (max-width: 640px) {
  .summary-header-crest {
    max-height: 70px;
    opacity: 0.3;
  }
}



/* =========================
   Club Header
========================= */

.appHeader {
  background: var(--club-primary);
  color: var(--club-secondary);
  border-bottom: 4px solid var(--club-accent);
  padding: 10px 16px;
}

.brandLink {
  text-decoration: none;
  color: inherit;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.headerCrest {
  width: 42px;
  height: 42px;
  object-fit: contain;
  background: white;
  border-radius: 50%;
  padding: 4px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.2);
}

.brandText {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--club-secondary);
}

.headerActions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 14px;
}

.helpLink {
  color: var(--club-secondary);
  text-decoration: none;
  font-weight: 500;
}

.helpLink:hover {
  text-decoration: underline;
}

@media (max-width: 600px) {
  .headerCrest {
    width: 36px;
    height: 36px;
  }

  .brandText {
    font-size: 1.05rem;
  }
}



/* =========================
   WhatsApp button
========================= */

.btn.whatsapp {
  background: #25D366;
  color: white;
}

.btn.whatsapp i {
  margin-right: 6px;
  font-size: 1.1em;
}

.btn.outline i {
  margin-right: 6px;
}

.btn.whatsapp:hover {
  background: #1ebe5d;
}
.btn i,
.btn svg {
  display: inline-block !important;
  font-size: 1.2em;
  margin-right: 8px;
  vertical-align: middle;
}
.fa-brands,
.fa-solid,
.fa-regular {
  font-family: "Font Awesome 6 Brands" !important;
}
.fa-brands {
  font-family: "Font Awesome 6 Brands" !important;
}
.btn i {
  margin-right: 8px;
  font-size: 1.1em;
  line-height: 1;
}
.wa-icon {
  width: 18px;
  height: 18px;
  margin-right: 8px;
  flex-shrink: 0;
}
.btn.whatsapp {
  background: #25d366;
  color: #ffffff;
  border-radius: 12px;
  padding: 0 18px;

  height: 44px;

  display: inline-flex;
  align-items: center;
  gap: 10px;

  font-weight: 600;
  font-size: 0.95rem;
}

.btn.whatsapp:hover {
  background: #1ebe5d;
}

.wa-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;

  /* optical alignment tweak */
  transform: translateY(1px);
}
@media (max-width: 360px) {
  .btn.whatsapp span {
    display: none;
  }
}
.btn.whatsapp {
  background: #25d366;
  color: #ffffff;

  height: 44px;
  padding: 0 18px;

  display: inline-flex;
  align-items: center;
  gap: 12px;

  border-radius: 12px;
  font-weight: 600;
  font-size: 0.95rem;
}

/* White circular badge */
.wa-badge {
  width: 28px;
  height: 28px;

  background: #ffffff;
  border-radius: 50%;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  flex-shrink: 0;
}

/* Icon itself */
.wa-icon {
  width: 16px;
  height: 16px;
  color: #25d366; /* WhatsApp green */
}

/* Hover polish */
.btn.whatsapp:hover {
  background: #1ebe5d;
}
/* === WhatsApp button (final polish) === */
.btn.whatsapp {
  background: #25d366;
  color: #fff;
  border: 0;

  height: 44px;                 /* matches your summaryActions .btn */
  padding: 0 16px 0 12px;       /* less left padding */
  border-radius: 12px;

  display: inline-flex;
  align-items: center;
  gap: 10px;                    /* tighter + balanced */
  font-weight: 700;
  font-size: 0.95rem;

  box-shadow: 0 1px 2px rgba(0,0,0,0.08);
}

.btn.whatsapp:hover { background: #1ebe5d; }
.btn.whatsapp:active { transform: translateY(1px); }

/* Icon badge: smaller + centered, not huge */
.btn.whatsapp .wa-badge {
  width: 26px;
  height: 26px;
  border-radius: 999px;
  background: rgba(255,255,255,0.95);

  display: inline-flex;
  align-items: center;
  justify-content: center;

  flex: 0 0 auto;
}

/* Icon: crisp size + correct optical alignment */
.btn.whatsapp .wa-icon {
  width: 15px;
  height: 15px;
  color: #25d366;
  transform: translateY(0.5px);
}

/* Keep text aligned consistently */
.btn.whatsapp .wa-text {
  line-height: 1;
}


/* =========================
   Club-themed form accents
========================= */

/* Base input styling */
input,
select,
textarea {
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 10px 12px;

  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

/* Focus state (main fix) */
input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--club-primary);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--club-primary) 20%, transparent);
}

/* Left accent strip (what you circled) */
input,
select,
textarea {
  border-left: 4px solid var(--club-primary);
}

/* Checkbox & radio buttons */
input[type="checkbox"],
input[type="radio"] {
  accent-color: var(--club-primary);
}

/* Date picker icon (Chrome / Edge) */
input[type="date"]::-webkit-calendar-picker-indicator {
  filter: invert(32%) sepia(98%) saturate(1680%) hue-rotate(200deg);
}

/* Disabled inputs */
input:disabled,
select:disabled,
textarea:disabled {
  background: #f9fafb;
  opacity: 0.8;
}
@media (max-width: 640px) {
  input,
  select,
  textarea {
    border-left-width: 3px;
  }
}

/* ======================================================
   STRONG club-themed input accent
====================================================== */

.formField input,
.formField select,
.formField textarea {
  border: 1px solid #e5e7eb;
  border-left-width: 6px;                 /* 👈 thicker base */
  border-left-color: #e5e7eb;             /* neutral until focus */
  border-radius: 12px;
  padding-left: 14px;                     /* compensate for thickness */
}


/* Optional: keep accent when filled */
.formField input:not(:placeholder-shown),
.formField select:not([value=""]) {
  border-left-color: var(--club-primary);
}

.formField::before {
  content: "";
  position: absolute;
  left: 0;
  top: 30px;            /* aligns under label */
  bottom: 10px;

  width: 12px;          /* 👈 REAL thickness */
  border-radius: 8px;

  background: transparent;
  transition: background 0.15s ease;
}





@media (max-width: 640px) {
  .formField input:focus,
  .formField select:focus,
  .formField textarea:focus {
    border-left-width: 10px;
  }
}
@media (max-width: 640px) {
  .formField::before {
    width: 14px;
  }
}
/* ======================================================
   THICK left accent per INPUT BOX only
====================================================== */

.formField
  input:not([type="radio"]):not([type="checkbox"]):not([type="file"]),
.formField select,
.formField textarea {
  border: 1px solid #cfd6e4;
  border-radius: 12px;

  /* Thick left accent INSIDE input */
  box-shadow: inset 3px 0 0 0 var(--club-primary);

  padding-left: 16px;
}

/* Stronger on focus */
.formField
  input:not([type="radio"]):not([type="checkbox"]):not([type="file"]):focus,
.formField select:focus,
.formField textarea:focus {
  outline: none;
  box-shadow: inset 3px 0 0 0 var(--club-primary);
}
/* ======================================================
   Remove accent from jersey number dropdowns only
====================================================== */

.sheet select {
  box-shadow: none !important;
  padding-left: 12px; /* reset padding if needed */
}

/* ======================================================
   Add accent back to Player Name inputs (team sheet)
====================================================== */

.sheet input[type="text"] {
  box-shadow: inset 3px 0 0 0 var(--club-primary);
  padding-left: 16px;
}


/* ======================================================
   Final Score – left accent (Home & Away)
====================================================== */

.finalScoreRow .teamScore {
  position: relative;
  padding-left: 14px; /* room for accent */
}

/* Left accent bar */
.finalScoreRow .teamScore::before {
  content: "";
  position: absolute;
  left: 0;
  top: 6px;
  bottom: 6px;

  width: 3px; /* 👈 matches your inputs */
  border-radius: 12px;

  background: var(--club-primary);
}
/* ======================================================
   Summary – Final Score tiles (border + curved accent)
====================================================== */

/* Override the earlier .teamScore styling */
.summaryCapture .finalScoreRow .teamScore {
  position: relative;
  overflow: hidden;              /* IMPORTANT: clips the accent to rounded corners */

  border: 1px solid #cfd6e4;     /* ✅ visible border */
  border-radius: 14px;

  background: #ffffff;           /* cleaner than slate */
  padding: 14px 16px;
  padding-left: 20px;            /* room for accent */
}

/* Left accent that wraps the corners */
.summaryCapture .finalScoreRow .teamScore::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;

  width: 6px;                    /* change to 3px if you want */
  background: var(--club-primary);

  /* wrap around top-left & bottom-left */
  border-top-left-radius: 14px;
  border-bottom-left-radius: 14px;
}
/* ======================================================
   Align jersey select + player name input heights
====================================================== */

.sheet .row select,
.sheet .row input[type="text"] {
  height: 44px;              /* 👈 single source of truth */
  line-height: 44px;
  box-sizing: border-box;
}
/* ======================================================
   Align Remove Player button with inputs/selects
====================================================== */

.sheet .row button {
  height: 44px;               /* same as input/select */
  min-height: 44px;
  line-height: 44px;

  box-sizing: border-box;
  padding: 0 14px;            /* horizontal only */
  display: inline-flex;
  align-items: center;
  justify-content: center;
}


.helpLink {
  color: var(--club-secondary);
  font-weight: 600;
  text-decoration: none;
}

.helpIcon {
  font-weight: 800;
  margin-right: 4px;
  color: var(--club-secondary);
}

/* =========================
   Admin Forms
========================= */

.adminForm {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px 24px;
}

.formItem {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.formItem label {
  font-weight: 600;
}

.formItem input[type="text"],
.formItem input[type="number"],
.formItem input[type="password"] {
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid #d1d5db;
}

.formItem input[type="color"] {
  height: 42px;
  padding: 4px;
  border-radius: 8px;
  border: 1px solid #d1d5db;
}

.formActions {
  margin-top: 16px;
  display: flex;
  justify-content: flex-end;
}

/* =========================
   Admin tables
========================= */

.adminTable {
  width: 100%;
  border-collapse: collapse;
}

.adminTable th,
.adminTable td {
  padding: 10px 12px;
  text-align: left;
  vertical-align: middle;
}

.adminTable thead th {
  font-size: 0.85rem;
  text-transform: uppercase;
  color: #6b7280; /* gray-500 */
  border-bottom: 1px solid #e5e7eb;
}

.adminTable tbody tr {
  border-bottom: 1px solid #f1f5f9;
}

.adminTable tbody tr:hover {
  background: #f8fafc;
}

/* Ensure action column never collapses */
.adminTable .actionsCol {
  width: 90px;
  text-align: right;
  white-space: nowrap;
}

/* Club name emphasis */
.adminTable .clubName {
  font-weight: 500;
}

/* Trial badges */
.trial {
  font-size: 0.85rem;
}

.trial.active {
  color: #16a34a; /* green */
  font-weight: 500;
}

.trial.expired {
  color: #dc2626; /* red */
  font-weight: 500;
}

/* Smaller admin buttons */
.btnSmall {
  padding: 6px 12px;
  font-size: 0.85rem;
}
.adminTable thead th {
  position: sticky;
  top: 0;
  background: #fff;
  z-index: 1;
}
.trial.warning {
  color: #ea580c; /* orange */
  font-weight: 600;
}
{% elif club.trial_days_left <= 7 %}
  <span class="trial warning">{{ club.trial_days_left }} days left</span>
{% endif %}


/* =========================
   Admin forms – mobile fix
========================= */

@media (max-width: 640px) {

  .adminForm {
    display: flex;
    flex-direction: column;
    gap: 16px;
  }

  .adminForm .formItem {
    width: 100%;
  }

  .adminForm input,
  .adminForm select,
  .adminForm textarea {
    width: 100%;
    min-width: 0;        /* 🔑 critical for iOS */
  }

}
/* =========================
   Admin pages only
========================= */

.admin-page .adminForm {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

@media (max-width: 640px) {
  .admin-page .adminForm {
    display: flex;
    flex-direction: column;
  }

  .admin-page .adminForm .formItem {
    width: 100%;
  }

  .admin-page .adminForm input,
  .admin-page .adminForm select,
  .admin-page .adminForm textarea {
    width: 100%;
    min-width: 0;
  }

  .admin-page input[type="color"] {
    width: 100%;
    height: 44px;
    padding: 4px;
    border-radius: 10px;
  }
}
@media (max-width: 640px) {
  .admin-page .adminTable tr {
    padding: 14px;
  }

  .admin-page .adminTable td {
    padding: 8px 0;
  }

  .admin-page .btnSmall {
    width: 100%;
  }
}
/* Trial status under Start Game */
.trialStatus {
  margin-top: 8px;
  font-size: 0.85rem;
  font-weight: 600;
}

.trialStatus.active {
  color: var(--club-primary);
}

.trialStatus.expired {
  color: #991b1b;
}
/* Trial status under Start Game */
.trialStatus {
  margin-top: 8px;
  font-size: 0.85rem;
  font-weight: 600;
}

.trialStatus.active {
  color: var(--club-primary);
}

.trialStatus.expired {
  color: #991b1b;
}
/* Container */
.startGameActions {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* Row with PIN + button */
.startGameRow {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Trial message under the button */
.trialStatus {
  font-size: 0.85rem;
  font-weight: 600;
  margin-left: 2px;
}

.trialStatus.active {
  color: var(--club-primary);
}

.trialStatus.expired {
  color: #991b1b;
}
.trialStatus {
  padding: 6px 10px;
  border-radius: 8px;
  background: color-mix(in srgb, var(--club-primary) 10%, white);
}

.startGameRow {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.startGameRow input,
.startGameRow button {
  width: 100%;
  box-sizing: border-box;
}
.pinWrap {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  background: #fff;
  width: 100%;
  box-sizing: border-box;
}

.pinWrap .pinInput {
  border: none;
  outline: none;
  flex: 1;
  padding: 0;
  font-size: 1rem;
}
.startGameBtn {
  height: 46px;
}
.pinWrap {
  min-height: 46px;
}
@media (min-width: 768px) {
  .startGameRow {
    flex-direction: row;
    align-items: stretch;
    gap: 12px;
  }

  .pinWrap {
    flex: 0 0 160px; /* fixed PIN width */
  }

  .startGameBtn {
    flex: 1; /* button fills remaining space */
  }
}
.pinWrap,
.startGameBtn {
  height: 46px;
}

.pinWrap {
  display: flex;
  align-items: center;
}
.adminForm {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.formSpan2 {
  grid-column: span 2;
}

@media (max-width: 767px) {
  .adminForm {
    grid-template-columns: 1fr;
  }

  .formSpan2 {
    grid-column: span 1;
  }
}

.adminForm input[type="color"] {
  width: 48px;
  height: 36px;
  padding: 0;
  border-radius: 6px;
  border: 1px solid #d1d5db;
  cursor: pointer;
}
.adminSection {
  padding: 16px 0;
  border-bottom: 1px solid #e5e7eb;
}

.adminSection:last-child {
  border-bottom: none;
}

.adminSection h3 {
  margin-bottom: 12px;
  font-size: 1rem;
  font-weight: 600;
  color: #111827;
}

.colorRow {
  display: flex;
  align-items: center;
  gap: 12px;
}

.colorRow input[type="color"] {
  width: 44px;
  height: 32px;
  border-radius: 6px;
  border: 1px solid #d1d5db;
  padding: 0;
}

.hexLabel {
  font-family: monospace;
  font-size: 0.85rem;
  color: #6b7280;
}
.crestPreview {
  max-height: 90px;
  display: block;
  margin-bottom: 8px;
}
.adminActions {
  margin-top: 24px;
  text-align: right;
}

.adminActions .btn {
  min-width: 160px;
}


.trialStatus.warning {
  background: #fff7ed;
  border: 1px solid #fdba74;
  color: #9a3412;
}
.badge {
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 500;
}

.badge.trial {
  background: #ecfdf5;
  color: #065f46;
}

.badge.warning {
  background: #fff7ed;
  color: #9a3412;
}

.badge.expired {
  background: #fef2f2;
  color: #7f1d1d;
}

/* =========================
   Subscription Form
========================= */

.subscriptionForm {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 10px;
}

.subscriptionOptions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.subscriptionOptions .radioOption {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.95rem;
  cursor: pointer;
}

.subscriptionOptions input[type="radio"] {
  accent-color: #6366f1; /* match primary */
}

.subscriptionForm .btn.primary {
  align-self: flex-start;
  min-width: 200px;
}
.durationOptions,
.dateOption {
  margin-left: 24px;
  margin-top: 6px;
  display: flex;
  gap: 12px;
}

.dateOption input[type="date"] {
  padding: 6px 10px;
  border-radius: 6px;
  border: 1px solid #d1d5db;
}

.subscriptionOptions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.trialStatus.warning .warningLink {
  margin-left: 4px;
  color: inherit;
  font-weight: 600;
  text-decoration: underline;
}
.trialStatus.expired .warningLink {
  margin-left: 4px;
  color: inherit;
  font-weight: 600;
  text-decoration: underline;
}
.trialStatus.warning .warningLink:hover {
  opacity: 0.85;
}
.supportCallout {
  background: #f8fafc;
  border: 1px solid #e5e7eb;
  border-left: 4px solid #3b82f6; /* matches your blue */
  padding: 10px 12px;
  border-radius: 6px;
  font-size: 0.9rem;
  margin: 0.75rem 0 1rem;
}

.supportCallout a {
  font-weight: 600;
  color: inherit;
  text-decoration: underline;
}

.readonlyField {
  background: #f3f4f6;
  color: #374151;
  cursor: not-allowed;
}


.subscriptionCard {
  padding: 20px 22px; /* slightly more than default card */
}

.subscriptionOptions {
  padding-left: 16px;
  padding-right: 16px;
  margin-top: 12px;
}
.subscriptionOptions {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-top: 14px;
}

/* Each logical block */
.subBlock {
  background: #f8fafc;
  border-radius: 12px;
  padding: 14px 16px;
}

/* Main mode radio */
.radioOption.main {
  background: transparent;
  padding: 0;
  font-weight: 600;
}

/* Child options */
.durationOptions {
  display: flex;
  gap: 12px;
  margin-top: 12px;
  padding-left: 28px; /* 👈 visual hierarchy */
}

/* Month pills */
.radioOption.pill {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 999px;
  padding: 8px 14px;
}

/* Date input spacing */
.dateOption {
  margin-top: 10px;
  padding-left: 28px;
}

/* Submit button alignment */
.subscriptionForm > .btn {
  margin-top: 16px;
  align-self: flex-start;
}

/* Add accent to the Extend Trial */
.subscriptionCard {
  border-left: 5px solid #4f46e5;
  background: linear-gradient(180deg, #f8f9ff, #ffffff);
}


/* =========================
   Colour picker inputs
========================= */
.colorRow input[type="color"] {
  width: 44px;
  height: 44px;
  padding: 0;
  border: 2px solid #e5e7eb;   /* neutral grey */
  border-radius: 12px;
  background: none;
}


/* Kill inner padding */
.colorRow input[type="color"]::-webkit-color-swatch-wrapper {
  padding: 0;
}

.colorRow input[type="color"]::-webkit-color-swatch {
  border: none;
  border-radius: 12px;
}

.colorRow input[type="color"]::-moz-color-swatch {
  border: none;
  border-radius: 12px;
}

/* Subtle focus ring instead of border */
.colorRow input[type="color"]:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.35);
}
/* ======================================================
   HARD RESET for <input type="color">
   Prevent double-input appearance
====================================================== */

.formField input[type="color"] {
  all: unset;                 /* 🔥 nuke inherited input styles */
  width: 44px;
  height: 44px;
  border-radius: 12px;
  cursor: pointer;
  display: inline-block;
}

/* Re-apply ONLY what we want */
.formField input[type="color"] {
  -webkit-appearance: none;
  appearance: none;
}

/* Chrome / Edge */
.formField input[type="color"]::-webkit-color-swatch-wrapper {
  padding: 0;
}

.formField input[type="color"]::-webkit-color-swatch {
  border: none;
  border-radius: 12px;
}

/* Firefox */
.formField input[type="color"]::-moz-color-swatch {
  border: none;
  border-radius: 12px;
}

/* Focus state (important for accessibility) */
.formField input[type="color"]:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.35);
}



.game-page #teamOnlyStatsContainer {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

/* FORCE 2 columns always (mobile + desktop) */
.game-page #statsContainer,
.game-page #teamOnlyStatsContainer {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

/* =========================
   Summary – Team Stats Rows
========================= */

.summaryStats {
  list-style: none;
  padding: 0;
  margin: 0;
}

.summaryStats .summaryRow {
  display: grid;
  grid-template-columns: 2fr 60px 50px 70px;
  align-items: center;
  gap: 8px;

  padding: 10px 14px;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background: #f9fafb;
}

.summaryStats .summaryRow + .summaryRow {
  margin-top: 8px;
}

.summaryStats .label {
  font-weight: 500;
}

.summaryStats .value {
  font-weight: 700;
  text-align: right;
}

.summaryStats .sep {
  text-align: center;
  color: #6b7280;
  font-size: 0.85em;
}

@media (max-width: 900px) {
  .summaryStats .summaryRow {
    grid-template-columns: 1fr auto auto auto;
    gap: 8px;
  }
}


/* Section labels */
.sectionLabel {
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 6px;
  display: block;
}

/* Card-style radio group */
.cardRadios {
  display: grid;
  gap: 10px;
}

/* Base radio card */
.cardRadios .radioOption {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 2px solid #e5e7eb; /* gray-200 */
  background: #f9fafb;
  cursor: pointer;
  transition: all 0.15s ease;
}

/* Hide native radio but keep accessibility */
.cardRadios input[type="radio"] {
  accent-color: #2563eb; /* blue-600 */
  transform: scale(1.1);
}

/* Hover */
.cardRadios .radioOption:hover {
  border-color: #93c5fd; /* blue-300 */
  background: #eff6ff;
}

/* Selected state */
.cardRadios .radioOption:has(input:checked) {
  border-color: #2563eb; /* blue-600 */
  background: #eff6ff;
  box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.15);
}

/* Emphasise Tracking Mode */
.trackingMode .radioOption {
  font-weight: 600;
}

/* Subtle secondary radios (Which team is yours) */
.cardRadios.subtle .radioOption {
  background: #ffffff;
  font-weight: 500;
}

/* Mobile spacing */
@media (max-width: 640px) {
  .cardRadios .radioOption {
    padding: 14px;
  }
}
/* =========================
   Radio Card Groups
========================= */

.cardRadios {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.cardRadios.subtle .radioOption {
  background: #f8fafc;
}

.radioOption {
  position: relative;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 12px 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.radioOption:hover {
  border-color: var(--accent, #3b82f6); /* #3b82f6 */
}

.radioOption input {
  accent-color: var(--accent, #3b82f6);
  cursor: pointer;
}

.radioOption span {
  font-weight: 500;
}

/* Selected state */
.radioOption input:checked + span {
  color: var(--accent, #3b82f6);
}

/* =========================
   Tracking / My Team Layout
========================= */

/* Always reserve space */
.myTeamMode {
  overflow: hidden;
  transition:
    max-height 0.25s ease,
    opacity 0.2s ease,
    margin-top 0.2s ease;
  max-height: 160px;     /* enough for label + radios */
  opacity: 1;
  margin-top: 0;
}

/* Hidden state */
.myTeamMode.is-hidden {
  max-height: 0;
  opacity: 0;
  margin-top: -6px;
  pointer-events: none;
}

/* Keep visual rhythm */
.trackingMode {
  margin-bottom: 6px;
}

@media (max-width: 520px) {
  .cardRadios {
    grid-template-columns: 1fr;
  }
}
.myTeamMode {
  border-left: 3px solid var(--accent, var(--club-primary));
  padding-left: 12px;
}


/* =========================
   Trial / Subscription Status
========================= */

.trialStatus {
  display: flex;
  align-items: center;
  gap: 8px;

  padding: 10px 14px;
  border-radius: 10px;
  margin-bottom: 10px;

  font-size: 0.95rem;
  font-weight: 600;

  /* FORCE readable defaults */
  background: #f8fafc;        /* neutral light */
  color: #111827;             /* dark text */
  border: 1px solid #e5e7eb;
}

/* Active trial */
.trialStatus.active {
  background: #ecfeff;        /* cyan-50 */
  border-left: 5px solid #06b6d4;
  color: #0f172a;
}

/* Trial warning (low games left) */
.trialStatus.warning {
  background: #fff7ed;        /* orange-50 */
  border-left: 5px solid #f59e0b;
  color: #92400e;
}

/* Expired trial */
.trialStatus.expired {
  background: #fef2f2;        /* red-50 */
  border-left: 5px solid #dc2626;
  color: #7f1d1d;
}

/* Links inside trial messages */
.trialStatus a {
  color: inherit;
  text-decoration: underline;
  font-weight: 700;
}


.teamsheetNote {
  margin-top: 6px;
  padding: 8px 10px;
  background: #f8fafc;
  border-left: 4px solid var(--club-primary);
  border-radius: 8px;
  font-size: 0.85rem;
  line-height: 1.4;
}
.teamsheetRules {
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px dashed #e5e7eb;
}


/* =========================
   Admin table – mobile layout
========================= */

@media (max-width: 768px) {

  .adminTable {
    border: 0;
  }

  .adminTable thead {
    display: none;
  }

  .adminTable tr {
    display: block;
    margin-bottom: 12px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 10px;
    background: #ffffff;
  }

  .adminTable td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;

    padding: 6px 0;
    border: none;
    text-align: right;
    font-size: 0.85rem;
  }

  .adminTable td::before {
    content: attr(data-label);
    font-weight: 600;
    color: #374151;
    text-align: left;
  }

  .adminTable td.clubName {
    font-size: 0.95rem;
    font-weight: 700;
  }

  .adminTable .actionsCol {
    justify-content: flex-end;
  }

  .adminTable .btnSmall {
    padding: 6px 10px;
    font-size: 0.8rem;
  }
}
@media (max-width: 768px) {
  .adminTable .actionsCol {
    margin-top: 6px;
  }
}


.adminTable th.sortable {
  cursor: pointer;
  user-select: none;
}

.adminTable th.sortable:hover {
  text-decoration: underline;
}
.adminTable th.sortable::after {
  content: " ⇅";
  font-size: 0.75em;
  opacity: 0.5;
}
.adminTable th.sortable.active {
  text-decoration: underline;
}

.matchTimeline {
  margin-top: 6px;
  font-size: 0.85rem;
  color: #374151;
}

.matchTimeline .timelineRow {
  line-height: 1.4;
}
/* =========================
   Match Phase / Timer Bar
========================= */

.matchPhaseBar {
  margin-top: 12px;
  padding: 12px;
  background: #f8fafc;
  border: 1px solid #e5e7eb;
  border-radius: 12px;

  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.phaseInfo {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.phaseLabel {
  font-size: 0.85rem;
  font-weight: 600;
  color: #374151;
}

.phaseTimer {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--club-primary);
}

/* 🔴 END PHASE (ALL SCREEN SIZES) */
#phaseActionBtn[data-action="END"] {
  background: #ef4444;
  border-color: #ef4444;
  color: #fff;
}

/* Hover polish */
#phaseActionBtn[data-action="END"]:hover {
  background: #dc2626;
  border-color: #dc2626;
}

/* Mobile layout only */
@media (max-width: 640px) {
  .matchPhaseBar {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
    gap: 10px;
  }

  .phaseInfo {
    align-items: center;
  }

  #phaseActionBtn {
    width: 100%;
    font-size: 1rem;
    padding: 12px;
    border-radius: 999px;
  }
}

/* =========================
   Landing Page
========================= */


.hero {
  background: linear-gradient(135deg, #1e40af, #2563eb);
  color: white;
  padding: 4rem 1.5rem;
  text-align: center;
  margin-bottom: 2rem;
}

.heroSubtitle {
  max-width: 700px;
  margin: 1rem auto 2rem;
  font-size: 1.1rem;
  opacity: 0.95;
}

.primaryBtn {
  display: inline-block;
  background: #16a34a;
  color: white;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
}

.feature {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: center;
  margin: 3rem 0;
}

.feature.reverse {
  direction: rtl;
}
.feature.reverse > * {
  direction: ltr;
}

.featureImage img {
  max-width: 100%;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.1);
  margin-bottom: 1rem;
}

@media (max-width: 900px) {
  .feature {
    grid-template-columns: 1fr;
  }
}



.headerLogo {
  height: 36px;
  width: auto;
  margin-right: 0.5rem;
}

.headerCrest {
  height: 36px;
  width: auto;
  margin-right: 0.5rem;
}

/* =========================
   Team Sheet Upload Card
========================= */

.teamsheetUploadCard {
  margin-bottom: 1rem;
  border: 1px dashed #d1d5db;   /* soft grey */
  background: #f9fafb;
}

.uploadTitle {
  margin-top: 0;
  margin-bottom: 0.5rem;
  font-size: 1rem;
}

.uploadDesc {
  margin: 0.25rem 0;
  font-size: 0.85rem;
  line-height: 1.4;
}

.uploadExample {
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  padding: 0.5rem;
  font-size: 0.8rem;
  margin: 0.5rem 0;
  white-space: pre-line;
}

.uploadInput {
  margin-top: 0.5rem;
}

.uploadDivider {
  text-align: center;
  font-size: 0.75rem;
  color: #9ca3af;
  margin: 0.75rem 0;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}


/* =========================
   Teamsheet Optional Container (Club Themed)
========================= */

.teamsheetOptionCard {
  margin-bottom: 1rem;
  border: 1px dashed #d1d5db;
  border-left: 5px solid var(--club-accent);
  background:
    linear-gradient(
      90deg,
      color-mix(in srgb, var(--club-accent) 6%, transparent),
      #f9fafb 40%
    );
}

.optionHeader {
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
  color: #111827; /* neutral dark (same family as other headings) */
}

.optionBody {
  font-size: 0.85rem;
}

.optionDesc {
  margin: 0.4rem 0;
}

.optionExample {
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  padding: 0.5rem;
  margin: 0.4rem 0;
  font-size: 0.8rem;
  white-space: pre-line;
}

.optionDivider {
  text-align: center;
  font-size: 0.75rem;
  color: #9ca3af;
  margin: 0.75rem 0;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}


.skipTeamsheet {
  text-align: center;
  margin-top: 0.5rem;
}

.skipTeamsheet .btn {
  font-size: 0.85rem;
}

.skipTeamsheet p {
  font-size: 0.8rem;
}
.optionItem {
  margin-bottom: 0.75rem;
}

.optionTitle {
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 0.25rem;
  color: #374151; /* neutral grey */
}

.optionItem.secondary .optionTitle,
.optionItem.tertiary .optionTitle {
  color: #374151; /* neutral */
}

.optionItem.tertiary {
  padding-top: 0.25rem;
  border-top: 1px dashed #e5e7eb;
}
/* =========================
   Teamsheet Options – Mobile Fixes
========================= */

.optionItem {
  display: block;
}

.optionItem .btn {
  display: inline-block;
  margin: 0.4rem 0 0.6rem 0; /* space above & below button */
}
.optionItem.secondary {
  padding-top: 0.5rem;
}

.optionItem.secondary .optionDesc {
  margin-top: 0.25rem;
}
/* =========================
   Teamsheet Info Callouts
========================= */

.jersey-help {
  display: flex;
  align-items: flex-start;
  gap: 0.4rem;
  margin-bottom: 0.5rem;
  line-height: 1.35;
}

.jersey-help:last-of-type {
  margin-bottom: 0;
}

.jersey-help .infoIcon {
  flex-shrink: 0;
  margin-top: 0.1rem;
}
/* =========================
   Proceed to Live Game Button
========================= */

.btnProceedLive {
  background: var(--proceed-btn-bg, #2563eb); /* default blue */
  color: #fff;
  border: none;
  font-weight: 600;
  padding: 0.6rem 1rem;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  text-decoration: none;
  box-shadow: 0 1px 3px rgba(0,0,0,0.12);
}

.btnProceedLive:hover {
  filter: brightness(1.05);
}

.btnProceedLive:active {
  transform: translateY(1px);
  box-shadow: 0 1px 2px rgba(0,0,0,0.15);
}

@media (max-width: 480px) {
  .btnProceedLive {
    width: 100%;
    justify-content: center;
    margin-top: 0.3rem;
  }
}

.coachDot {
  margin-left: 4px;
  font-size: 0.8em;
}


.coachBadge {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.2;
}

.coachSub {
  display: block;        
  font-size: 0.7em;
  opacity: 0.7;
  margin-top: 2px;
  margin-left: 38px;
}

@media (max-width: 640px) {
  .coachBadge {
    align-items: center;   /* center text inside the badge */
    text-align: center;    /* center the text lines */
  }
}



/* =========================
   Extra Time Modal
========================= */

.modalOverlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 1rem;
}

.modalOverlay.hidden {
  display: none;
}

.modalCard {
  background: white;
  border-radius: 14px;
  max-width: 420px;
  width: 100%;
  padding: 1.25rem;
  text-align: center;
  box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}

.modalTitle {
  margin-top: 0;
  margin-bottom: 0.5rem;
  font-size: 1.25rem;
}

.modalText {
  font-size: 0.95rem;
  color: #444;
  margin-bottom: 1.25rem;
}

.modalActions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

/* Desktop enhancement */
@media (min-width: 768px) {
  .modalActions {
    flex-direction: row;
  }
}


button.disabled,
button:disabled {
  opacity: 0.6;
  pointer-events: none;
}

.phaseTimer {
  display: none;          /* hidden by default */
  font-weight: 700;
  font-size: 1.1rem;
  margin-top: 0.25rem;
}
