/* ==========================================================================
   SPORTYTRADER EXACT MATCH TABLE STYLES  (consolidated: desktop fixes +
   full mobile responsive rework)
   ========================================================================== */

.odds-hub-wrapper {
    background-color: #f8f9fa;
    font-family: var(--font-main);
    color: #162a43;
    padding: 16px 0 60px 0;
}

.odds-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Breadcrumbs */
.odds-breadcrumbs {
    font-size: 12px;
    color: #6c757d;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.odds-breadcrumbs a {
    color: #6c757d;
    text-decoration: none;
}

.odds-breadcrumbs .current-crumb {
    color: #162a43;
    font-weight: 600;
}

/* Sub Navigation Tabs */
.odds-sub-tabs {
    display: flex;
    justify-content: center;
    gap: 60px;
    border-bottom: 1px solid #e2e6ea;
    margin-bottom: 24px;
}

.odds-sub-tabs .tab-item {
    padding: 10px 4px 14px 4px;
    font-size: 15px;
    font-weight: 600;
    color: #4a5568;
    text-decoration: none;
    position: relative;
}

.odds-sub-tabs .tab-item.active {
    color: #0b1c32;
    font-weight: 700;
}

.odds-sub-tabs .tab-item.active::after {
    content: "";
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: #f89e00;
}

/* Main Layout Split */
.odds-main-layout {
    display: flex;
    gap: 30px;
    align-items: flex-start;
}

.odds-content-area {
    flex: 1;
    min-width: 0;
}

.page-main-title {
    font-size: 24px;
    font-weight: 800;
    color: #0b1c32;
    margin-bottom: 6px;
}

.model-subtitle {
    font-size: 14px;
    color: #4a5568;
    margin-bottom: 20px;
}

/* Competition Filter Dropdown (native fallback, only used if JS custom
   select below isn't wired up) */
.competition-filter-bar {
    margin-bottom: 20px;
}

.comp-select {
    width: 100%;
    max-width: 570px;
    padding: 11px 16px;
    background: #f8f9fa;
    border: 1px solid #dcdfe6;
    border-radius: 6px;
    font-size: 14px;
    color: #162a43;
    outline: none;
    cursor: pointer;
}

/* Custom dropdown (replaces native <select> so the highlight color can be
   styled — browsers won't let CSS touch native option highlighting) */
.custom-select {
    position: relative;
    width: 100%;
    max-width: 570px;
    margin-bottom: 20px;
}
.custom-select-trigger {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 11px 16px;
    background: #f8f9fa;
    border: 1px solid #dcdfe6;
    border-radius: 6px;
    color: #162a43;
    font-size: 14px;
    font-family: inherit;
    cursor: pointer;
}
.custom-select.open .custom-select-trigger svg {
    transform: rotate(180deg);
}
.custom-select-trigger svg {
    transition: transform 0.15s;
    flex-shrink: 0;
}
.custom-select-options {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: #ffffff;
    border: 1px solid #e2e6ea;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
    list-style: none;
    margin: 0;
    padding: 6px;
    max-height: 260px;
    overflow-y: auto;
    z-index: 20;
}
.custom-select.open .custom-select-options {
    display: block;
}
.custom-select-options li {
    padding: 10px 12px;
    border-radius: 6px;
    color: #162a43;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
}
.custom-select-options li:hover {
    background: #f8f9fa;
    color: #f89e00;
}
.custom-select-options li.selected {
    background: #0b1c32;
    color: #ffffff;
    font-weight: 700;
}

/* Optional mobile-only "See all competitions" pill (used at top of
   sidebar on small screens — see note at bottom of this file) */
.mobile-comp-pill {
    display: none;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 10px 18px;
    border: 1px solid #dcdfe6;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 600;
    color: #162a43;
    background: #ffffff;
    cursor: pointer;
    margin-bottom: 16px;
}

/* ==========================================================================
   EXACT 4-COLUMN CSS GRID (Headers & Cards Locked Together)
   ========================================================================== */

.odds-hub-wrapper .table-headers,
.odds-hub-wrapper .match-card {
    display: grid !important;
    grid-template-columns: 160px 1fr 150px auto !important;
    align-items: center !important;
    padding: 14px 20px;
    width: 100%;
}

.odds-hub-wrapper .table-headers {
    background: transparent;
    border: none;
    padding-bottom: 8px;
    font-size: 13px;
    font-weight: 600;
    color: #6c757d;
}

.odds-hub-wrapper .table-headers span:nth-child(3),
.odds-hub-wrapper .table-headers span:nth-child(4) {
    text-align: center;
}

