/* v252: Keep the v250 prediction page structure, restore match-card behaviour, and make prediction rows mobile friendly without turning the whole page into history-only. */

/* Do not let old compact/history-only experiments affect the restored prediction cards. */
.football-predictions-page:not(.football-predictions-page--history-only) .football-prediction-match-card--compact,
.football-predictions-page:not(.football-predictions-page--history-only) .football-prediction-match-card__main-link,
.football-predictions-page:not(.football-predictions-page--history-only) .football-prediction-match-card__teams--stacked {
    all: revert;
}

/* Keep page sections, but give them comfortable spacing and prevent overflow. */
.football-predictions-page .football-prediction-main {
    min-width: 0 !important;
}

.football-predictions-page .football-prediction-surebets,
.football-predictions-page .football-prediction-day,
.football-predictions-page .football-prediction-history-section {
    margin-bottom: clamp(1.25rem, 2.5vw, 2rem) !important;
}

.football-predictions-page .football-prediction-league-list {
    display: grid !important;
    gap: clamp(1rem, 2vw, 1.5rem) !important;
}

/* Prediction rows: same idea as the supplied design, without removing the page sections. */
.kisure-prediction-row-list {
    display: grid !important;
    gap: clamp(.8rem, 1.6vw, 1.15rem) !important;
    overflow-x: auto !important;
    overscroll-behavior-inline: contain !important;
    -webkit-overflow-scrolling: touch !important;
    padding: .15rem .05rem .45rem !important;
    scrollbar-width: thin !important;
}

.kisure-prediction-row-card {
    background: rgba(255,255,255,.96) !important;
    border: 1px solid rgba(15,23,42,.13) !important;
    border-radius: 26px !important;
    box-shadow: 0 12px 28px rgba(15,23,42,.05) !important;
    color: var(--bg-contrast) !important;
    min-width: min(100%, 1040px) !important;
    overflow: hidden !important;
    padding: clamp(1rem, 1.65vw, 1.45rem) !important;
    width: 100% !important;
}

.kisure-prediction-row-card__top {
    align-items: center !important;
    display: grid !important;
    gap: clamp(1rem, 2vw, 1.9rem) !important;
    grid-template-columns: minmax(180px, 220px) minmax(300px, 1fr) minmax(235px, 285px) !important;
}

.kisure-prediction-row-card__context {
    min-width: 0 !important;
}

.kisure-prediction-row-card__league span,
.kisure-prediction-row-card__team strong {
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
}

.kisure-prediction-row-card__teams {
    align-items: center !important;
    display: flex !important;
    flex-wrap: nowrap !important;
    gap: clamp(.9rem, 2vw, 2.7rem) !important;
    justify-content: center !important;
    min-width: 0 !important;
}

.kisure-prediction-row-card__team {
    align-items: center !important;
    display: flex !important;
    flex: 1 1 0 !important;
    gap: .75rem !important;
    min-width: 0 !important;
}

.kisure-prediction-row-card__team--home {
    justify-content: flex-end !important;
    text-align: right !important;
}

.kisure-prediction-row-card__team--away {
    justify-content: flex-start !important;
    text-align: left !important;
}

.kisure-prediction-row-card__team img,
.kisure-prediction-row-card__team b {
    flex: 0 0 44px !important;
    height: 44px !important;
    width: 44px !important;
}

.kisure-prediction-row-card__vs {
    flex: 0 0 56px !important;
    height: 48px !important;
}

.kisure-prediction-row-card__odds {
    display: flex !important;
    flex-wrap: nowrap !important;
    gap: .55rem !important;
    justify-content: flex-end !important;
}

.kisure-prediction-row-card__odd {
    border-radius: 17px !important;
    height: 98px !important;
    min-width: 74px !important;
}

.kisure-prediction-row-card__odd.is-active {
    background: linear-gradient(135deg, rgba(14,165,164,.14), rgba(209,240,206,.42)) !important;
    border-color: rgba(14,165,164,.65) !important;
}

/* Previous predictions keep the list idea, while staying responsive. */
.football-prediction-history-list--clean {
    display: grid !important;
    gap: .7rem !important;
}

.football-prediction-history-list--clean .football-prediction-history-row {
    align-items: center !important;
    display: grid !important;
    gap: .85rem !important;
    grid-template-columns: 42px minmax(220px, 1fr) minmax(170px, .55fr) auto !important;
    min-width: 0 !important;
}

.football-prediction-history-row__body,
.football-prediction-history-row__dates {
    min-width: 0 !important;
}

.football-prediction-history-row__body strong,
.football-prediction-history-row__body em,
.football-prediction-history-row__dates small {
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
}

/* Tablet: preserve the horizontal prediction idea, just scale the columns down. */
@media (max-width: 1100px) {
    .kisure-prediction-row-list {
        margin-inline: -.75rem !important;
        padding-inline: .75rem !important;
    }

    .kisure-prediction-row-card {
        min-width: 920px !important;
    }

    .kisure-prediction-row-card__top {
        grid-template-columns: 190px 1fr 252px !important;
    }

    .kisure-prediction-row-card__team strong {
        font-size: 1.05rem !important;
    }
}

/* Mobile: keep one horizontal match row with safe scrolling, not a broken vertical layout. */
@media (max-width: 720px) {
    .football-predictions-page .football-prediction-hero,
    .football-predictions-page .football-prediction-surebets,
    .football-predictions-page .football-prediction-day,
    .football-predictions-page .football-prediction-history-section,
    .football-predictions-page .football-side-panel {
        border-radius: 22px !important;
    }

    .football-predictions-page .football-prediction-surebets__title {
        align-items: flex-start !important;
    }

    .football-predictions-page .football-prediction-surebets__title h2 {
        font-size: clamp(1.5rem, 8vw, 2rem) !important;
    }

    .kisure-prediction-row-list {
        margin-inline: -1rem !important;
        padding-inline: 1rem !important;
    }

    .kisure-prediction-row-card {
        min-width: 790px !important;
        padding: .95rem !important;
    }

    .kisure-prediction-row-card__top {
        grid-template-columns: 170px 320px 235px !important;
        gap: 1rem !important;
    }

    .kisure-prediction-row-card__team img,
    .kisure-prediction-row-card__team b {
        flex-basis: 38px !important;
        height: 38px !important;
        width: 38px !important;
    }

    .kisure-prediction-row-card__vs {
        flex-basis: 48px !important;
        height: 42px !important;
    }

    .kisure-prediction-row-card__odd {
        height: 88px !important;
        min-width: 66px !important;
    }

    .kisure-prediction-row-card__footer {
        margin-top: .85rem !important;
        padding-top: .75rem !important;
    }

    .football-prediction-history-list--clean {
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
        padding-bottom: .35rem !important;
    }

    .football-prediction-history-list--clean .football-prediction-history-row {
        grid-template-columns: 38px 250px 180px 110px !important;
        min-width: 610px !important;
    }
}

html[data-theme="dark"] .kisure-prediction-row-card,
html[data-theme="dark"] .football-prediction-history-list--clean .football-prediction-history-row {
    background: rgba(15,23,42,.92) !important;
    border-color: rgba(255,255,255,.10) !important;
}
