/* PWA Specific Styles */
.pwa-install-btn {
    position: fixed;
    bottom: 100px;
    right: 20px;
    background: #007bff;
    color: white;
    border: none;
    border-radius: 25px;
    padding: 12px 20px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.3);
    z-index: 1000;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.pwa-install-btn:hover {
    background: #0056b3;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 123, 255, 0.4);
}

/* Toast notifications */
.pwa-toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #1a1a1a;
    color: white;
    padding: 12px 20px;
    border-radius: 8px;
    border: 1px solid #333;
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 1001;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    animation: slideInRight 0.3s ease;
}

.pwa-toast-success {
    border-left: 4px solid #00d26a;
}

.pwa-toast-warning {
    border-left: 4px solid #ffa502;
}

.pwa-toast-info {
    border-left: 4px solid #007bff;
}

.pwa-update-toast {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: #1a1a1a;
    color: white;
    padding: 15px 20px;
    border-radius: 8px;
    border: 1px solid #333;
    z-index: 1001;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.update-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.update-btn {
    background: #007bff;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 600;
}

.update-btn:hover {
    background: #0056b3;
}

/* Offline indicator */
.offline-indicator {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: #ff4757;
    color: white;
    text-align: center;
    padding: 10px;
    font-size: 0.9rem;
    font-weight: 600;
    z-index: 2000;
    display: none;
}

.offline .offline-indicator {
    display: block;
}

/* Standalone mode adjustments */
.pwa-standalone .mobile-top-bar {
    padding-top: env(safe-area-inset-top);
}

.pwa-standalone .mobile-nav {
    padding-bottom: env(safe-area-inset-bottom);
}

/* Safe area support */
@supports(padding: max(0px)) {
    .pwa-standalone .mobile-top-bar {
        padding-top: max(20px, env(safe-area-inset-top));
    }
    
    .pwa-standalone .mobile-nav {
        padding-bottom: max(20px, env(safe-area-inset-bottom));
    }
}

/* Animations */
@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Responsive PWA buttons */
@media (max-width: 768px) {
    .pwa-install-btn {
        bottom: 80px;
        right: 15px;
        padding: 10px 16px;
        font-size: 0.8rem;
    }
    
    .pwa-toast {
        top: 10px;
        right: 10px;
        left: 10px;
    }
    
    .pwa-update-toast {
        left: 10px;
        right: 10px;
        transform: none;
    }
}

/* PWA Install Button */
.pwa-install-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: linear-gradient(135deg, #4CAF50, #45a049);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 50px;
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
    cursor: pointer;
    z-index: 10000;
    display: none;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
}

.pwa-install-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.4);
}

/* PWA Toasts */
.pwa-toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background: white;
    color: #333;
    padding: 15px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    z-index: 10001;
    display: flex;
    align-items: center;
    gap: 10px;
    max-width: 300px;
    animation: slideInRight 0.3s ease;
}

.pwa-toast-success {
    border-left: 4px solid #4CAF50;
}

.pwa-toast-warning {
    border-left: 4px solid #ff9800;
}

.pwa-toast-error {
    border-left: 4px solid #f44336;
}

.pwa-toast-info {
    border-left: 4px solid #2196F3;
}

/* PWA Update Toast */
.pwa-update-toast {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: white;
    padding: 15px 20px;
    border-radius: 8px;
    z-index: 10002;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.update-content {
    display: flex;
    align-items: center;
    gap: 10px;
}

.update-btn {
    background: #4CAF50;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
}

/* Offline State */
body.offline::before {
    content: "⚠️ Offline";
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: #ff9800;
    color: white;
    text-align: center;
    padding: 5px;
    font-size: 12px;
    z-index: 9999;
}

/* Standalone Mode Adjustments */
body.pwa-standalone {
    padding-top: env(safe-area-inset-top);
    padding-bottom: env(safe-area-inset-bottom);
}

/* Animations */
@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .pwa-install-btn {
        bottom: 10px;
        right: 10px;
        left: 10px;
        justify-content: center;
    }
    
    .pwa-toast {
        left: 10px;
        right: 10px;
        max-width: none;
    }
}