/**
 * ================================================================
 * SPORTSBOOK UX EXPANSION CSS
 * ================================================================
 * Styles for:
 * 1. UPCOMING UI (header, date navigation, countdowns)
 * 2. PROFESSIONAL SEARCH (overlay, results)
 * 3. MATCH CARD MARKETS (expanded markets view)
 * 4. FAVORITES ENHANCEMENTS (better empty states, filtering)
 * ================================================================
 */

/* ================================================================
   1. UPCOMING UI
   ================================================================ */

/* Upcoming header (34-44px height) */
.bc-sb-upcoming-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.02);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    height: 40px;
    min-height: 40px;
}

.bc-sb-upcoming-header__title {
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: #f5f7fa;
    margin: 0;
}

.bc-sb-upcoming-header__subtitle {
    font-size: 12px;
    color: #9ca3af;
    font-weight: 500;
}

/* Date navigation (36-42px height) */
.bc-sb-upcoming-date-nav {
    display: flex;
    gap: 6px;
    padding: 8px 16px;
    overflow-x: auto;
    overflow-y: hidden;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    background: #0f1115;
    height: 42px;
    min-height: 42px;
    
    /* Horizontal scroll on mobile */
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
}

.bc-sb-upcoming-date-nav::-webkit-scrollbar {
    display: none; /* Chrome/Safari */
}

.bc-sb-upcoming-date-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 14px;
    height: 28px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.3px;
    color: #9ca3af;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    cursor: pointer;
    transition: all 120ms cubic-bezier(.2, .8, .2, 1);
    white-space: nowrap;
    flex-shrink: 0;
}

.bc-sb-upcoming-date-btn:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.12);
    color: #f5f7fa;
}

.bc-sb-upcoming-date-btn--active {
    background: #FFD700 !important;
    border-color: #FFD700 !important;
    color: #000 !important;
}

.bc-sb-upcoming-date-btn:active {
    transform: scale(0.96);
}

/* Countdown in match cards */
.bc-sb-countdown {
    font-size: 10px;
    color: #9ca3af;
    font-weight: 500;
    margin-top: 2px;
}

/* ================================================================
   2. PROFESSIONAL SEARCH OVERLAY
   ================================================================ */

.bc-sb-search-overlay {
    position: fixed;
    background: #13161b;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    box-shadow: 
        0 8px 24px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(255, 255, 255, 0.05);
    max-height: 480px;
    overflow-y: auto;
    z-index: 9999;
    padding: 8px;
    
    /* Smooth scroll */
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.15) transparent;
}

.bc-sb-search-overlay::-webkit-scrollbar {
    width: 6px;
}

.bc-sb-search-overlay::-webkit-scrollbar-track {
    background: transparent;
}

.bc-sb-search-overlay::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 3px;
}

/* Search section */
.bc-sb-search-section {
    margin-bottom: 8px;
}

.bc-sb-search-section:last-child {
    margin-bottom: 0;
}

.bc-sb-search-section__title {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.8px;
    color: #6b7280;
    padding: 8px 12px 4px;
    text-transform: uppercase;
}

/* Search result item */
.bc-sb-search-result {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 10px 12px;
    background: transparent;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    text-align: left;
    transition: background 100ms cubic-bezier(.2, .8, .2, 1);
}

.bc-sb-search-result:hover {
    background: rgba(255, 255, 255, 0.04);
}

.bc-sb-search-result--highlighted {
    background: rgba(255, 215, 0, 0.12) !important;
}

.bc-sb-search-result:active {
    transform: scale(0.98);
    transition-duration: 60ms;
}

.bc-sb-search-result__main {
    flex: 1;
    min-width: 0;
}

.bc-sb-search-result__match {
    font-size: 13px;
    font-weight: 600;
    color: #f5f7fa;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bc-sb-search-result__name {
    font-size: 13px;
    font-weight: 600;
    color: #f5f7fa;
    margin-bottom: 2px;
}

.bc-sb-search-result__meta {
    font-size: 11px;
    color: #9ca3af;
    display: flex;
    align-items: center;
    gap: 6px;
}

.bc-sb-search-result__flag {
    font-size: 18px;
    margin-right: 8px;
}

.bc-sb-search-result__count {
    font-size: 12px;
    font-weight: 600;
    color: #9ca3af;
    padding: 2px 8px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 4px;
}

/* Search empty state */
.bc-sb-search-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 32px 24px;
    text-align: center;
}

.bc-sb-search-empty__icon {
    font-size: 40px;
    margin-bottom: 12px;
    opacity: 0.5;
}

.bc-sb-search-empty__title {
    font-size: 14px;
    font-weight: 600;
    color: #f5f7fa;
    margin-bottom: 6px;
}

.bc-sb-search-empty__text {
    font-size: 12px;
    color: #9ca3af;
}

/* ================================================================
   3. MATCH CARD MARKETS EXPANSION
   ================================================================ */

/* Match card with expanded markets */
.bc-sb-match-card--expanded {
    /* Add extra spacing when markets are visible */
}

/* Markets container */
.bc-sb-markets {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 8px 12px 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

/* Market row */
.bc-sb-market {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.bc-sb-market__header {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.3px;
    color: #9ca3af;
    text-transform: uppercase;
}

.bc-sb-market__odds {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
    gap: 6px;
}

/* Market odd button (similar to existing odds button) */
.bc-sb-market-odd {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 8px 6px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    cursor: pointer;
    transition: all 100ms cubic-bezier(.2, .8, .2, 1);
    min-height: 44px;
}

.bc-sb-market-odd:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.15);
}

.bc-sb-market-odd:active {
    transform: scale(0.96);
    transition-duration: 60ms;
}

