/* ============================================
   BARRA BOTTOM MINIMAL - Floating Point Central
   Design moderno con 4 bottoni: WhatsApp, Chiama, Su, Scan Me
   Versione ottimizzata per whois.bruschi.com
   ============================================ */

/* Barra contenitore principale */
.action-bar-bottom {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.96) 0%, rgba(30, 41, 59, 0.98) 100%);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.25);
    padding: 12px 0;
    will-change: transform;
    animation: slideUp 0.5s ease 0.3s both;
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Container centrato dei bottoni */
.action-bar-content {
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    padding: 0 20px;
}

/* Stile base bottoni */
.action-btn {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-width: 85px;
    height: 68px;
    padding: 10px 16px;
    border-radius: 16px;
    border: none;
    color: white;
    font-weight: 600;
    font-size: 13px;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.action-btn:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
    text-decoration: none;
}

.action-btn:active {
    transform: translateY(-2px);
}

/* Icone SVG dentro i bottoni */
.action-btn svg {
    width: 26px;
    height: 26px;
    flex-shrink: 0;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

/* Testi dei bottoni */
.action-label {
    font-size: 12px;
    font-weight: 600;
    line-height: 1;
    letter-spacing: 0.3px;
    text-transform: capitalize;
    white-space: nowrap;
}

/* ============================================
   COLORI SPECIFICI BOTTONI (come da immagini)
   ============================================ */

/* WhatsApp - Verde */
.action-whatsapp {
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
}

.action-whatsapp:hover {
    background: linear-gradient(135deg, #128C7E 0%, #075E54 100%);
    box-shadow: 0 8px 24px rgba(37, 211, 102, 0.4);
}

/* Chiama - Blu */
.action-call {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
}

.action-call:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    box-shadow: 0 8px 24px rgba(59, 130, 246, 0.4);
}

/* Su (Scroll Top) - Viola */
.action-scroll {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
}

.action-scroll:hover {
    background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%);
    box-shadow: 0 8px 24px rgba(139, 92, 246, 0.4);
}

/* Salva Contatto (Scan Me) - Rosso/Arancione - Larghezza maggiore per testo */
.action-scan {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    min-width: 100px;
}

.action-scan:hover {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    box-shadow: 0 8px 24px rgba(239, 68, 68, 0.4);
}

/* ============================================
   POPUP QR CODE - Design moderno
   ============================================ */

.qr-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.qr-popup.active {
    display: flex;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Overlay sfocato */
.qr-popup-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

/* Contenuto popup */
.qr-popup-content {
    position: relative;
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    border: 2px solid rgba(255, 255, 255, 0.15);
    border-radius: 24px;
    padding: 2.5rem;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.5);
    animation: popupSlideUp 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes popupSlideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Bottone chiusura X */
.qr-popup-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    color: white;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.qr-popup-close:hover {
    background: rgba(239, 68, 68, 0.9);
    border-color: #dc2626;
    transform: rotate(90deg);
}

/* Header popup */
.qr-popup-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.qr-popup-header h3 {
    color: white;
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 0 0.5rem 0;
}

.qr-popup-header p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.95rem;
    margin: 0;
}

/* QR Code container */
.qr-popup-code {
    background: white;
    border-radius: 16px;
    padding: 1.5rem;
    text-align: center;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.qr-popup-code img {
    width: 220px;
    height: 220px;
    margin: 0 auto;
    border-radius: 12px;
}

/* Bottone download vCard */
.qr-popup-download {
    margin-top: 1.5rem;
    width: 100%;
    padding: 1rem;
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-decoration: none;
    transition: all 0.3s;
}

.qr-popup-download:hover {
    background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(139, 92, 246, 0.4);
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

/* Tablet e schermi medi (768px - 1024px) */
@media (max-width: 1024px) {
    .action-bar-content {
        gap: 10px;
    }
    
    .action-btn {
        min-width: 75px;
        height: 64px;
        padding: 8px 12px;
    }
    
    .action-btn svg {
        width: 24px;
        height: 24px;
    }
    
    .action-label {
        font-size: 11px;
    }
}

/* Mobile landscape e piccoli tablet (max 768px) */
@media (max-width: 768px) {
    .action-bar-bottom {
        padding: 10px 0;
    }
    
    .action-bar-content {
        gap: 8px;
        padding: 0 12px;
    }
    
    .action-btn {
        min-width: 70px;
        height: 60px;
        padding: 8px 10px;
        gap: 4px;
    }
    
    .action-btn svg {
        width: 22px;
        height: 22px;
    }
    
    .action-label {
        font-size: 10px;
    }
    
    .qr-popup-content {
        padding: 2rem;
        max-width: 340px;
    }
    
    .qr-popup-code img {
        width: 180px;
        height: 180px;
    }
}

/* Mobile portrait piccoli (max 480px) */
@media (max-width: 480px) {
    .action-bar-content {
        gap: 6px;
        padding: 0 10px;
    }
    
    .action-btn {
        min-width: 60px;
        height: 56px;
        padding: 6px 8px;
    }
    
    .action-btn svg {
        width: 20px;
        height: 20px;
    }
    
    .action-label {
        font-size: 9px;
    }
}

/* Tiny screens (max 360px) - Solo icone */
@media (max-width: 360px) {
    .action-btn {
        min-width: 50px;
        height: 50px;
        padding: 8px;
    }
    
    .action-label {
        display: none;
    }
    
    .action-btn svg {
        width: 24px;
        height: 24px;
    }
}

/* ============================================
   PRINT STYLES - Nascondi in stampa
   ============================================ */

@media print {
    .action-bar-bottom,
    .qr-popup {
        display: none !important;
    }
}

/* ============================================
   ACCESSIBILITÀ
   ============================================ */

/* Focus visibile per navigazione da tastiera */
.action-btn:focus-visible,
.qr-popup-close:focus-visible {
    outline: 3px solid #fbbf24;
    outline-offset: 2px;
}

/* Reduce motion per utenti con preferenze accessibilità */
@media (prefers-reduced-motion: reduce) {
    .action-bar-bottom,
    .action-btn,
    .qr-popup,
    .qr-popup-content {
        animation: none !important;
        transition: none !important;
    }
}

/* Dark mode support (già implementato di default) */
@media (prefers-color-scheme: light) {
    .action-bar-bottom {
        background: linear-gradient(180deg, rgba(248, 250, 252, 0.96) 0%, rgba(241, 245, 249, 0.98) 100%);
        border-top-color: rgba(0, 0, 0, 0.1);
    }
    
    .qr-popup-content {
        background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
        border-color: rgba(0, 0, 0, 0.15);
    }
    
    .qr-popup-header h3 {
        color: #0f172a;
    }
    
    .qr-popup-header p {
        color: rgba(15, 23, 42, 0.7);
    }
}
