/**
 * LuxHaven360 - Connection Monitor Styles
 * Design premium per avvisi di connessione
 */

/* ==========================================
   BANNER CONNESSIONE (Warning/Success)
   ========================================== */

.lh-connection-banner {
    position: fixed;
    top: 90px; /* Sotto navbar */
    left: 50%;
    transform: translateX(-50%) translateY(-120%);
    z-index: 99998;
    max-width: 600px;
    width: 90%;
    opacity: 0;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}

.lh-connection-banner.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
    pointer-events: all;
}

.lh-banner-content {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: linear-gradient(135deg, rgba(26, 26, 26, 0.98), rgba(15, 15, 15, 0.98));
    backdrop-filter: blur(20px);
    border: 2px solid;
    border-radius: 16px;
    padding: 1.25rem 1.5rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
}

/* Warning Style */
.lh-connection-banner.weak .lh-banner-content {
    border-color: rgba(251, 191, 36, 0.6);
    box-shadow: 0 20px 60px rgba(251, 191, 36, 0.2);
}

/* Success Style */
.lh-connection-banner.success .lh-banner-content {
    border-color: rgba(16, 185, 129, 0.6);
    box-shadow: 0 20px 60px rgba(16, 185, 129, 0.2);
}

.lh-banner-icon {
    font-size: 2rem;
    flex-shrink: 0;
    animation: pulseIcon 2s ease-in-out infinite;
}

@keyframes pulseIcon {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.1); opacity: 0.8; }
}

.lh-banner-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.lh-banner-text strong {
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.lh-connection-banner.weak .lh-banner-text strong {
    color: #fbbf24;
}

.lh-connection-banner.success .lh-banner-text strong {
    color: #10b981;
}

.lh-banner-text span {
    font-size: 0.875rem;
    color: #9ca3af;
    line-height: 1.4;
}

.lh-banner-close {
    background: transparent;
    border: none;
    color: #71717a;
    font-size: 1.75rem;
    font-weight: 300;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.lh-banner-close:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #fafafa;
    transform: rotate(90deg);
}

/* ==========================================
   OVERLAY ERRORE CONNESSIONE (Offline)
   ========================================== */

.lh-connection-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease;
}

.lh-connection-overlay.show {
    opacity: 1;
    pointer-events: all;
}

.lh-error-card {
    background: linear-gradient(135deg, #1a1a1a, #0f0f0f);
    border: 2px solid #ef4444;
    border-radius: 24px;
    padding: 3rem 2.5rem;
    max-width: 500px;
    width: 100%;
    text-align: center;
    box-shadow: 
        0 25px 80px rgba(239, 68, 68, 0.3),
        inset 0 0 60px rgba(239, 68, 68, 0.05);
    animation: errorCardEntrance 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes errorCardEntrance {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.lh-error-icon {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ef4444, #dc2626);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3.5rem;
    margin: 0 auto 2rem;
    box-shadow: 0 15px 40px rgba(239, 68, 68, 0.4);
    animation: iconPulse 2s ease-in-out infinite;
}

@keyframes iconPulse {
    0%, 100% {
        box-shadow: 0 15px 40px rgba(239, 68, 68, 0.4);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 20px 50px rgba(239, 68, 68, 0.6);
        transform: scale(1.05);
    }
}

.lh-error-title {
    font-size: 2rem;
    font-weight: 300;
    letter-spacing: 2px;
    color: #ef4444;
    margin-bottom: 1.25rem;
}

.lh-error-text {
    font-size: 1.05rem;
    line-height: 1.8;
    color: #9ca3af;
    margin-bottom: 2.5rem;
}

.lh-error-btn {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    border: none;
    color: #ffffff;
    padding: 1rem 2.5rem;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 10px 30px rgba(239, 68, 68, 0.3);
}

.lh-error-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 40px rgba(239, 68, 68, 0.5);
    background: linear-gradient(135deg, #dc2626, #b91c1c);
}

.lh-error-btn:active {
    transform: translateY(0);
}

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

@media (max-width: 768px) {
    .lh-connection-banner {
        top: 70px;
        width: 95%;
    }

    .lh-banner-content {
        padding: 1rem 1.25rem;
        gap: 0.75rem;
    }

    .lh-banner-icon {
        font-size: 1.5rem;
    }

    .lh-banner-text strong {
        font-size: 0.9rem;
    }

    .lh-banner-text span {
        font-size: 0.8rem;
    }

    .lh-banner-close {
        width: 28px;
        height: 28px;
        font-size: 1.5rem;
    }

    .lh-error-card {
        padding: 2rem 1.5rem;
    }

    .lh-error-icon {
        width: 70px;
        height: 70px;
        font-size: 2.5rem;
        margin-bottom: 1.5rem;
    }

    .lh-error-title {
        font-size: 1.5rem;
    }

    .lh-error-text {
        font-size: 0.95rem;
    }

    .lh-error-btn {
        padding: 0.85rem 2rem;
        font-size: 0.95rem;
    }
}
