/**
 * PHASE 5 — MOBILE-FIRST + RESPONSIVE SPORTSBOOK UX
 * Professional mobile sportsbook experience (320px - 1023px)
 * Preserves 100% of desktop UI and business logic
 */

/* ============================================
   MOBILE BASE & RESET
   ============================================ */

@media (max-width: 1023px) {
    /* Prevent horizontal overflow at sportsbook shell level */
    .bc-sb-app {
        overflow-x: hidden !important;
        width: 100% !important;
        max-width: 100vw !important;
    }
    
    /* Ensure content fits viewport */
    .bc-sb-container {
        max-width: 100vw !important;
        overflow-x: hidden !important;
    }
}

/* ============================================
   SAFE AREAS (iPhone X+, Dynamic Island)
   ============================================ */

@media (max-width: 1023px) {
    /* Header safe area */
    .bc-sb-header {
        padding-top: max(env(safe-area-inset-top), 12px) !important;
    }
    
    /* Floating BetSlip safe area */
    .bc-sb-floating-betslip {
        bottom: max(env(safe-area-inset-bottom), 16px) !important;
        right: max(env(safe-area-inset-right), 16px) !important;
    }
    
    /* Mobile drawer safe area */
    .bc-sb-mobile-betslip {
        padding-bottom: env(safe-area-inset-bottom) !important;
    }
    
    /* Modal safe areas */
    .bc-sb-modal,
    .bc-sb-match-center-mobile {
        padding-top: env(safe-area-inset-top) !important;
        padding-bottom: env(safe-area-inset-bottom) !important;
    }
}

/* ============================================
   HEADER (52px max mobile)
   ============================================ */

@media (max-width: 1023px) {
    .bc-sb-header {
        height: 90px !important;
        min-height: 90px !important;
        max-height: 90px !important;
        padding: 16px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        gap: 12px !important;
        background: #080B0F !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.06) !important;
    }
    
    /* Logo/Clock — 50px */
    .bc-sb-header__logo {
        width: 50px !important;
        height: 50px !important;
        color: #FFD000 !important;
        flex-shrink: 0 !important;
    }
    
    .bc-sb-header__logo img {
        max-width: 50px !important;
        max-height: 50px !important;
        width: auto !important;
        height: auto !important;
    }
    
    /* Header actions group */
    .bc-sb-header__actions {
        display: flex !important;
        align-items: center !important;
        gap: 8px !important;
        flex-shrink: 0 !important;
    }
    
    /* Search trigger */
    .bc-sb-search-trigger {
        width: 40px !important;
        height: 40px !important;
        min-width: 40px !important;
        padding: 0 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        border-radius: 6px !important;
        background: rgba(255, 255, 255, 0.06) !important;
        border: 1px solid rgba(255, 255, 255, 0.08) !important;
    }
    
    /* Favorites trigger */
    .bc-sb-favorites-trigger {
        width: 40px !important;
        height: 40px !important;
        min-width: 40px !important;
        padding: 0 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        border-radius: 6px !important;
        background: rgba(255, 255, 255, 0.06) !important;
        border: 1px solid rgba(255, 255, 255, 0.08) !important;
    }
    
    /* Hide desktop-only header elements */
    .bc-sb-header__desktop-only,
    .bc-sb-header__balance-desktop {
        display: none !important;
    }
}

/* ============================================
   SPORTS NAV (44-48px horizontal scroll)
   ============================================ */

