/* PWA Specific Styles */

/* Hide install button when in PWA mode */
.pwa-mode .install-prompt {
    display: none !important;
}

/* PWA Status Bar Styling */
.pwa-mode {
    padding-top: env(safe-area-inset-top);
    padding-bottom: env(safe-area-inset-bottom);
}

/* Offline Indicator */
.offline {
    filter: grayscale(0.5);
}

.offline::before {
    content: "🔌 وضع عدم الاتصال";
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: #dc3545;
    color: white;
    text-align: center;
    padding: 8px;
    font-size: 14px;
    z-index: 9999;
}

/* PWA Install Button Animation */
@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.install-banner {
    animation: slideInRight 0.5s ease-out;
}

/* PWA Loading States */
.pwa-loading {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 20px;
    border-radius: 10px;
    z-index: 9999;
}

/* PWA Splash Screen Style */
.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: 10000;
    color: white;
}

.pwa-splash-logo {
    width: 120px;
    height: 120px;
    margin-bottom: 20px;
    animation: bounce 1s infinite;
}

.pwa-splash-text {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 10px;
}

.pwa-splash-subtitle {
    font-size: 16px;
    opacity: 0.8;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

/* PWA Update Banner */
.pwa-update-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #007bff;
    color: white;
    padding: 15px;
    text-align: center;
    transform: translateY(100%);
    transition: transform 0.3s ease;
    z-index: 9998;
}

.pwa-update-banner.show {
    transform: translateY(0);
}

.pwa-update-banner button {
    background: white;
    color: #007bff;
    border: none;
    padding: 8px 16px;
    border-radius: 5px;
    margin-left: 10px;
    cursor: pointer;
}

/* Mobile App Bar */
.pwa-mode .navbar {
    position: sticky;
    top: 0;
    z-index: 1000;
}

/* Full Screen Button for PWA */
.fullscreen-btn {
    position: fixed;
    top: 10px;
    left: 10px;
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: none;
    z-index: 1001;
}

.pwa-mode .fullscreen-btn {
    display: block;
}

/* Responsive PWA Adjustments */
@media (max-width: 768px) {
    .pwa-mode .container {
        padding-left: 10px;
        padding-right: 10px;
    }
    
    .pwa-mode .navbar-brand {
        font-size: 18px;
    }
}

/* PWA Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .pwa-mode {
        background-color: #1a1a1a;
        color: #ffffff;
    }
    
    .pwa-mode .card {
        background-color: #2d2d2d;
        border-color: #444;
    }
    
    .pwa-mode .navbar {
        background-color: #2d2d2d !important;
    }
}