.odds-hub-wrapper .match-card {
    background: #ffffff;
    border: 1px solid #e2e6ea;
    border-radius: 8px;
    margin-bottom: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.02);
}

/* Column 1: Competition Metadata */
.match-meta {
    display: flex;
    flex-direction: column;
    font-size: 12px;
}

.match-date {
    color: #2d3748;
    font-weight: 600;
}

.match-tournament {
    color: #718096;
    margin-top: 2px;
}

/* Column 2: Match Teams */
.match-teams {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.team-row {
    font-size: 13px;
    font-weight: 600;
    color: #162a43;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Round team badge (fixed square box is required for border-radius:50%
   to produce a circle rather than an oval) */
.team-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    font-size: 10px;
    font-weight: 700;
    flex-shrink: 0;
    overflow: hidden;
}
.team-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Column 3: Prediction (1 X 2 Boxes) */
.odds-hub-wrapper .match-prediction {
    display: flex !important;
    flex-direction: column;
    align-items: center !important;
    justify-content: center !important;
    justify-self: center !important;
    text-align: center;
    gap: 3px;
    width: 100%;
}

.pred-boxes {
    display: flex;
    border: 1px solid #cbd5e0;
    border-radius: 4px;
    overflow: hidden;
}

.p-box {
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 700;
    background: #edf2f7;
    color: #4a5568;
    border-right: 1px solid #cbd5e0;
}

.p-box:last-child {
    border-right: none;
}

.p-box.active-win {
    background: #48bb78;
    color: #ffffff;
}

.pred-prob {
    font-size: 10px;
    color: #718096;
    font-weight: 500;
    white-space: nowrap;
}

/* Column 4: Odds Pill Component */
.odds-hub-wrapper .match-odds-action {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    justify-self: center !important;
    background: #ffffff;
    border: 1px solid #dcdfe6;
    border-radius: 999px;
    overflow: hidden;
    margin: 0 auto;
}

.bookie-badge {
    font-size: 11px;
    font-weight: 800;
    padding: 8px 10px;
    color: #ffffff;
    text-align: center;
}

.bookie-badge.betway {
    background-color: #000000;
}

.bookie-badge.xbet {
    background-color: #1a4d8c;
}

.odds-val {
    font-size: 13px;
    font-weight: 700;
    color: #162a43;
    background: #ffffff;
    padding: 8px 12px;
    border-left: 1px solid #dcdfe6;
    border-right: 1px solid #dcdfe6;
    text-align: center;
}

.bet-now-btn {
    background: #f89e00;
    color: #ffffff;
    font-size: 11px;
    font-weight: 800;
    padding: 8px 14px;
    text-decoration: none;
    text-align: center;
    white-space: nowrap;
    transition: background 0.15s;
}

.bet-now-btn:hover {
    background: #e08e00;
}

/* ==========================================================================
   IN-FEED PROMO BANNER & SIDEBAR WIDGET
   ========================================================================== */

.infeed-promo-banner {
    background-color: #0b1c32;
    color: #ffffff;
    border-radius: 8px;
    padding: 20px 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 16px 0;
}

.promo-icon-box {
    font-size: 24px;
    background: rgba(255,255,255,0.1);
    padding: 10px;
    border-radius: 6px;
    position: relative;
    flex-shrink: 0;
}

/* Small red notification dot, CSS-only (no HTML change needed) */
.promo-icon-box::after {
    content: "";
    position: absolute;
    top: -3px;
    right: -3px;
    width: 10px;
    height: 10px;
    background: #e53e3e;
    border-radius: 50%;
    border: 2px solid #0b1c32;
}

.promo-text {
    flex: 1;
}

.promo-text h3 {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 2px;
}

.promo-text p {
    font-size: 11px;
    color: #a0aec0;
}

.promo-signup-btn {
    background-color: #f89e00;
    color: #ffffff;
    padding: 8px 16px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
}

/* Right Sidebar */
.odds-sidebar {
    width: 270px;
    flex-shrink: 0;
}

.sidebar-box {
    background: #ffffff;
    border: 1px solid #e2e6ea;
    border-radius: 8px;
    padding: 14px;
}

.sports-mini-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 14px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e2e6ea;
    font-size: 12px;
}

.sports-mini-tabs a {
    padding: 5px 10px;
    background: #f8f9fa;
    color: #4a5568;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 500;
}

.sports-mini-tabs a.active {
    background: #0b1c32;
    color: #ffffff;
    font-weight: 600;
}

