/* ============================================================
   COMPONENTS.CSS — Thirsk Squash Club
   Reusable UI pieces: cards, buttons, forms, tables
   ============================================================ */

/* ── BUTTONS ───────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 18px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  font-family: var(--font-body);
  text-decoration: none;
}

.btn-primary  { background: var(--bm);  color: #05080a; font-weight: 600; box-shadow: 0 4px 14px rgba(0,208,132,0.35); }
.btn-dark     { background: #05080a;    color: var(--bm); border: 1px solid var(--bm); }
.btn-blue     { background: var(--bm);  color: #05080a; font-weight: 600; }
.btn-ghost    { background: none; border: 1.5px solid rgba(255,255,255,.35); color: #fff; }
.btn-danger   { background: var(--rd);  color: #fff; }
.btn-success  { background: var(--gn);  color: #fff; }
.btn-whatsapp { background: #25d366;    color: #fff; }

.btn-primary:hover { background: var(--bml); box-shadow: 0 6px 20px rgba(52,211,153,0.55); transform: translateY(-1px); }
.btn-dark:hover    { background: #111; border-color: var(--bml); color: var(--bml); }
.btn-blue:hover    { background: var(--bm2); color: #fff; }
.btn-ghost:hover   { border-color: var(--bm); color: var(--bm); background: rgba(0,208,132,0.08); }

.btn-sm { padding: 5px 12px; font-size: 12px; }
.btn-lg { padding: 12px 24px; font-size: 15px; }
.btn-full { width: 100%; }

/* Compact admin action buttons */
.btn-dark-sm, .btn-blue-sm {
  font-size: 10px;
  padding: 2px 8px;
  border: none;
  border-radius: var(--radius-sm);
  color: #fff;
  font-family: var(--font-body);
  font-weight: 500;
  cursor: pointer;
  transition: opacity 0.15s;
}
.btn-dark-sm { background: var(--bd); }
.btn-blue-sm { background: var(--bm); }
.btn-dark-sm:hover, .btn-blue-sm:hover { opacity: 0.85; }

/* Header specific ghost button */
.hdr-ghost {
  background: none;
  border: 1px solid rgba(255,255,255,.25);
  color: var(--lav);
  font-size: 12px;
  padding: 5px 11px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s;
  font-family: var(--font-body);
}
.hdr-ghost:hover { border-color: var(--bm); color: var(--bm); }

.hdr-solid {
  background: var(--bm);
  border: none;
  color: #111;
  font-size: 12.5px;
  font-weight: 600;
  padding: 6px 20px;          /* wider — was 5px 11px */
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-family: var(--font-body);
  letter-spacing: 0.3px;
  white-space: nowrap;
  transition: transform 0.15s;
}
.hdr-solid:hover { transform: translateY(-1px); }

/* ── CARDS ─────────────────────────────────────────────────── */
.card {
  background: var(--wh);
  border: 0.5px solid var(--br);
  border-radius: var(--radius-lg);
  padding: 1.1rem;
}

.card h3 {
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 0.7rem;
}

.card-dark {
  background: var(--bd);
  border-color: var(--bd);
  color: #fff;
}

/* Stat card */
.stat-card {
  background: var(--wh);
  border: 0.5px solid var(--br);
  border-radius: var(--radius-lg);
  padding: 0.9rem 1.1rem;
}

.stat-label {
  font-size: 11px;
  color: var(--mu);
  margin-bottom: 3px;
}

.stat-value {
  font-size: 22px;
  font-weight: 500;
}

.stat-value.blue  { color: var(--bm); font-weight: 600; }
.stat-value.gold  { color: #b8860b; font-weight: 600; }
.stat-value.green { color: var(--gn); font-weight: 600; }

/* Anniversary stat card */
.stat-anni {
  background: linear-gradient(135deg, var(--bd) 0%, var(--bm) 100%);
  border-color: var(--bm);
  position: relative;
  overflow: hidden;
}
.stat-anni::after {
  content: '';
  position: absolute;
  top: -10px; right: -10px;
  width: 50px; height: 50px;
  border-radius: 50%;
  background: rgba(255,215,0,0.1);
}
.stat-anni .stat-label { color: var(--ac); letter-spacing: 1px; font-weight: 500; }
.stat-anni .stat-anni-years {
  font-family: var(--font-display);
  color: #fff;
  font-size: 14px;
  letter-spacing: 2px;
  line-height: 1.2;
}
.stat-anni .stat-anni-years em {
  color: #fff;
  font-style: normal;
}

/* ── FORMS ─────────────────────────────────────────────────── */
.form-group {
  margin-bottom: 0.8rem;
}

.form-group label {
  display: block;
  font-size: 11px;
  color: var(--mu);
  margin-bottom: 3px;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 8px 10px;
  border: 0.5px solid var(--br);
  border-radius: var(--radius-sm);
  font-size: 13px;
  background: var(--wh);
  color: #0a0f1e;
  transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--bm);
}

.form-group textarea {
  resize: vertical;
  min-height: 80px;
}

/* ── STRIPE PAYMENT BOX ────────────────────────────────────── */
.stripe-box {
  background: var(--bl);
  border: 1px solid var(--bm);
  border-radius: var(--radius-lg);
  padding: 1.1rem;
  margin-top: 0.9rem;
}

