/* Styles for the Predict page and its detail pages.
   (Controllers/PredictController.cs, Views/Predict/*.cshtml)
   Kept separate from site.css so it stays easy to find and edit. */

.predict-shell {
    max-width: 520px;
    margin: 0 auto;
    padding: 16px 16px 90px; /* bottom padding clears the fixed main nav */
    font-family: Arial, Helvetica, sans-serif;
    color: var(--text);
}

.predict-topbar {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.predict-back {
    color: var(--text);
    text-decoration: none;
    font-size: 20px;
}

.predict-topbar h1 {
    font-size: 20px;
    margin: 0;
}

/* ── Brand + lookback tabs ─────────────────────────────────────────── */

.predict-brand-tabs {
    display: flex;
    justify-content: center; /* logos sit centred as a group */
    gap: 10px;
    margin-bottom: 5px;
}

.predict-tab {
    flex: 0 0 auto;
    width: 64px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6px;
    border-radius: 12px;
    border: 2px solid var(--line);
    /* Brand logos are drawn for a white background, so this stays light in
       dark mode too - otherwise the dark artwork disappears. */
    background: #ffffff;
    text-decoration: none;
}

.predict-tab img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    display: block;
}

.predict-tab.active {
    border-color: var(--gold);
    box-shadow: inset 0 0 0 1px rgba(212, 175, 55, .25), 0 2px 8px rgba(212, 175, 55, .18);
}

/*.predict-tab:not(.active) {
    opacity: .62;
}*/

.predict-lookback-tabs {
    display: flex;
    gap: 4px;
    padding: 4px;
    margin-bottom: 16px;
    background: var(--surface-soft);
    border: 1px solid var(--line);
    border-radius: 999px;
}

.predict-lookback-tab {
    flex: 1 1 0;
    text-align: center;
    padding: 7px 4px;
    border-radius: 999px;
    color: var(--text-soft);
    text-decoration: none;
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
}

.predict-lookback-tab.active {
    background: #1a1a1a;
    color: var(--gold);
}

.predict-section-heading {
    font-size: 16px;
    margin: 0 0 12px;
}

/* ── Tiles ─────────────────────────────────────────────────────────── */

.predict-tile-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.predict-tile {
    display: block;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 14px;
    box-shadow: var(--shadow);
    color: var(--text);
    text-decoration: none;
}

.predict-tile:active {
    border-color: var(--gold);
}

.predict-tile-wide {
    grid-column: 1 / -1;
}

.predict-tile-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.predict-tile-title {
    font-size: 13px;
    font-weight: 800;
}

.predict-tile-title.hot { color: #e0453a; }
.predict-tile-title.cold { color: #3a8de0; }
.predict-tile-title.popular { color: #b8860b; }

.predict-mini-label {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-soft);
    margin-bottom: 6px;
}

/* ── Chips ─────────────────────────────────────────────────────────── */

.predict-chip-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.predict-chip {
    display: inline-block;
    font-weight: 800;
    font-size: 15px;
    padding: 5px 9px;
    border-radius: 8px;
    background: var(--surface-soft);
    border: 1px solid var(--line);
}

.predict-chip.hot {
    color: #e0453a;
    border-color: rgba(224, 69, 58, 0.35);
}

.predict-chip.cold {
    color: #3a8de0;
    border-color: rgba(58, 141, 224, 0.35);
}

.predict-chip.round {
    border-radius: 999px;
    min-width: 32px;
    text-align: center;
    color: #b8860b;
    border-color: rgba(184, 134, 11, 0.35);
}

.predict-chip.sm {
    font-size: 13px;
    padding: 3px 7px;
    min-width: 26px;
}

.predict-pair-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.predict-position-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    text-align: center;
}

.predict-position-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

/* ── Stat bars ─────────────────────────────────────────────────────── */

.predict-stat-row {
    display: grid;
    grid-template-columns: 92px 1fr 42px;
    align-items: center;
    gap: 8px;
    margin-bottom: 7px;
}

.predict-stat-label {
    font-size: 11px;
    color: var(--text-soft);
}

.predict-stat-track {
    height: 7px;
    border-radius: 999px;
    background: var(--surface-soft);
    border: 1px solid var(--line);
    overflow: hidden;
}

.predict-stat-fill {
    display: block;
    height: 100%;
    border-radius: 999px;
    background: var(--gold);
}

.predict-stat-pct {
    font-size: 11px;
    font-weight: 700;
    text-align: right;
}

.predict-legend {
    margin-top: 8px;
    font-size: 11px;
    color: var(--text-soft);
}

/* ── Detail page ───────────────────────────────────────────────────── */

.predict-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 16px;
    box-shadow: var(--shadow);
}

