/* =========================================
   Balance Badge - Golden Theme with Dropdown
   ========================================= */

   .sbc-balance-widget {
    position: relative;
    display: inline-flex;
    align-items: center;
    margin-right: 8px;
}

/* Main Badge - Compact single display */
.sbc-balance-badge {
      display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 20px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(255, 248, 230, 0.95));
    border: 1px solid #A5525F;
    box-shadow: 0 2px 8px #A5525F;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 13px;
    font-weight: 600;
    color: #A5525F;
    font-variant-numeric: tabular-nums;
    backdrop-filter: blur(4px);
}

.sbc-balance-badge:hover {
    background: linear-gradient(135deg, rgba(255,255,255,1), rgba(255,245,215,1));
    box-shadow: 0 4px 12px rgba(184,134,11,0.25);
    transform: translateY(-1px);
}

.sbc-balance-badge .sbc-bal-icon {
    display: flex;
    align-items: center;
    color: #b8860b;
}

.sbc-balance-badge .sbc-bal-icon svg {
    width: 15px;
    height: 15px;
}

.sbc-balance-badge .sbc-bal-value {
    font-weight: 700;
}

.sbc-balance-badge .sbc-bal-arrow {
    display: flex;
    align-items: center;
    opacity: 0.5;
    transition: transform 0.2s ease;
    margin-left: 2px;
}

.sbc-balance-badge .sbc-bal-arrow svg {
    width: 12px;
    height: 12px;
}

.sbc-balance-widget.open .sbc-bal-arrow {
    transform: rotate(180deg);
}

/* Dropdown Panel */
.sbc-balance-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    min-width: 180px;
    background: linear-gradient(145deg, #fff, #fffbf0);
    border: 1px solid rgba(184,134,11,0.25);
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12), 0 2px 8px rgba(184,134,11,0.1);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all 0.2s ease;
    z-index: 1000;
    overflow: hidden;
}

.sbc-balance-widget.open .sbc-balance-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.sbc-balance-dropdown::before {
    content: '';
    position: absolute;
    top: -6px;
    right: 16px;
    width: 10px;
    height: 10px;
    background: #fff;
    border-left: 1px solid rgba(184,134,11,0.25);
    border-top: 1px solid rgba(184,134,11,0.25);
    transform: rotate(45deg);
}

/* Dropdown Header */
.sbc-dropdown-header {
    padding: 10px 14px;
    background: #B76E79;
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Balance Items in Dropdown */
.sbc-dropdown-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    border-bottom: 1px solid rgba(184,134,11,0.1);
    transition: background 0.15s ease;
}

.sbc-dropdown-item:last-child {
    border-bottom: none;
}

.sbc-dropdown-item:hover {
    background: rgba(255,248,230,0.8);
}

.sbc-dropdown-item .sbc-item-label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: #555;
    font-weight: 500;
}

.sbc-dropdown-item .sbc-item-label .sbc-item-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    background: #ffffff;
    color: #C68D95;
}

.sbc-dropdown-item .sbc-item-label .sbc-item-icon svg {
    width: 14px;
    height: 14px;
}

.sbc-dropdown-item .sbc-item-value {
    font-weight: 700;
    font-size: 14px;
    color: #8b6914;
    font-variant-numeric: tabular-nums;
}

/* Warning state for low balance */
.sbc-dropdown-item.sbc-low .sbc-item-value {
    color: #c62828;
}

.sbc-dropdown-item.sbc-low {
    background: rgba(255,235,238,0.5);
}

/* Unlimited badge */
.sbc-item-unlimited {
    background: linear-gradient(135deg, #b8860b, #d4a422);
    color: #fff;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
    margin-left: 5px;
}

/* Mobile adjustments */
@media (max-width: 480px) {
    .sbc-balance-badge {
        padding: 5px 10px;
        font-size: 12px;
    }
    
    .sbc-balance-dropdown {
        min-width: 160px;
        right: -8px;
    }
}

/* Legacy: Old single-balance badge (for backwards compat) */
.sbc-minutes-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 999px;
    background: linear-gradient(135deg, #111, #333);
    color: #fff;
    font-weight: 600;
    font-size: 13px;
    font-variant-numeric: tabular-nums;
    margin-right: 8px;
    border: 1px solid rgba(255,255,255,0.15);
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
    letter-spacing: 0.5px;
}

.sbc-minutes-warning {
    background: linear-gradient(135deg, #7a1f1f, #b82828) !important;
    animation: sbcMinutesWarningPulse 1.5s ease-in-out infinite;
}

@keyframes sbcMinutesWarningPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.8; }
}

/* Voice/Video overlay minutes pill */
.sbc-voice-minutes {
    margin-top: 8px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 12px;
    background: linear-gradient(135deg, #ffffff, #faf8f0);
    color: #a67c00;
    font-weight: 700;
    font-size: 15px;
    font-variant-numeric: tabular-nums;
    border: 1px solid rgba(212, 175, 55, 0.35);
    box-shadow: 0 8px 24px rgba(212, 175, 55, 0.18);
    letter-spacing: 0.5px;
}

.sbc-voice-minutes.sbc-pulse {
    animation: sbcMinutesPulse 700ms ease-out;
}

@keyframes sbcMinutesPulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(212, 175, 55, 0.25);
    }
    70% {
        transform: scale(1.05);
        box-shadow: 0 0 0 12px rgba(212, 175, 55, 0);
    }
    100% {
        transform: scale(1);
    }
}

/* Video-specific minutes display */
#sbc-video-minutes {
    background: linear-gradient(135deg, #ffffff, #faf8f0);
    color: #a67c00;
    border-color: rgba(212, 175, 55, 0.35);
    box-shadow: 0 8px 24px rgba(212, 175, 55, 0.18);
}

/* Legacy support for token classes (backwards compatibility) */
.sbc-token-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 999px;
    background: linear-gradient(135deg, #111, #333);
    color: #fff;
    font-weight: 600;
    font-size: 13px;
    margin-right: 8px;
    border: 1px solid rgba(255,255,255,0.15);
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

.sbc-token-warning {
    background: linear-gradient(135deg, #7a1f1f, #b82828) !important;
}

.sbc-voice-tokens {
    margin-top: 8px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 12px;
    background: linear-gradient(135deg, #fff0f7, #ffe3ee);
    color: #a81a5b;
    font-weight: 700;
    font-size: 14px;
    border: 1px solid rgba(255,107,157,.35);
    box-shadow: 0 8px 24px rgba(255,107,157,.18);
}