.stripe-box h4 {
  font-size: 13px;
  font-weight: 500;
  color: var(--bd);
  margin-bottom: 0.4rem;
}

.stripe-price {
  font-family: var(--font-display);
  font-size: 32px;
  color: var(--bd);
  letter-spacing: 2px;
  margin-bottom: 0.2rem;
}

.stripe-note {
  font-size: 11px;
  color: var(--mu);
  margin-bottom: 0.8rem;
  line-height: 1.5;
}

.stripe-secure {
  font-size: 10px;
  color: var(--mu);
  margin-top: 0.4rem;
}

/* ── TABLES ────────────────────────────────────────────────── */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.data-table th {
  text-align: left;
  padding: 7px 9px;
  color: var(--mu);
  font-weight: 500;
  border-bottom: 0.5px solid var(--br);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.data-table td {
  padding: 8px 9px;
  border-bottom: 0.5px solid var(--br);
  vertical-align: middle;
}

.data-table tr:last-child td {
  border-bottom: none;
}

.data-table tr.row-promo td { background: #f0fff6; }
.data-table tr.row-relg  td { background: #fff5f5; }

/* ── RANK BADGES (league positions) ────────────────────────── */
.rank {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  font-size: 10px;
  font-weight: 500;
}
.rank-gold   { background: #fff3cd; color: #856404; }
.rank-silver { background: #e9ecef; color: #495057; }
.rank-bronze { background: #fde3cc; color: #8a3800; }
.rank-other  { background: var(--bl); color: var(--bm); }

/* ── RESULT ROWS ───────────────────────────────────────────── */
.result-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem;
  border: 0.5px solid var(--br);
  border-radius: var(--radius-sm);
  margin-bottom: 0.4rem;
  font-size: 12px;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.result-score {
  font-family: var(--font-display);
  font-size: 18px;
  letter-spacing: 2px;
}

.result-score.win  { color: var(--gn); }
.result-score.loss { color: var(--rd); }

/* ── DIVISION HEADER ───────────────────────────────────────── */
.div-header {
  background: var(--bd);
  color: #fff;
  padding: 7px 9px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 1px;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  margin-top: 0.9rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-left: 3px solid var(--bm);
}

.div-header span {
  font-size: 10px;
  color: rgba(255,255,255,.45);
}

/* ── RULE BLOCKS (mini league rules) ───────────────────────── */
.rule-block {
  margin-bottom: 0.7rem;
  padding: 0.75rem;
  background: var(--bl);
  border-radius: var(--radius-md);
  border-left: 3px solid var(--bm);
}

.rule-block h4 {
  font-size: 12px;
  font-weight: 500;
  color: var(--bd);
  margin-bottom: 0.3rem;
}

.rule-block p {
  font-size: 12px;
  color: var(--mu);
  line-height: 1.6;
}

/* ── SCORE INPUT (match reporting) ─────────────────────────── */
.score-inputs {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 0.4rem;
  align-items: center;
  margin-bottom: 0.7rem;
}

.score-inputs input {
  width: 100%;
  padding: 10px;
  border: 0.5px solid var(--br);
  border-radius: var(--radius-sm);
  font-size: 22px;
  font-family: var(--font-display);
  text-align: center;
  color: var(--bd);
  background: #fff;
  letter-spacing: 2px;
}

.score-inputs input:focus { outline: none; border-color: var(--bm); }
.score-vs { text-align: center; font-size: 11px; color: var(--mu); font-weight: 500; }

/* ── MEMBERSHIP CARDS ──────────────────────────────────────── */
.mem-card {
  background: var(--wh);
  border: 0.5px solid var(--br);
  border-radius: var(--radius-lg);
  padding: 1.1rem;
  position: relative;
  cursor: pointer;
  transition: all 0.2s;
}

.mem-card:hover {
  border-color: var(--bm);
  transform: translateY(-2px);
}

.mem-card.featured { border: 2px solid var(--bm); }

.mem-badge {
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--bm);
  color: #fff;
  font-size: 10px;
  padding: 2px 10px;
  border-radius: 18px;
  white-space: nowrap;
}

.mem-type  { font-size: 11px; color: var(--mu); margin-bottom: 3px; }
.mem-price { font-size: 24px; font-weight: 500; }
.mem-price span { font-size: 12px; font-weight: 400; color: var(--mu); }
.mem-features { margin-top: 0.6rem; font-size: 12px; color: var(--mu); line-height: 1.9; }

.mem-btn {
  width: 100%;
  margin-top: 0.9rem;
  background: var(--bm);
  color: #fff;
  border: none;
  padding: 8px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}
.mem-btn:hover          { background: var(--bd); }
.mem-btn.free           { background: var(--bm); color: #111; }
.mem-btn.free:hover     { opacity: 0.88; }
.mem-btn.mem-btn-active { background: var(--gl); color: var(--gn); cursor: default; border: 1px solid var(--gn); }
.mem-btn.mem-btn-renew  { background: var(--bm); color: #111; }

/* ── NEWS ITEMS ────────────────────────────────────────────── */
.news-item {
  border-bottom: 0.5px solid var(--br);
  padding: 0.75rem 0;
}
.news-item:last-child { border-bottom: none; padding-bottom: 0; }
.news-date  { font-size: 11px; color: var(--mu); margin-bottom: 2px; }
.news-title { font-size: 13px; font-weight: 500; }
.news-body  { font-size: 12px; color: var(--mu); margin-top: 2px; line-height: 1.5; }
.news-img   { width: 100%; max-height: 140px; object-fit: cover; border-radius: 6px; margin-bottom: .4rem; display: block; }

/* ── SPONSORS BAR ──────────────────────────────────────────── */
.sponsors-bar {
  background: var(--wh);
  border: 0.5px solid var(--br);
  border-radius: var(--radius-lg);
  padding: 0.9rem 1.2rem;
  margin-bottom: 1.2rem;
}

.sponsors-label {
  font-size: 10px;
  color: var(--mu);
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 0.6rem;
}

.sponsors-list {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  flex-wrap: wrap;
}

.sponsor-slot {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border: 0.5px solid var(--br);
  border-radius: var(--radius-sm);
  font-size: 12px;
  color: var(--mu);
}

.sponsor-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--bl);
  border: 1.5px solid var(--bm);
}

.sponsor-cta {
  font-size: 11px;
  color: var(--bm);
  cursor: pointer;
  margin-left: auto;
  font-weight: 500;
}

/* ── COURT BOOKING CALENDAR ────────────────────────────────── */
.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  margin-bottom: 0.8rem;
}

.cal-day {
  text-align: center;
  padding: 6px 3px;
  font-size: 11px;
  border-radius: 5px;
  cursor: pointer;
  border: 0.5px solid transparent;
  transition: all 0.15s;
}
.cal-day.header  { color: var(--mu); cursor: default; font-size: 10px; }
.cal-day.empty   { cursor: default; }
.cal-day.today    { font-weight: 500; color: var(--bm); }
.cal-day.selected,
.cal-day.sel      { background: var(--bm); color: #fff; }
.cal-day:not(.header):not(.empty):not(.selected):not(.sel):hover { border-color: var(--bm); color: var(--bm); }

.time-slots {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.4rem;
  max-height: 260px;
  overflow-y: auto;
}

.time-slot {
  padding: 7px;
  border: 0.5px solid var(--br);
  border-radius: var(--radius-sm);
  font-size: 12px;
  text-align: center;
  cursor: pointer;
  transition: all 0.15s;
}
.time-slot:hover              { border-color: var(--bm); color: var(--bm); }
.time-slot.taken              { background: #f5f5f5; color: #bbb; cursor: not-allowed; }
.time-slot.selected,
.time-slot.sel                { background: var(--bm); color: #fff; border-color: var(--bm); }

.court-tabs { display: flex; gap: 0.4rem; margin-bottom: 0.9rem; }

.court-tab {
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  border: 0.5px solid var(--br);
  font-size: 12px;
  cursor: pointer;
  background: var(--wh);
  transition: all 0.2s;
}
.court-tab.active { background: var(--bd); color: #fff; border-color: var(--bd); }

.booking-summary {
  background: var(--bl);
  border-radius: var(--radius-md);
  padding: 0.9rem;
  font-size: 12px;
  margin-top: 0.9rem;
  display: none;
}

/* ── ADMIN TABS ────────────────────────────────────────────── */
.admin-tabs { display: flex; gap: 0.4rem; margin-bottom: 1rem; flex-wrap: wrap; }

.admin-tab {
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  border: 0.5px solid var(--br);
  font-size: 12px;
  cursor: pointer;
  background: var(--wh);
  transition: all 0.2s;
}
.admin-tab.active { background: var(--bd); color: #fff; }

.admin-section { display: none; }
.admin-section.active { display: block; }

/* ── CONFIRM / DISPUTE BUTTONS (pending results) ───────────── */
.result-actions { display: flex; gap: 0.4rem; width: 100%; }

.result-actions button {
  flex: 1;
  padding: 5px;
  font-size: 11px;
  cursor: pointer;
  border-radius: 5px;
  font-family: var(--font-body);
  border: 0.5px solid;
}

.btn-confirm {
  background: var(--gl);
  color: var(--gn);
  border-color: var(--gn);
}

.btn-dispute {
  background: var(--rl);
  color: var(--rd);
  border-color: var(--rd);
}

/* ── ANNIVERSARY HERO PILL ─────────────────────────────────── */
.anni-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255, 215, 0, 0.12);
  border: 1px solid rgba(255, 215, 0, 0.35);
  border-radius: 20px;
  padding: 4px 14px;
  margin-bottom: 0.75rem;
  font-size: 11px;
  color: var(--bm);
  letter-spacing: 2px;
  font-weight: 500;
}

.anni-pill-year {
  font-family: var(--font-display);
  font-size: 13px;
  color: #fff;
  letter-spacing: 2px;
}

/* ── LEAGUE TABS ────────────────────────────────────────────── */
.league-tab {
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  border: 0.5px solid var(--br);
  font-size: 12px;
  cursor: pointer;
  background: var(--wh);
  transition: all 0.2s;
  font-family: var(--font-body);
}

.league-tab.active {
  background: var(--bd);
  color: var(--bm);
  border-color: var(--bd);
}

.league-section {
  display: none;
}

.league-section.active {
  display: block;
}

/* ============================================================
   HERO — 50 YEAR ANNIVERSARY TREATMENT
   ============================================================ */

.hero-anniversary-ribbon {
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 3;
  background: linear-gradient(135deg, #b8860b 0%, #e8c872 50%, #b8860b 100%);
  color: #2a1a00;
  font-family: var(--font-editorial);
  font-style: italic;
  font-weight: 700;
  font-size: 10px;
  letter-spacing: 1px;
  padding: 4px 10px;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(184,134,11,0.4);
  text-transform: uppercase;
  white-space: nowrap;
}
@media (max-width: 600px) {
  .hero-anniversary-ribbon {
    /* Shorten the ribbon content on narrow screens via CSS so it can't
       overlap the title. Real text is hidden, a shorter label shows. */
    font-size: 0;
    padding: 3px 8px;
    top: 0.75rem;
    right: 0.75rem;
  }
  .hero-anniversary-ribbon::before {
    content: '50 YEARS';
    font-size: 9px;
    letter-spacing: 1.2px;
  }
}

.hero-kicker {
  font-family: var(--font-editorial);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(13px, 1.6vw, 15px);
  color: var(--bm);
  letter-spacing: 1px;
  margin-bottom: 0.6rem;
  display: block;
}

.hero-heritage {
  display: flex;
  align-items: baseline;
  gap: 0.9rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255,255,255,.12);
  flex-wrap: wrap;
}
.hero-heritage-num-wrap {
  display: flex;
  align-items: baseline;
  gap: 0.4rem;
}
.hero-heritage-num {
  font-family: var(--font-display);
  font-size: clamp(44px, 7vw, 72px);
  color: var(--bm);
  line-height: 1;
  letter-spacing: 2px;
}
.hero-heritage-years {
  font-family: var(--font-display);
  font-size: clamp(16px, 2vw, 22px);
  color: var(--bm);   /* lime — adds more green to top of hero */
  letter-spacing: 3px;
  text-transform: uppercase;
  line-height: 1;
}
.hero-heritage-label {
  font-family: var(--font-editorial);
  font-style: italic;
  font-size: clamp(13px, 1.5vw, 16px);
  color: rgba(255,255,255,.82);
  line-height: 1.35;
}
.hero-heritage-dates {
  font-family: var(--font-display);
  font-size: 12px;
  letter-spacing: 3px;
  color: rgba(255,255,255,.5);
  display: block;
  margin-top: 2px;
}

/* ============================================================
   HOMEPAGE NEWS — EDITORIAL TREATMENT
   ============================================================ */

.news-card h3.news-heading {
  font-family: var(--font-editorial);
  font-style: italic;
  font-weight: 500;
  font-size: 22px;
  letter-spacing: -0.3px;
  margin-bottom: 1rem;
  color: var(--bd);
}
.news-item {
  padding: 0.9rem 0;
  border-bottom: 0.5px solid var(--br);
}
.news-item:last-child { border-bottom: none; padding-bottom: 0; }
.news-item:first-child { padding-top: 0; }
.news-item .news-date {
  font-family: var(--font-editorial);
  font-style: italic;
  font-size: 11px;
  color: var(--bm);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-bottom: 4px;
}
.news-item .news-title {
  font-size: 15px;
  font-weight: 500;
  color: var(--bd);
  line-height: 1.35;
  margin-bottom: 4px;
}
.news-item .news-body {
  font-size: 13px;
  color: var(--mu);
  line-height: 1.55;
}
.news-item .news-image {
  width: 100%;
  max-height: 180px;
  object-fit: cover;
  border-radius: var(--radius-md);
  margin-bottom: 0.55rem;
  display: block;
}

/* ============================================================
   ADMIN — DIVISION MANAGEMENT
   ============================================================ */
.admin-unassigned-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.4rem 0.5rem;
  margin-bottom: 0.3rem;
  background: var(--al);
  border: 0.5px solid #ffe082;
  border-radius: var(--radius-sm);
  font-size: 12px;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.admin-unassigned-row > span { font-weight: 500; }
.admin-unassigned-row > div { display: flex; flex-wrap: wrap; gap: 4px; }

.division-card-title {
  font-weight: 500;
  font-size: 13px;
  color: var(--bd);
}
.division-player-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.35rem 0.5rem;
  border-bottom: 0.5px solid var(--br);
  font-size: 12px;
}
.division-player-row:last-child { border-bottom: none; }

/* ============================================================
   ADMIN — NEWS LIST (in admin panel)
   ============================================================ */
.admin-news-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 0.6rem 0;
  border-bottom: 0.5px solid var(--br);
  gap: 0.5rem;
}
.admin-news-row .admin-news-body { flex: 1; }
.admin-news-row .admin-news-title { font-weight: 500; font-size: 13px; }

/* ============================================================
   LEAGUE — HOMEPAGE CTA + PLAYER CARDS
   ============================================================ */

/* Outlined lime button for "Sign In" homepage action */
.btn-outline-blue {
  background: none;
  border: 1px solid var(--bm);
  color: var(--bm);
}
.btn-outline-blue:hover { background: var(--bl); }

/* Solid plum button for "Join" / "Rejoin" homepage actions */
.btn-plum {
  background: var(--bd);
  color: #fff;
  border: none;
}
.btn-plum:hover { background: #1a221d; }

.in-league-flag {
  font-size: 11px;
  color: var(--gn);
  font-weight: 500;
}

/* Unread red dot on player card message button */
.unread-dot {
  position: absolute;
  top: -2px;
  right: -2px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--rd);
  border: 2px solid var(--wh);
}

/* Message preview under player-card chat bubble */
.msg-preview {
  font-size: 11px;
  color: var(--mu);
  margin-top: 2px;
}
.msg-preview.is-unread {
  color: var(--bd);
  font-weight: 600;
}

/* Chat thread rounded corner overrides */
.chat-bubble {
  margin-bottom: 0.6rem;
  padding: 0.5rem 0.8rem;
  max-width: 80%;
}
.chat-bubble-me    { border-radius: 12px 12px 4px 12px; }
.chat-bubble-other { border-radius: 12px 12px 12px 4px; }
.chat-bubble-time {
  font-size: 10px;
  margin-top: 3px;
  opacity: 0.6;
}

/* Standings table row tints — top = promotion, bottom = relegation */
.standings-row-promote { background: #f0fff6; }
.standings-row-demote  { background: #fff5f5; }

/* ============================================================
   CONSENT BLOCK (signup modal + profile page)
   ============================================================ */
.consent-block {
  background: var(--bg);
  border: 0.5px solid var(--br);
  border-radius: var(--radius-md);
  padding: 0.75rem 0.9rem;
}
.consent-heading {
  font-size: 12px;
  font-weight: 500;
  color: var(--bd);
  letter-spacing: 0.3px;
  margin-bottom: 0.55rem;
}
.consent-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 12px;
  color: var(--mu);
  cursor: pointer;
  line-height: 1.45;
  margin-bottom: 0.45rem;
}
.consent-row:last-child { margin-bottom: 0; }
.consent-row input[type="checkbox"] {
  flex-shrink: 0;
  margin-top: 2px;
  width: 16px;
  height: 16px;
  accent-color: var(--bm);
  cursor: pointer;
}
.consent-row strong { color: var(--bd); font-weight: 500; }
.consent-note {
  font-size: 10px;
  color: var(--mu);
  font-style: italic;
  margin-top: 0.55rem;
  padding-top: 0.45rem;
  border-top: 0.5px dashed var(--br);
}

/* ============================================================
   HOMEPAGE PRICING PEEK (conversion surface)
   ============================================================ */
.pricing-peek {
  background: var(--wh);
  border: 0.5px solid var(--br);
  border-radius: var(--radius-lg);
  padding: 1.1rem;
  margin-bottom: 1.2rem;
}
.pricing-peek-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.9rem;
  flex-wrap: wrap;
}
.pricing-peek-kicker {
  font-family: var(--font-editorial);
  font-style: italic;
  font-size: 12px;
  color: var(--bm);
  letter-spacing: 1px;
  text-transform: uppercase;
}
.pricing-peek-title {
  font-family: var(--font-editorial);
  font-style: italic;
  font-size: 20px;
  color: var(--bd);
  margin-top: 2px;
}
.pricing-peek-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 0.6rem;
}
.pricing-peek-tile {
  background: var(--bg);
  border: 0.5px solid var(--br);
  border-radius: var(--radius-md);
  padding: 0.75rem 0.9rem;
  transition: transform 0.15s, box-shadow 0.15s;
}
.pricing-peek-tile:hover {
  transform: translateY(-1px);
  box-shadow: 0 3px 10px rgba(15,21,17,0.08);
}
.pricing-peek-tile.is-featured {
  background: linear-gradient(180deg, #faf1d6 0%, #fff 100%);
  border: 1px solid var(--gml);
  box-shadow: 0 6px 20px rgba(184,134,11,0.12);
  position: relative;
}
.pricing-peek-tile.is-featured::after {
  content: 'MOST POPULAR';
  position: absolute;
  top: -10px;
  right: 10px;
  background: linear-gradient(135deg, #b8860b 0%, #e8c872 50%, #b8860b 100%);
  color: #2a1a00;
  font-size: 10px;
  letter-spacing: 1px;
  padding: 3px 10px;
  border-radius: 10px;
  font-weight: 700;
  box-shadow: 0 3px 10px rgba(184,134,11,0.45);
  text-transform: uppercase;
  font-family: var(--font-body);
}
.pricing-peek-label {
  font-family: var(--font-display);
  font-size: 13px;
  letter-spacing: 2px;
  color: var(--mu);
  margin-bottom: 4px;
}
.pricing-peek-price {
  font-family: var(--font-display);
  font-size: 24px;
  color: var(--bd);
  letter-spacing: 1px;
  line-height: 1;
  margin-bottom: 4px;
}
.pricing-peek-price span {
  font-family: var(--font-body);
  font-size: 11px;
  color: var(--mu);
  letter-spacing: 0;
  font-weight: 400;
  margin-left: 2px;
}
.pricing-peek-note {
  font-size: 11px;
  color: var(--mu);
  line-height: 1.4;
}

/* ============================================================
   BOOKING STATUS BANNER (public-visible calendar, action-gated)
   ============================================================ */
.book-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  background: var(--bd);
  color: #fff;
  border-radius: var(--radius-lg);
  padding: 0.9rem 1.2rem;
  margin-bottom: 0.9rem;
  border-left: 4px solid var(--bm);
}
.book-banner-body { flex: 1; min-width: 200px; }
.book-banner-title {
  font-family: var(--font-editorial);
  font-style: italic;
  font-weight: 500;
  font-size: 17px;
  color: var(--bm);
  margin-bottom: 2px;
}
.book-banner-sub {
  font-size: 12px;
  color: var(--lav);
  line-height: 1.5;
}
.book-banner-actions {
  display: flex;
  gap: 0.5rem;
  flex-shrink: 0;
  flex-wrap: wrap;
}

/* ============================================================
   LEAGUE PAGE — TOP GRID (divisions left, signup hero right)
   ============================================================ */
.league-top-grid {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 1.2rem;
  margin-bottom: 1rem;
  align-items: start;
}
.league-divisions-stack {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.9rem;
}
.league-signup-col {
  position: sticky;
  top: 72px; /* clear the sticky header */
  align-self: start;
}
/* Stack on narrower screens — sticky is unhelpful on small heights */
@media (max-width: 960px) {
  .league-top-grid { grid-template-columns: 1fr; }
  .league-signup-col { position: static; }
  /* Two divisions side-by-side again when there's no right column */
  .league-divisions-stack { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
}

/* ============================================================
   LEAGUE-PAGE MINI LEAGUE SIGNUP CARD
   State-aware hero card: kicker + big title + dynamic sub +
   primary CTA, with a live progress widget on the right.
   ============================================================ */
.league-signup-card {
  display: grid;
  /* Stack body + progress vertically — card now lives in a 360px right
     column on the league page, so side-by-side layout doesn't fit. */
  grid-template-columns: 1fr;
  gap: 1.2rem;
  align-items: stretch;
  background: linear-gradient(135deg, var(--bd) 0%, #1a221d 100%);
  color: #fff;
  border-radius: var(--radius-lg);
  padding: 1.6rem 1.7rem;
  margin-bottom: 1rem;
  position: relative;
  overflow: hidden;
  border-left: 4px solid var(--bm);
}
.league-signup-card::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 85% 20%, rgba(0, 208, 132,0.12) 0%, transparent 55%),
    radial-gradient(circle at 15% 85%, rgba(0, 208, 132,0.10) 0%, transparent 55%);
}
.league-signup-body {
  position: relative;
  z-index: 1;
  min-width: 0;
}
.league-signup-kicker {
  font-family: var(--font-editorial);
  font-style: italic;
  font-size: 12px;
  color: var(--bm);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  display: block;
  margin-bottom: 0.5rem;
}
.league-signup-title {
  font-family: var(--font-display);
  font-size: clamp(26px, 3.4vw, 40px);
  color: #fff;
  letter-spacing: 2px;
  line-height: 1.1;
  margin-bottom: 0.6rem;
  font-weight: 400;
}
.league-signup-sub {
  font-size: 14px;
  color: var(--lav);
  line-height: 1.65;
  max-width: 560px;
  margin-bottom: 1.15rem;
}
.league-signup-actions {
  display: flex;
  gap: 0.55rem;
  flex-wrap: wrap;
  align-items: center;
}
.btn-signup-primary {
  font-size: 14px;
  padding: 10px 22px;
}
.btn-signup-secondary {
  background: none;
  border: 1px solid rgba(255,255,255,0.3);
  color: #fff;
  font-size: 13px;
  padding: 9px 18px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-family: var(--font-body);
  font-weight: 500;
  transition: border-color 0.15s, color 0.15s;
}
.btn-signup-secondary:hover { border-color: var(--bm); color: var(--bm); }
.btn-signup-wa {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--wa);
  color: #fff;
  font-size: 12px;
  padding: 9px 16px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  font-family: var(--font-body);
  font-weight: 500;
  white-space: nowrap;
}
.btn-signup-wa:hover { opacity: 0.9; text-decoration: none; }

/* Right-hand progress widget */
.league-signup-progress {
  position: relative;
  z-index: 1;
  text-align: center;
  min-width: 180px;
  padding: 1.1rem 1.4rem 1.2rem;
  background: rgba(8, 10, 9, 0.4);
  border: 1px solid rgba(0, 208, 132, 0.4);
  border-radius: var(--radius-md);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.league-signup-count {
  font-family: var(--font-display);
  font-size: clamp(40px, 4.4vw, 54px);
  color: var(--bm);
  letter-spacing: 2px;
  line-height: 1;
}
.league-signup-count-slash {
  color: rgba(255,255,255,0.45);
  font-size: 0.7em;
  letter-spacing: 1px;
}
.league-signup-of {
  font-size: 11px;
  color: rgba(255,255,255,0.7);
  letter-spacing: 1.8px;
  text-transform: uppercase;
  margin: 0.45rem 0 0.7rem;
}
.league-signup-bar-wrap {
  background: rgba(255,255,255,0.18);
  border-radius: 6px;
  height: 10px;
  overflow: hidden;
  width: 100%;
}
.league-signup-bar {
  background: linear-gradient(90deg, var(--bm) 0%, var(--bml) 100%);
  height: 100%;
  border-radius: 6px;
  width: 0%;
  transition: width 0.8s ease;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.3);
}
.league-signup-hint {
  font-family: var(--font-editorial);
  font-style: italic;
  font-size: 12px;
  color: rgba(255,255,255,0.8);
  margin-top: 0.6rem;
  line-height: 1.4;
}

/* Stack on narrow screens */
@media (max-width: 680px) {
  .league-signup-card {
    grid-template-columns: 1fr;
    gap: 1.25rem;
    padding: 1.4rem 1.3rem;
  }
  .league-signup-progress {
    width: 100%;
    min-width: 0;
  }
}

/* Live-update pulse — plays after a Supabase Realtime event repaints standings.
   Subtle emerald border flash so members see "this just updated" without distraction. */
@keyframes standings-flash-anim {
  0%   { box-shadow: 0 0 0 0 rgba(52, 211, 153,0); }
  20%  { box-shadow: 0 0 0 4px rgba(52, 211, 153,0.65); }
  100% { box-shadow: 0 0 0 0 rgba(52, 211, 153,0); }
}
.standings-flash {
  animation: standings-flash-anim 1.6s ease-out;
}

/* ============================================================
   TEAMS TABS (Thirsk 1 / Thirsk 2)
   ============================================================ */
.teams-tabs {
  display: flex;
  gap: 2px;
  border-bottom: 0.5px solid var(--br);
  margin-bottom: 1rem;
}
.teams-tab {
  flex: 0 0 auto;
  background: none;
  border: none;
  padding: 10px 18px;
  font-family: var(--font-display);
  font-size: 14px;
  letter-spacing: 2px;
  color: var(--mu);
  cursor: pointer;
  position: relative;
  transition: color 0.15s;
}
.teams-tab:hover { color: var(--bd); }
.teams-tab.active {
  color: var(--bm);
}
.teams-tab.active::after {
  content: '';
  position: absolute;
  left: 10%;
  right: 10%;
  bottom: -1px;
  height: 2px;
  background: var(--bm);
}

/* Squad cards — tight roster list with NYSL profile links */
.squad-row {
  display: grid;
  grid-template-columns: 28px 1fr auto;
  gap: 0.6rem;
  align-items: center;
  padding: 0.55rem 0.1rem;
  border-bottom: 0.5px solid var(--br);
}
.squad-row:last-child { border-bottom: none; }
.squad-pos {
  font-family: var(--font-display);
  font-size: 14px;
  color: var(--mu);
  letter-spacing: 1px;
  text-align: center;
}
.squad-name-wrap { min-width: 0; }
.squad-name {
  font-size: 13px;
  color: var(--bd);
  font-weight: 500;
  letter-spacing: 0.2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.squad-record-wrap { margin-top: 2px; }
.squad-record {
  display: inline-block;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.5px;
  padding: 1px 7px;
  border-radius: 8px;
}
.squad-record-win  { background: var(--gl); color: var(--gn); }
.squad-record-loss { background: var(--rl); color: var(--rd); }
.squad-record-even { background: #f4f4f5;   color: var(--mu); }
.squad-link {
  font-size: 10px;
  color: var(--bm);
  background: var(--bl);
  padding: 3px 9px;
  border-radius: 10px;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.15s;
}
.squad-link:hover {
  background: var(--bm);
  color: #05080a;
}

/* ============================================================
   NYSL MATCH CARDS + LEAGUE TABLE (live-scraped)
   ============================================================ */
.match-card {
  background: var(--wh);
  border: 0.5px solid var(--br);
  border-radius: var(--radius-md);
  padding: 0.9rem 1rem;
  margin-bottom: 0.5rem;
  position: relative;
}
.match-card.is-win  { border-left: 3px solid var(--gn); }
.match-card.is-loss { border-left: 3px solid var(--rd); }
.match-card.is-future { border-left: 3px solid var(--bm); background: var(--bl); }

.match-teams {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 0.75rem;
  align-items: center;
}
.match-team {
  font-family: var(--font-display);
  font-size: 14px;
  letter-spacing: 1.5px;
  color: var(--bd);
  line-height: 1.15;
  min-width: 0;
  overflow-wrap: anywhere;
}
.match-team.is-us { color: var(--bm); }
.match-team.left  { text-align: left; }
.match-team.right { text-align: right; }
.match-vs {
  font-family: var(--font-body);
  font-size: 10px;
  color: var(--mu);
  letter-spacing: 1px;
  text-align: center;
}

.match-score {
  text-align: center;
  margin: 0.4rem 0 0.35rem;
}
.match-score-main {
  font-family: var(--font-display);
  font-size: 30px;
  letter-spacing: 3px;
  line-height: 1;
}
.match-score-main.win  { color: var(--gn); }
.match-score-main.loss { color: var(--rd); }
.match-score-future {
  font-family: var(--font-display);
  font-size: 20px;
  letter-spacing: 2px;
  color: var(--mu);
}
.match-score-points {
  font-size: 10px;
  color: var(--mu);
  margin-top: 2px;
  letter-spacing: 0.5px;
}

.match-story {
  font-size: 11px;
  color: var(--mu);
  text-align: center;
  letter-spacing: 0.3px;
  line-height: 1.5;
  margin-top: 0.25rem;
}
.match-story .match-outcome {
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-left: 0.4rem;
}
.match-story .match-outcome.win  { color: var(--gn); }
.match-story .match-outcome.loss { color: var(--rd); }

/* League table — scraped standings */
.league-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
}
.league-table th,
.league-table td {
  padding: 7px 8px;
  text-align: center;
  border-bottom: 0.5px solid var(--br);
}
.league-table th {
  font-size: 10px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--mu);
  font-weight: 500;
}
.league-table td.team-cell {
  text-align: left;
  font-weight: 500;
}
.league-table td.pos-cell { color: var(--mu); font-weight: 500; }
.league-table td.pts-cell { font-weight: 600; color: var(--bd); }
.league-table tr.is-us td {
  background: var(--bl);
  color: var(--bd);
}
.league-table tr.is-us td.pts-cell { color: var(--bm); }
.league-table tr.is-us td.team-cell {
  position: relative;
  padding-left: 14px;
}
.league-table tr.is-us td.team-cell::before {
  content: '';
  position: absolute;
  left: 4px;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 16px;
  background: var(--bm);
  border-radius: 2px;
}

/* ============================================================
   CONTACT — WHATSAPP GROUP CARDS
   ============================================================ */
.wa-note {
  background: var(--bl);
  border-radius: var(--radius-md);
  padding: 0.65rem 0.9rem;
  margin-bottom: 0.9rem;
  font-size: 12px;
  color: var(--mu);
  line-height: 1.6;
  border-left: 3px solid var(--wa);
}
.wa-note strong { color: var(--wac); }

.wa-group-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem;
  background: var(--wh);
  border: 0.5px solid var(--br);
  border-radius: var(--radius-md);
  margin-bottom: 0.6rem;
  gap: 0.75rem;
}
.wa-group-body { flex: 1; }
.wa-group-label-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 3px;
}
.wa-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
  display: inline-block;
}
.wa-group-label {
  font-size: 13px;
  font-weight: 500;
  color: #0a0f1e;
}
.wa-group-tag {
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 10px;
  background: var(--bl);
  color: var(--bm);
}
.wa-group-desc {
  font-size: 11px;
  color: var(--mu);
}
.wa-group-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #fff;
  padding: 7px 12px;
  border-radius: var(--radius-sm);
  font-size: 11px;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
}
/* Shared colour modifiers used by both .wa-dot and .wa-group-btn */
.wa-bright { background: var(--wa); }
.wa-teal   { background: var(--wab); }
.wa-dark   { background: var(--wac); }

