/* Classic rate-table compatibility layer. Keeps the original odds-table presentation. */
#scrollIframe.wrap-iframe-rate .sport-sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

#scrollIframe.wrap-iframe-rate .sport-rate-loading {
    min-height: 96px;
    padding: 12px;
    background: #fff;
}

#scrollIframe.wrap-iframe-rate .sport-skeleton-row {
    height: 38px;
    margin: 6px 0;
    border-radius: 3px;
    background: linear-gradient(90deg, #ececec 25%, #f7f7f7 37%, #ececec 63%);
    background-size: 400% 100%;
    animation: sport-rate-skeleton 1.25s ease-in-out infinite;
}

@keyframes sport-rate-skeleton {
    0% { background-position: 100% 0; }
    100% { background-position: 0 0; }
}

/* Do not let theme CSS collapse or hide team/league images in the rate table. */
#scrollIframe.wrap-iframe-rate .team-box img,
#scrollIframe.wrap-iframe-rate .name-team-left img,
#scrollIframe.wrap-iframe-rate .name-team-right img,
#scrollIframe.wrap-iframe-rate img.team-logo,
#scrollIframe.wrap-iframe-rate img.flag-img,
#scrollIframe.wrap-iframe-rate .league-logo img {
    display: inline-block !important;
    visibility: visible !important;
    opacity: 1 !important;
    flex: 0 0 auto;
    object-fit: contain;
}

#scrollIframe.wrap-iframe-rate .team-box img,
#scrollIframe.wrap-iframe-rate .name-team-left img,
#scrollIframe.wrap-iframe-rate .name-team-right img,
#scrollIframe.wrap-iframe-rate img.team-logo {
    width: 22px !important;
    height: 22px !important;
    max-width: 22px !important;
}

#scrollIframe.wrap-iframe-rate img.flag-img {
    width: 22px !important;
    height: 16px !important;
    max-width: 22px !important;
}

@media (prefers-reduced-motion: reduce) {
    #scrollIframe.wrap-iframe-rate .sport-skeleton-row {
        animation: none;
    }
}

/* Sport Plugin compact UI layer. Uses existing customizer colors through CSS variables. */
#scrollIframe:not(.wrap-iframe-rate).sport-optimized,
#scrollIframe:not(.wrap-iframe-rate).wrap-iframe {
    --sport-accent: #c9151e;
    --sport-accent-dark: #990f16;
    --sport-surface: #ffffff;
    --sport-surface-alt: #f6f7f9;
    --sport-border: #e2e5e9;
    --sport-text: #17202a;
    --sport-muted: #657180;
    --sport-radius: 8px;
    box-sizing: border-box;
    width: 100%;
    min-width: 0 !important;
    padding: 0 !important;
    overflow: hidden;
    color: var(--sport-text);
    background: var(--sport-surface);
    border: 1px solid var(--sport-border);
    border-radius: var(--sport-radius);
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.05);
    font-size: 12px;
    line-height: 1.35;
}

#scrollIframe:not(.wrap-iframe-rate) *,
#scrollIframe:not(.wrap-iframe-rate) *::before,
#scrollIframe:not(.wrap-iframe-rate) *::after {
    box-sizing: border-box;
}

#scrollIframe:not(.wrap-iframe-rate) .sport-widget-meta {
    display: flex;
    align-items: center;
    gap: 7px;
    min-height: 34px;
    padding: 7px 10px;
    color: var(--sport-muted);
    background: var(--sport-surface-alt);
    border-bottom: 1px solid var(--sport-border);
    font-size: 11px;
}

#scrollIframe:not(.wrap-iframe-rate) .sport-live-dot {
    width: 7px;
    height: 7px;
    flex: 0 0 7px;
    border-radius: 50%;
    background: #16a34a;
    box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.12);
}

#scrollIframe:not(.wrap-iframe-rate) .sport-sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

#scrollIframe:not(.wrap-iframe-rate) .sport-rate-loading {
    padding: 8px;
    background: var(--sport-surface);
}

