/* Shared pieces for the cricket/quiz showcase pages (live, match, team, hall of fame).
   Built on glass.css panes — nothing here adds a second backdrop blur. */

/* ---- Room crest: shield badge (ViewHelpers.TeamCrest / site.js teamCrest) ---- */
.crest {
    --crest: #C2410C;
    position: relative; display: inline-grid; place-items: center; flex: none; overflow: hidden;
    border-radius: 14% 14% 46% 46% / 12% 12% 34% 34%;
    background:
        radial-gradient(90% 55% at 32% 0%, rgba(255,255,255,.24), rgba(255,255,255,0) 70%),
        linear-gradient(170deg, color-mix(in srgb, var(--crest) 90%, #fff) 0%, var(--crest) 50%, color-mix(in srgb, var(--crest) 72%, #000) 100%);
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.30), inset 0 -6px 10px rgba(0,0,0,.14), 0 3px 10px rgba(28,22,6,.22);
    color: #fff;
}
.crest b { font-weight: 800; line-height: 1; text-shadow: 0 1px 1px rgba(0,0,0,.25); }
.crest img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
.crest--xs { width: 22px; height: 24px; font-size: .62rem; }
.crest--sm { width: 28px; height: 31px; font-size: .74rem; }
.crest--md { width: 40px; height: 44px; font-size: 1rem; }
.crest--lg { width: 64px; height: 70px; font-size: 1.6rem; }
.crest--xl { width: 88px; height: 96px; font-size: 2.2rem; }
@media (max-width: 560px) { .crest--xl { width: 64px; height: 70px; font-size: 1.6rem; } }

/* ---- Scoreline hero: two sides facing off across one glass slab ---- */
.duel {
    display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 12px 18px;
    padding: 22px 20px 18px;
}
.duel-side { display: grid; justify-items: center; align-content: start; gap: 8px; text-align: center; min-width: 0; }
.duel-name { font-weight: 800; color: var(--ink); text-decoration: none; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
a.duel-name:hover { color: var(--ember); }
.duel-score { display: grid; justify-items: center; line-height: 1; font-variant-numeric: tabular-nums; }
.duel-score strong { font-size: clamp(2rem, 6vw, 3.25rem); font-weight: 800; letter-spacing: -.02em; color: var(--ink); }
.duel-score small { margin-top: 4px; font-size: .8rem; color: var(--ink-3); }
.duel-side.is-lost .duel-score strong { color: var(--ink-2); }
.duel-side.is-won .crest { box-shadow: inset 0 0 0 1px rgba(255,255,255,.5), 0 0 0 3px rgba(255,255,255,.55), 0 6px 18px rgba(217,86,10,.35); }
.duel-won { font-size: .72rem; font-weight: 800; color: #fff; background: #D9560A; padding: 2px 10px; border-radius: 999px; }
.duel-won[data-hidden] { visibility: hidden; } /* keeps both sides the same height */
.duel-vs { font-family: 'Bangers', 'Nunito', sans-serif; font-size: 1.4rem; letter-spacing: .06em; color: var(--ink-3); }
.duel-result {
    grid-column: 1 / -1; justify-self: center; text-align: center;
    font-family: 'Bangers', 'Nunito', sans-serif; font-size: clamp(1.4rem, 3.6vw, 2rem); letter-spacing: .03em; color: var(--ink);
}
.duel-meta { grid-column: 1 / -1; display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }

/* ---- Small stat row used under heroes ---- */
.stat-strip { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.stat-cell { padding: 12px 14px; border-radius: var(--glass-radius-sm, 16px); background: var(--glass-inlay); display: grid; gap: 2px; }
.stat-cell span { font-size: .78rem; color: var(--ink-3); }
.stat-cell strong { font-size: 1.15rem; color: var(--ink); font-variant-numeric: tabular-nums; }
.stat-cell a { color: inherit; text-decoration: none; }
.stat-cell a:hover { color: var(--ember); }

/* ---- Tournament matches: gold trim + trophy ribbon (live cards, results, scorecard hero) ---- */
.is-tournament { --gold: #E7B33A; --gold-deep: #A8740A; --gold-wash: rgba(248, 212, 138, .38); }
.lc.is-tournament, .match-hero.is-tournament {
    background:
        linear-gradient(180deg, var(--gold-wash), rgba(248, 212, 138, 0) 46%),
        var(--glass-fill);
    box-shadow: var(--glass-shadow), inset 0 0 0 1.5px rgba(231, 179, 58, .75);
}
.lc-ribbon, .match-ribbon {
    display: flex; align-items: center; justify-content: center; gap: 6px;
    margin: -16px -16px 0; padding: 6px 12px; border-radius: inherit;
    border-bottom-left-radius: 0; border-bottom-right-radius: 0;
    background: linear-gradient(90deg, #A8740A, #E7B33A 50%, #A8740A);
    color: #fff; font-weight: 800; font-size: .78rem; letter-spacing: .04em;
    text-shadow: 0 1px 1px rgba(0, 0, 0, .25);
}
.match-ribbon { margin: 0; font-size: .85rem; padding: 8px 12px; }
.is-tournament .crest { box-shadow: inset 0 0 0 1px rgba(255,255,255,.3), 0 0 0 2px #E7B33A, 0 3px 10px rgba(168,116,10,.35); }
.is-tournament .duel-won { background: linear-gradient(90deg, #A8740A, #E7B33A); }
.is-tournament .lc-progress span { background: #C08A16; }
.lc-result.is-tournament { box-shadow: inset 3px 0 0 #E7B33A; background: linear-gradient(90deg, var(--gold-wash), transparent 60%), var(--glass-inlay); }
.lc-rtrophy { font-size: .7rem; font-weight: 800; color: var(--gold-deep); display: inline-flex; gap: 4px; align-items: center; }

/* ---- Filter chips + search (Results page, live page filters) ---- */
.results-filters { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.filter-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.filter-chip {
    display: inline-flex; align-items: center; gap: 7px; padding: 8px 14px; border-radius: 999px;
    font-weight: 800; font-size: .84rem; color: var(--ink); text-decoration: none; cursor: pointer; border: 0;
    background: linear-gradient(180deg, rgba(255,255,255,.78), rgba(255,255,255,.46));
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.85), 0 4px 12px rgba(150,105,10,.12);
}
.filter-chip:hover { background: rgba(255,255,255,.92); color: var(--ink); }
.filter-chip.is-on { background: var(--ink); color: #fff; box-shadow: 0 6px 16px rgba(28,22,6,.22); }
.filter-chip--gold i { color: #C98A0B; }
.filter-chip--gold.is-on { background: linear-gradient(135deg, #FFE08A, #F5B82E 45%, #C98A0B); color: #3A2600; }
.filter-chip--gold.is-on i { color: #3A2600; }
.filter-chip:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.results-search {
    position: relative; display: flex; align-items: center; min-width: min(100%, 280px); flex: 0 1 320px;
}
.results-search > i { position: absolute; left: 14px; color: var(--ink-3); pointer-events: none; }
.results-search input {
    width: 100%; padding: 10px 38px 10px 38px; border-radius: 999px; border: 0; font: inherit; font-size: .9rem; color: var(--ink);
    background: rgba(255,255,255,.72); box-shadow: inset 0 0 0 1px rgba(255,255,255,.9), 0 4px 12px rgba(150,105,10,.12);
}
.results-search input:focus { outline: 2px solid var(--ink); outline-offset: 1px; }
.results-clear { position: absolute; right: 12px; color: var(--ink-3); }
.results-scope { margin: -6px 2px 12px; font-size: .86rem; }
.results-pager { display: flex; justify-content: space-between; align-items: center; margin-top: 16px; }
.results-pager .section-pill i { margin: 0; }

/* ---- Portraits ---- */
.portrait {
    --ring: rgba(255,255,255,.9);
    position: relative; display: inline-grid; place-items: center; flex: none; overflow: hidden; border-radius: 50%;
    background: linear-gradient(160deg, #F3E3B5, #D9B866); color: #3A2600; font-weight: 800;
    box-shadow: 0 0 0 3px var(--ring), 0 6px 16px rgba(28,22,6,.18);
}
.portrait b { line-height: 1; }
.portrait img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.portrait--sm { width: 30px; height: 30px; font-size: .8rem; box-shadow: 0 0 0 2px var(--ring); }
.portrait--md { width: 54px; height: 54px; font-size: 1.2rem; }
.portrait--lg { width: 76px; height: 76px; font-size: 1.7rem; }
.portrait--xl { width: 128px; height: 128px; font-size: 3rem; }
.portrait--gold { --ring: #F5B82E; }
.portrait--silver { --ring: #C9CED6; }
.portrait--bronze { --ring: #CD8B4E; }

/* ---- Medals ---- */
.medal {
    display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%;
    font-size: .74rem; font-weight: 800; color: #3A2600;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.6), 0 2px 6px rgba(28,22,6,.2);
}
.medal--gold { background: linear-gradient(135deg, #FFE08A, #F5B82E 50%, #C98A0B); }
.medal--silver { background: linear-gradient(135deg, #F4F6F8, #C9CED6 55%, #8E96A3); }
.medal--bronze { background: linear-gradient(135deg, #F2C29A, #CD8B4E 55%, #8F5527); color: #2A1405; }

/* ---- Share / download buttons (match page) ---- */
.duel-actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.share-btn {
    display: inline-flex; align-items: center; gap: 8px; padding: 10px 18px; border-radius: 999px; border: 0;
    font: inherit; font-weight: 800; font-size: .9rem; text-decoration: none; cursor: pointer;
    background: var(--ink); color: #fff; box-shadow: 0 8px 20px rgba(28,22,6,.22);
}
.share-btn:hover { color: #fff; transform: translateY(-1px); }
.share-btn--gold { background: linear-gradient(135deg, #FFE08A, #F5B82E 45%, #C98A0B); color: #3A2600; box-shadow: 0 8px 20px rgba(201,138,11,.3); }
.share-btn--gold:hover { color: #3A2600; }
.share-btn:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