/* ============================================================
   PUSH BANNERS (in-app + iOS home-screen prompts)
   Deliberately dark on a light site — notification UI
   ============================================================ */
.push-banner {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%);
  background: #1a2236;
  border: 1px solid var(--bm);
  border-radius: 12px;
  padding: 16px 20px;
  z-index: 10000;
  box-shadow: 0 8px 32px rgba(0,0,0,.4);
  max-width: 400px;
  width: calc(100% - 32px);
  pointer-events: auto;           /* defensive — some Safari versions inherit none from backdrop-filter ancestors */
}
.push-banner * { pointer-events: auto; }
.push-banner button {
  position: relative;             /* own stacking context inside the banner */
  z-index: 1;
}
.push-banner-inline  { display: flex; align-items: center; gap: 12px; }
.push-banner-stacked { display: block; }
.push-banner-body    { flex: 1; }
.push-banner-title {
  color: #fff;
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 4px;
}
.push-banner-stacked .push-banner-title { margin-bottom: 6px; }
.push-banner-sub {
  color: #8899aa;
  font-size: 12px;
}
.push-banner-sub-ios {
  line-height: 1.5;
  margin-bottom: 12px;
}
.push-banner-sub-ios strong { color: #fff; font-weight: 600; }
.push-ios-icon {
  font-size: 16px;
  vertical-align: middle;
}
.push-banner-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}
.push-banner-actions-end { justify-content: flex-end; }
.push-banner-allow {
  background: var(--bm);
  color: #111;
  border: none;
  border-radius: 8px;
  padding: 8px 14px;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  font-family: var(--font-body);
}
.push-banner-later {
  background: none;
  border: 1px solid #334;
  color: #8899aa;
  border-radius: 8px;
  padding: 8px 14px;
  font-size: 13px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  font-family: var(--font-body);
}

