/* File: /public/css/components/status-bar.css */
/* Arcade Layer - Auto-Fit Status Cards */
/* v1.2.0 - Style D: ultra-transparent bg + bottom accent bar + gradient border on hover */
/*
   WHITE-LABEL NOTES:
   - Uses CSS variables for all colors/fonts
   - Cards auto-resize based on how many are visible (feature flags)
   - max-width prevents 1-3 cards from stretching too wide
   - Replaces the old fixed 4-column .summary-cards grid
*/

/* =====================================================
   STATUS BAR - Flex container for auto-fit cards
   ===================================================== */
.status-bar {
    display: flex;
    align-items: stretch;
    justify-content: center;
    gap: 10px;
    margin-bottom: 16px;
    flex-shrink: 0;
    max-width: 100%;
}

/* Hide dividers — kept in JSX for structure but not displayed in card mode */
.status-divider {
    display: none;
}

/* =====================================================
   STATUS SEGMENT - Individual glass card
   ===================================================== */
.status-segment {
    flex: 1 1 0;
    min-width: 80px;
    max-width: 200px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 10px 12px 12px;
    text-align: center;
    position: relative;
    overflow: hidden;

    background: rgba(10, 25, 10, 0.75);
    border: 1px solid rgba(var(--brand-primary-rgb, 45, 139, 59), 0.18);
    border-radius: 12px;
    backdrop-filter: blur(16px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Bottom accent bar per card */
.status-segment::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 10%;
    right: 10%;
    height: 2px;
    background: linear-gradient(90deg,
        transparent,
        rgba(var(--brand-primary-rgb, 45, 139, 59), 0.7),
        transparent);
    border-radius: 2px;
}

.status-segment:hover {
    transform: translateY(-3px);
    background: rgba(255, 255, 255, 0.11);
    box-shadow:
        0 8px 24px rgba(0, 0, 0, 0.4),
        0 0 12px rgba(var(--brand-primary-rgb, 45, 139, 59), 0.15);
    border-color: rgba(var(--brand-primary-rgb, 45, 139, 59), 0.35);
}

/* Jackpot segment — gold-tinted bottom accent */
.status-segment.jackpot-segment::before {
    background: linear-gradient(90deg,
        transparent,
        rgba(var(--brand-secondary-rgb, 212, 175, 55), 0.7),
        transparent);
}

/* =====================================================
   STATUS LABEL
   ===================================================== */
.status-label {
    font-size: 0.6rem;
    color: var(--text-secondary, #94a3b8);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    font-weight: 600;
    margin-bottom: 3px;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Free spin badge inline */
.status-label .free-spin-badge {
    display: inline-flex;
    align-items: center;
    font-size: 0.5rem;
    background: linear-gradient(135deg, #f39c12, #e67e22);
    color: #fff;
    padding: 1px 5px;
    border-radius: 8px;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: none;
    animation: badgePulse 2s ease-in-out infinite;
}

/* Claimed count inline */
.status-label .status-claimed {
    font-size: 0.5rem;
    color: rgba(255, 255, 255, 0.4);
    letter-spacing: 0;
    text-transform: none;
    font-weight: 400;
}

/* =====================================================
   STATUS VALUE
   ===================================================== */
.status-value {
    font-family: var(--font-display, 'Cinzel', serif);
    font-size: clamp(1.1rem, 2.5vw, 1.5rem);
    font-weight: 700;
    color: #fff;
    line-height: 1.2;
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.1);
}

.status-value.green {
    color: var(--wryon-green, #2ecc71);
    text-shadow: 0 0 12px rgba(var(--brand-primary-rgb, 45, 139, 59), 0.5);
}

.status-value.gold {
    color: var(--greek-gold, #d4af37);
    text-shadow: 0 0 12px rgba(var(--brand-secondary-rgb, 212, 175, 55), 0.5);
}

.status-value.red {
    color: var(--christmas-red, #c41e3a);
    text-shadow: 0 0 12px rgba(196, 30, 58, 0.5);
}

/* =====================================================
   STATUS ACTION - Compact CTA button
   ===================================================== */
.status-action {
    display: inline-block;
    margin-top: 5px;
    font-size: 0.55rem;
    padding: 3px 10px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 14px;
    color: #fff;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.05);
    font-weight: 600;
    letter-spacing: 0.3px;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.status-action:hover {
    background: rgba(var(--brand-primary-rgb, 45, 139, 59), 0.3);
    border-color: rgba(var(--brand-primary-rgb, 45, 139, 59), 0.6);
    transform: translateY(-1px);
}

.status-action:active {
    transform: translateY(0);
}

.status-action.claim-btn-animated {
    background: linear-gradient(135deg,
        rgba(46, 204, 113, 0.25),
        rgba(39, 174, 96, 0.25));
    border-color: rgba(46, 204, 113, 0.4);
}

.status-action.claim-btn-animated:hover {
    background: linear-gradient(135deg,
        rgba(46, 204, 113, 0.45),
        rgba(39, 174, 96, 0.45));
}

.status-action:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.status-action.buy-spins-btn-animated {
    animation: subtlePulse 3s ease-in-out infinite;
}

/* =====================================================
   STATUS SUB - Secondary line (e.g., "+ 150 LAVA")
   ===================================================== */
.status-sub {
    font-size: 0.55rem;
    color: var(--greek-gold, #d4af37);
    margin-top: 2px;
    font-weight: 500;
}

/* =====================================================
   FLASH ANIMATIONS
   ===================================================== */
.status-segment.card-flash {
    animation: segmentFlash 0.6s ease;
}

@keyframes segmentFlash {
    0%   { box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3); }
    30%  { box-shadow: 0 0 20px rgba(var(--brand-primary-rgb, 45, 139, 59), 0.5),
                       0 4px 20px rgba(0, 0, 0, 0.3); }
    100% { box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3); }
}

.value-flash-green {
    animation: valueFlashGreen 0.6s ease;
}

.value-flash-gold {
    animation: valueFlashGold 0.6s ease;
}

@keyframes valueFlashGreen {
    0%   { transform: scale(1); }
    40%  { transform: scale(1.15); color: #5dff8a;
           text-shadow: 0 0 20px rgba(93, 255, 138, 0.8); }
    100% { transform: scale(1); }
}

@keyframes valueFlashGold {
    0%   { transform: scale(1); }
    40%  { transform: scale(1.15); color: #ffd700;
           text-shadow: 0 0 20px rgba(255, 215, 0, 0.8); }
    100% { transform: scale(1); }
}

@keyframes badgePulse {
    0%, 100% { opacity: 1; }
    50%      { opacity: 0.7; }
}

@keyframes subtlePulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(var(--brand-primary-rgb, 45, 139, 59), 0); }
    50%      { box-shadow: 0 0 8px 2px rgba(var(--brand-primary-rgb, 45, 139, 59), 0.15); }
}

/* =====================================================
   RESPONSIVE: Tablet — tighten up
   ===================================================== */
@media (max-width: 900px) {
    .status-bar {
        gap: 8px;
    }

    .status-segment {
        padding: 8px 8px 6px;
    }

    .status-value {
        font-size: clamp(0.95rem, 2.2vw, 1.2rem);
    }

    .status-label {
        font-size: 0.55rem;
    }

    .status-action {
        font-size: 0.5rem;
        padding: 2px 8px;
    }
}

/* =====================================================
   RESPONSIVE: Mobile — hide (wheel stats bar takes over)
   ===================================================== */
@media (max-width: 768px) {
    .status-bar {
        display: none;
    }
}

/* =====================================================
   IMMERSIVE MODE — hide during spin / viewing
   ===================================================== */
body.wheel-spinning-immersive .status-bar,
body.wheel-viewing-immersive .status-bar {
    display: none;
}