@media (max-width: 767px) {
    /* Hide small nav bar, use large cards instead */
    .bc-sb-sports-nav {
        display: none !important;
    }
    
    /* Show sports bar with large cards */
    .bc-sb-sports-bar {
        display: flex !important;
        gap: 12px !important;
        padding: 16px !important;
        overflow-x: auto !important;
        overflow-y: hidden !important;
        -webkit-overflow-scrolling: touch !important;
        scrollbar-width: none !important;
        background: #080B0F !important;
    }
    
    .bc-sb-sports-bar::-webkit-scrollbar {
        display: none !important;
    }
    
    /* Sport card — 105x125px premium cards */
    .bc-sb-sport {
        min-width: 105px !important;
        width: 105px !important;
        height: 125px !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 10px !important;
        background: #151A20 !important;
        border: 2px solid transparent !important;
        border-radius: 22px !important;
        cursor: pointer !important;
        transition: all 0.15s ease !important;
        flex-shrink: 0 !important;
    }
    
    .bc-sb-sport__icon {
        width: 46px !important;
        height: 46px !important;
        font-size: 46px !important;
        line-height: 1 !important;
        color: #F5F7FA !important;
    }
    
    .bc-sb-sport__name {
        font-size: 16px !important;
        font-weight: 600 !important;
        color: #9AA3AF !important;
        text-align: center !important;
    }
    
    /* Active sport */
    .bc-sb-sport--active {
        background: #151A20 !important;
        border-color: #FFD000 !important;
        box-shadow: 0 0 16px rgba(255, 208, 0, 0.2) !important;
        position: relative !important;
    }
    
    .bc-sb-sport--active::after {
        content: '' !important;
        position: absolute !important;
        bottom: 0 !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        width: 40px !important;
        height: 3px !important;
        background: #FFD000 !important;
        border-radius: 2px 2px 0 0 !important;
    }
    
    .bc-sb-sport--active .bc-sb-sport__icon {
        color: #FFD000 !important;
    }
    
    .bc-sb-sport--active .bc-sb-sport__name {
        color: #FFD000 !important;
    }
}

@media (min-width: 768px) and (max-width: 1023px) {
    /* Original small nav bar for tablets */
    .bc-sb-sports-nav {
        height: 48px !important;
        min-height: 48px !important;
        overflow-x: auto !important;
        overflow-y: hidden !important;
        white-space: nowrap !important;
        -webkit-overflow-scrolling: touch !important;
        scrollbar-width: none !important;
        padding: 0 12px !important;
        display: flex !important;
        align-items: center !important;
        gap: 8px !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.06) !important;
    }
    
    .bc-sb-sports-nav::-webkit-scrollbar {
        display: none !important;
    }
    
    /* Sport items */
    .bc-sb-sports-nav__item {
        flex-shrink: 0 !important;
        padding: 8px 14px !important;
        min-height: 36px !important;
        border-radius: 18px !important;
        font-size: 13px !important;
        font-weight: 600 !important;
        display: inline-flex !important;
        align-items: center !important;
        gap: 6px !important;
        white-space: nowrap !important;
        background: rgba(255, 255, 255, 0.04) !important;
        border: 1px solid rgba(255, 255, 255, 0.06) !important;
        color: #9ca3af !important;
        transition: all 0.15s ease !important;
    }
    
    .bc-sb-sports-nav__item--active {
        background: rgba(255, 215, 0, 0.12) !important;
        border-color: rgba(255, 215, 0, 0.3) !important;
        color: #FFD700 !important;
    }
    
    .bc-sb-sports-nav__item:active {
        transform: scale(0.97) !important;
    }
    
    /* Sport icons */
    .bc-sb-sports-nav__icon {
        font-size: 16px !important;
        line-height: 1 !important;
    }
}

/* ============================================
   MODE BAR (40-44px)
   ============================================ */

@media (max-width: 1023px) {
    .bc-sb-mode-bar {
        height: 44px !important;
        min-height: 44px !important;
        padding: 6px 12px !important;
        display: flex !important;
        gap: 6px !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.06) !important;
        background: #0f1115 !important;
    }
    
    /* Mode buttons */
    .bc-sb-mode-btn {
        flex: 1 !important;
        height: 32px !important;
        min-height: 32px !important;
        padding: 0 12px !important;
        border-radius: 6px !important;
        font-size: 12px !important;
        font-weight: 700 !important;
        text-transform: uppercase !important;
        letter-spacing: 0.5px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 4px !important;
        background: rgba(255, 255, 255, 0.04) !important;
        border: 1px solid rgba(255, 255, 255, 0.06) !important;
        color: #6b7280 !important;
        transition: all 0.15s ease !important;
    }
    
    .bc-sb-mode-btn--active {
        background: rgba(255, 215, 0, 0.12) !important;
        border-color: rgba(255, 215, 0, 0.3) !important;
        color: #FFD700 !important;
    }
    
    .bc-sb-mode-btn:active {
        transform: scale(0.97) !important;
    }
    
    /* LIVE indicator */
    .bc-sb-mode-btn--live .bc-sb-mode-btn__indicator {
        width: 6px !important;
        height: 6px !important;
        border-radius: 50% !important;
        background: #ef4444 !important;
        animation: pulse-red 1.5s ease-in-out infinite !important;
    }
}

