/* === FLAG WORLDS 2026 — schedule page ===
   Built on top of the shared styles.css tokens (dark glass theme, #3b82f6 accent).
   Women uses a secondary accent so the two brackets read apart at a glance. */

:root {
  --accent-men: #3b82f6;
  --accent-women: #ef476f;
  --ink: rgba(255, 255, 255, 0.92);
  --ink-muted: rgba(255, 255, 255, 0.6);
  --ink-faint: rgba(255, 255, 255, 0.38);
  --hairline: rgba(255, 255, 255, 0.1);
  --surface: rgba(255, 255, 255, 0.04);
  --surface-hover: rgba(255, 255, 255, 0.075);
}

/* === FLAG IMAGES (flagcdn.com SVGs) === */
img.fl {
  display: block;
  flex: 0 0 auto;
  width: auto;
  border-radius: 3px;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.22), 0 1px 3px rgba(0, 0, 0, 0.35);
  background: rgba(255, 255, 255, 0.9);
}

.flag-page[data-gender="men"] { --gender-accent: var(--accent-men); }
.flag-page[data-gender="women"] { --gender-accent: var(--accent-women); }

/* === back link reuses .nav-link, just add an icon gap already handled === */

/* === HERO === */
.flag-hero {
  min-height: auto;
  padding: 96px 16px 28px;
  text-align: center;
}

.flag-eyebrow {
  font-family: 'Montserrat', sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--gender-accent, #3b82f6);
  margin-bottom: 14px;
  transition: color 0.3s ease;
}

.flag-title {
  font-family: 'Montserrat', sans-serif;
  font-size: 30px;
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: 14px;
}

.flag-subtitle {
  font-size: 14px;
  font-weight: 300;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.78);
  max-width: 520px;
  margin: 0 auto;
}

/* === generic content section (no forced viewport height) === */
.flag-section {
  padding: 10px 16px 26px;
  display: flex;
  justify-content: center;
}

.flag-section .glass {
  text-align: left;
}

/* === GENDER TOGGLE === */
.gender-toggle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: 999px;
  padding: 4px;
  max-width: 340px;
  margin: 0 auto 18px;
}

.gender-toggle button {
  appearance: none;
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 10px 12px;
  border-radius: 999px;
  font-family: 'Montserrat', sans-serif;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--ink-muted);
  transition: background 0.25s ease, color 0.25s ease;
}

