/**
 * PWA Styles
 * Styles for install button, toast notifications, and offline indicator
 */

/* Install Button */
.pwa-install-button {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: var(--gradient-primary);
    color: white;
    border: none;
    padding: 15px 25px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    box-shadow: 0 5px 25px rgba(40, 116, 166, 0.4);
    z-index: 9999;
    opacity: 0;
    transform: translateY(100px);
    transition: all 0.3s ease;
}

.pwa-install-button.show {
    opacity: 1;
    transform: translateY(0);
}

.pwa-install-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(40, 116, 166, 0.5);
}

.pwa-install-button:active {
    transform: translateY(-1px);
}

/* Toast Notifications */
.pwa-toast {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(150px);
    background: white;
    color: #2C3E50;
    padding: 15px 25px;
    border-radius: 10px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.15);
    z-index: 10000;
    opacity: 0;
    transition: all 0.3s ease;
    max-width: 90%;
    text-align: center;
    font-weight: 500;
}

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

.pwa-toast-success {
    border-left: 4px solid #27AE60;
}

.pwa-toast-warning {
    border-left: 4px solid #F39C12;
}

.pwa-toast-error {
    border-left: 4px solid #E74C3C;
}

.pwa-toast-info {
    border-left: 4px solid #3498DB;
}

/* Offline Indicator */
body.offline::before {
    content: "You are offline";
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: #E74C3C;
    color: white;
    text-align: center;
    padding: 10px;
    z-index: 99999;
    font-weight: 600;
    font-size: 14px;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
    }

    to {
        transform: translateY(0);
    }
}

/* PWA Mode Adjustments */
body.pwa-mode {
    padding-top: env(safe-area-inset-top);
    padding-bottom: env(safe-area-inset-bottom);
}

/* Splash Screen (iOS) */
@media (display-mode: standalone) {
    body {
        user-select: none;
        -webkit-user-select: none;
        -webkit-touch-callout: none;
    }
}

/* Mobile Install Button Adjustments */
@media (max-width: 768px) {
    .pwa-install-button {
        bottom: 15px;
        right: 15px;
        left: 15px;
        font-size: 14px;
        padding: 12px 20px;
    }

    .pwa-toast {
        bottom: 15px;
        padding: 12px 20px;
        font-size: 14px;
    }
}