@keyframes pulse-red {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* ============================================
   SIDEBAR → MOBILE NAVIGATION
   ============================================ */

@media (max-width: 1023px) {
    /* Hide desktop sidebar */
    .bc-sb-sidebar {
        display: none !important;
    }
    
    /* Main content full width */
    .bc-sb-main {
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    
    /* Mobile navigation becomes main content */
    .bc-sb-main-content {
        width: 100% !important;
        padding: 0 !important;
    }
}

/* ============================================
   TOP LEAGUES (40-44px rows)
   ============================================ */

@media (max-width: 1023px) {
    .bc-sb-top-leagues {
        padding: 0 !important;
        background: #0f1115 !important;
    }
    
    .bc-sb-top-leagues__header {
        padding: 12px 16px !important;
        font-size: 12px !important;
        font-weight: 700 !important;
        text-transform: uppercase !important;
        letter-spacing: 0.5px !important;
        color: #6b7280 !important;
        background: #0a0c0f !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.06) !important;
    }
    
    .bc-sb-top-league-item {
        min-height: 44px !important;
        height: auto !important;
        padding: 12px 16px !important;
        display: flex !important;
        align-items: center !important;
        gap: 12px !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.04) !important;
        background: #0f1115 !important;
        transition: background 0.15s ease !important;
    }
    
    .bc-sb-top-league-item:active {
        background: #13161b !important;
    }
    
    /* Favorite star */
    .bc-sb-top-league-item__favorite {
        font-size: 16px !important;
        width: 20px !important;
        flex-shrink: 0 !important;
    }
    
    /* League name */
    .bc-sb-top-league-item__name {
        flex: 1 !important;
        font-size: 14px !important;
        font-weight: 600 !important;
        color: #f5f7fa !important;
        line-height: 1.3 !important;
    }
    
    /* Match count */
    .bc-sb-top-league-item__count {
        font-size: 13px !important;
        font-weight: 700 !important;
        color: #6b7280 !important;
        padding: 2px 8px !important;
        background: rgba(255, 255, 255, 0.04) !important;
        border-radius: 10px !important;
        flex-shrink: 0 !important;
    }
    
    /* Chevron */
    .bc-sb-top-league-item__chevron {
        width: 16px !important;
        height: 16px !important;
        color: #6b7280 !important;
        flex-shrink: 0 !important;
    }
}

/* ============================================
   TOP COUNTRIES (40-44px rows with emoji flags)
   ============================================ */

@media (max-width: 1023px) {
    .bc-sb-top-countries {
        padding: 0 !important;
        background: #0f1115 !important;
    }
    
    .bc-sb-top-countries__header {
        padding: 12px 16px !important;
        font-size: 12px !important;
        font-weight: 700 !important;
        text-transform: uppercase !important;
        letter-spacing: 0.5px !important;
        color: #6b7280 !important;
        background: #0a0c0f !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.06) !important;
    }
    
    .bc-sb-top-country-item {
        min-height: 44px !important;
        height: auto !important;
        padding: 12px 16px !important;
        display: flex !important;
        align-items: center !important;
        gap: 12px !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.04) !important;
        background: #0f1115 !important;
        transition: background 0.15s ease !important;
    }
    
    .bc-sb-top-country-item:active {
        background: #13161b !important;
    }
    
    /* Country flag (emoji) */
    .bc-sb-top-country-item__flag {
        font-size: 20px !important;
        line-height: 1 !important;
        width: 24px !important;
        height: 24px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        flex-shrink: 0 !important;
    }
    
    /* Country name */
    .bc-sb-top-country-item__name {
        flex: 1 !important;
        font-size: 14px !important;
        font-weight: 600 !important;
        color: #f5f7fa !important;
        line-height: 1.3 !important;
    }
    
    /* League count */
    .bc-sb-top-country-item__count {
        font-size: 13px !important;
        font-weight: 700 !important;
        color: #6b7280 !important;
        padding: 2px 8px !important;
        background: rgba(255, 255, 255, 0.04) !important;
        border-radius: 10px !important;
        flex-shrink: 0 !important;
    }
    
    /* Chevron */
    .bc-sb-top-country-item__chevron {
        width: 16px !important;
        height: 16px !important;
        color: #6b7280 !important;
        flex-shrink: 0 !important;
    }
    
    /* Favorite button */
    .bc-sb-top-country-item__favorite {
        width: 32px !important;
        height: 32px !important;
        min-width: 32px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        flex-shrink: 0 !important;
    }
}