#scrollIframe:not(.wrap-iframe-rate) .sport-skeleton-row {
    height: 34px;
    margin: 5px 0;
    border-radius: 5px;
    background: linear-gradient(90deg, #f0f2f5 25%, #f8f9fb 37%, #f0f2f5 63%);
    background-size: 400% 100%;
    animation: sport-skeleton 1.25s ease-in-out infinite;
}

@keyframes sport-skeleton {
    0% { background-position: 100% 0; }
    100% { background-position: 0 0; }
}

#scrollIframe:not(.wrap-iframe-rate) #min,
#scrollIframe:not(.wrap-iframe-rate) #appHome,
#scrollIframe:not(.wrap-iframe-rate) #homepage,
#scrollIframe:not(.wrap-iframe-rate) #main {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
}

#scrollIframe:not(.wrap-iframe-rate) .filter-box,
#scrollIframe:not(.wrap-iframe-rate) .filter-row,
#scrollIframe:not(.wrap-iframe-rate) .filter-row-wrap,
#scrollIframe:not(.wrap-iframe-rate) #min .tools {
    min-height: 0 !important;
    margin: 0 !important;
    padding: 6px 8px !important;
    gap: 6px !important;
    border-color: var(--sport-border) !important;
}

/*
 * 6in1 desktop table header contains two stacked 20px rows inside a
 * fixed-height container. It must not inherit the compact filter padding,
 * otherwise the second label row spills into the first odds row.
 */
#scrollIframe.wrap-iframe-6in1 .match-list-head {
    box-sizing: border-box !important;
    height: 45px !important;
    min-height: 45px !important;
    margin: 0 !important;
    padding: 0 !important;
    gap: 0 !important;
    overflow: hidden !important;
    border-color: var(--sport-border) !important;
}

#scrollIframe.wrap-iframe-6in1 .match-list-head > div {
    box-sizing: border-box !important;
    height: 100% !important;
    min-height: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}

#scrollIframe.wrap-iframe-6in1 .match-list-head .odds-title-head,
#scrollIframe.wrap-iframe-6in1 .match-list-head .odds-title-items {
    box-sizing: border-box !important;
    height: 22px !important;
    min-height: 22px !important;
    margin: 0 !important;
    padding: 0 !important;
    line-height: 22px !important;
}

#scrollIframe.wrap-iframe-6in1 .match-list-head .odds-title.head > div {
    line-height: 22px !important;
}

#scrollIframe:not(.wrap-iframe-rate) button,
#scrollIframe:not(.wrap-iframe-rate) select,
#scrollIframe:not(.wrap-iframe-rate) input,
#scrollIframe:not(.wrap-iframe-rate) .button-df,
#scrollIframe:not(.wrap-iframe-rate) .btn-item-now,
#scrollIframe:not(.wrap-iframe-rate) .filter-select-rate,
#scrollIframe:not(.wrap-iframe-rate) .filter-select-company,
#scrollIframe:not(.wrap-iframe-rate) .custom-select {
    min-height: 28px !important;
    margin: 0 !important;
    padding: 5px 9px !important;
    border-radius: 5px !important;
    font-size: 11px !important;
    line-height: 16px !important;
}

#scrollIframe:not(.wrap-iframe-rate) #mintable,
#scrollIframe:not(.wrap-iframe-rate) #live,
#scrollIframe:not(.wrap-iframe-rate) .table-view {
    width: 100%;
    min-width: 0;
    overflow-x: auto;
    scrollbar-width: thin;
}

#scrollIframe:not(.wrap-iframe-rate) table {
    width: 100% !important;
    margin: 0 !important;
    border-collapse: separate !important;
    border-spacing: 0 !important;
    color: var(--sport-text);
    font-size: 11px !important;
}

#scrollIframe:not(.wrap-iframe-rate) #table_live tr,
#scrollIframe:not(.wrap-iframe-rate) .table-time tr,
#scrollIframe:not(.wrap-iframe-rate) .bet-match-item {
    min-height: 32px !important;
    height: auto !important;
}

