/**
 * ================================================================
 * BET HUB STYLES
 * ================================================================
 * Comprehensive styling for:
 * - Tab navigation (BETSLIP | MY BETS | HISTORY)
 * - MY BETS bet cards
 * - BET HISTORY cards
 * - Cash Out UI
 * - Confirmation dialogs
 * - Empty states
 * - Loading states
 * - Toast notifications
 * - Mobile responsive (320px+)
 * ================================================================
 */

/* ================================================================
   PANEL VISIBILITY SYSTEM
   ================================================================ */

.bet-hub-panel {
    display: none;
}

.bet-hub-panel.bet-hub-panel--active {
    display: block;
}

/* ================================================================
   TAB NAVIGATION
   ================================================================ */

.bc-sb-hub-tabs {
    display: flex;
    gap: 0;
    margin-top: 12px;
    border-bottom: 2px solid #2a2f36;
}

.bc-sb-hub-tab {
    flex: 1;
    background: transparent;
    border: none;
    padding: 12px 8px;
    font-size: 13px;
    font-weight: 600;
    color: #8b92a0;
    cursor: pointer;
    position: relative;
    transition: color 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 44px;
}

.bc-sb-hub-tab:hover {
    color: #fff;
}

.bc-sb-hub-tab--active {
    color: #fff;
}

.bc-sb-hub-tab--active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background: #FFD000;
}

.bc-sb-hub-tab__label {
    white-space: nowrap;
}

.bc-sb-hub-tab__badge {
    background: #FFD000;
    color: #1a1f26;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
}

/* ================================================================
   MY BETS CONTAINER
   ================================================================ */

.bc-sb-my-bets {
    padding: 16px;
    overflow-y: auto;
    max-height: calc(100vh - 200px);
}

.bc-sb-my-bets__section {
    margin-bottom: 24px;
}

.bc-sb-my-bets__section:last-child {
    margin-bottom: 0;
}

.bc-sb-my-bets__section-title {
    font-size: 12px;
    font-weight: 700;
    color: #8b92a0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0 0 12px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ================================================================
   BET CARDS
   ================================================================ */

.bc-sb-bet-card {
    background: #1e2329;
    border-radius: 8px;
    margin-bottom: 12px;
    overflow: hidden;
    transition: all 0.2s ease;
}

.bc-sb-bet-card:last-child {
    margin-bottom: 0;
}

.bc-sb-bet-card--live {
    border-left: 3px solid #e23a3a;
}

.bc-sb-bet-card--expanded {
    background: #23282f;
}

.bc-sb-bet-card__header {
    padding: 12px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 6px;
    position: relative;
}

.bc-sb-bet-card__header:hover {
    background: rgba(255, 255, 255, 0.03);
}

.bc-sb-bet-card__title {
    font-size: 14px;
    font-weight: 600;
    color: #fff;
}

.bc-sb-bet-card__meta {
    font-size: 12px;
    color: #8b92a0;
}

.bc-sb-bet-card__summary {
    padding: 0 12px 12px 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.bc-sb-bet-card__row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
}

.bc-sb-bet-card__label {
    color: #8b92a0;
}

.bc-sb-bet-card__value {
    color: #fff;
    font-weight: 600;
}

.bc-sb-bet-card__value--highlight {
    color: #f9d659;
    font-size: 14px;
}

/* ================================================================
   BET STATUS BADGES
   ================================================================ */

.bc-sb-bet-status {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}

.bc-sb-bet-status--won {
    background: rgba(76, 175, 80, 0.2);
    color: #4caf50;
}

.bc-sb-bet-status--lost {
    background: rgba(158, 158, 158, 0.2);
    color: #9e9e9e;
}

.bc-sb-bet-status--void {
    background: rgba(255, 152, 0, 0.2);
    color: #ff9800;
}

.bc-sb-live-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #e23a3a;
    color: #fff;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}

.bc-sb-live-badge::before {
    content: '';
    width: 6px;
    height: 6px;
    background: #fff;
    border-radius: 50%;
    animation: pulse 1.5s ease-in-out infinite;
}

.bc-sb-live-badge--small {
    padding: 3px 6px;
    font-size: 10px;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.4;
    }
}

