/* PWA-specific styles */

/* Update notification */
.update-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 16px 20px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    z-index: 1001;
    animation: slideIn 0.3s ease-out;
}

.update-notification .update-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.update-notification button {
    background: white;
    color: #667eea;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.update-notification button:hover {
    background: #f8f9fa;
    transform: translateY(-1px);
}

.update-notification button:last-child {
    background: transparent;
    color: white;
    border: 1px solid rgba(255,255,255,0.3);
}

.update-notification button:last-child:hover {
    background: rgba(255,255,255,0.1);
}

/* Offline indicator */
.offline-indicator {
    position: fixed;
    bottom: 20px;
    left: 20px;
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    z-index: 1000;
    animation: slideIn 0.3s ease-out;
}

/* Install button */
.install-pwa-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    display: none;
    z-index: 1000;
    transition: all 0.2s;
}

/* Install banner - always visible */
.install-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 12px 20px;
    text-align: center;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    z-index: 1002;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.install-banner-btn {
    background: rgba(255,255,255,0.2);
    color: white;
    border: 1px solid rgba(255,255,255,0.3);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.install-banner-btn:hover {
    background: rgba(255,255,255,0.3);
    transform: translateY(-1px);
}

.install-banner-close {
    background: none;
    border: none;
    color: white;
    font-size: 18px;
    cursor: pointer;
    padding: 4px;
    margin-left: 10px;
}

.install-banner-close:hover {
    opacity: 0.8;
}

/* Adjust top navigation when install banner is visible */
.has-install-banner .top-nav {
    top: 50px;
}

.has-install-banner .progress-banner {
    top: 50px;
}

.has-install-banner .sidebar {
    top: 50px;
    height: calc(100vh - 50px);
}

.install-pwa-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(0,0,0,0.2);
}

.install-pwa-btn:active {
    transform: translateY(0);
}

/* PWA mode adjustments */
.pwa-mode .top-nav {
    padding-top: env(safe-area-inset-top);
}

.pwa-mode .main-content {
    padding-bottom: env(safe-area-inset-bottom);
}

/* Offline mode styles */
.offline .progress-banner {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.offline .progress-banner:before {
    content: "📡 ";
}

/* Animations */
@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

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

/* Mobile PWA optimizations */
@media (max-width: 768px) {
    .update-notification {
        top: 10px;
        right: 10px;
        left: 10px;
    }
    
    .install-pwa-btn {
        bottom: 10px;
        right: 10px;
    }
    
    .offline-indicator {
        bottom: 10px;
        left: 10px;
    }
}

/* Splash screen support */
.splash-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    color: white;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.splash-screen .splash-content {
    text-align: center;
    animation: fadeIn 0.5s ease-out;
}

.splash-screen .splash-icon {
    font-size: 60px;
    margin-bottom: 20px;
}

.splash-screen .splash-title {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 8px;
}

.splash-screen .splash-subtitle {
    font-size: 16px;
    opacity: 0.9;
}

/* Hide splash screen when loaded */
.splash-screen.hidden {
    display: none;
}