/* ═══════════════════════════════════════════════════════════════════
 * Setups FAB (Floating Action Button)
 * Mobile-only - hidden on desktop (use the topbar badge instead)
 * ═══════════════════════════════════════════════════════════════════ */


/* Default: hidden */
.setups-fab {
    display: none;
}


/* Mobile only */
@media (max-width: 768px) {
    
    .setups-fab {
        position: fixed;
        bottom: 20px;
        left: 16px;  /* RTL-friendly: in left corner since we're RTL */
        z-index: 999;  /* below modals (10000+) but above content */
        
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 6px;
        
        width: auto;
        min-width: 56px;
        height: 56px;
        padding: 0 16px;
        
        background: linear-gradient(135deg, #ef4444, #dc2626);
        color: white;
        border: none;
        border-radius: 28px;
        cursor: pointer;
        
        box-shadow: 
            0 4px 14px rgba(239, 68, 68, 0.4),
            0 0 0 4px rgba(239, 68, 68, 0.15);
        
        font-family: inherit;
        animation: fabPulse 2.5s ease-in-out infinite;
        transition: transform 0.2s ease, box-shadow 0.2s ease;
        
        /* Better touch feedback */
        -webkit-tap-highlight-color: transparent;
        user-select: none;
        -webkit-user-select: none;
    }
    
    .setups-fab:active {
        transform: scale(0.92);
        box-shadow: 
            0 2px 8px rgba(239, 68, 68, 0.4),
            0 0 0 2px rgba(239, 68, 68, 0.15);
    }
    
    .sf-icon {
        font-size: 1.4rem;
        line-height: 1;
    }
    
    .sf-count {
        font-weight: 800;
        font-size: 1rem;
        font-family: 'JetBrains Mono', monospace;
        line-height: 1;
        background: rgba(255, 255, 255, 0.25);
        padding: 4px 8px;
        border-radius: 12px;
        min-width: 24px;
        text-align: center;
    }
    
    /* Pulse animation - constant gentle attention */
    @keyframes fabPulse {
        0%, 100% {
            box-shadow: 
                0 4px 14px rgba(239, 68, 68, 0.4),
                0 0 0 0 rgba(239, 68, 68, 0.4);
        }
        50% {
            box-shadow: 
                0 4px 14px rgba(239, 68, 68, 0.4),
                0 0 0 12px rgba(239, 68, 68, 0);
        }
    }
    
    /* Stronger pulse when count increases */
    .setups-fab.pulse-new {
        animation: fabPulseNew 0.6s ease-in-out 3;
    }
    
    @keyframes fabPulseNew {
        0%, 100% {
            transform: scale(1);
        }
        50% {
            transform: scale(1.12);
        }
    }
    
    /* Hide FAB when a modal is open (the body has overflow:hidden when modal opens) */
    body[style*="overflow: hidden"] .setups-fab,
    body:has(.modal-overlay.show) .setups-fab {
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.2s ease;
    }
}


/* Smaller phones - keep button accessible */
@media (max-width: 480px) {
    .setups-fab {
        bottom: 16px;
        left: 12px;
        min-width: 52px;
        height: 52px;
        padding: 0 14px;
    }
    
    .sf-icon {
        font-size: 1.25rem;
    }
    
    .sf-count {
        font-size: 0.9rem;
        padding: 3px 7px;
        min-width: 22px;
    }
}