/* ============================================
   DATE HEADER (30-34px mobile)
   ============================================ */

@media (max-width: 1023px) {
    .bc-sb-date-separator {
        min-height: 32px !important;
        height: auto !important;
        padding: 8px 16px !important;
        font-size: 12px !important;
        font-weight: 700 !important;
        text-transform: uppercase !important;
        letter-spacing: 0.5px !important;
        color: #9ca3af !important;
        background: #0a0c0f !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.06) !important;
        display: flex !important;
        align-items: center !important;
        gap: 8px !important;
    }
    
    .bc-sb-date-separator__label {
        font-size: 12px !important;
    }
    
    .bc-sb-date-separator__date {
        font-size: 11px !important;
        color: #6b7280 !important;
    }
}

/* ============================================
   LEAGUE HEADER (34-40px mobile)
   ============================================ */

@media (max-width: 1023px) {
    .bc-sb-league-header {
        min-height: 38px !important;
        height: auto !important;
        padding: 10px 16px !important;
        display: flex !important;
        align-items: center !important;
        gap: 8px !important;
        background: #0f1115 !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.06) !important;
    }
    
    /* Country flag */
    .bc-sb-league-header__flag {
        font-size: 16px !important;
        line-height: 1 !important;
        flex-shrink: 0 !important;
    }
    
    /* League name */
    .bc-sb-league-header__name {
        flex: 1 !important;
        font-size: 13px !important;
        font-weight: 700 !important;
        color: #f5f7fa !important;
        line-height: 1.3 !important;
    }
    
    /* Match count */
    .bc-sb-league-header__count {
        font-size: 12px !important;
        font-weight: 700 !important;
        color: #6b7280 !important;
        padding: 2px 6px !important;
        background: rgba(255, 255, 255, 0.04) !important;
        border-radius: 8px !important;
        flex-shrink: 0 !important;
    }
}

/* ============================================
   MATCH ROWS (72-90px mobile)
   ============================================ */

