/* ==============================
   Tabs Layout
   ============================== */
.bapi-tabs {
    border-radius: 12px;
    overflow: hidden;
    background: #232939;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.3);
    color: #fff;
}

.bapi-tabs .bapi-tabs-header {
    padding: 14px 20px;
    border-bottom: 1px solid #444;
    background: #1a202c;
}

.bapi-tabs .bapi-tabs-title {
    margin: 0;
    font-size: 1.3rem;
    font-weight: 700;
    color: #caab72;
}

/* Vertical layout */
.bapi-tabs .tabs-vertical-wrapper {
    display: flex;
    min-height: 400px;
}

/* Sidebar (vertical menu) */
.bapi-tabs .tab-sidebar {
    display: flex;
    flex-direction: column;
    width: 220px;
    background: linear-gradient(180deg, #1a202c, #232939);
    border-right: 1px solid #444;
    padding: 10px 0;
    position: relative;
    box-shadow: 2px 0 12px rgba(0, 0, 0, 0.5);
}

/* Sidebar buttons */
.bapi-tabs .tab-sidebar .tab-btn {
    position: relative;
    padding: 12px 20px;
    font-size: 0.95rem;
    font-weight: 600;
    text-align: left;
    border: none;
    background: transparent;
    cursor: pointer;
    color: #ccc;
    margin: 2px 0;
    overflow: hidden;
    border-bottom: #caab72 1px solid;
    transition: all 0.5s ease;
}

/* Hover effect */
.bapi-tabs .tab-sidebar .tab-btn:hover {
    color: #fff;
    background: #2c3346;
    box-shadow: inset 0 0 10px rgba(202, 171, 114, 0.2);
}

/* Active tab */
.bapi-tabs .tab-sidebar .tab-btn.active {
    color: #caab72;
    border-left: 6px solid #caab72;
    background: #2c3346;
    box-shadow: inset 0 0 12px rgba(202, 171, 114, 0.3);
}

/* Arrow indicator */
.bapi-tabs .tab-sidebar .tab-btn::after {
    content: "\25B8";
    /* ▸*/
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%) rotate(0deg);
    transition: transform 0.3s, color 0.3s;
    color: #aaa;
}

.bapi-tabs .tab-sidebar .tab-btn.active::after {
    transform: translateY(-50%) rotate(90deg);
    color: #caab72;
}

/* Optional gradient underline for active */
.bapi-tabs .tab-sidebar .tab-btn.active::before {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, #caab72, #fff);
    border-radius: 2px;
    opacity: 0.7;
}

/* Tab content */
.bapi-tabs .tab-content-wrapper {
    flex: 1;
    background: #232939;
    padding: 16px;
    overflow-y: auto;
}

.bapi-tabs .tab-content {
    display: none;
}

.bapi-tabs .tab-content.active {
    display: block;
}

/* ==============================
   Odds Widget Styling
   ============================== */
.betsapi-widget-odds {
    font-family: var(--font-family-base);
    font-size: 13px;
    color: #ddd;
    background-color: #2c2f44;
}

/* Market Title */
.betsapi-widget-odds .market-title {
    font-size: 1.2rem;
    font-weight: 700;
    text-align: center;
    color: #caab72;
    margin: 12px 0 16px;
    padding-bottom: 6px;
    border-bottom: 1px solid #444;
}