/* ============================================================
   REFERRAL — read-only link input
   ============================================================ */
.referral-link-input {
  flex: 1;
  font-size: 11px;
  padding: 8px;
  border: 0.5px solid var(--br);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--mu);
  font-family: var(--font-body);
}

/* ============================================================
   HAMBURGER MENU BUTTONS (mobile nav drawer)
   ============================================================ */
.ham-btn {
  background: none;
  border: none;
  font-size: 14px;
  padding: 12px 1.2rem;
  text-align: left;
  cursor: pointer;
  width: 100%;
  font-family: var(--font-body);
}
.ham-btn-profile { color: var(--bm); }
.ham-btn-muted   { color: var(--lavl); }
.ham-btn-primary {
  background: var(--bm);
  color: #111;
  font-weight: 600;
  margin-top: 4px;
}
.ham-btn-primary:hover { opacity: 0.92; }

/* PWA banner emphasis (inline strongs and icon inside the dark banner) */
.pwa-emph { color: #fff; }
.pwa-icon { font-size: 14px; }

/* ============================================================
   TEAM RESULT ROW (league page)
   ============================================================ */
.result-opp { font-weight: 500; font-size: 13px; }
.result-score-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}
.result-outcome {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 1px;
}
.result-outcome.win  { color: var(--gn); }
.result-outcome.loss { color: #999; }
