/* PWA Install Banner & Modal Styles */

/* Install Banner - Always visible at bottom */
.pwa-install-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #0d6efd 0%, #6610f2 100%);
    color: white;
    padding: 12px 20px;
    display: none;
    align-items: center;
    justify-content: space-between;
    z-index: 9999;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
    animation: slideUp 0.3s ease-out;
}

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

.pwa-install-banner .banner-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.pwa-install-banner .banner-icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.pwa-install-banner .banner-icon img {
    width: 36px;
    height: 36px;
    border-radius: 6px;
}

.pwa-install-banner .banner-text {
    flex: 1;
}

.pwa-install-banner .banner-title {
    font-size: 16px;
    font-weight: 700;
    margin: 0 0 2px 0;
}

.pwa-install-banner .banner-subtitle {
    font-size: 13px;
    opacity: 0.9;
    margin: 0;
}

.pwa-install-banner .banner-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.pwa-install-banner .btn-install {
    background: white;
    color: #0d6efd;
    border: none;
    padding: 10px 24px;
    border-radius: 25px;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.pwa-install-banner .btn-install:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.pwa-install-banner .btn-close-banner {
    background: transparent;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 5px;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.pwa-install-banner .btn-close-banner:hover {
    opacity: 1;
}

/* Mobile adjustments for banner */
@media (max-width: 576px) {
    .pwa-install-banner {
        padding: 10px 15px;
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .pwa-install-banner .banner-content {
        flex: 1;
    }
    
    .pwa-install-banner .banner-icon {
        width: 40px;
        height: 40px;
    }
    
    .pwa-install-banner .banner-icon img {
        width: 30px;
        height: 30px;
    }
    
    .pwa-install-banner .banner-title {
        font-size: 14px;
    }
    
    .pwa-install-banner .banner-subtitle {
        font-size: 11px;
    }
    
    .pwa-install-banner .btn-install {
        padding: 8px 16px;
        font-size: 13px;
    }
}

/* Install Modal */
#install-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.2s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.install-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
}

.install-modal-content {
    position: relative;
    background: white;
    border-radius: 20px;
    padding: 30px;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        transform: translateY(30px) scale(0.95);
        opacity: 0;
    }
    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

.install-modal-content h3 {
    margin: 0 0 20px 0;
    font-size: 20px;
    color: #333;
    text-align: center;
}

.install-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: #f0f0f0;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    transition: all 0.2s;
}

.install-modal-close:hover {
    background: #e0e0e0;
    color: #333;
}

.install-steps {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 20px;
}

.install-step {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 12px;
}

.step-num {
    background: linear-gradient(135deg, #0d6efd 0%, #6610f2 100%);
    color: white;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    flex-shrink: 0;
}

.install-step span:last-child {
    flex: 1;
    font-size: 14px;
    color: #444;
    line-height: 1.5;
}

.install-note {
    text-align: center;
    color: #28a745;
    font-size: 14px;
    margin: 0;
    padding: 12px;
    background: #e8f5e9;
    border-radius: 10px;
}

/* RTL Support */
[dir="rtl"] .install-modal-close {
    right: auto;
    left: 15px;
}

[dir="rtl"] .install-step {
    text-align: right;
}

/* Floating Install Button - Alternative style */
.pwa-floating-btn {
    position: fixed;
    bottom: 80px;
    right: 20px;
    background: linear-gradient(135deg, #0d6efd 0%, #6610f2 100%);
    color: white;
    border: none;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(13, 110, 253, 0.4);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9998;
    transition: all 0.3s;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 4px 20px rgba(13, 110, 253, 0.4); }
    50% { box-shadow: 0 4px 30px rgba(13, 110, 253, 0.6); }
    100% { box-shadow: 0 4px 20px rgba(13, 110, 253, 0.4); }
}

.pwa-floating-btn:hover {
    transform: scale(1.1);
}

.pwa-floating-btn i {
    font-size: 24px;
}

[dir="rtl"] .pwa-floating-btn {
    right: auto;
    left: 20px;
}
