/* Progressive Web App Styles */

/* Install Button */
#install-button {
    display: none;
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: #10b981;
    color: white;
    border: none;
    border-radius: 50px;
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
    z-index: 1000;
    transition: all 0.3s ease;
}

#install-button:hover {
    background-color: #059669;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(16, 185, 129, 0.4);
}

#install-button:active {
    transform: translateY(0);
}

/* Offline Indicator */
#offline-indicator {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background-color: #f59e0b;
    color: white;
    text-align: center;
    padding: 8px;
    font-size: 14px;
    font-weight: 500;
    z-index: 1001;
}

#offline-indicator.show {
    display: block;
}

/* Status Messages */
#status-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1002;
}

.status-message {
    padding: 12px 20px;
    border-radius: 8px;
    margin-bottom: 10px;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    animation: slideIn 0.3s ease;
}

.status-success {
    background-color: #10b981;
    color: white;
}

.status-warning {
    background-color: #f59e0b;
    color: white;
}

.status-error {
    background-color: #ef4444;
    color: white;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Update Notification */
.update-notification {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background-color: #3b82f6;
    color: white;
    padding: 16px;
    text-align: center;
    z-index: 1003;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.update-content h3 {
    margin: 0 0 8px 0;
    font-size: 18px;
    font-weight: 600;
}

.update-content p {
    margin: 0 0 16px 0;
    font-size: 14px;
    opacity: 0.9;
}

.update-content button {
    margin: 0 8px;
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.update-content .btn-primary {
    background-color: white;
    color: #3b82f6;
}

.update-content .btn-primary:hover {
    background-color: #f8fafc;
}

.update-content .btn-secondary {
    background-color: transparent;
    color: white;
    border: 1px solid white;
}

.update-content .btn-secondary:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

/* PWA-specific styles for mobile */
@media (max-width: 768px) {
    #install-button {
        bottom: 80px;
        right: 16px;
        padding: 10px 16px;
        font-size: 13px;
    }
    
    #status-container {
        top: 16px;
        right: 16px;
        left: 16px;
    }
    
    .status-message {
        padding: 10px 16px;
        font-size: 13px;
    }
}

/* Safe area handling for devices with notches */
@supports (padding: max(0px)) {
    #install-button {
        bottom: max(20px, env(safe-area-inset-bottom));
        right: max(20px, env(safe-area-inset-right));
    }
    
    #offline-indicator {
        padding-top: max(8px, env(safe-area-inset-top));
    }
    
    .update-notification {
        padding-top: max(16px, env(safe-area-inset-top));
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .status-message {
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    }
    
    .update-notification {
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    #install-button,
    .status-message,
    .update-content button {
        transition: none;
    }
    
    .status-message {
        animation: none;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    #install-button {
        border: 2px solid white;
    }
    
    .status-message {
        border: 1px solid currentColor;
    }
    
    .update-content .btn-secondary {
        border-width: 2px;
    }
}


