/* ===================== GullySport — Live scoring, stats, feed, teams, contests =====================
   Shared by the engagement pages. Built on the site tokens (style.css), so
   the app restyle in css/native.css recolours these pages along with the rest.
   ============================================================================================= */

.eg-wrap { max-width: 760px; }
.eg-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow-soft);
  margin-bottom: 14px;
}
.eg-card h2, .eg-card h3 { font-size: 1.05rem; margin-bottom: 10px; }
.eg-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin: 22px 0 10px; }
.eg-head h2 { font-size: 1.1rem; margin: 0; }
.eg-head a, .eg-link { color: var(--violet); font-weight: 700; font-size: 0.88rem; }
.eg-muted { color: var(--ink-dim); font-size: 0.86rem; }
.eg-empty { color: var(--ink-dim); font-size: 0.9rem; padding: 14px 16px; border: 1px dashed var(--border); border-radius: 14px; background: var(--surface-2); }
.eg-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.eg-grow { flex: 1; min-width: 0; }
.eg-error { color: var(--pink); font-weight: 600; font-size: 0.9rem; }
.eg-note { font-size: 0.82rem; color: var(--ink-dim); margin-top: 6px; }
.eg-hidden { display: none !important; }

.eg-toolbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 6px; }
.eg-toolbar input, .eg-toolbar select { margin: 0; flex: 1; min-width: 140px; }

.eg-chips[hidden] { display: none; }
.eg-chips { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 2px; }
.eg-chip {
  flex: none; border: 1px solid var(--border); background: var(--surface); color: var(--ink);
  border-radius: 999px; padding: 7px 14px; font-weight: 700; font-size: 0.84rem; cursor: pointer;
}
.eg-chip[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }

.eg-btn-sm { padding: 8px 14px !important; font-size: 0.84rem !important; }

