/* Public browsing improvements: intentionally scoped to avoid changing authenticated pages. */
.public-competition-header { margin: 0 0 1rem; }
.public-competition-header nav { font-size: .8rem; margin-bottom: .75rem; color: #cbd5e1; }
.public-competition-header nav a { color: #b5f0e5; }
.public-competition-title { display: flex; align-items: center; justify-content: center; gap: .8rem; }
.public-competition-title img { object-fit: contain; }
.public-competition-header .public-competition-logo { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 52px; width: 52px; height: 52px; padding: 6px; background: #fff; border: 1px solid #e2e8f0; border-radius: 10px; box-shadow: 0 1px 3px rgb(15 23 42 / 8%); }
.public-competition-header .public-competition-logo img { display: block; width: 40px; height: 40px; }
.public-competition-title h1 { font-size: clamp(1.4rem, 3vw, 2rem); margin: 0; }
.public-competition-title p { font-size: .85rem; margin: .25rem 0 0; color: #cbd5e1; }
.public-switchers { display: flex; justify-content: center; gap: .75rem; margin-top: .9rem; flex-wrap: wrap; }
.public-switchers label { font-size: .75rem; color: #e2e8f0; max-width: 100%; }
.public-switchers select { margin-top: .25rem; max-width: 320px; }
.tournament-overview { margin-top: 1.4rem !important; }
.public-section-nav { position: sticky; top: 0; z-index: 25; padding: .6rem .2rem; background: #111c2c; border-radius: .75rem; }
.public-section-nav .nav-link { padding: .55rem .7rem; }
.team-profile-page .team-insights-header { padding: 1rem 1.2rem; min-height: 0; }
.team-profile-page .team-insights-title h1 { font-size: clamp(1.35rem, 3vw, 1.9rem); }
.team-profile-page .team-insights-badge { max-height: 56px; width: 52px; object-fit: contain; }
.team-profile-page .team-insights-shirt { margin: 0 !important; height: 72px !important; width: auto; max-width: 90px; }
.public-team-statistics > div { flex: 0 0 16.666%; width: 16.666%; }
.public-team-statistics .feature-card { padding: .6rem !important; border-radius: .7rem; }
.public-team-statistics .fs-3 { font-size: 1.35rem !important; }
.public-fixture-controls { display: flex; flex-wrap: wrap; gap: .7rem; align-items: end; margin: .75rem 0; }
.public-fixture-controls label { font-size: .8rem; font-weight: 600; flex: 1 1 150px; min-width: 0; }
.public-fixture-controls input, .public-fixture-controls select { margin-top: .3rem; }
.public-fixture-controls input[type=search] { min-width: 130px; }
.public-fixture-browser [hidden], .public-tournament-directory [hidden], .public-recent[hidden] { display: none !important; }
.public-muted { color: #596574; font-size: .8rem; margin: .5rem 0; }
.public-empty { padding: 1rem; background: #f3f7f8; color: #344054; border-radius: .6rem; }
.public-match { padding: .8rem .1rem; border-bottom: 1px solid #e8edf0; scroll-margin-top: 100px; }
.public-match-line { display: grid; grid-template-columns: minmax(0, 1fr) 72px minmax(0, 1fr); gap: .5rem; align-items: center; }
.public-match-home { text-align: right; display: flex; justify-content: flex-end; min-width: 0; }
.public-match-away { text-align: left; display: flex; justify-content: flex-start; min-width: 0; }
.public-match-score { text-align: center; font-weight: 700; }
.public-match-kickoff { display: inline-block; padding: .25rem .45rem; border-radius: .4rem; background: #edf4f4; color: #155e59; font-size: .85rem; }
.public-match .team-link { white-space: normal; }
.public-match-actions { text-align: center; margin-top: .5rem; }
.public-match-preview { margin: .5rem auto 0; max-width: 650px; text-align: center; color: #334155; }
.public-match-preview p { color: #475569; }
.public-match-preview a:not(.btn) { color: #0f766e; font-weight: 600; }
.public-match-preview a:not(.btn):hover { color: #115e59; text-decoration: underline; }
.public-match-preview[open] { background: #f4f8f8; border: 1px solid #dce7e6; padding: .8rem; border-radius: .65rem; }
.public-preview-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 1rem; }
.public-preview-grid p { font-size: .85rem; margin: .45rem 0; }
.public-preview-grid h3 { font-size: 1rem; }
.public-form-run { display: inline-flex; align-items: center; flex-wrap: wrap; gap: .3rem; }
.public-result { display: inline-flex; align-items: center; justify-content: center; width: 27px; height: 27px; border-radius: .35rem; color: #fff !important; font-size: .8rem; text-decoration: none; font-weight: 700; }
.public-result.result-w { background: #16804a; }.public-result.result-d { background: #2563eb; }.public-result.result-l { background: #b91c1c; }
.public-table-legend { display: flex; flex-wrap: wrap; gap: .75rem; padding-top: .8rem; font-size: .78rem; color: #344054; }
.public-table-legend > span { display: inline-flex; align-items: center; gap: .35rem; }
.public-zone { width: 12px; height: 12px; border: 1px solid #82909c; border-radius: 2px; display: inline-block; }
.public-zone.table-success { background: #c8dfd6; }.public-zone.row-promotion { background: #e8f9ba; }.public-zone.row-playoff { background: #c3e5f8; }.public-zone.table-danger { background: #f8d7da; }
.tournament-overview .public-form-table .table tbody tr > td { --bs-table-bg: #fff; --bs-table-striped-bg: #f6f8fa; background-color: #fff !important; border-left-color: #e9ecef !important; }
.tournament-overview .tournament-overview .public-form-table .table tbody tr > td:first-child { border-left-width: 1px !important; }
.public-highlight-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 1rem; margin-bottom: 1rem; }
.public-highlight-grid section { background: #fff; color: #263445; padding: 1rem; border-radius: .8rem; border-top: 3px solid #13827a; }
.public-highlight-grid h2 { color: #243445; font-size: 1rem; margin: 0 0 .6rem; }
.public-highlight-grid p, .public-highlight-grid a { font-size: .85rem; }
.public-top-match .public-match { padding: .35rem 0 .8rem; }.public-top-match > p { margin-top: .9rem; }
.public-overview-facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: .75rem; margin: 1rem 0; }
.public-overview-facts > div { background: #f3f7f8; padding: .8rem; border-radius: .65rem; }
.public-overview-facts span { display: block; font-size: .75rem; color: #596574; }.public-overview-facts strong { font-size: 1.3rem; }
.public-team-overview h3 { font-size: 1rem; }
.public-position-run { display: flex; flex-wrap: wrap; gap: .5rem; margin: .8rem 0; }
.public-position-run a { display: flex; flex-direction: column; align-items: center; padding: .5rem .8rem; background: #edf5f4; color: #155e59; border-radius: .5rem; text-decoration: none; }
.public-position-run small { font-size: .7rem; }.public-position-run strong { font-size: 1.2rem; }
.public-recent { display: flex; align-items: center; flex-wrap: wrap; gap: .5rem; margin: 1rem 0; }
.public-recent h2 { flex: 0 0 100%; font-size: 1.1rem; margin: 0 0 .25rem; }
.public-recent > div { display: contents; }
.public-recent [data-recent-clear] { background: #334155; border-color: #64748b; color: #fff; }
.public-recent [data-recent-clear]:hover { background: #475569; border-color: #94a3b8; color: #fff; }
.public-recent [data-recent-clear]:focus-visible { outline: 3px solid #5eead4; outline-offset: 3px; }
.public-tournament-directory { color: #e2e8f0; }.public-tournament-directory .public-muted { color: #cbd5e1; }
.tournament-overview #quickpredict h3, .tournament-overview #quickpredict h4 { color: #263445; }
.public-predictor-status { display: flex; align-items: center; flex-wrap: wrap; gap: .75rem; margin-bottom: 1rem; }
.public-predictor-status p { margin: 0; font-size: .85rem; }
#quickpredict #leagueTable { width: 100%; scroll-margin-top: 100px; }
#quickpredict #leagueTable .predictor-change { display: inline-flex; align-items: center; justify-content: center; min-width: 2.5em; margin-left: .35rem; padding: .25em .45em; border: 1px solid transparent; border-radius: .35rem; font-size: .72rem; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.2; white-space: nowrap; vertical-align: middle; }
#quickpredict #leagueTable .movement-up { background: #12685b; border-color: #12685b; color: #fff; }
#quickpredict #leagueTable .movement-down { background: #b91c1c; border-color: #b91c1c; color: #fff; }
/* Set every cell and Bootstrap's stripe variables so the league bands remain solid. */
#quickpredict #leagueTable tbody tr.table-success > td { --bs-table-bg: #d1e7dd; --bs-table-striped-bg: #d1e7dd; background-color: #d1e7dd !important; }
#quickpredict #leagueTable tbody tr.row-promotion > td { --bs-table-bg: #ecfcc8; --bs-table-striped-bg: #ecfcc8; background-color: #ecfcc8 !important; }
#quickpredict #leagueTable tbody tr.row-playoff > td { --bs-table-bg: #cceafd; --bs-table-striped-bg: #cceafd; background-color: #cceafd !important; }
#quickpredict #leagueTable tbody tr.table-danger > td { --bs-table-bg: #f8d7da; --bs-table-striped-bg: #f8d7da; background-color: #f8d7da !important; }
#quickpredict .predictor-change { color: #12685b; font-size: .75rem; white-space: nowrap; }
#quickpredict .predictor-fixture-line { display: grid; grid-template-columns: minmax(0, 1fr) 100px minmax(0, 1fr); gap: .6rem; align-items: center; }
#quickpredict .predictor-fixture-line > div { width: auto; padding: 0; }
#quickpredict .team-name { white-space: normal; }
#quickpredict .fixture { scroll-margin-top: 100px; }
@media (max-width: 767px) {
    .public-section-nav { top: 0; border-radius: .5rem; }
    .public-team-statistics > div { flex-basis: 33.333%; width: 33.333%; }
    .public-match-line { grid-template-columns: minmax(0, 1fr) 54px minmax(0, 1fr); gap: .25rem; }
    .public-match-line .team-link { font-size: .8rem; }
    .public-overview-facts { gap: .4rem; }.public-overview-facts > div { padding: .6rem; }.public-overview-facts strong { font-size: 1.05rem; }
    #quickpredict .predictor-fixtures-column { order: -1; }
}
@media (prefers-reduced-motion: reduce) { .public-section-nav *, #quickpredict * { scroll-behavior: auto !important; transition: none !important; } }

.team-profile-page .profile-panel h2 { color: #263445; font-size: 1.2rem; }
.team-profile-page .profile-panel h3 { color: #344054; }

/* Keep projected movement separate from the rank and team name. */
#quickpredict #leagueTable .predictor-movement-column { width: 3.5rem; text-align: center; vertical-align: middle; white-space: nowrap; }
#quickpredict #leagueTable .predictor-movement-column .predictor-change { margin-left: 0; }

/* Overview values sit on pale cards rather than the surrounding dark page. */
.team-profile-page .public-team-overview .public-overview-facts strong { color: #1e293b; }

.team-profile-page .public-performance-notes, .team-profile-page .public-performance-notes p { color: #334155; }
.team-profile-page .public-team-overview .public-overview-facts .public-overview-deduction { display: inline-block; margin-left: .35rem; padding: .3em .45em; border-radius: .35rem; background: #b42336; color: #fff; font-size: .7rem; font-weight: 700; line-height: 1.2; white-space: nowrap; vertical-align: middle; }

.public-highlight-teams {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
    margin: 0 0 .7rem;
    padding: 0;
    list-style: none;
}

.public-highlight-teams > li {
    max-width: 100%;
    padding: .3rem .65rem;
    border: 1px solid #a8d0c2;
    border-radius: .5rem;
    background: #e8f4ee;
    color: #17493e;
    font-size: .85rem;
    font-weight: 700;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

/* Compact game-type markers do not add a row to competition tiles. */
.game-type-legend { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1.25rem; margin: .5rem 0 1rem; color: #cbd5e1; font-size: .78rem; }
.game-type-legend > span { display: inline-flex; align-items: center; gap: .4rem; }
.game-type-legend i { font-size: 1rem; }
.game-type-tournament { color: #fde68a; }
.game-type-weekend { color: #b8ffd9; }
.game-type-tile .game-type-markers { position: absolute; top: .5rem; right: .5rem; left: auto; z-index: 2; display: flex; flex-direction: column; align-items: center; gap: .3rem; }
.game-type-marker { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border: 1px solid rgb(255 255 255 / 15%); border-radius: 8px; background: #142638; font-size: .85rem; line-height: 1; }
/* Align status labels with the flag at the top, leaving room for the type icon on the right. */
.game-type-tile .game-tournament-status { position: absolute; top: .5rem; left: auto; right: 2.5rem; max-width: calc(100% - 5.25rem); white-space: normal; overflow-wrap: anywhere; line-height: 1.15; }

/* Align homepage flags with the game-type icons and remove the dark flag backing. */
.game-type-tile .flag-wrapper-sm { position: relative; top: 2px; box-shadow: none; background: transparent; }