/* League container */
.betsapi-widget-odds .league-container {
    margin-bottom: 12px;
    border-radius: 8px;
    overflow: hidden;
    background: #1a202c;
    border: 1px solid #444;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

/* Accordion title */
.betsapi-widget-odds .league-title {
    background: #232939;
    color: #caab72;
    font-size: 0.95rem;
    font-weight: 600;
    padding: 10px 14px;
    border: none;
    text-align: left;
    cursor: pointer;
    width: 100%;
    position: relative;
    transition: all 0.3s;
}

.betsapi-widget-odds .league-title:hover {
    background: #2c3346;
}

.betsapi-widget-odds .league-title::after {
    content: "\25B8";
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    transition: transform 0.2s;
}

.betsapi-widget-odds .league-title.active::after {
    transform: translateY(-50%) rotate(90deg);
}

/* League body */
.betsapi-widget-odds .league-table-container {
    border-radius: 0 0 8px 8px;
    margin-bottom: 0;
    transition: all 1s ease;
}

/* Match block */
.betsapi-widget-odds .match-container {
    background: #2c3346;
    padding: 10px 12px;
    transition: all 0.3s;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
    border-bottom: #caab72 1px solid;
}

.betsapi-widget-odds .match-container:last-child {
    border-radius: 0 0 8px 8px;
    margin-bottom: 0;
    border-bottom: none;
}

/* Team names */
.betsapi-widget-odds .team_names {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 6px;
    color: #fff;
}

.betsapi-widget-odds .team_names .vs {
    margin: 0 6px;
    font-weight: normal;
    color: #aaa;
}

/* Variant wrapper for scroll */
.betsapi-widget-odds .variant-wrapper {
    width: 100%;
    overflow-x: auto;
    position: relative;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
    margin-top: 6px;
}

/* Variant block */
.betsapi-widget-odds .variant {
    margin-bottom: 8px;
}

.betsapi-widget-odds .variant-name {
    font-size: 12px;
    font-weight: 600;
    color: #caab72;
    margin-bottom: 4px;
}

/* ===== Odds grid ===== */
.odd-header,
.odd-row {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(50px, auto);
    gap: 4px;
    font-size: 12px;
    align-items: center;
    text-align: center;
}

/* Columns */
.odd-col {
    padding: 6px 8px;
    white-space: nowrap;
    box-sizing: border-box;
}

.odd-col.highlighted {
    background: #caab72;
    border-radius: 6px;
    transition: background 0.8s ease;
}

.odd-col-link,
.odd-col-link:hover,
.odd-col-link:visited,
.odd-col-link:active {
    color: #FFF !important;
    text-decoration: none !important;
}



.odd-col-arrow {
    display: inline-block;
    margin-left: 4px;
    font-size: 0.8em;
    vertical-align: middle;
}

.odd-up {
    color: #4caf50;
    /* green */
}

.odd-down {
    color: #f44336;
    /* red */
}

/* Header styling */
.odd-header {
    font-weight: 600;
    color: #aaa;
    border-bottom: 1px solid #444;
    padding-bottom: 6px;
    margin-bottom: 6px;
}

/* Row styling */
.odd-row {
    padding: 6px 0;
    transition: all 0.3s;
}

.odd-row:hover {
    background: #3a3f57;
    border-radius: 6px;

}

.odd-row .odd-col:hover {
    background: #caab72;
    color: #232939;
    font-weight: 700;
    transition: all 0.3s;
    border-radius: 6px;
}

/* Custom scrollbar */
.betsapi-widget-odds .variant-wrapper::-webkit-scrollbar {
    height: 6px;
}

.betsapi-widget-odds .variant-wrapper::-webkit-scrollbar-track {
    background: #2c3346;
    border-radius: 3px;
}

.betsapi-widget-odds .variant-wrapper::-webkit-scrollbar-thumb {
    background: #444;
    border-radius: 3px;
}

.betsapi-widget-odds .variant-wrapper::-webkit-scrollbar-thumb:hover {
    background: #caab72;
}

.bapi-odds .tab-content {
    background-color: #1a1f2d;
}

.sabah-content.updated {
    box-shadow: 0 0 8px #caab72;
    transition: box-shadow 0.5s;
}

@keyframes flash {
    0% {
        background-color: rgba(202, 171, 114, 0.2);
    }

    100% {
        background-color: transparent;
    }
}

.tab-sidebar-wrapper .tab-scroll-left,
.tab-sidebar-wrapper .tab-scroll-right {
    display: none;
}

/* ==============================
   Responsive for Mobile
   ============================== */
@media (max-width: 991px) {
    .bapi-tabs .tabs-vertical-wrapper {
        flex-direction: column;
        min-height: auto;
    }

    /* Sidebar becomes horizontal */
    .bapi-tabs .tab-sidebar {
        width: 100%;
        flex-direction: row;
        overflow-x: auto;
        border-right: none;
        border-bottom: 1px solid #444;
        box-shadow: none;
        padding: 0 30px;
        /* space for indicators */
        scroll-behavior: smooth;
        -webkit-overflow-scrolling: touch;
    }

    /* Sidebar buttons inline */
    .bapi-tabs .tab-sidebar .tab-btn {
        flex: 0 0 auto;
        margin: 0 2px;
        border: none;
        border-radius: 0;
        text-align: center;
        padding: 10px 16px;
        font-size: 0.9rem;
    }

    /* Active tab border for horizontal */
    .bapi-tabs .tab-sidebar .tab-btn.active {
        border-left: none;
        border-right: 3px solid #caab72;
        border-bottom: none;
    }

    /* Tab content wrapper */
    .bapi-tabs .tab-content-wrapper {
        padding: 12px;
    }

    /* Scroll indicators */
    .tab-sidebar-wrapper {
        position: relative;
        overflow: hidden;
    }

    .tab-sidebar-wrapper::before,
    .tab-sidebar-wrapper::after {
        content: "";
        position: absolute;
        top: 0;
        bottom: 0;
        width: 20px;
        pointer-events: none;
        z-index: 2;
        transition: opacity 0.3s;
    }

    .tab-sidebar-wrapper::before {
        left: 0;
        background: linear-gradient(to right, #232939, transparent);
        opacity: 0;
    }

    .tab-sidebar-wrapper.show-left-indicator::before {
        opacity: 1;
    }

    .tab-sidebar-wrapper::after {
        right: 0;
        background: linear-gradient(to left, #232939, transparent);
        opacity: 0;
    }

    .tab-sidebar-wrapper.show-right-indicator::after {
        opacity: 1;
    }

    .tab-sidebar-wrapper {
        display: flex;
        align-items: center;
    }

    .tab-sidebar-wrapper .tab-sidebar {
        flex: 1;
        overflow-x: auto;
        display: flex;
        scroll-behavior: smooth;
        -webkit-overflow-scrolling: touch;
        padding: 0;
    }

    .tab-sidebar-wrapper .tab-scroll-left,
    .tab-sidebar-wrapper .tab-scroll-right {
        display: flex;
        align-items: center;
        justify-content: center;
        position: relative;
        top: 0;
        bottom: 0;
        width: 32px;
        background: rgba(35, 41, 57, 0.8);
        color: #caab72;
        border: none;
        font-size: 16px;
        cursor: pointer;
        z-index: 3;
        transition: background 0.3s;
        flex: 0 0 32px;
        padding: 0 !important;
    }

    .tab-sidebar-wrapper .tab-scroll-left:hover,
    .tab-sidebar-wrapper .tab-scroll-right:hover {
        background: rgba(35, 41, 57, 1);
    }

    .tab-sidebar-wrapper .tab-scroll-left {
        left: 0;
        border-top-left-radius: 6px;
        border-bottom-left-radius: 6px;
    }

    .tab-sidebar-wrapper .tab-scroll-right {
        right: 0;
        border-top-right-radius: 6px;
        border-bottom-right-radius: 6px;
    }

    /* Hide buttons on desktop */
    @media (min-width: 992px) {

        .tab-sidebar-wrapper .tab-scroll-left,
        .tab-sidebar-wrapper .tab-scroll-right {
            display: none;
        }
    }
}

@media (max-width: 575px) {
    .layout-container {
        padding: 0;
    }

    .bapi-tabs .tab-sidebar .tab-btn {
        padding: 5px 5px;
        font-size: 0.8rem;
        border-left: #caab72 1px solid;
    }

    /* Odds widget content */
    .betsapi-widget-odds {
        font-size: 12px;
    }

    .betsapi-widget-odds .team_names {
        font-size: 13px;
    }

    .betsapi-widget-odds .variant-wrapper {
        padding-bottom: 2px;
    }

    .betsapi-widget-odds .odd-col {
        padding: 4px 6px;
        font-size: 11px;
    }
}