/* ================================================================
   SPORTSBOOK PROFESSIONAL DESIGN SYSTEM
   BetConstruct-Level UI/UX - Phase 1 & 2
   ================================================================ */

/* ================================================================
   PHASE 1: PROFESSIONAL HEADER
   ================================================================ */

.bc-sb-app > .bc-sb-header,
.bc-sb-header {
    height: 56px !important;
    min-height: 56px !important;
    background: #1a1d23;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    position: sticky;
    top: 0;
    z-index: 100;
}

.bc-sb-header__left {
    display: flex;
    align-items: center;
    gap: 20px;
    flex: 0 0 auto;
}

.bc-sb-header__brand {
    display: flex;
    align-items: center;
    gap: 10px;
}

.bc-sb-header__logo {
    color: #FFD700;
    flex-shrink: 0;
}

.bc-sb-header__name {
    font-size: 15px;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: 0.3px;
    white-space: nowrap;
}

.bc-sb-header__center {
    flex: 1;
    max-width: 480px;
    margin: 0 20px;
}

.bc-sb-header__search {
    position: relative;
    width: 100%;
}

.bc-sb-header__search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #6b7280;
    pointer-events: none;
}

.bc-sb-header__search-input {
    width: 100%;
    height: 36px;
    background: #0f1115;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    padding: 0 12px 0 38px;
    color: #ffffff;
    font-size: 13px;
    transition: all 0.15s ease;
}

.bc-sb-header__search-input:focus {
    outline: none;
    border-color: #FFD700;
    background: #13161b;
}

.bc-sb-header__search-input::placeholder {
    color: #6b7280;
}

.bc-sb-header__right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 0 0 auto;
}

.bc-sb-header-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    height: 36px;
    padding: 0 14px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    color: #e5e7eb;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
}

.bc-sb-header-btn:hover {
    background: rgba(255, 215, 0, 0.08);
    border-color: rgba(255, 215, 0, 0.3);
    color: #FFD700;
}

.bc-sb-header-btn svg {
    flex-shrink: 0;
}

.bc-sb-header-btn__label {
    white-space: nowrap;
}

/* ================================================================
   PHASE 1: PROFESSIONAL SPORTS BAR
   ================================================================ */

.bc-sb-app > .bc-sb-sports-nav,
.bc-sb-sports-nav {
    height: 48px !important;
    min-height: 48px !important;
    background: #13161b;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    position: sticky;
    top: 56px;
    z-index: 99;
}

