/**
 * ================================================================
 * MOBILE SPORTSBOOK HOME — SPORTS + LEAGUES VISIBLE IMMEDIATELY
 * ================================================================
 * 
 * TARGET: Show sports, leagues, and countries on mobile home screen
 * NO EMPTY STATE: Users see content immediately, not "Select a league"
 * 
 * SCOPE: Mobile only (max-width: 767px)
 * ================================================================
 */

@media (max-width: 767px) {
    
    /* ================================================================
       HIDE DESKTOP SIDEBAR, SHOW MOBILE HOME VIEW
       ================================================================ */
    
    /* Hide desktop left sidebar on mobile */
    .bc-sb-sidebar {
        display: none !important;
    }
    
    /* Hide desktop betslip drawer on mobile (but not while the user has opened it) */
    .bc-sb-mobile-betslip:not(.bc-sb-mobile-betslip--open),
    #bcSbMobileBetslip:not(.bc-sb-mobile-betslip--open) {
        display: none !important;
    }
    
    /* Show mobile leagues section */
    .bc-sb-mobile-leagues {
        display: block !important;
        background: #0a0b0e;
        min-height: calc(100vh - 144px); /* viewport - header - sports - mode */
    }
    
    /* ================================================================
       MOBILE HOME SECTIONS
       ================================================================ */
    
    /* Section wrapper */
    .bc-sb-mobile-home-section {
        padding: 16px 16px 8px 16px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    }
    
    /* Section header */
    .bc-sb-mobile-home-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        margin-bottom: 12px;
    }
    
    .bc-sb-mobile-home-title {
        font-size: 13px;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        color: #6b7280;
    }
    
    .bc-sb-mobile-home-action {
        font-size: 12px;
        font-weight: 600;
        color: #FFD700;
        background: none;
        border: none;
        padding: 0;
        cursor: pointer;
    }
    
    /* ================================================================
       MOBILE SPORTS GRID (if not using horizontal nav)
       ================================================================ */
    
    .bc-sb-mobile-sports-grid {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 8px;
        padding: 12px;
    }
    
    .bc-sb-mobile-sport {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 6px;
        padding: 12px 8px;
        background: rgba(255, 255, 255, 0.04);
        border: 1px solid rgba(255, 255, 255, 0.06);
        border-radius: 8px;
        cursor: pointer;
        transition: all 0.12s ease;
    }
    
    .bc-sb-mobile-sport:active {
        transform: scale(0.96);
        background: rgba(255, 255, 255, 0.06);
    }
    
    .bc-sb-mobile-sport--active {
        background: rgba(255, 215, 0, 0.12) !important;
        border-color: rgba(255, 215, 0, 0.3) !important;
    }
    
    .bc-sb-mobile-sport__icon {
        font-size: 24px;
        line-height: 1;
    }
    
    .bc-sb-mobile-sport__name {
        font-size: 11px;
        font-weight: 600;
        color: #9ca3af;
        text-align: center;
    }
    
    .bc-sb-mobile-sport--active .bc-sb-mobile-sport__name {
        color: #FFD700;
    }
    
    /* ================================================================
       MOBILE LEAGUES LIST
       ================================================================ */
    
    .bc-sb-mobile-leagues__content {
        padding: 0;
    }
    
    /* League row */
    .bc-sb-mobile-league {
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 12px 16px;
        min-height: 44px;
        background: #0a0b0e;
        border-bottom: 1px solid rgba(255, 255, 255, 0.04);
        cursor: pointer;
        transition: background 0.08s ease;
    }
    
    .bc-sb-mobile-league:active {
        background: rgba(255, 255, 255, 0.04);
    }
    
    /* Favorite star */
    .bc-sb-mobile-league__favorite {
        flex-shrink: 0;
        width: 20px;
        height: 20px;
        display: flex;
        align-items: center;
        justify-content: center;
        color: #4b5563;
    }
    
    .bc-sb-mobile-league__favorite--active {
        color: #FFD700;
    }
    
    /* League icon/flag */
    .bc-sb-mobile-league__icon {
        flex-shrink: 0;
        width: 20px;
        height: 20px;
        font-size: 16px;
        line-height: 1;
        text-align: center;
    }
    
    /* League name */
    .bc-sb-mobile-league__name {
        flex: 1;
        font-size: 14px;
        font-weight: 500;
        color: #e5e7eb;
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    
    /* Fixture count badge */
    .bc-sb-mobile-league__count {
        flex-shrink: 0;
        font-size: 12px;
        font-weight: 600;
        color: #9ca3af;
        background: rgba(255, 255, 255, 0.04);
        padding: 2px 8px;
        border-radius: 10px;
        min-width: 24px;
        text-align: center;
    }
    
    /* Chevron */
    .bc-sb-mobile-league__chevron {
        flex-shrink: 0;
        width: 16px;
        height: 16px;
        color: #6b7280;
    }
    
    /* ================================================================
       MOBILE COUNTRIES LIST
       ================================================================ */
    
    .bc-sb-mobile-country {
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 12px 16px;
        min-height: 44px;
        background: #0a0b0e;
        border-bottom: 1px solid rgba(255, 255, 255, 0.04);
        cursor: pointer;
        transition: background 0.08s ease;
    }
    
    .bc-sb-mobile-country:active {
        background: rgba(255, 255, 255, 0.04);
    }
    
    /* Flag emoji */
    .bc-sb-mobile-country__flag {
        flex-shrink: 0;
        font-size: 20px;
        line-height: 1;
        width: 28px;
        text-align: center;
    }
    
    /* Country name */
    .bc-sb-mobile-country__name {
        flex: 1;
        font-size: 14px;
        font-weight: 500;
        color: #e5e7eb;
    }
    
    /* League count */
    .bc-sb-mobile-country__count {
        flex-shrink: 0;
        font-size: 12px;
        font-weight: 600;
        color: #9ca3af;
        background: rgba(255, 255, 255, 0.04);
        padding: 2px 8px;
        border-radius: 10px;
        min-width: 24px;
        text-align: center;
    }
    
    /* Chevron */
    .bc-sb-mobile-country__chevron {
        flex-shrink: 0;
        width: 16px;
        height: 16px;
        color: #6b7280;
    }
    
    /* ================================================================
       MOBILE LEAGUE SEARCH
       ================================================================ */
    
    .bc-sb-mobile-leagues__search {
        padding: 12px 16px;
        background: #0f1115;
        border-bottom: 1px solid rgba(255, 255, 255, 0.06);
        position: sticky;
        top: 0;
        z-index: 10;
    }
    
    .bc-sb-mobile-leagues__search-wrapper {
        position: relative;
        display: flex;
        align-items: center;
    }
    
    .bc-sb-mobile-leagues__search-icon {
        position: absolute;
        left: 12px;
        width: 18px;
        height: 18px;
        color: #6b7280;
        pointer-events: none;
    }
    
    .bc-sb-mobile-leagues__search-wrapper input {
        width: 100%;
        height: 40px;
        padding: 0 12px 0 40px;
        background: rgba(255, 255, 255, 0.04);
        border: 1px solid rgba(255, 255, 255, 0.06);
        border-radius: 8px;
        font-size: 14px;
        color: #e5e7eb;
        outline: none;
        transition: all 0.12s ease;
    }
    
    .bc-sb-mobile-leagues__search-wrapper input:focus {
        background: rgba(255, 255, 255, 0.06);
        border-color: rgba(255, 215, 0, 0.3);
    }
    
    .bc-sb-mobile-leagues__search-wrapper input::placeholder {
        color: #6b7280;
    }
    
    /* ================================================================
       MOBILE EMPTY STATE (only show when NO data)
       ================================================================ */
    
    .bc-sb-mobile-empty {
        padding: 48px 24px;
        text-align: center;
        color: #6b7280;
    }
    
    .bc-sb-mobile-empty__icon {
        width: 48px;
        height: 48px;
        margin: 0 auto 16px;
        color: #4b5563;
    }
    
    .bc-sb-mobile-empty__title {
        font-size: 16px;
        font-weight: 600;
        color: #9ca3af;
        margin-bottom: 8px;
    }
    
    .bc-sb-mobile-empty__text {
        font-size: 14px;
        color: #6b7280;
    }
    
    /* ================================================================
       HIDE DESKTOP EMPTY STATE ON MOBILE
       ================================================================ */
    
    .bc-sb-main-content .bc-sb-empty-state {
        display: none !important;
    }
    
    /* ================================================================
       SHOW MATCHES WHEN LEAGUE SELECTED
       ================================================================ */
    
    .bc-sb-events {
        display: block !important;
        padding: 0 !important;
    }
    
    .bc-sb-events__header {
        padding: 12px 16px;
        background: #0f1115;
        border-bottom: 1px solid rgba(255, 255, 255, 0.06);
        display: flex;
        align-items: center;
        justify-content: space-between;
    }
    
    .bc-sb-events__title {
        font-size: 14px;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        color: #9ca3af;
    }
    
    .bc-sb-events__count {
        font-size: 12px;
        font-weight: 600;
        color: #6b7280;
        background: rgba(255, 255, 255, 0.04);
        padding: 2px 8px;
        border-radius: 10px;
    }
    
    /* ================================================================
       MOBILE LAYOUT ADJUSTMENTS
       ================================================================ */
    
    /* Full width content on mobile */
    .bc-sb-layout {
        display: block !important;
        grid-template-columns: 1fr !important;
    }
    
    .bc-sb-content {
        width: 100% !important;
        max-width: 100% !important;
        padding: 0 !important;
    }
    
    /* Hide desktop sports bar inside content */
    .bc-sb-sports-bar {
        display: none !important;
    }
    
    /* Ensure matches are visible */
    #bcSbFixturesList {
        display: block !important;
    }
    
    /* ================================================================
       COMPACT MATCH CARDS ON MOBILE
       ================================================================ */
    
    .bc-sb-match {
        margin: 0 !important;
        border-radius: 0 !important;
        border-left: none !important;
        border-right: none !important;
        min-height: 76px !important;
    }
    
    .bc-sb-match:first-child {
        border-top: none !important;
    }
}

/* ================================================================
   MOBILE HOME — LEAGUE/COUNTRY SECTIONS FROM SIDEBAR
   ================================================================ */

@media (max-width: 767px) {
    /* Override sidebar sections to be mobile-friendly */
    .bc-sb-nav-section {
        padding: 0 !important;
        margin: 0 !important;
        border: none !important;
    }
    
    .bc-sb-nav-section__header {
        padding: 12px 16px !important;
        background: #0f1115 !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.06) !important;
    }
    
    .bc-sb-nav-section__title {
        font-size: 13px !important;
        font-weight: 700 !important;
        letter-spacing: 0.5px !important;
        color: #6b7280 !important;
    }
    
    .bc-sb-nav-section__content {
        padding: 0 !important;
    }
    
    /* League items in sidebar sections */
    .bc-sb-league-item,
    .bc-sb-country-item {
        padding: 12px 16px !important;
        min-height: 44px !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.04) !important;
        border-radius: 0 !important;
        margin: 0 !important;
    }
}
