/* PWA Install Button */
.pwa-install-btn {
    display: none;
    align-items: center;
    gap: 0.5rem;
    background: #42a5f5;
    color: white;
    border: none;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    margin-left: 1rem;
}

.pwa-install-btn:hover {
    background: #1976d2;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.pwa-install-btn svg {
    width: 16px;
    height: 16px;
}

/* PWA Update Notification */
.pwa-update-notification {
    position: fixed;
    top: -100px;
    left: 50%;
    transform: translateX(-50%);
    background: #16213e;
    color: white;
    padding: 1rem;
    border-radius: 0 0 12px 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    z-index: 10000;
    transition: top 0.3s ease;
    min-width: 300px;
    text-align: center;
}

.pwa-update-notification.show {
    top: 0;
}

.update-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.update-btn {
    background: #42a5f5;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background 0.3s ease;
}

.update-btn:hover {
    background: #1976d2;
}

.dismiss-btn {
    background: transparent;
    color: white;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.dismiss-btn:hover {
    opacity: 1;
}

/* Mobile responsiveness for PWA components */
@media (max-width: 768px) {
    .pwa-install-btn {
        font-size: 0.8rem;
        padding: 0.5rem 0.75rem;
        margin-left: 0.5rem;
    }
    
    .pwa-update-notification {
        min-width: 280px;
        margin: 0 1rem;
        width: calc(100% - 2rem);
    }
    
    .update-content {
        flex-direction: column;
        gap: 0.75rem;
        text-align: center;
    }
    
    .update-content span {
        font-size: 0.9rem;
    }
}

/* Hide install button when in standalone mode (already installed) */
@media (display-mode: standalone) {
    .pwa-install-btn {
        display: none !important;
    }
}

/* PWA splash screen simulation */
.pwa-splash {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: linear-gradient(135deg, #16213e 0%, #0f3460 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    color: white;
}

.pwa-splash .logo {
    width: 120px;
    height: 120px;
    margin-bottom: 2rem;
    animation: pulse 2s infinite;
}

.pwa-splash h1 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    text-align: center;
}

.pwa-splash p {
    font-size: 1rem;
    opacity: 0.8;
    text-align: center;
    max-width: 300px;
}

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

/* Hide splash screen after loading */
.pwa-splash.hidden {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease;
}
