/* Network Detector Styles */

/* 1. Offline Fullscreen Glassmorphism Modal Overlay */
#network-offline-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

#network-offline-overlay.active {
    opacity: 1;
    visibility: visible;
}

.network-offline-card {
    background: #ffffff;
    border-radius: 20px;
    padding: 40px 30px;
    max-width: 460px;
    width: 100%;
    text-align: center;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(229, 231, 235, 0.5);
    animation: offlineCardPop 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes offlineCardPop {
    0% { transform: scale(0.9); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

.network-offline-icon-box {
    width: 80px;
    height: 80px;
    margin: 0 auto 24px;
    background: #fee2e2;
    color: #ef4444;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    box-shadow: 0 0 0 10px rgba(239, 68, 68, 0.1);
    animation: offlinePulse 2s infinite;
}

.network-offline-card.restored .network-offline-icon-box {
    background: #dcfce7;
    color: #16a34a;
    box-shadow: 0 0 0 10px rgba(22, 163, 74, 0.1);
    animation: none;
}

@keyframes offlinePulse {
    0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4); }
    70% { box-shadow: 0 0 0 16px rgba(239, 68, 68, 0); }
    100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

.network-offline-title {
    font-size: 22px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 12px;
    line-height: 1.3;
}

.network-offline-msg {
    font-size: 14px;
    color: #64748b;
    margin-bottom: 28px;
    line-height: 1.6;
}

.network-offline-btn {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    color: #ffffff;
    border: none;
    padding: 12px 28px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.25);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.network-offline-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.35);
    color: #ffffff;
}

/* 2. Slow Internet Warning Top Banner */
#network-slow-banner {
    position: fixed;
    top: -70px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 999998;
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-left: 5px solid #f59e0b;
    border-radius: 12px;
    padding: 12px 20px;
    box-shadow: 0 10px 25px -5px rgba(245, 158, 11, 0.25);
    display: flex;
    align-items: center;
    gap: 14px;
    transition: top 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    max-width: 90%;
    width: 480px;
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;
}

#network-slow-banner.active {
    top: 20px;
}

.network-slow-icon {
    font-size: 22px;
    color: #d97706;
}

.network-slow-text {
    font-size: 13px;
    font-weight: 600;
    color: #92400e;
    flex: 1;
    line-height: 1.4;
}

.network-slow-close {
    background: transparent;
    border: none;
    color: #b45309;
    font-size: 18px;
    cursor: pointer;
    padding: 0 4px;
    line-height: 1;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.network-slow-close:hover {
    opacity: 1;
}