@media (max-width: 1023px) {
    .bc-sb-match-card {
        min-height: 72px !important;
        height: auto !important;
        padding: 12px 16px !important;
        display: flex !important;
        flex-direction: column !important;
        gap: 8px !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.04) !important;
        background: #0f1115 !important;
        transition: background 0.15s ease !important;
    }
    
    .bc-sb-match-card:active {
        background: #13161b !important;
    }
    
    /* Match header (time + teams) */
    .bc-sb-match-card__header {
        display: flex !important;
        gap: 12px !important;
        align-items: flex-start !important;
    }
    
    /* Time */
    .bc-sb-match-card__time {
        font-size: 12px !important;
        font-weight: 600 !important;
        color: #6b7280 !important;
        line-height: 1.4 !important;
        min-width: 40px !important;
        flex-shrink: 0 !important;
    }
    
    /* LIVE indicator */
    .bc-sb-match-card__live {
        font-size: 10px !important;
        font-weight: 800 !important;
        color: #fff !important;
        background: #ef4444 !important;
        padding: 2px 6px !important;
        border-radius: 3px !important;
        letter-spacing: 0.5px !important;
        line-height: 1 !important;
        min-width: 40px !important;
        text-align: center !important;
    }
    
    /* Teams */
    .bc-sb-match-card__teams {
        flex: 1 !important;
        display: flex !important;
        flex-direction: column !important;
        gap: 4px !important;
        min-width: 0 !important;
    }
    
    .bc-sb-match-card__team {
        font-size: 14px !important;
        font-weight: 600 !important;
        color: #f5f7fa !important;
        line-height: 1.3 !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
    }
    
    /* Odds row */
    .bc-sb-match-card__odds {
        display: flex !important;
        gap: 6px !important;
        align-items: center !important;
        justify-content: flex-end !important;
        margin-left: 52px !important;
    }
    
    /* Odds buttons (44px minimum touch target) */
    .bc-sb-odds-btn {
        min-width: 54px !important;
        min-height: 44px !important;
        padding: 8px 10px !important;
        background: rgba(255, 255, 255, 0.06) !important;
        border: 1px solid rgba(255, 255, 255, 0.08) !important;
        border-radius: 6px !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 2px !important;
        transition: all 0.15s ease !important;
    }
    
    .bc-sb-odds-btn:active {
        background: rgba(255, 215, 0, 0.12) !important;
        border-color: rgba(255, 215, 0, 0.3) !important;
        transform: scale(0.97) !important;
    }
    
    .bc-sb-odds-btn--selected {
        background: rgba(255, 215, 0, 0.12) !important;
        border-color: rgba(255, 215, 0, 0.3) !important;
    }
    
    .bc-sb-odds-btn--suspended {
        opacity: 0.4 !important;
        pointer-events: none !important;
    }
    
    /* Odds label */
    .bc-sb-odds-btn__label {
        font-size: 10px !important;
        font-weight: 600 !important;
        color: #6b7280 !important;
        text-transform: uppercase !important;
        line-height: 1 !important;
    }
    
    /* Odds value */
    .bc-sb-odds-btn__value {
        font-size: 14px !important;
        font-weight: 700 !important;
        color: #f5f7fa !important;
        line-height: 1 !important;
    }
    
    .bc-sb-odds-btn--selected .bc-sb-odds-btn__value {
        color: #FFD700 !important;
    }
}

/* ============================================
   FLOATING BETSLIP (44x44px minimum)
   ============================================ */

@media (max-width: 1023px) {
    .bc-sb-floating-betslip {
        position: fixed !important;
        bottom: max(env(safe-area-inset-bottom), 16px) !important;
        right: max(env(safe-area-inset-right), 16px) !important;
        z-index: 1000 !important;
        min-width: 56px !important;
        min-height: 56px !important;
        padding: 0 16px !important;
        background: #FFD700 !important;
        border: none !important;
        border-radius: 28px !important;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3), 0 2px 6px rgba(0, 0, 0, 0.2) !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 8px !important;
        transition: all 0.2s ease !important;
    }
    
    .bc-sb-floating-betslip:active {
        transform: scale(0.95) !important;
    }
    
    /* Icon */
    .bc-sb-floating-betslip__icon {
        width: 20px !important;
        height: 20px !important;
        flex-shrink: 0 !important;
    }
    
    /* Text */
    .bc-sb-floating-betslip__text {
        font-size: 13px !important;
        font-weight: 700 !important;
        color: #14100A !important;
        text-transform: uppercase !important;
        letter-spacing: 0.5px !important;
    }
    
    /* Badge */
    .bc-sb-floating-betslip__badge {
        min-width: 20px !important;
        height: 20px !important;
        padding: 0 6px !important;
        background: #14100A !important;
        color: #FFD700 !important;
        font-size: 11px !important;
        font-weight: 800 !important;
        border-radius: 10px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        flex-shrink: 0 !important;
    }
}

/* ============================================
   MOBILE BETSLIP DRAWER (max-height: 92vh)
   ============================================ */

