/* PWA Components Styles */

/* ==================== INSTALL BUTTON ==================== */

.pwa-install-btn {
    position: fixed;
    bottom: calc(var(--nav-height) + 30px + var(--safe-area-inset-bottom));
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
    
    padding: 14px 24px;
    border: none;
    border-radius: 50px;
    
    display: flex;
    align-items: center;
    gap: 10px;
    
    font-family: 'Outfit', sans-serif;
    font-size: 0.9rem;
    font-weight: 700;
    
    box-shadow: 0 10px 30px rgba(59, 130, 246, 0.4);
    cursor: pointer;
    
    z-index: 9998;
    
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0;
}

.pwa-install-btn.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.pwa-install-btn:hover {
    transform: translateX(-50%) translateY(-3px);
    box-shadow: 0 12px 35px rgba(59, 130, 246, 0.5);
}

.pwa-install-btn:active {
    transform: translateX(-50%) translateY(-1px);
}

.pwa-install-btn i {
    font-size: 1.1rem;
}

/* ==================== UPDATE TOAST ==================== */

.pwa-update-toast {
    position: fixed;
    bottom: 20px;
    left: 20px;
    right: 20px;
    max-width: 500px;
    margin: 0 auto;
    
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-left: 4px solid #3b82f6;
    border-radius: 16px;
    
    padding: 16px 20px;
    
    display: flex;
    align-items: center;
    gap: 15px;
    
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    
    z-index: 9999;
    
    opacity: 0;
    transform: translateY(100px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.pwa-update-toast.show {
    opacity: 1;
    transform: translateY(0);
}

.update-content {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 15px;
}

.update-content > i {
    font-size: 2rem;
    color: #3b82f6;
    flex-shrink: 0;
}

.update-text strong {
    display: block;
    color: #f8fafc;
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.update-text p {
    color: #94a3b8;
    font-size: 0.85rem;
    margin: 0;
}

.btn-update {
    padding: 10px 20px;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
    border: none;
    border-radius: 10px;
    font-family: 'Outfit', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
}

.btn-update:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
}

.btn-close {
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: #94a3b8;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
}

.btn-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #f8fafc;
}

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

@media (max-width: 640px) {
    .pwa-install-btn {
        bottom: calc(var(--nav-height) + 20px + var(--safe-area-inset-bottom));
        padding: 12px 20px;
        font-size: 0.85rem;
    }
    
    .pwa-update-toast {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }
    
    .update-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .btn-update {
        width: 100%;
    }
    
    .btn-close {
        position: absolute;
        top: 16px;
        right: 16px;
    }
}

/* ==================== OFFLINE INDICATOR ==================== */

.offline-indicator {
    position: fixed;
    top: 10px;
    left: 50%;
    transform: translateX(-50%) translateY(-100px);
    
    background: rgba(239, 68, 68, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    
    color: white;
    padding: 10px 20px;
    border-radius: 20px;
    
    font-size: 0.85rem;
    font-weight: 600;
    
    display: flex;
    align-items: center;
    gap: 8px;
    
    box-shadow: 0 4px 20px rgba(239, 68, 68, 0.3);
    
    z-index: 10000;
    
    transition: transform 0.3s ease;
}

.offline-indicator.show {
    transform: translateX(-50%) translateY(0);
}

.offline-indicator i {
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}