#scrollIframe:not(.wrap-iframe-rate) #table_live td,
#scrollIframe:not(.wrap-iframe-rate) #table_live th,
#scrollIframe:not(.wrap-iframe-rate) .table-time td,
#scrollIframe:not(.wrap-iframe-rate) .table-time th {
    height: 32px !important;
    padding: 4px 5px !important;
    vertical-align: middle !important;
    border-color: var(--sport-border) !important;
}

#scrollIframe:not(.wrap-iframe-rate) #table_live tr.tds:nth-of-type(even) td,
#scrollIframe:not(.wrap-iframe-rate) .bet-match-item-repeated:nth-child(even) .bet-match-item {
    background-color: #fbfcfd;
}

#scrollIframe:not(.wrap-iframe-rate) #table_live tr.tds:hover td,
#scrollIframe:not(.wrap-iframe-rate) .bet-match-item:hover {
    background-color: #f3f6f9 !important;
}

#scrollIframe:not(.wrap-iframe-rate) .Leaguestitle,
#scrollIframe:not(.wrap-iframe-rate) .league-title-head-row,
#scrollIframe:not(.wrap-iframe-rate) .league-item-head,
#scrollIframe:not(.wrap-iframe-rate) .upper-live-title,
#scrollIframe:not(.wrap-iframe-rate) .upper-live-titlez {
    min-height: 30px !important;
    height: 30px !important;
    color: #fff !important;
    background: var(--sport-accent) !important;
    border-color: var(--sport-accent-dark) !important;
    font-weight: 700 !important;
}

#scrollIframe:not(.wrap-iframe-rate) .Leaguestitle td,
#scrollIframe:not(.wrap-iframe-rate) .league-title-head-row td,
#scrollIframe:not(.wrap-iframe-rate) .upper-live-title td,
#scrollIframe:not(.wrap-iframe-rate) .upper-live-titlez td {
    color: inherit !important;
    background: inherit !important;
}

#scrollIframe:not(.wrap-iframe-rate) .football-team-name,
#scrollIframe:not(.wrap-iframe-rate) .team-box,
#scrollIframe:not(.wrap-iframe-rate) .team-box a,
#scrollIframe:not(.wrap-iframe-rate) [data-team-name] {
    min-width: 0;
    color: var(--sport-text) !important;
    font-size: 11px !important;
    font-weight: 600;
    line-height: 15px !important;
    text-decoration: none !important;
}

#scrollIframe:not(.wrap-iframe-rate) .team-box a,
#scrollIframe:not(.wrap-iframe-rate) [data-team-name] {
    display: inline-block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#scrollIframe:not(.wrap-iframe-rate) .odds,
#scrollIframe:not(.wrap-iframe-rate) .odds1,
#scrollIframe:not(.wrap-iframe-rate) .odds2,
#scrollIframe:not(.wrap-iframe-rate) .odds3,
#scrollIframe:not(.wrap-iframe-rate) .odds-number,
#scrollIframe:not(.wrap-iframe-rate) .table-core-odds-value p {
    min-width: 38px !important;
    min-height: 24px !important;
    margin: 0 auto !important;
    padding: 4px 5px !important;
    border-radius: 4px !important;
    line-height: 16px !important;
    text-align: center;
    font-size: 11px !important;
}

#scrollIframe:not(.wrap-iframe-rate) .score-color,
#scrollIframe:not(.wrap-iframe-rate) .scored-s,
#scrollIframe:not(.wrap-iframe-rate) .ratio-value {
    font-weight: 800 !important;
    font-variant-numeric: tabular-nums;
}

#scrollIframe:not(.wrap-iframe-rate) img {
    max-width: 100%;
}

#scrollIframe:not(.wrap-iframe-rate) img.flag-img,
#scrollIframe:not(.wrap-iframe-rate) img.cImg {
    width: 18px !important;
    height: 13px !important;
    object-fit: cover;
}