@media (max-width: 1023px) {
    .bc-sb-mobile-betslip {
        position: fixed !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        z-index: 2000 !important;
        background: #0f1115 !important;
        border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
        border-top-left-radius: 16px !important;
        border-top-right-radius: 16px !important;
        max-height: 92vh !important;
        display: flex !important;
        flex-direction: column !important;
        transform: translateY(100%) !important;
        transition: transform 0.3s ease !important;
        box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.3) !important;
        padding-bottom: env(safe-area-inset-bottom) !important;
    }
    
    .bc-sb-mobile-betslip--open {
        transform: translateY(0) !important;
    }
    
    /* Drawer handle */
    .bc-sb-mobile-betslip::before {
        content: '' !important;
        position: absolute !important;
        top: 8px !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        width: 40px !important;
        height: 4px !important;
        background: rgba(255, 255, 255, 0.2) !important;
        border-radius: 2px !important;
    }
    
    /* Drawer header */
    .bc-sb-mobile-betslip__header {
        padding: 20px 16px 12px 16px !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.06) !important;
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        flex-shrink: 0 !important;
    }
    
    .bc-sb-mobile-betslip__title {
        font-size: 16px !important;
        font-weight: 700 !important;
        color: #f5f7fa !important;
    }
    
    .bc-sb-mobile-betslip__close {
        width: 36px !important;
        height: 36px !important;
        min-width: 36px !important;
        border-radius: 6px !important;
        background: rgba(255, 255, 255, 0.06) !important;
        border: 1px solid rgba(255, 255, 255, 0.08) !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        font-size: 18px !important;
        color: #9ca3af !important;
    }
    
    /* Drawer content */
    .bc-sb-mobile-betslip__content {
        flex: 1 !important;
        overflow-y: auto !important;
        overflow-x: hidden !important;
        -webkit-overflow-scrolling: touch !important;
        max-height: calc(92vh - 160px) !important;
    }
    
    /* Drawer footer (sticky CTAs) */
    .bc-sb-mobile-betslip__footer {
        padding: 16px !important;
        background: #0a0c0f !important;
        border-top: 1px solid rgba(255, 255, 255, 0.06) !important;
        flex-shrink: 0 !important;
    }
}

/* ============================================
   BET HUB TABS MOBILE (40-44px, one row)
   ============================================ */

@media (max-width: 1023px) {
    .bc-sb-hub-tabs {
        display: flex !important;
        gap: 0 !important;
        border-bottom: 2px solid rgba(255, 255, 255, 0.08) !important;
        background: #0f1115 !important;
        overflow: visible !important;
    }
    
    .bc-sb-hub-tab {
        flex: 1 !important;
        min-height: 42px !important;
        padding: 10px 8px !important;
        font-size: 11px !important;
        font-weight: 700 !important;
        text-transform: uppercase !important;
        letter-spacing: 0.5px !important;
        color: #6b7280 !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 4px !important;
        position: relative !important;
    }
    
    .bc-sb-hub-tab--active {
        color: #FFD700 !important;
    }
    
    .bc-sb-hub-tab--active::after {
        content: '' !important;
        position: absolute !important;
        bottom: -2px !important;
        left: 0 !important;
        right: 0 !important;
        height: 2px !important;
        background: #FFD700 !important;
    }
    
    /* Tab badge */
    .bc-sb-hub-tab__badge {
        min-width: 16px !important;
        height: 16px !important;
        padding: 0 4px !important;
        background: #FFD700 !important;
        color: #14100A !important;
        font-size: 10px !important;
        font-weight: 800 !important;
        border-radius: 8px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }
}

/* ============================================
   SELECTION CARDS MOBILE (70-100px)
   ============================================ */

@media (max-width: 1023px) {
    .bc-sb-selection {
        min-height: 70px !important;
        padding: 12px !important;
        background: #13161b !important;
        border: 1px solid rgba(255, 255, 255, 0.06) !important;
        border-radius: 6px !important;
        margin: 8px 16px !important;
    }
    
    .bc-sb-selection__match {
        font-size: 13px !important;
        font-weight: 600 !important;
        margin-bottom: 6px !important;
    }
    
    .bc-sb-selection__league {
        font-size: 11px !important;
        margin-bottom: 8px !important;
    }
    
    .bc-sb-selection__market-name {
        font-size: 11px !important;
    }
    
    .bc-sb-selection__odds {
        font-size: 14px !important;
    }
    
    .bc-sb-selection__remove {
        width: 28px !important;
        height: 28px !important;
        min-width: 28px !important;
        top: 10px !important;
        right: 10px !important;
    }
}

/* ============================================
   BETSLIP CTA MOBILE (44px minimum)
   ============================================ */

@media (max-width: 1023px) {
    .bc-sb-stake__input {
        height: 44px !important;
        font-size: 15px !important;
    }
    
    .bc-sb-place-btn {
        min-height: 48px !important;
        height: 48px !important;
        font-size: 14px !important;
        font-weight: 800 !important;
    }
    
    .bc-sb-booking-btn {
        min-height: 44px !important;
        height: 44px !important;
        font-size: 13px !important;
    }
}