/* ---------- Match cards (lists, feed) ---------- */
.lv-list { display: grid; gap: 10px; }
.lv-card {
  display: block; background: var(--surface); border: 1px solid var(--border); border-radius: 16px;
  padding: 12px 14px; color: var(--ink); box-shadow: 0 6px 16px rgba(6, 49, 99, 0.06);
}
.lv-card.is-live { box-shadow: inset 4px 0 0 var(--live), 0 6px 16px rgba(6, 49, 99, 0.06); }
.lv-meta { font-size: 0.75rem; color: var(--ink-dim); display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-bottom: 6px; }
.lv-live { background: var(--live); color: #fff; font-weight: 800; font-size: 0.66rem; padding: 2px 6px; border-radius: 4px; letter-spacing: 0.04em; }
.lv-team { display: flex; justify-content: space-between; gap: 8px; font-size: 0.95rem; color: var(--ink-soft); }
.lv-team b { color: var(--ink); font-variant-numeric: tabular-nums; }
.lv-team.win { color: var(--ink); font-weight: 800; }
.lv-foot { font-size: 0.8rem; color: var(--ink-muted); margin-top: 6px; }

/* ---------- Live match view ---------- */
.lv-score {
  background: var(--grad-dark); color: #fff; border-radius: 22px; padding: 18px; margin-bottom: 14px;
}
.lv-score .lv-meta { color: rgba(255, 255, 255, 0.75); }
.lv-score-team { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.lv-score-team span { font-weight: 700; opacity: 0.8; }
.lv-score-team.on span { opacity: 1; }
.lv-score-big { font-size: 1.9rem; font-weight: 900; font-variant-numeric: tabular-nums; }
.lv-score-small { font-size: 1rem; font-weight: 800; opacity: 0.85; font-variant-numeric: tabular-nums; }
.lv-status { margin-top: 10px; font-weight: 700; color: #ffd98a; font-size: 0.92rem; }
.lv-rates { display: flex; gap: 14px; font-size: 0.8rem; opacity: 0.85; margin-top: 4px; }

.lv-over { display: flex; gap: 6px; flex-wrap: wrap; }
.lv-ball {
  min-width: 32px; height: 32px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 0.78rem; background: var(--bg-alt); color: var(--ink); padding: 0 6px;
}
.lv-ball.b4 { background: #2563EB; color: #fff; }
.lv-ball.b6 { background: #0B875D; color: #fff; }
.lv-ball.bw { background: var(--live); color: #fff; }
.lv-ball.bx { background: #FFE7B8; }

.lv-table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
.lv-table th { text-align: right; font-size: 0.72rem; color: var(--ink-dim); font-weight: 700; padding: 6px 4px; text-transform: uppercase; letter-spacing: 0.04em; }
.lv-table th:first-child, .lv-table td:first-child { text-align: left; }
.lv-table td { text-align: right; padding: 7px 4px; border-top: 1px solid var(--border); font-variant-numeric: tabular-nums; color: var(--ink); }
.lv-table td small { display: block; color: var(--ink-dim); font-size: 0.72rem; font-weight: 400; }
.lv-table tr.on td:first-child { font-weight: 800; }
.lv-table .lv-star { color: var(--live); }

.lv-tabs { display: flex; gap: 6px; margin-bottom: 10px; }

.lv-react { display: flex; gap: 8px; }
.lv-react button {
  flex: 1; border: 1px solid var(--border); background: var(--surface); border-radius: 14px; padding: 8px 4px;
  font-size: 1.25rem; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 2px;
}
.lv-react button small { font-size: 0.75rem; font-weight: 800; color: var(--ink-muted); }
.lv-react button[aria-pressed="true"] { border-color: var(--saffron); background: #FFF1E0; }

.lv-lineups { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.lv-lineups h4 { font-size: 0.85rem; margin-bottom: 6px; }
.lv-claim {
  display: flex; justify-content: space-between; align-items: center; width: 100%; gap: 6px;
  border: 1px solid var(--border); background: var(--surface-2); border-radius: 10px; padding: 7px 10px;
  margin-bottom: 6px; font-size: 0.86rem; color: var(--ink); text-align: left; cursor: pointer;
}
.lv-claim[disabled] { cursor: default; opacity: 0.85; }
.lv-claim small { color: var(--cyan); font-weight: 700; font-size: 0.72rem; }
.lv-claim.mine { border-color: var(--cyan); }

/* ---------- Scorer console ---------- */
.sc-pad { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.sc-pad button {
  min-height: 58px; border-radius: 14px; border: 1px solid var(--border); background: var(--surface);
  font-size: 1.3rem; font-weight: 900; color: var(--ink); cursor: pointer; touch-action: manipulation;
}
.sc-pad button:active { transform: scale(0.97); }
.sc-pad .sc-4 { background: #2563EB; color: #fff; border: 0; }
.sc-pad .sc-6 { background: #0B875D; color: #fff; border: 0; }
.sc-pad .sc-x { font-size: 0.9rem; background: #FFF1E0; }
.sc-pad .sc-x[aria-pressed="true"] { background: var(--saffron); color: var(--ink); }
.sc-pad .sc-w { background: var(--live); color: #fff; border: 0; font-size: 1.05rem; grid-column: span 4; }
.sc-pad .sc-undo { font-size: 0.9rem; }
.sc-pad button:disabled { opacity: 0.4; }
.sc-hint { font-size: 0.82rem; color: var(--ink-muted); min-height: 1.3em; margin: 8px 0 0; }
.sc-at { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 12px; font-size: 0.88rem; }
.sc-at div { background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; padding: 8px 10px; color: var(--ink); }
.sc-at small { display: block; color: var(--ink-dim); font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.05em; font-weight: 700; }
.sc-at .on { border-color: var(--saffron); }

.eg-sheet {
  position: fixed; inset: 0; z-index: 400; background: rgba(8, 20, 34, 0.5);
  display: flex; align-items: flex-end; justify-content: center;
}
.eg-sheet[hidden] { display: none; }
.eg-sheet-box {
  background: var(--surface); width: 100%; max-width: 560px; border-radius: 22px 22px 0 0;
  padding: 18px 16px calc(18px + env(safe-area-inset-bottom)); max-height: 88vh; overflow-y: auto;
}
.eg-sheet-box h3 { font-size: 1.1rem; margin-bottom: 12px; }
.eg-sheet-box label { font-weight: 700; font-size: 0.82rem; color: var(--ink-soft); display: block; margin: 10px 0 4px; }
.eg-opts { display: flex; flex-wrap: wrap; gap: 6px; }
.eg-opts button {
  border: 1px solid var(--border); background: var(--surface-2); border-radius: 10px; padding: 9px 12px;
  font-weight: 700; color: var(--ink); cursor: pointer; font-size: 0.88rem;
}
.eg-opts button[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.eg-sheet-actions { display: flex; gap: 8px; margin-top: 16px; }
.eg-sheet-actions .btn { flex: 1; justify-content: center; }

@media (max-width: 560px) {
  .lv-lineups { grid-template-columns: 1fr; }
}

/* ---------- Stats and badges ---------- */
.bd-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.bd {
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 10px 8px;
  text-align: center; font-size: 0.78rem; color: var(--ink); line-height: 1.25;
}
.bd-icon { font-size: 1.6rem; display: block; margin-bottom: 4px; }
.bd small { display: block; color: var(--ink-dim); font-size: 0.7rem; margin-top: 4px; }
.bd.locked { background: var(--surface-2); color: var(--ink-dim); }
.bd.locked .bd-icon { filter: grayscale(1); opacity: 0.45; }
.bd-bar { height: 4px; border-radius: 4px; background: var(--border); margin-top: 6px; overflow: hidden; }
.bd-bar span { display: block; height: 100%; background: var(--saffron); }
.lb-row a { color: inherit; }

/* ---------- Dashboard shortcuts ---------- */
.eg-hub { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.eg-hub a {
  display: flex; align-items: center; gap: 10px; background: var(--surface); border: 1px solid var(--border);
  border-radius: 16px; padding: 12px; color: var(--ink); font-weight: 700; font-size: 0.9rem; box-shadow: 0 6px 16px rgba(6, 49, 99, 0.05);
}
.eg-hub a span[aria-hidden] { font-size: 1.4rem; }
.eg-hub small { display: block; font-weight: 500; color: var(--ink-dim); font-size: 0.74rem; }

/* ---------- Feed ---------- */
.fd-hl { display: flex; gap: 12px; align-items: flex-start; font-size: 0.95rem; font-weight: 600; }
.fd-icon { font-size: 1.6rem; line-height: 1; }
.fd-video { display: flex; gap: 12px; align-items: center; text-align: left; width: 100%; cursor: pointer; font: inherit; }
.fd-video img, .fd-noimg { width: 104px; height: 60px; object-fit: cover; border-radius: 10px; flex: none; background: var(--bg-alt); display: flex; align-items: center; justify-content: center; font-size: 1.5rem; }
.fd-news-head { display: flex; gap: 12px; align-items: flex-start; justify-content: space-between; }
.fd-news-head > div { min-width: 0; flex: 1; }
.fd-pic { position: relative; display: block; flex: none; width: 84px; height: 84px; border-radius: 12px; overflow: hidden; background: var(--bg-alt); }
.fd-pic img { width: 100%; height: 100%; object-fit: cover; display: block; }
.fd-lead { overflow: hidden; }
.fd-lead .fd-pic { width: auto; height: auto; aspect-ratio: 16 / 9; margin: -12px -14px 12px; border-radius: 0; }
.fd-lead .fd-pic.fd-pic-small { aspect-ratio: auto; height: 84px; width: 84px; margin: 0 0 10px; border-radius: 12px; }
.fd-credit { position: absolute; right: 8px; bottom: 8px; font-size: 0.68rem; font-weight: 600; color: #fff; background: rgba(0, 0, 0, 0.55); padding: 2px 8px; border-radius: 999px; }
.fd-art { width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; color: #fff;
  background: linear-gradient(135deg, var(--a) 0%, var(--a) 55%, var(--b) 100%); text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35); }
.fd-art-code { font-weight: 900; font-size: 1.35rem; letter-spacing: 0.02em; line-height: 1; }
.fd-art-label { font-size: 0.62rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; opacity: 0.92; max-width: 92%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fd-art-ball { width: 34px; height: 34px; color: #C8102E; }
.fd-lead .fd-art-code { font-size: 3rem; }
.fd-lead .fd-art-label { font-size: 0.8rem; }
.fd-lead .fd-art-ball { width: 64px; height: 64px; }
.fd-news-title { display: block; color: var(--ink); font-weight: 700; font-size: 1rem; line-height: 1.35; text-decoration: none; }
.fd-news-title::after { content: " ↗"; color: var(--ink-dim); font-weight: 400; }
.fd-news-sum { margin: 6px 0 0; font-size: 0.88rem; color: var(--ink-muted); line-height: 1.45; }
.fd-news-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.fd-news-tags .eg-chip { font-size: 0.75rem; padding: 3px 9px; }
.fd-video b { display: block; color: var(--ink); font-size: 0.95rem; }

/* ---------- Teams ---------- */
.ev-rsvp { display: flex; gap: 6px; margin-top: 8px; }
.ev-rsvp button { flex: 1; border: 1px solid var(--border); background: var(--surface-2); border-radius: 10px; padding: 8px; font-weight: 700; cursor: pointer; color: var(--ink); }
.ev-rsvp button[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.mb-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--border); }
.mb-row:first-child { border-top: 0; }
.mb-av { width: 34px; height: 34px; border-radius: 50%; background: var(--grad-primary); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 0.85rem; flex: none; }
.tr-code { font-family: ui-monospace, monospace; font-size: 1.3rem; font-weight: 800; letter-spacing: 0.18em; color: var(--ink); }

/* ---------- Contests (ct-) ---------- */
.ct-label { font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--ink-dim); margin-bottom: 6px; }
.ct-label .eg-muted { text-transform: none; letter-spacing: 0; font-weight: 500; }
.ct-lineups { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.ct-lineups h4 { font-size: 0.85rem; margin: 0 0 6px; }
.ct-lineups .eg-chip { display: block; width: 100%; text-align: left; margin: 0 0 6px; }
.ct-crowd { margin-top: 12px; }
.ct-bar { height: 8px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.ct-bar span { display: block; height: 100%; background: var(--saffron); }
.ct-crowd-row { display: flex; justify-content: space-between; font-size: 0.78rem; color: var(--ink-dim); margin-top: 4px; gap: 8px; }
.ct-row { display: flex; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 0.92rem; }
.ct-row b { white-space: nowrap; }
.ct-total { border-bottom: 0; font-weight: 800; font-size: 1rem; }
.ct-msg:empty { display: none; }
a.lb-row { text-decoration: none; color: inherit; }
.ct-lineups .eg-chip:disabled:not([aria-pressed="true"]) { opacity: 0.45; }

/* ---------- Updates (up-) ---------- */
.up-item { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); color: var(--ink); text-decoration: none; }
.up-item.is-new { border-color: var(--saffron); box-shadow: inset 3px 0 0 var(--saffron); }
.up-icon { font-size: 1.3rem; line-height: 1.2; }
.up-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.up-text span { color: var(--ink-dim); font-size: 0.88rem; }
.up-item small { color: var(--ink-dim); font-size: 0.75rem; white-space: nowrap; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.up-dot { background: var(--saffron); color: var(--ink); font-weight: 700; border-radius: 99px; padding: 1px 8px; font-size: 0.7rem; }
.up-switch { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; border-bottom: 1px solid var(--border); cursor: pointer; font-weight: 400; }
.up-switch input { width: 20px; height: 20px; margin: 2px 0 0; flex: none; accent-color: var(--saffron); }
.up-switch span { display: flex; flex-direction: column; gap: 2px; }
.up-switch small { color: var(--ink-dim); font-size: 0.82rem; }
