/**
 * ================================================================
 * FLOATING BETSLIP BUTTON — ALTENAR-INSPIRED PREMIUM UX
 * ================================================================
 * Replaces bottom navigation with a modern floating FAB-style
 * betslip launcher. Adapts to mobile and desktop contexts.
 * ================================================================
 */

/* ================================================================
   STEP 1: HIDE MOBILE BOTTOM NAVIGATION
   ================================================================ */

.bc-sb-mobile-nav {
    display: none !important;
}

/* Remove bottom padding that was reserved for mobile nav */
@media (max-width: 767px) {
    .bc-sb-content {
        padding-bottom: 0 !important;
    }
    
    .bc-sb-mobile-betslip__content {
        padding-bottom: calc(16px + env(safe-area-inset-bottom)) !important;
    }
}

/* ================================================================
   STEP 2: FLOATING BETSLIP BUTTON
   ================================================================ */

.bc-sb-floating-betslip {
    position: fixed;
    z-index: 50;
    
    /* Mobile positioning: bottom-right */
    bottom: calc(16px + env(safe-area-inset-bottom));
    right: 16px;
    
    /* Button styling */
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    
    min-width: 120px;
    height: 48px;
    padding: 0 16px;
    
    background: var(--sb-surface);
    border: 1px solid var(--sb-border);
    border-radius: 24px;
    
    color: var(--sb-text);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    
    box-shadow: 
        0 4px 12px rgba(0, 0, 0, 0.15),
        0 2px 6px rgba(0, 0, 0, 0.08);
    
    cursor: pointer;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    
    transition: all 0.18s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Icon */
.bc-sb-floating-betslip__icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    color: var(--sb-text-2);
    transition: color 0.18s ease;
}

/* Label */
.bc-sb-floating-betslip__label {
    white-space: nowrap;
}

/* Badge (selection count) */
.bc-sb-floating-betslip__badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    
    background: var(--sb-text-3);
    color: var(--sb-bg);
    
    border-radius: 11px;
    font-size: 12px;
    font-weight: 800;
    line-height: 1;
    font-variant-numeric: tabular-nums;
    
    transition: all 0.18s ease;
}

/* ================================================================
   STATES: EMPTY (0 selections)
   ================================================================ */

.bc-sb-floating-betslip--empty {
    background: var(--sb-surface);
    border-color: var(--sb-border);
}

.bc-sb-floating-betslip--empty .bc-sb-floating-betslip__icon {
    color: var(--sb-text-3);
}

.bc-sb-floating-betslip--empty .bc-sb-floating-betslip__badge {
    background: var(--sb-text-4);
    opacity: 0.5;
}

/* ================================================================
   STATES: ACTIVE (has selections)
   ================================================================ */

.bc-sb-floating-betslip--active {
    background: var(--sb-primary);
    border-color: var(--sb-primary);
    color: var(--sb-on-primary);
    box-shadow: 
        0 6px 16px rgba(255, 107, 0, 0.3),
        0 3px 8px rgba(255, 107, 0, 0.2);
}

.bc-sb-floating-betslip--active .bc-sb-floating-betslip__icon {
    color: var(--sb-on-primary);
}

.bc-sb-floating-betslip--active .bc-sb-floating-betslip__badge {
    background: rgba(255, 255, 255, 0.25);
    color: var(--sb-on-primary);
    font-weight: 900;
}

/* ================================================================
   INTERACTION STATES
   ================================================================ */

/* Hover (desktop) */
@media (hover: hover) {
    .bc-sb-floating-betslip:hover {
        transform: translateY(-2px);
        box-shadow: 
            0 8px 20px rgba(0, 0, 0, 0.2),
            0 4px 10px rgba(0, 0, 0, 0.12);
    }
    
    .bc-sb-floating-betslip--active:hover {
        box-shadow: 
            0 8px 24px rgba(255, 107, 0, 0.4),
            0 4px 12px rgba(255, 107, 0, 0.25);
    }
}

/* Active/pressed */
.bc-sb-floating-betslip:active {
    transform: scale(0.96);
    transition-duration: 0.08s;
}

/* Focus visible (keyboard navigation) */
.bc-sb-floating-betslip:focus-visible {
    outline: 2px solid var(--sb-primary);
    outline-offset: 2px;
}

/* ================================================================
   BADGE ANIMATION (on count change)
   ================================================================ */

@keyframes bc-sb-badge-pop {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.3);
    }
    100% {
        transform: scale(1);
    }
}

.bc-sb-floating-betslip__badge--pop {
    animation: bc-sb-badge-pop 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ================================================================
   RESPONSIVE: TABLET
   ================================================================ */

@media (min-width: 768px) and (max-width: 1023px) {
    .bc-sb-floating-betslip {
        bottom: 20px;
        right: 20px;
        min-width: 130px;
        height: 52px;
        font-size: 14px;
    }
}

/* ================================================================
   RESPONSIVE: DESKTOP
   ================================================================ */

@media (min-width: 1024px) {
    .bc-sb-floating-betslip {
        /* Desktop: hide when betslip panel is visible */
        display: none;
    }
    
    /* Show only if betslip panel is collapsed */
    .bc-sb-betslip--collapsed ~ .bc-sb-floating-betslip,
    .bc-sb-layout--betslip-hidden .bc-sb-floating-betslip {
        display: flex;
        bottom: 24px;
        right: 24px;
    }
}

/* ================================================================
   REDUCED MOTION
   ================================================================ */

@media (prefers-reduced-motion: reduce) {
    .bc-sb-floating-betslip {
        transition: none;
    }
    
    .bc-sb-floating-betslip:hover {
        transform: none;
    }
    
    .bc-sb-floating-betslip:active {
        transform: none;
    }
    
    .bc-sb-floating-betslip__badge--pop {
        animation: none;
    }
}

/* ================================================================
   ACCESSIBILITY
   ================================================================ */

.bc-sb-floating-betslip[aria-label] {
    /* Ensure screen readers announce properly */
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .bc-sb-floating-betslip {
        border-width: 2px;
    }
    
    .bc-sb-floating-betslip--active {
        border: 2px solid currentColor;
    }
}

/* ================================================================
   PRINT: HIDE
   ================================================================ */

@media print {
    .bc-sb-floating-betslip {
        display: none;
    }
}