/* ================================================================
   BET DETAILS (EXPANDED)
   ================================================================ */

.bc-sb-bet-details {
    border-top: 1px solid #2a2f36;
    padding: 12px;
}

.bc-sb-bet-detail__info {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
}

.bc-sb-bet-detail__row {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
}

.bc-sb-bet-detail__label {
    color: #8b92a0;
}

.bc-sb-bet-detail__value {
    color: #fff;
    font-weight: 600;
}

.bc-sb-bet-detail__selections {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.bc-sb-bet-detail__selection {
    background: #1a1f26;
    border-radius: 6px;
    padding: 10px;
    position: relative;
}

.bc-sb-bet-detail__sel-header {
    display: flex;
    gap: 8px;
    margin-bottom: 4px;
}

.bc-sb-bet-detail__sport {
    font-size: 11px;
    color: #f9d659;
    font-weight: 600;
}

.bc-sb-bet-detail__league {
    font-size: 11px;
    color: #8b92a0;
}

.bc-sb-bet-detail__fixture {
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 4px;
}

.bc-sb-bet-detail__market {
    font-size: 12px;
    color: #8b92a0;
    margin-bottom: 6px;
}

.bc-sb-bet-detail__odds {
    font-size: 12px;
    color: #4caf50;
    font-weight: 600;
}

.bc-sb-sel-status {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
}

.bc-sb-sel-status--won {
    background: #4caf50;
    color: #fff;
}

.bc-sb-sel-status--lost {
    background: #e23a3a;
    color: #fff;
}

.bc-sb-sel-status--void {
    background: #ff9800;
    color: #fff;
}

/* ================================================================
   CASH OUT BUTTON
   ================================================================ */

.bc-sb-cashout-btn {
    width: 100%;
    background: linear-gradient(135deg, #4caf50 0%, #45a049 100%);
    border: none;
    border-radius: 6px;
    padding: 14px;
    margin: 12px 12px 12px 12px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    transition: all 0.2s ease;
    min-height: 44px;
}

.bc-sb-cashout-btn:hover {
    background: linear-gradient(135deg, #45a049 0%, #3d8b40 100%);
    transform: translateY(-1px);
}

.bc-sb-cashout-btn:active {
    transform: translateY(0);
}

.bc-sb-cashout-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.bc-sb-cashout-btn__label {
    font-size: 11px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.bc-sb-cashout-btn__amount {
    font-size: 18px;
    font-weight: 700;
    color: #fff;
}

/* ================================================================
   CASH OUT DIALOG
   ================================================================ */

.bc-sb-cashout-dialog {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.bc-sb-cashout-dialog__backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
}

.bc-sb-cashout-dialog__content {
    position: relative;
    background: #1e2329;
    border-radius: 12px;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: dialogIn 0.3s ease;
}

@keyframes dialogIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.bc-sb-cashout-dialog__header {
    padding: 20px;
    border-bottom: 1px solid #2a2f36;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.bc-sb-cashout-dialog__title {
    font-size: 18px;
    font-weight: 700;
    color: #fff;
    margin: 0;
}

.bc-sb-cashout-dialog__close {
    background: transparent;
    border: none;
    width: 32px;
    height: 32px;
    padding: 0;
    cursor: pointer;
    color: #8b92a0;
    transition: color 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.bc-sb-cashout-dialog__close:hover {
    color: #fff;
}

.bc-sb-cashout-dialog__close svg {
    width: 20px;
    height: 20px;
}

.bc-sb-cashout-dialog__warning {
    background: rgba(255, 152, 0, 0.1);
    border: 1px solid rgba(255, 152, 0, 0.3);
    border-radius: 8px;
    padding: 16px;
    margin: 16px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.bc-sb-cashout-dialog__warning-icon {
    width: 32px;
    height: 32px;
    color: #ff9800;
}

.bc-sb-cashout-dialog__warning-text {
    font-size: 14px;
    font-weight: 600;
    color: #ff9800;
}

.bc-sb-cashout-dialog__warning-details {
    font-size: 13px;
    color: #fff;
    text-align: center;
    line-height: 1.5;
}

.bc-sb-cashout-dialog__body {
    padding: 20px;
}

.bc-sb-cashout-dialog__amount {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
}

.bc-sb-cashout-dialog__label {
    font-size: 13px;
    color: #8b92a0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.bc-sb-cashout-dialog__value {
    font-size: 32px;
    font-weight: 700;
    color: #4caf50;
}

.bc-sb-cashout-dialog__message {
    font-size: 13px;
    color: #8b92a0;
    text-align: center;
}

.bc-sb-cashout-dialog__footer {
    padding: 20px;
    border-top: 1px solid #2a2f36;
    display: flex;
    gap: 12px;
}

.bc-sb-cashout-dialog__footer .bc-sb-btn {
    flex: 1;
}

/* ================================================================
   BET HISTORY
   ================================================================ */

.bc-sb-bet-history {
    padding: 16px;
    overflow-y: auto;
    max-height: calc(100vh - 200px);
}

.bc-sb-bet-history__group {
    margin-bottom: 24px;
}

.bc-sb-bet-history__group:last-child {
    margin-bottom: 0;
}

.bc-sb-bet-history__date {
    font-size: 12px;
    font-weight: 700;
    color: #8b92a0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0 0 12px 0;
}

.bc-sb-history-card {
    background: #1e2329;
    border-radius: 8px;
    margin-bottom: 12px;
    overflow: hidden;
}

.bc-sb-history-card:last-child {
    margin-bottom: 0;
}

.bc-sb-history-card--expanded {
    background: #23282f;
}

.bc-sb-history-card__header {
    padding: 12px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.bc-sb-history-card__header:hover {
    background: rgba(255, 255, 255, 0.03);
}

.bc-sb-history-card__title {
    font-size: 14px;
    font-weight: 600;
    color: #fff;
}

.bc-sb-history-card__meta {
    font-size: 12px;
    color: #8b92a0;
}

.bc-sb-history-card__summary {
    padding: 0 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.bc-sb-history-card__row {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
}

.bc-sb-history-card__label {
    color: #8b92a0;
}

.bc-sb-history-card__value {
    color: #fff;
    font-weight: 600;
}

.bc-sb-history-card__value--won {
    color: #4caf50;
}

.bc-sb-history-card__value--lost {
    color: #9e9e9e;
}

.bc-sb-history-card__value--cashed {
    color: #f9d659;
}

.bc-sb-history-card__footer {
    padding: 12px;
    border-top: 1px solid #2a2f36;
    margin-top: 8px;
}

.bc-sb-history-card__bet-id {
    font-size: 11px;
    color: #8b92a0;
}

.bc-sb-history-result {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}

.bc-sb-history-result--won {
    background: rgba(76, 175, 80, 0.2);
    color: #4caf50;
}

.bc-sb-history-result--lost {
    background: rgba(158, 158, 158, 0.2);
    color: #9e9e9e;
}

.bc-sb-history-result--void {
    background: rgba(255, 152, 0, 0.2);
    color: #ff9800;
}

.bc-sb-history-result--cashed {
    background: rgba(249, 214, 89, 0.2);
    color: #f9d659;
}

.bc-sb-history-details {
    border-top: 1px solid #2a2f36;
    padding: 12px;
}

.bc-sb-history-detail__info {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
}

.bc-sb-history-detail__row {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
}

.bc-sb-history-detail__label {
    color: #8b92a0;
}

.bc-sb-history-detail__value {
    color: #fff;
    font-weight: 600;
}

.bc-sb-history-detail__selections {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.bc-sb-history-detail__selection {
    background: #1a1f26;
    border-radius: 6px;
    padding: 10px;
    display: flex;
    gap: 10px;
    align-items: flex-start;
}

.bc-sb-history-detail__sel-content {
    flex: 1;
}

.bc-sb-history-detail__sel-header {
    display: flex;
    gap: 8px;
    margin-bottom: 4px;
}

.bc-sb-history-detail__sport {
    font-size: 11px;
    color: #f9d659;
    font-weight: 600;
}

.bc-sb-history-detail__league {
    font-size: 11px;
    color: #8b92a0;
}

.bc-sb-history-detail__fixture {
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 4px;
}

.bc-sb-history-detail__market {
    font-size: 12px;
    color: #8b92a0;
    margin-bottom: 6px;
}

.bc-sb-history-detail__odds {
    font-size: 12px;
    color: #4caf50;
    font-weight: 600;
}

/* ================================================================
   EMPTY STATES
   ================================================================ */

.bc-sb-my-bets__empty,
.bc-sb-bet-history__empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
}

.bc-sb-my-bets__empty-icon,
.bc-sb-bet-history__empty-icon {
    width: 64px;
    height: 64px;
    color: #8b92a0;
    margin-bottom: 16px;
}

.bc-sb-my-bets__empty-title,
.bc-sb-bet-history__empty-title {
    font-size: 18px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 8px;
}

.bc-sb-my-bets__empty-text,
.bc-sb-bet-history__empty-text {
    font-size: 14px;
    color: #8b92a0;
    margin-bottom: 24px;
}

/* ================================================================
   TOAST NOTIFICATIONS
   ================================================================ */

.bc-sb-cashout-toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #1e2329;
    border-radius: 8px;
    padding: 16px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    z-index: 10001;
    animation: toastIn 0.3s ease;
    min-width: 300px;
}

.bc-sb-cashout-toast--exit {
    animation: toastOut 0.3s ease forwards;
}

@keyframes toastIn {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes toastOut {
    to {
        opacity: 0;
        transform: translateX(100%);
    }
}

.bc-sb-cashout-toast__content {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 32px;
}

.bc-sb-cashout-toast__message {
    font-size: 14px;
    color: #fff;
}

.bc-sb-cashout-toast--success .bc-sb-cashout-toast__content {
    color: #4caf50;
}

.bc-sb-cashout-toast--error .bc-sb-cashout-toast__content {
    color: #e23a3a;
}

.bc-sb-cashout-toast--info .bc-sb-cashout-toast__content {
    color: #f9d659;
}

/* ================================================================
   BUTTONS
   ================================================================ */

.bc-sb-btn {
    background: #f9d659;
    color: #1a1f26;
    border: none;
    border-radius: 6px;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    min-height: 44px;
}

.bc-sb-btn:hover {
    background: #fada46;
    transform: translateY(-1px);
}

.bc-sb-btn:active {
    transform: translateY(0);
}

.bc-sb-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.bc-sb-btn--primary {
    background: #f9d659;
    color: #1a1f26;
}

.bc-sb-btn--secondary {
    background: transparent;
    color: #fff;
    border: 1px solid #2a2f36;
}

.bc-sb-btn--secondary:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: #3a3f46;
}

/* ================================================================
   SPINNER
   ================================================================ */

.bc-sb-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #2a2f36;
    border-top-color: #f9d659;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-bottom: 16px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ================================================================
   MOBILE RESPONSIVE (<767px)
   ================================================================ */

@media (max-width: 767px) {
    .bc-sb-hub-tab {
        font-size: 12px;
        padding: 10px 6px;
    }

    .bc-sb-hub-tab__label {
        font-size: 11px;
    }

    .bc-sb-my-bets,
    .bc-sb-bet-history {
        padding: 12px;
    }

    .bc-sb-cashout-dialog {
        padding: 12px;
    }

    .bc-sb-cashout-dialog__content {
        max-width: 100%;
    }

    .bc-sb-cashout-dialog__value {
        font-size: 28px;
    }

    .bc-sb-cashout-toast {
        top: 10px;
        right: 10px;
        left: 10px;
        min-width: auto;
    }
}

/* ================================================================
   ACCESSIBILITY
   ================================================================ */

.bc-sb-hub-tab:focus-visible,
.bc-sb-cashout-btn:focus-visible,
.bc-sb-btn:focus-visible {
    outline: 2px solid #f9d659;
    outline-offset: 2px;
}

/* ================================================================
   PRINT
   ================================================================ */

@media print {
    .bc-sb-hub-tabs,
    .bc-sb-cashout-btn,
    .bc-sb-cashout-dialog,
    .bc-sb-cashout-toast {
        display: none !important;
    }
}
