/* PWA Specific Styles */



#install-button {
    display: none;
    position: relative;
    overflow: hidden;
    border: none;
    background: linear-gradient(45deg, #007bff, #0056b3);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.3);
}

#install-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.4);
    background: linear-gradient(45deg, #0056b3, #003d82);
}

#install-button:active {
    transform: translateY(0);
}

#install-button.installing {
    pointer-events: none;
    opacity: 0.7;
}

/* Connection Status Styles */
.connection-status-container {
    display: flex;
    align-items: center;
}

#connection-status {
    font-size: 10px;
    padding: 4px 8px;
    border-radius: 12px;
    font-weight: 500;
    transition: all 0.3s ease;
}

#connection-status.online {
    background-color: #28a745 !important;
    color: white;
}

#connection-status.offline {
    background-color: #dc3545 !important;
    color: white;
    animation: blink 1s infinite;
}

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

/* PWA Standalone Mode Styles */
.pwa-standalone {
    /* Adjustments for standalone mode */
}

.pwa-standalone .app-header {
    /* Add extra padding for status bar */
    padding-top: env(safe-area-inset-top);
}

.pwa-standalone .d-none-standalone {
    display: none !important;
}

.pwa-browser .d-none-browser {
    display: none !important;
}

/* PWA Splash Screen Styles */
.pwa-splash {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #007bff, #0056b3);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    color: white;
}

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

.pwa-splash .loading {
    font-size: 18px;
    margin-top: 20px;
}

.pwa-splash .spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-top: 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* PWA Update Available Banner */
.pwa-update-banner {
    position: fixed;
    bottom: 20px;
    left: 20px;
    right: 20px;
    background: #007bff;
    color: white;
    padding: 16px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: none;
    z-index: 1000;
}

.pwa-update-banner.show {
    display: block;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.pwa-update-banner .update-message {
    margin-bottom: 12px;
    font-weight: 500;
}

.pwa-update-banner .update-actions {
    display: flex;
    gap: 12px;
}

.pwa-update-banner button {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.pwa-update-banner .btn-update {
    background: white;
    color: #007bff;
}

.pwa-update-banner .btn-update:hover {
    background: #f8f9fa;
}

.pwa-update-banner .btn-dismiss {
    background: transparent;
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.5);
}

.pwa-update-banner .btn-dismiss:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    
    
    #install-button {
        font-size: 11px;
        padding: 6px 12px;
    }
    
    #connection-status {
        font-size: 9px;
        padding: 2px 6px;
    }
    
    .pwa-update-banner {
        bottom: 10px;
        left: 10px;
        right: 10px;
        padding: 12px;
    }
}

/* Offline Indicator */
.offline-indicator {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: #dc3545;
    color: white;
    text-align: center;
    padding: 8px;
    font-size: 14px;
    z-index: 1001;
    transform: translateY(-100%);
    transition: transform 0.3s ease;
}

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

/* PWA App Icon Badge */
.pwa-app-badge {
    position: relative;
}

.pwa-app-badge::after {
    content: 'PWA';
    position: absolute;
    top: -8px;
    right: -8px;
    background: #28a745;
    color: white;
    font-size: 8px;
    padding: 2px 4px;
    border-radius: 8px;
    font-weight: bold;
} 