/* ============================================
   MATCH CENTER MOBILE (full-width)
   ============================================ */

@media (max-width: 1023px) {
    .bc-sb-match-center-mobile {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        z-index: 3000 !important;
        background: #0f1115 !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch !important;
        padding-top: env(safe-area-inset-top) !important;
        padding-bottom: env(safe-area-inset-bottom) !important;
    }
    
    .bc-sb-match-center-mobile__header {
        position: sticky !important;
        top: 0 !important;
        z-index: 10 !important;
        padding: 12px 16px !important;
        background: #0f1115 !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.06) !important;
        display: flex !important;
        align-items: center !important;
        gap: 12px !important;
    }
    
    .bc-sb-match-center-mobile__back {
        width: 36px !important;
        height: 36px !important;
        min-width: 36px !important;
        border-radius: 6px !important;
        background: rgba(255, 255, 255, 0.06) !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        font-size: 18px !important;
        color: #9ca3af !important;
    }
}

/* ============================================
   SEARCH MOBILE
   ============================================ */

@media (max-width: 1023px) {
    .bc-sb-search-modal {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        z-index: 2500 !important;
        background: #0f1115 !important;
        padding-top: env(safe-area-inset-top) !important;
    }
    
    .bc-sb-search-modal__header {
        padding: 12px 16px !important;
        display: flex !important;
        align-items: center !important;
        gap: 12px !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.06) !important;
    }
    
    .bc-sb-search-modal__input {
        flex: 1 !important;
        height: 44px !important;
        padding: 0 16px !important;
        background: rgba(255, 255, 255, 0.06) !important;
        border: 1px solid rgba(255, 255, 255, 0.08) !important;
        border-radius: 22px !important;
        font-size: 15px !important;
        color: #f5f7fa !important;
    }
    
    .bc-sb-search-modal__close {
        width: 36px !important;
        height: 36px !important;
        min-width: 36px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        font-size: 14px !important;
        font-weight: 600 !important;
        color: #9ca3af !important;
    }
}

/* ============================================
   FAVORITES MOBILE
   ============================================ */

@media (max-width: 1023px) {
    .bc-sb-favorites-btn {
        width: 40px !important;
        height: 40px !important;
        min-width: 40px !important;
        min-height: 40px !important;
        padding: 0 !important;
        border-radius: 6px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }
    
    .bc-sb-favorites-btn--active {
        color: #FFD700 !important;
    }
}

/* ============================================
   MY BETS MOBILE
   ============================================ */

@media (max-width: 1023px) {
    .bc-sb-bet-card {
        padding: 12px !important;
        margin: 8px 16px !important;
    }
    
    .bc-sb-bet-card__cashout-btn {
        min-height: 44px !important;
        height: 44px !important;
        font-size: 13px !important;
        font-weight: 700 !important;
    }
}

/* ============================================
   EMPTY STATES MOBILE
   ============================================ */

@media (max-width: 1023px) {
    .bc-sb-empty {
        padding: 40px 20px !important;
    }
    
    .bc-sb-empty__icon {
        width: 56px !important;
        height: 56px !important;
        margin-bottom: 16px !important;
    }
    
    .bc-sb-empty__title {
        font-size: 15px !important;
        margin-bottom: 8px !important;
    }
    
    .bc-sb-empty__text {
        font-size: 13px !important;
    }
}

/* ============================================
   TOUCH INTERACTIONS
   ============================================ */

@media (max-width: 1023px) {
    /* Remove hover effects on touch devices */
    @media (hover: none) {
        .bc-sb-match-card:hover,
        .bc-sb-odds-btn:hover,
        .bc-sb-top-league-item:hover,
        .bc-sb-top-country-item:hover {
            background: inherit !important;
            transform: none !important;
        }
    }
    
    /* Active states for touch */
    .bc-sb-match-card:active,
    .bc-sb-top-league-item:active,
    .bc-sb-top-country-item:active,
    .bc-sb-odds-btn:active,
    .bc-sb-hub-tab:active,
    .bc-sb-mode-btn:active,
    .bc-sb-sports-nav__item:active {
        transition: none !important;
    }
}