.gender-toggle button[aria-pressed="true"] {
  background: var(--gender-accent, #3b82f6);
  color: #fff;
}

.active-filter {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 13px;
  color: var(--ink-muted);
  margin-bottom: 18px;
}

.active-filter[hidden] { display: none; }

.active-filter button {
  appearance: none;
  border: 1px solid var(--hairline);
  background: var(--surface);
  color: var(--ink);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: border-color 0.2s ease;
}

.active-filter button:hover { border-color: var(--gender-accent, #3b82f6); }
.active-filter .fl { height: 14px; }

/* === GROUPS === */
.groups-heading {
  font-family: 'Montserrat', sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 12px;
}

.group-scroller {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 8px;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x proximity;
}

.group-scroller::-webkit-scrollbar { height: 5px; }
.group-scroller::-webkit-scrollbar-thumb { background: var(--hairline); border-radius: 3px; }

.group-card {
  flex: 0 0 auto;
  scroll-snap-align: start;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: 14px;
  padding: 12px;
  min-width: 158px;
}

.group-card .g-label {
  display: block;
  font-family: 'Montserrat', sans-serif;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--gender-accent, #3b82f6);
  margin-bottom: 6px;
}

.flag-btn {
  appearance: none;
  border: 1px solid transparent;
  background: transparent;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 6px;
  border-radius: 10px;
  cursor: pointer;
  text-align: left;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink);
  min-height: 36px;
  transition: background 0.15s ease, border-color 0.15s ease, opacity 0.15s ease;
}

.flag-btn:hover { background: var(--surface-hover); }
.flag-btn .fl { height: 18px; }
.flag-btn .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.flag-btn[aria-pressed="true"] {
  background: color-mix(in srgb, var(--gender-accent, #3b82f6) 20%, transparent);
  border-color: var(--gender-accent, #3b82f6);
}

/* === SCHEDULE === */
.schedule-heading {
  font-family: 'Montserrat', sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 12px;
}

details.day {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: 14px;
  margin-bottom: 10px;
  overflow: hidden;
}

details.day > summary {
  list-style: none;
  cursor: pointer;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

details.day > summary::-webkit-details-marker { display: none; }

.day-heading {
  font-family: 'Montserrat', sans-serif;
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.day-heading .daynum { color: var(--gender-accent, #3b82f6); }
.day-heading .daydesc {
  display: block;
  font-family: 'Inter', sans-serif;
  font-size: 11.5px;
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  color: var(--ink-muted);
  margin-top: 2px;
}

.chev {
  color: var(--ink-faint);
  font-size: 12px;
  transition: transform 0.2s ease;
  flex: 0 0 auto;
}

details.day[open] > summary .chev { transform: rotate(90deg); }

.day-body {
  border-top: 1px solid var(--hairline);
  padding: 4px 8px 8px;
}

.match {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px 10px;
  border-radius: 10px;
  margin: 2px 0;
  transition: opacity 0.2s ease, filter 0.2s ease, background 0.2s ease;
}

.match--hit { background: color-mix(in srgb, var(--gender-accent, #3b82f6) 14%, transparent); }
.match--dim { opacity: 0.3; filter: grayscale(0.6); }

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

.match .time {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  font-size: 12.5px;
  color: var(--ink-muted);
  flex: 0 0 auto;
}

.match .grp-tag {
  flex: 0 0 auto;
  width: 14px;
  text-align: center;
  font-size: 10px;
  font-weight: 800;
  color: var(--gender-accent, #3b82f6);
}

.match .field-badge {
  flex: 0 0 auto;
  margin-left: auto;
  font-size: 10px;
  font-weight: 600;
  color: var(--ink-muted);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--hairline);
  padding: 2px 6px;
  border-radius: 6px;
  white-space: nowrap;
}

.teams {
  width: 100%;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.team { display: flex; align-items: center; gap: 6px; min-width: 0; flex: 1 1 0; }
.team.b { flex-direction: row-reverse; text-align: right; }
.team .fl { height: 16px; }
.team .nm {
  font-size: 12.5px;
  font-weight: 500;
  line-height: 1.25;
  white-space: normal;
}

.vs { font-size: 10.5px; color: var(--ink-faint); font-weight: 600; flex: 0 0 auto; }

.cruce-pair {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--hairline);
  padding: 3px 7px;
  border-radius: 7px;
  color: var(--ink-muted);
}

/* === LEGEND === */
.flag-legend summary {
  cursor: pointer;
  padding: 4px 0 14px;
  font-family: 'Montserrat', sans-serif;
  font-size: 13px;
  font-weight: 600;
  list-style: none;
}

.flag-legend summary::-webkit-details-marker { display: none; }

.flag-legend p {
  font-size: 13px;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.72);
}

.flag-footnote {
  text-align: center;
  color: var(--ink-faint);
  font-size: 12px;
  line-height: 1.7;
  padding: 6px 16px 40px;
}

/* === TABLET 600px+ === */
@media (min-width: 600px) {
  .group-scroller { display: grid; grid-template-columns: repeat(4, 1fr); overflow: visible; }
}

/* === TABLET 768px+ === */
@media (min-width: 768px) {
  .flag-hero { padding: 118px 32px 34px; }
  .flag-title { font-size: 40px; }
  .flag-subtitle { font-size: 16px; }
  .match .time { width: 46px; font-size: 13px; }
}
