/* Material Design 3 look for every club app. styles.css stays the base and this file only
   restyles it, so going back to the old look is removing this file and its <link> (or reverting
   the commit that added it). The club's colours still come from theme.css: --brand is the M3
   primary, --accent the tertiary. */

@font-face {
  /* only the icons of the bottom bar (subset from Google Fonts, Apache 2.0) */
  font-family: "Material Symbols Rounded";
  font-style: normal; font-weight: 400; font-display: block;
  src: url("/fonts/material-symbols-rounded.woff2") format("woff2");
}

:root {
  /* white surfaces with neutral greys (no tinted background) */
  --bg: #ffffff;
  --card: #f4f5f8;          /* surface container low */
  --surface-2: #eceef2;     /* surface container: bottom bar */
  --surface-3: #e3e5ea;     /* surface container highest: chips, empty avatars */
  --ink: #1a1c1f;
  --muted: #44474e;
  --line: #dadce2;          /* outline variant */
  --outline: #74777f;
  /* tonal colours made from the club's own */
  --tonal: color-mix(in srgb, var(--brand) 13%, #eef3ff);
  --on-tonal: color-mix(in srgb, var(--brand) 70%, #000);
  --accent-soft: color-mix(in srgb, var(--accent) 22%, #fff);
  --on-accent-soft: color-mix(in srgb, var(--accent) 35%, #2b1300);
  --radius: 16px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111318;
    --card: #1b1d22;
    --surface-2: #1f2226;
    --surface-3: #33353a;
    --ink: #e3e2e8;
    --muted: #c4c6cf;
    --line: #3a3d44;
    --outline: #8e9099;
    --tonal: color-mix(in srgb, var(--brand-text) 28%, #1b1d22);
    --on-tonal: #e3e6ff;
    --accent-soft: color-mix(in srgb, var(--accent) 30%, #1b1d22);
    --on-accent-soft: color-mix(in srgb, var(--accent) 35%, #fff);
    color-scheme: dark;
  }
}

body { font-family: Roboto, system-ui, -apple-system, "Segoe UI", sans-serif; }
h2 { font-size: 1.05rem; font-weight: 500; }
.ms {
  font-family: "Material Symbols Rounded"; font-weight: normal; font-style: normal; font-size: 24px; line-height: 1;
  letter-spacing: normal; text-transform: none; white-space: nowrap; direction: ltr;
  font-feature-settings: "liga"; -webkit-font-smoothing: antialiased; font-variation-settings: "FILL" 0;
}

/* top app bar: white, crest and club name, no coloured band */
.top {
  background: var(--bg); color: var(--ink); border-bottom: 0; box-shadow: none;
  padding: calc(10px + env(safe-area-inset-top)) 12px 10px 16px; transition: background .2s;
}
.brand { font-weight: 500; font-size: 1.35rem; gap: 12px; }
.brand-logo { height: 40px; }
.lang { background: var(--tonal); color: var(--on-tonal); font-weight: 500; padding: 8px 14px; }

/* navigation bar: icon in a pill, label underneath */
.nav { background: var(--surface-2); border-top: 0; padding: 12px 0 calc(14px + env(safe-area-inset-bottom)); }
.nav a { flex: 1; min-width: 0; gap: 4px; font-size: 12px; font-weight: 500; color: var(--muted); padding: 0; }
.nav a .ms { width: 64px; height: 32px; border-radius: 16px; display: grid; place-items: center; font-size: 24px; line-height: 32px; border: 0; transition: background .2s; }
.nav a.on { color: var(--ink); font-weight: 600; }
.nav a.on .ms { background: var(--tonal); color: var(--on-tonal); font-variation-settings: "FILL" 1; border: 0; }

/* cards: filled, no border; squads keep a thin colour edge */
.card { border: 0; border-radius: 16px; padding: 16px; }
.squad { border-left: 0; box-shadow: inset 4px 0 0 var(--line); }
.squad-naranja { box-shadow: inset 4px 0 0 var(--naranja); }
.squad-blanco { box-shadow: inset 4px 0 0 var(--blanco); }
.squad-azul { box-shadow: inset 4px 0 0 var(--azul); }
.squad-rojo { box-shadow: inset 4px 0 0 var(--rojo); }
.squad-verde { box-shadow: inset 4px 0 0 var(--verde); }
.squad-amarillo { box-shadow: inset 4px 0 0 var(--amarillo); }
.squad-negro { box-shadow: inset 4px 0 0 var(--negro); }
.squad-morado { box-shadow: inset 4px 0 0 var(--morado); }
.meet { background: var(--accent-soft); color: var(--on-accent-soft); border-radius: 8px; padding: 4px 10px; font-weight: 500; }
.match { border-top-color: var(--line); }
.score { font-weight: 700; font-size: 1.35rem; letter-spacing: .01em; }
.crest-empty { background: var(--surface-3); color: var(--muted); font-weight: 500; border-radius: 50%; }
.match .crest.sm { border-radius: 50%; }

/* category tabs as a segmented button */
.tabs { background: none; border: 1px solid var(--outline); border-radius: 20px; padding: 0; gap: 0; overflow: hidden; }
.tab { border-radius: 0; padding: 0; height: 40px; font-weight: 500; font-size: 14px; color: var(--ink); border-right: 1px solid var(--outline); }
.tab:last-child { border-right: 0; }
.tab.on { background: var(--tonal); color: var(--on-tonal); }
.tab.on::before { content: "✓ "; }

/* filter chips */
.chip { border-radius: 8px; border-color: var(--line); background: var(--bg); color: var(--muted); font-weight: 500; padding: 6px 14px; }
.chip.on { background: var(--tonal); border-color: transparent; color: var(--on-tonal); font-weight: 500; }
.chip.on::before { content: "✓ "; }
.daybar input { border-radius: 8px; padding: 6px 10px; font-size: 14px; height: 34px; }
.place-row { background: var(--card); border: 0; }

/* badges */
.badge { border-radius: 8px; font-weight: 500; letter-spacing: .02em; }
.badge-live { background: var(--live); }
.badge-finished { background: var(--surface-3); color: var(--muted); }

/* buttons: full pills, filled / tonal / outlined */
.primary, .ghost, .danger {
  border-radius: 999px; font-weight: 500; font-size: 15px; padding: 12px 24px; min-height: 44px;
}
.ghost { background: transparent; border-color: var(--outline); color: var(--brand-text); }
.danger { border-color: var(--outline); }
:is(button, a, label).sm { padding: 8px 16px; font-size: 14px; min-height: 36px; }
.link { font-weight: 500; }

/* match screen: the scoreboard is a big card in the club colour */
.board {
  background: var(--brand); color: var(--brand-ink); border: 0; border-radius: 28px; padding: 20px 12px;
  background-image: none;
}
.board[class*="squad-"] { box-shadow: none; }
/* two-line labels make pills look like eggs: these big buttons get rounded corners instead */
.clockbtns button, .scorebtns button { border-radius: 20px; }
.board .crest.lg { background: #fff; border-radius: 50%; padding: 4px; }
.board .crest-empty { background: rgba(255, 255, 255, .18); color: inherit; }
.big-score { font-weight: 700; }
.big-score i { color: inherit; opacity: .6; }
.clock { color: inherit; opacity: .75; font-weight: 500; }
.clock.running { color: color-mix(in srgb, var(--accent) 60%, #fff); opacity: 1; }
.board .badge { background: rgba(255, 255, 255, .18); color: inherit; }
.board .badge-live { background: var(--live); color: #fff; }
.btn-osos, .btn-opp { border-radius: 20px; font-weight: 500; border: 0; }
.btn-osos { box-shadow: 0 1px 3px rgba(0, 0, 0, .3), 0 4px 8px 3px rgba(0, 0, 0, .12); }
.btn-opp { background: var(--surface-3); color: var(--ink); }
.pcard { background: var(--bg); border-color: var(--line); border-radius: 16px; }
.pcard.sub { background: var(--bg); }
.pname { font-weight: 500; }
.pbtns button { border-radius: 16px; font-weight: 500; padding: 12px 4px; }
.btn-try { background: var(--accent-soft); color: var(--on-accent-soft); }
.btn-tackle { background: var(--tonal); color: var(--on-tonal); }
.sect { text-transform: none; letter-spacing: 0; color: var(--brand-text); font-weight: 500; }
.sect::after { background: var(--line); }

/* players: avatars and jersey numbers */
.ph-empty { font-weight: 500; }
.dorsal { background: var(--accent); color: var(--accent-ink); font-weight: 700; border-color: var(--bg); }
.card .dorsal { border-color: var(--card); }

/* forms: outlined text fields */
input, select, .form textarea {
  background: var(--bg); border: 1px solid var(--outline); border-radius: 4px; padding: 14px 16px;
}
input:focus, select:focus, .form textarea:focus {
  outline: none; border-color: var(--brand-text); box-shadow: inset 0 0 0 1px var(--brand-text);
}
.card input, .card select { background: var(--card); }
.form label { color: var(--muted); font-size: 13px; font-weight: 500; }
input[type="checkbox"], input[type="radio"] { accent-color: var(--brand); }
input.sw { padding: 0; border-radius: 12px; }
input.hex { padding: 10px 12px; }

/* lists and settings rows */
.srow .ic {
  width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; font-size: 20px; background: var(--tonal);
}
.srow { border-top: 0; }
.srow b, .urow b { font-weight: 500; }
.role, .ist, .anon { border-radius: 8px; font-weight: 500; }
.seg { background: none; border: 1px solid var(--outline); padding: 0; gap: 0; border-radius: 20px; overflow: hidden; }
.seg button { border-radius: 0; font-weight: 500; color: var(--ink); height: 40px; border-right: 1px solid var(--outline); }
.seg button:last-child { border-right: 0; }
.seg button.on { background: var(--tonal); color: var(--on-tonal); box-shadow: none; }
.seg button.on::before { content: "✓ "; }
.opt { border-radius: 16px; border-width: 1px; }
.opt.on { background: var(--tonal); border-color: transparent; }
.preview { border-color: var(--line); border-radius: 16px; }
.note { border: 0; background: var(--card); border-radius: 16px; }

/* bottom sheet, snackbar */
.sheet { border-radius: 28px 28px 0 0; background: var(--card); }
.pick button { border-radius: 16px; background: var(--bg); font-weight: 500; }
.toast { border-radius: 4px; background: #303034; color: #f2f0f4; text-align: left; padding: 14px 16px; }

/* login: crest in a rounded tile */
.hero img { height: 92px; padding: 14px; border-radius: 32px; background: var(--tonal); box-sizing: content-box; }
.mele-card { border: 1px solid var(--line); background: var(--bg); }