/* ============================================
   REDUCED MOTION
   ============================================ */

@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ============================================
   SPECIFIC IPHONE SIZES
   ============================================ */

/* iPhone SE (320px) */
@media (max-width: 320px) {
    .bc-sb-header {
        padding-left: 8px !important;
        padding-right: 8px !important;
        gap: 6px !important;
    }
    
    .bc-sb-header__logo {
        max-width: 80px !important;
    }
    
    .bc-sb-top-league-item,
    .bc-sb-top-country-item {
        padding: 10px 12px !important;
    }
    
    .bc-sb-match-card {
        padding: 10px 12px !important;
    }
    
    .bc-sb-match-card__team {
        font-size: 13px !important;
    }
    
    .bc-sb-odds-btn {
        min-width: 50px !important;
        padding: 6px 8px !important;
    }
}

/* iPhone 12/13/14 (390px) */
@media (min-width: 390px) and (max-width: 430px) {
    .bc-sb-match-card__odds {
        gap: 8px !important;
    }
    
    .bc-sb-odds-btn {
        min-width: 58px !important;
    }
}

/* iPhone Pro Max (430px) */
@media (min-width: 430px) and (max-width: 767px) {
    .bc-sb-odds-btn {
        min-width: 62px !important;
    }
}

/* ============================================
   TABLET (768px - 1023px)
   ============================================ */

@media (min-width: 768px) and (max-width: 1023px) {
    /* Hybrid layout: sidebar + main + betslip */
    .bc-sb-app {
        display: grid !important;
        grid-template-columns: 240px 1fr !important;
        gap: 0 !important;
    }
    
    .bc-sb-sidebar {
        display: flex !important;
        width: 240px !important;
    }
    
    .bc-sb-main {
        width: 100% !important;
    }
    
    /* Header adjustments */
    .bc-sb-header {
        max-height: 56px !important;
        padding: 12px 16px !important;
    }
    
    .bc-sb-header__logo {
        max-width: 120px !important;
        max-height: 32px !important;
    }
    
    /* Match cards wider spacing */
    .bc-sb-match-card {
        padding: 14px 20px !important;
    }
    
    .bc-sb-odds-btn {
        min-width: 64px !important;
    }
    
    /* Floating betslip still visible */
    .bc-sb-floating-betslip {
        display: flex !important;
    }
}

/* ============================================
   DESKTOP SAFETY (1024px+)
   ============================================ */

@media (min-width: 1024px) {
    /* Ensure mobile CSS doesn't leak into desktop */
    .bc-sb-mobile-betslip,
    .bc-sb-floating-betslip {
        /* Desktop behavior controlled by Phase 4 CSS */
    }
    
    /* Restore desktop header */
    .bc-sb-header {
        /* Desktop behavior controlled by Phase 1-2 CSS */
    }
    
    /* Restore desktop sidebar */
    .bc-sb-sidebar {
        /* Desktop behavior controlled by Phase 1-2 CSS */
    }
    
    /* Restore desktop match cards */
    .bc-sb-match-card {
        /* Desktop behavior controlled by Phase 3 CSS */
    }
}

/* ============================================
   PERFORMANCE OPTIMIZATIONS
   ============================================ */

@media (max-width: 1023px) {
    /* GPU acceleration for smooth scrolling */
    .bc-sb-sports-nav,
    .bc-sb-main-content,
    .bc-sb-mobile-betslip__content {
        will-change: scroll-position !important;
        transform: translateZ(0) !important;
    }
    
    /* GPU acceleration for animated elements
       (transform intentionally omitted here — it would overwrite the
       open/closed translateY() state set elsewhere for these drawers;
       will-change alone is sufficient to hint layer promotion) */
    .bc-sb-floating-betslip,
    .bc-sb-mobile-betslip,
    .bc-sb-match-center-mobile {
        will-change: transform !important;
    }
    
    /* Optimize repaints */
    .bc-sb-odds-btn,
    .bc-sb-mode-btn,
    .bc-sb-hub-tab {
        backface-visibility: hidden !important;
        -webkit-backface-visibility: hidden !important;
    }
}

/* ============================================
   END PHASE 5 MOBILE CSS
   ============================================ */