.bc-sb-sports-wrapper {
    height: 100% !important;
    display: flex !important;
    align-items: center;
    gap: 0;
    padding: 0 20px;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.bc-sb-sports-wrapper::-webkit-scrollbar {
    display: none;
}

/* Sport tabs - styled by renderer but we set base dimensions */
.bc-sb-sport {
    flex-shrink: 0;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 16px;
    border-bottom: 2px solid transparent;
    color: #9ca3af;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.bc-sb-sport:hover {
    color: #e5e7eb;
    background: rgba(255, 255, 255, 0.03);
}

.bc-sb-sport.bc-sb-sport--active {
    color: #FFD700;
    border-bottom-color: #FFD700;
    background: rgba(255, 215, 0, 0.05);
}

.bc-sb-sport__icon {
    font-size: 18px;
}

.bc-sb-sport__name {
    white-space: nowrap;
}

.bc-sb-sport__count {
    font-size: 11px;
    color: #6b7280;
}

.bc-sb-sport-skeleton {
    width: 100px;
    height: 32px;
    background: linear-gradient(90deg, #1a1d23 25%, #23262d 50%, #1a1d23 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: 4px;
    margin: 0 8px;
}

@keyframes skeleton-loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ================================================================
   PHASE 1: COMPACT MODE BAR
   ================================================================ */

.bc-sb-app > .bc-sb-mode-bar,
.bc-sb-mode-bar {
    height: 44px !important;
    min-height: 44px !important;
    background: #0f1115;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    position: sticky;
    top: 104px;
    z-index: 98;
}

.bc-sb-mode-bar__wrapper {
    height: 100% !important;
    display: flex !important;
    align-items: center;
    gap: 0;
    padding: 0 20px;
}

.bc-sb-mode {
    height: 100%;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0 18px;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    color: #9ca3af;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.bc-sb-mode:hover {
    color: #e5e7eb;
    background: rgba(255, 255, 255, 0.03);
}

.bc-sb-mode.bc-sb-mode--active {
    color: #FFD700;
    border-bottom-color: #FFD700;
}

.bc-sb-mode--live {
    color: #9ca3af;
}

.bc-sb-mode--live:hover {
    color: #e5e7eb;
}

.bc-sb-mode--live.bc-sb-mode--active {
    color: #ef4444;
    border-bottom-color: #ef4444;
}

.bc-sb-mode__icon {
    flex-shrink: 0;
}

.bc-sb-mode__label {
    white-space: nowrap;
}

.bc-sb-mode__count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 18px;
    padding: 0 5px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 9px;
    font-size: 11px;
    font-weight: 700;
}

.bc-sb-mode--active .bc-sb-mode__count {
    background: rgba(255, 215, 0, 0.2);
    color: #FFD700;
}

.bc-sb-mode--live.bc-sb-mode--active .bc-sb-mode__count {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

.bc-sb-live-dot {
    width: 6px;
    height: 6px;
    background: #ef4444;
    border-radius: 50%;
    animation: live-pulse 1.5s ease-in-out infinite;
}

@keyframes live-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* ================================================================
   PHASE 2: PROFESSIONAL SIDEBAR NAVIGATION
   ================================================================ */

.bc-sb-sidebar {
    width: 100%;
    background: #13161b;
    overflow-y: auto;
    overflow-x: hidden;
}

.bc-sb-nav-section {
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.bc-sb-nav-section__header {
    display: flex;
    align-items: center;
    gap: 8px;
    height: 40px;
    padding: 0 16px;
    background: #0f1115;
    color: #6b7280;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.8px;
    text-transform: uppercase;
}

.bc-sb-nav-section__icon {
    flex-shrink: 0;
    opacity: 0.6;
}

.bc-sb-nav-section__title {
    flex: 1;
}

.bc-sb-nav-section__content {
    padding: 8px 0;
}

/* League/Country Item */
.bc-sb-league-item,
.bc-sb-country-item {
    display: flex;
    align-items: center;
    gap: 10px;
    height: 42px;
    padding: 0 16px;
    color: #e5e7eb;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
    border-left: 2px solid transparent;
}

.bc-sb-league-item:hover,
.bc-sb-country-item:hover {
    background: rgba(255, 255, 255, 0.04);
    border-left-color: rgba(255, 215, 0, 0.5);
}

.bc-sb-league-item.bc-sb-league-item--active,
.bc-sb-country-item.bc-sb-country-item--active {
    background: rgba(255, 215, 0, 0.08);
    border-left-color: #FFD700;
    color: #FFD700;
}

.bc-sb-league-item__flag,
.bc-sb-country-item__flag {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
}

.bc-sb-league-item__icon {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #FFD700;
}

.bc-sb-league-item__name,
.bc-sb-country-item__name {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bc-sb-league-item__count,
.bc-sb-country-item__count {
    flex-shrink: 0;
    font-size: 11px;
    font-weight: 600;
    color: #6b7280;
    margin-right: 4px;
}

.bc-sb-league-item--active .bc-sb-league-item__count,
.bc-sb-country-item--active .bc-sb-country-item__count {
    color: #FFD700;
}

.bc-sb-league-item__chevron,
.bc-sb-country-item__chevron {
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    color: #6b7280;
}

.bc-sb-league-item--active .bc-sb-league-item__chevron,
.bc-sb-country-item--active .bc-sb-country-item__chevron {
    color: #FFD700;
}

/* Empty state */
.bc-sb-sidebar-empty {
    padding: 40px 20px;
    text-align: center;
    color: #6b7280;
    font-size: 13px;
}

/* ================================================================
   LAYOUT ADJUSTMENTS
   ================================================================ */

.bc-sb-layout {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr) 350px;
    min-height: calc(100vh - 148px);
}

.bc-sb-content {
    background: #0f1115;
    overflow-y: auto;
}

.bc-sb-betslip {
    background: #13161b;
    border-left: 1px solid rgba(255, 255, 255, 0.06);
    overflow-y: auto;
}

/* ================================================================
   MOBILE RESPONSIVE
   ================================================================ */

@media (max-width: 1439px) {
    .bc-sb-layout {
        /* P1-2: Increased sidebar from 240px to 260px for competitive parity */
        grid-template-columns: 260px minmax(0, 1fr) 330px;
    }
}

@media (max-width: 1023px) {
    /* Mobile: hide desktop header elements */
    .bc-sb-header {
        height: 52px;
        padding: 0 12px;
    }
    
    .bc-sb-header__center {
        display: none;
    }
    
    .bc-sb-header-btn__label {
        display: none;
    }
    
    .bc-sb-header-btn {
        width: 40px;
        height: 32px;
        padding: 0;
        justify-content: center;
    }
    
    /* Mobile: sports bar scrolling */
    .bc-sb-sports-nav {
        height: 44px;
        top: 52px;
    }
    
    .bc-sb-sports-wrapper {
        padding: 0 12px;
    }
    
    .bc-sb-sport {
        height: 44px;
        padding: 0 12px;
        font-size: 12px;
    }
    
    /* Mobile: mode bar */
    .bc-sb-mode-bar {
        height: 40px;
        top: 96px;
    }
    
    .bc-sb-mode-bar__wrapper {
        padding: 0 12px;
    }
    
    .bc-sb-mode {
        padding: 0 14px;
        font-size: 11px;
    }
    
    /* Mobile: collapse sidebar */
    .bc-sb-layout {
        grid-template-columns: 1fr;
    }
    
    .bc-sb-sidebar {
        display: none;
    }
    
    .bc-sb-betslip {
        display: none;
    }
}

@media (max-width: 767px) {
    .bc-sb-header__name {
        font-size: 14px;
    }
}

@media (max-width: 374px) {
    .bc-sb-header {
        padding: 0 8px;
    }
    
    .bc-sb-header__brand {
        gap: 6px;
    }
    
    .bc-sb-header__logo {
        width: 24px;
        height: 24px;
    }
    
    .bc-sb-header__name {
        font-size: 13px;
    }
    
    .bc-sb-header__right {
        gap: 4px;
    }
    
    .bc-sb-header-btn {
        width: 36px;
        height: 30px;
    }
}

/* ================================================================
   HIDE OLD MOBILE ELEMENTS (preserve IDs for JS)
   ================================================================ */

.bc-sb-mobile-search {
    display: none !important;
}

/* Keep mobile navigation hidden - floating betslip handles this */
.bc-sb-mobile-nav {
    display: none !important;
}