.predict-note {
    margin: 0 0 14px;
    font-size: 12px;
    line-height: 1.5;
    color: var(--text-soft);
}

.predict-col-title {
    font-size: 13px;
    margin: 0 0 8px;
}

.predict-col-title.hot { color: #e0453a; }
.predict-col-title.cold { color: #3a8de0; }
.predict-col-title.popular { color: #b8860b; }

.predict-mt {
    margin-top: 20px;
}

.predict-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.predict-table th {
    text-align: left;
    font-size: 11px;
    font-weight: 700;
    color: var(--text-soft);
    padding: 6px 4px;
    border-bottom: 1px solid var(--line);
}

.predict-table td {
    padding: 7px 4px;
    border-bottom: 1px solid var(--line);
}

.predict-table tr:last-child td {
    border-bottom: none;
}

.predict-back-btn {
    display: block;
    margin-top: 16px;
    padding: 12px;
    text-align: center;
    border-radius: 12px;
    border: 1px solid var(--line);
    background: var(--surface);
    color: var(--text);
    text-decoration: none;
    font-weight: 700;
    font-size: 14px;
}

.predict-empty {
    font-size: 13px;
    color: var(--text-soft);
    margin: 0;
}

/* ── Number popup (native <dialog>) ────────────────────────────────── */

.predict-chip-btn {
    cursor: pointer;
    font: inherit;
    font-weight: 800;
    font-size: 15px;
}

.predict-modal {
    width: min(92vw, 380px);
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: var(--surface);
    color: var(--text);
    box-shadow: 0 24px 60px rgba(0, 0, 0, .35);
}

.predict-modal::backdrop {
    background: rgba(0, 0, 0, .45);
}

.predict-modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border-bottom: 1px solid var(--line);
}

.predict-chip.lg {
    font-size: 22px;
    padding: 6px 14px;
    letter-spacing: 1px;
}

.predict-modal-close {
    border: 0;
    background: transparent;
    color: var(--text-soft);
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
    padding: 0 4px;
}

.predict-modal-body {
    padding: 14px 16px 18px;
}

.predict-kv {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    padding: 7px 0;
    border-bottom: 1px dashed var(--line);
    font-size: 13px;
}

.predict-kv span {
    color: var(--text-soft);
}

.predict-modal-sub {
    margin: 16px 0 8px;
    font-size: 12px;
    font-weight: 800;
    color: var(--text-soft);
    text-transform: uppercase;
    letter-spacing: .4px;
}

.predict-modal-hint {
    margin: 8px 0 0;
    font-size: 11px;
    color: var(--text-soft);
}

.predict-chip.flag {
    border-color: rgba(184, 134, 11, .75);
    background: rgba(184, 134, 11, .12);
}

/* Text-label chip (e.g. "2 Even 2 Odd") - narrower type than a number chip. */
.predict-chip.lg.text {
    font-size: 15px;
    letter-spacing: 0;
}

.predict-modal-title {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.predict-modal-caption {
    font-size: 11px;
    color: var(--text-soft);
    line-height: 1.3;
}

/* Clickable stat row label that still reads as text, not a button. */
.predict-linklike {
    border: 0;
    background: none;
    padding: 0;
    font: inherit;
    color: var(--text);
    text-align: left;
    text-decoration: underline dotted;
    text-underline-offset: 3px;
    cursor: pointer;
}

.predict-example-date {
    font-size: 11px;
    color: var(--text-soft);
    text-align: right;
    white-space: nowrap;
}

.predict-disclaimer {
    margin: 16px 0 0;
    padding-top: 12px;
    border-top: 1px solid var(--line);
    font-size: 11px;
    line-height: 1.5;
    color: var(--text-soft);
}

@media (max-width: 380px) {
    .predict-pair-split {
        grid-template-columns: 1fr;
    }

    .predict-stat-row {
        grid-template-columns: 80px 1fr 38px;
    }
}