#scrollIframe:not(.wrap-iframe-rate) .action-table,
#scrollIframe:not(.wrap-iframe-rate) .toolimg,
#scrollIframe:not(.wrap-iframe-rate) .df-wrapper {
    min-width: 42px !important;
}

#scrollIframe:not(.wrap-iframe-rate) .sport-hidden-count-zero,
#scrollIframe:not(.wrap-iframe-rate) .live-dropdown:has(.live-dropdown--content:empty),
#scrollIframe:not(.wrap-iframe-rate) a[aria-disabled="true"]:empty,
#scrollIframe:not(.wrap-iframe-rate) [hidden] {
    display: none !important;
}

@media (max-width: 900px) {
    #scrollIframe:not(.wrap-iframe-rate).sport-optimized,
    #scrollIframe:not(.wrap-iframe-rate).wrap-iframe {
        border-radius: 6px;
        font-size: 11px;
    }

    #scrollIframe:not(.wrap-iframe-rate) .sport-widget-meta {
        min-height: 30px;
        padding: 6px 8px;
        font-size: 10px;
    }

    #scrollIframe:not(.wrap-iframe-rate) .filter-row,
    #scrollIframe:not(.wrap-iframe-rate) .filter-row-wrap,
    #scrollIframe:not(.wrap-iframe-rate) #min .tools {
        overflow-x: auto;
        flex-wrap: nowrap !important;
        scrollbar-width: none;
    }

    #scrollIframe:not(.wrap-iframe-rate) .filter-row::-webkit-scrollbar,
    #scrollIframe:not(.wrap-iframe-rate) .filter-row-wrap::-webkit-scrollbar,
    #scrollIframe:not(.wrap-iframe-rate) #min .tools::-webkit-scrollbar {
        display: none;
    }

    #scrollIframe:not(.wrap-iframe-rate) .filter-row > *,
    #scrollIframe:not(.wrap-iframe-rate) .filter-row-wrap > *,
    #scrollIframe:not(.wrap-iframe-rate) #min .tools li {
        flex: 0 0 auto;
    }

    #scrollIframe:not(.wrap-iframe-rate) #table_live td,
    #scrollIframe:not(.wrap-iframe-rate) #table_live th {
        padding: 3px 4px !important;
    }

    #scrollIframe:not(.wrap-iframe-rate) .football-team-name,
    #scrollIframe:not(.wrap-iframe-rate) .team-box,
    #scrollIframe:not(.wrap-iframe-rate) .team-box a,
    #scrollIframe:not(.wrap-iframe-rate) [data-team-name] {
        font-size: 10px !important;
    }

    #scrollIframe:not(.wrap-iframe-rate) .odds,
    #scrollIframe:not(.wrap-iframe-rate) .odds1,
    #scrollIframe:not(.wrap-iframe-rate) .odds2,
    #scrollIframe:not(.wrap-iframe-rate) .odds3,
    #scrollIframe:not(.wrap-iframe-rate) .odds-number {
        min-width: 34px !important;
        padding: 3px 4px !important;
        font-size: 10px !important;
    }
}

@media (max-width: 640px) {
    #scrollIframe:not(.wrap-iframe-rate) .action-table-pc,
    #scrollIframe:not(.wrap-iframe-rate) .df-wrapper-league-item,
    #scrollIframe:not(.wrap-iframe-rate) .cup-match-tags,
    #scrollIframe:not(.wrap-iframe-rate) .mb-ads,
    #scrollIframe:not(.wrap-iframe-rate) .live-dropdown {
        display: none !important;
    }

    #scrollIframe:not(.wrap-iframe-rate) .league-detail-mobile {
        display: flex !important;
    }

    #scrollIframe:not(.wrap-iframe-rate) .sport-skeleton-row {
        height: 31px;
    }
}

@media (prefers-reduced-motion: reduce) {
    #scrollIframe:not(.wrap-iframe-rate) .sport-skeleton-row {
        animation: none;
    }
}