.bc-sb-market-odd--selected {
    background: #FFD700 !important;
    border-color: #FFD700 !important;
}

.bc-sb-market-odd--suspended {
    opacity: 0.4;
    cursor: not-allowed;
}

.bc-sb-market-odd__label {
    font-size: 10px;
    color: #9ca3af;
    margin-bottom: 2px;
    text-align: center;
}

.bc-sb-market-odd--selected .bc-sb-market-odd__label {
    color: #000;
}

.bc-sb-market-odd__value {
    font-size: 13px;
    font-weight: 700;
    color: #f5f7fa;
}

.bc-sb-market-odd--selected .bc-sb-market-odd__value {
    color: #000;
}

/* More markets button */
.bc-sb-more-markets {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    color: #9ca3af;
    cursor: pointer;
    transition: all 100ms cubic-bezier(.2, .8, .2, 1);
}

.bc-sb-more-markets:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.12);
    color: #f5f7fa;
}

.bc-sb-more-markets:active {
    transform: scale(0.98);
}

/* Expand markets toggle */
.bc-sb-expand-markets {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 6px;
    background: transparent;
    border: none;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    font-size: 11px;
    font-weight: 600;
    color: #9ca3af;
    cursor: pointer;
    transition: all 100ms;
}

.bc-sb-expand-markets:hover {
    background: rgba(255, 255, 255, 0.02);
    color: #f5f7fa;
}

.bc-sb-expand-markets svg {
    width: 14px;
    height: 14px;
    margin-left: 4px;
    transition: transform 140ms cubic-bezier(.2, .8, .2, 1);
}

.bc-sb-expand-markets--active svg {
    transform: rotate(180deg);
}

/* ================================================================
   4. FAVORITES ENHANCEMENTS
   ================================================================ */

/* Enhanced favorites empty state */
.bc-sb-favorites-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 24px;
    text-align: center;
    min-height: 320px;
}

.bc-sb-favorites-empty::before {
    content: "⭐";
    font-size: 56px;
    opacity: 0.3;
    margin-bottom: 16px;
}

.bc-sb-favorites-empty-title {
    font-size: 16px;
    font-weight: 700;
    color: #f5f7fa;
    margin-bottom: 8px;
}

.bc-sb-favorites-empty-text {
    font-size: 13px;
    color: #9ca3af;
    line-height: 1.5;
    max-width: 280px;
}

/* Favorites filter tabs */
.bc-sb-favorites-filter {
    display: flex;
    gap: 8px;
    padding: 12px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    background: #0f1115;
}

.bc-sb-favorites-filter__tab {
    padding: 6px 14px;
    font-size: 12px;
    font-weight: 600;
    color: #9ca3af;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    cursor: pointer;
    transition: all 100ms cubic-bezier(.2, .8, .2, 1);
}

.bc-sb-favorites-filter__tab:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.12);
    color: #f5f7fa;
}

.bc-sb-favorites-filter__tab--active {
    background: #FFD700 !important;
    border-color: #FFD700 !important;
    color: #000 !important;
}

.bc-sb-favorites-filter__tab:active {
    transform: scale(0.96);
}

/* Favorites count badge */
.bc-sb-favorites-filter__tab-count {
    display: inline-block;
    margin-left: 6px;
    padding: 0 6px;
    font-size: 10px;
    font-weight: 700;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
}

.bc-sb-favorites-filter__tab--active .bc-sb-favorites-filter__tab-count {
    background: rgba(0, 0, 0, 0.15);
}

/* ================================================================
   5. MOBILE OPTIMIZATIONS
   ================================================================ */

@media (max-width: 767px) {
    /* Upcoming header mobile */
    .bc-sb-upcoming-header {
        padding: 6px 12px;
        height: 36px;
        min-height: 36px;
    }
    
    .bc-sb-upcoming-header__title {
        font-size: 13px;
    }
    
    .bc-sb-upcoming-header__subtitle {
        font-size: 11px;
    }
    
    /* Date navigation mobile - horizontal scroll */
    .bc-sb-upcoming-date-nav {
        padding: 8px 12px;
        gap: 4px;
    }
    
    .bc-sb-upcoming-date-btn {
        padding: 0 12px;
        font-size: 10px;
    }
    
    /* Search overlay mobile - full width */
    .bc-sb-search-overlay {
        left: 8px !important;
        right: 8px !important;
        width: calc(100% - 16px) !important;
        max-height: 60vh;
    }
    
    /* Markets mobile - 2 column grid */
    .bc-sb-market__odds {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* Favorites empty mobile */
    .bc-sb-favorites-empty {
        padding: 32px 16px;
        min-height: 240px;
    }
    
    .bc-sb-favorites-empty::before {
        font-size: 48px;
    }
}

/* ================================================================
   6. DESKTOP ENHANCEMENTS
   ================================================================ */

@media (min-width: 768px) {
    /* Search overlay desktop - better positioning */
    .bc-sb-search-overlay {
        max-width: 420px;
    }
    
    /* Markets desktop - 3+ column grid */
    .bc-sb-market__odds {
        grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
    }
}

/* ================================================================
   7. REDUCED MOTION SUPPORT
   ================================================================ */

@media (prefers-reduced-motion: reduce) {
    .bc-sb-upcoming-date-btn,
    .bc-sb-search-result,
    .bc-sb-market-odd,
    .bc-sb-more-markets,
    .bc-sb-favorites-filter__tab {
        transition-duration: 0.01ms !important;
    }
}

/* ================================================================
   8. PRINT STYLES
   ================================================================ */

@media print {
    .bc-sb-upcoming-header,
    .bc-sb-upcoming-date-nav,
    .bc-sb-search-overlay,
    .bc-sb-favorites-filter {
        display: none !important;
    }
}