.date-filter-row {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    font-weight: 500;
    color: #718096;
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e2e6ea;
}

.date-filter-row .active-date {
    color: #0b1c32;
    border-bottom: 2px solid #f89e00;
    padding-bottom: 2px;
    font-weight: 700;
}

.sidebar-tournaments {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-tournaments li {
    font-size: 13px;
    font-weight: 500;
    color: #2d3748;
    padding: 8px 0;
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid #f8f9fa;
    cursor: pointer;
}

.sidebar-tournaments li:hover {
    color: #f89e00;
}

/* ==========================================================================
   RESPONSIVE — MOBILE / TABLET (<= 992px)
   Rebuilds the 4-column grid into a stacked card, turns the odds pill
   full-width, stacks the promo banner, and moves the sidebar filters
   above the match list — matching the reference screenshots.
   ========================================================================== */
@media (max-width: 992px) {

    .odds-main-layout {
        flex-direction: column;
    }

    /* Sidebar moves above the content area on mobile */
    .odds-sidebar {
        width: 100%;
        order: -1;
    }

    .sidebar-box {
        border: none;
        border-radius: 0;
        padding: 0 0 16px 0;
        margin-bottom: 4px;
    }

    /* Sports tabs become plain underlined links, not pill buttons */
    .sports-mini-tabs {
        flex-wrap: nowrap;
        overflow-x: auto;
        gap: 22px;
        background: none;
        padding: 0 0 14px 0;
        margin-bottom: 0;
        border-bottom: 1px solid #e2e6ea;
        -ms-overflow-style: none;
        scrollbar-width: none;
    }
    .sports-mini-tabs::-webkit-scrollbar {
        display: none;
    }
    .sports-mini-tabs a {
        background: none !important;
        padding: 0 0 12px 0;
        color: #4a5568;
        font-weight: 600;
        font-size: 14px;
        white-space: nowrap;
        border-bottom: 2px solid transparent;
    }
    .sports-mini-tabs a.active {
        background: none !important;
        color: #0b1c32;
        border-bottom-color: #f89e00;
    }

    /* Optional "See all competitions" pill — only shows if you add the
       .mobile-comp-pill element to the sidebar markup (see note below) */
    .mobile-comp-pill {
        display: flex;
        margin-top: 14px;
    }

    .date-filter-row {
        border: 1px solid #e2e6ea;
        border-radius: 8px;
        padding: 12px 18px;
        margin-top: 14px;
        margin-bottom: 0;
    }

    .sidebar-tournaments {
        display: none;
    }

    /* Table header row (Competition / Match / Prediction / Odds) is
       meaningless once cards stack, so hide it */
    .odds-hub-wrapper .table-headers {
        display: none !important;
    }

    /* Rebuild each match card as a 2-column mini-grid:
         row 1: date -------------------- tournament   (full width)
         row 2: team names       |   prediction boxes
         row 3: odds pill ------------------------------ (full width) */
    .odds-hub-wrapper .match-card {
        grid-template-columns: 1fr auto !important;
        grid-template-areas:
            "meta meta"
            "teams prediction"
            "odds odds";
        align-items: start !important;
        row-gap: 14px;
        column-gap: 12px;
        padding: 16px;
    }

    .match-meta {
        grid-area: meta;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        width: 100%;
    }
    .match-tournament {
        margin-top: 0;
    }

    .match-teams {
        grid-area: teams;
    }

    .odds-hub-wrapper .match-prediction {
        grid-area: prediction;
        align-items: flex-end !important;
        justify-self: end !important;
        width: auto;
    }
    .match-prediction .pred-prob {
        text-align: right;
    }

    /* Odds pill becomes a full-width bar, BET NOW! stretches to fill
       the remaining space instead of hugging its own text width */
    .odds-hub-wrapper .match-odds-action {
        grid-area: odds;
        justify-self: stretch !important;
        width: 100%;
        margin: 0;
    }
    .odds-hub-wrapper .match-odds-action .bet-now-btn {
        flex: 1;
        padding: 10px 14px;
    }

    /* Promo banner stacks and centers on mobile */
    .infeed-promo-banner {
        flex-direction: column;
        text-align: center;
        padding: 28px 20px;
        gap: 12px;
    }
    .promo-icon-box {
        width: 44px;
        height: 44px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 0;
    }
    .promo-text h3 {
        font-size: 16px;
        line-height: 1.4;
    }
    .promo-text p {
        font-size: 12px;
    }
    .promo-signup-btn {
        width: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 6px;
        padding: 14px;
        font-size: 14px;
    }
}