/* =========================================
   PWA STYLES - Install Banners & Prompts
   ========================================= */

/* =========================================
   INSTALL BANNER
   ========================================= */
.pwa-banner {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 16px;
    padding: 16px 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4), 0 0 30px rgba(99, 102, 241, 0.15);
    z-index: 9999;
    max-width: 420px;
    width: calc(100% - 32px);
}

.pwa-banner.pwa-update {
    border-color: rgba(34, 197, 94, 0.3);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4), 0 0 30px rgba(34, 197, 94, 0.15);
}

.pwa-banner-content {
    display: flex;
    align-items: center;
    gap: 14px;
}

.pwa-banner-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #6366f1, #4f46e5);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.pwa-update .pwa-banner-icon {
    background: linear-gradient(135deg, #22c55e, #16a34a);
}

.pwa-banner-icon i {
    font-size: 1.4rem;
    color: white;
}

.pwa-banner-text {
    flex: 1;
    min-width: 0;
}

.pwa-banner-text strong {
    display: block;
    color: #f1f5f9;
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 2px;
}

.pwa-banner-text span {
    display: block;
    color: #94a3b8;
    font-size: 0.8rem;
}

.pwa-banner-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.pwa-btn-install {
    background: linear-gradient(135deg, #6366f1, #4f46e5);
    color: white;
    border: none;
    padding: 10px 16px;
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
}

.pwa-btn-install:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}

.pwa-update .pwa-btn-install {
    background: linear-gradient(135deg, #22c55e, #16a34a);
}

.pwa-update .pwa-btn-install:hover {
    box-shadow: 0 4px 15px rgba(34, 197, 94, 0.4);
}

.pwa-btn-close {
    background: transparent;
    border: none;
    color: #64748b;
    font-size: 1.1rem;
    cursor: pointer;
    padding: 8px;
    transition: color 0.2s;
}

.pwa-btn-close:hover {
    color: #94a3b8;
}

/* =========================================
   NOTIFICATION PROMPT
   ========================================= */
.pwa-notification-prompt {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    border: 1px solid rgba(251, 191, 36, 0.3);
    border-radius: 20px;
    padding: 28px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 40px rgba(251, 191, 36, 0.1);
    z-index: 10000;
    max-width: 380px;
    width: calc(100% - 32px);
    text-align: center;
}

.pwa-prompt-icon {
    width: 72px;
    height: 72px;
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    animation: bell-swing 2s ease-in-out infinite;
}

@keyframes bell-swing {

    0%,
    100% {
        transform: rotate(0deg);
    }

    10%,
    30% {
        transform: rotate(-10deg);
    }

    20%,
    40% {
        transform: rotate(10deg);
    }

    50% {
        transform: rotate(0deg);
    }
}

.pwa-prompt-icon i {
    font-size: 2rem;
    color: white;
}

.pwa-prompt-text h4 {
    color: #f1f5f9;
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.pwa-prompt-text p {
    color: #94a3b8;
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 24px;
}

.pwa-prompt-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.pwa-btn-allow {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: #0f172a;
    border: none;
    padding: 14px 24px;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.pwa-btn-allow:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(251, 191, 36, 0.4);
}

.pwa-btn-deny {
    background: transparent;
    color: #64748b;
    border: 1px solid #334155;
    padding: 12px 24px;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.pwa-btn-deny:hover {
    background: #1e293b;
    color: #94a3b8;
}

/* =========================================
   INSTALL NAV BUTTON
   ========================================= */
.pwa-install-nav {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.15), rgba(99, 102, 241, 0.05)) !important;
    border: 1px dashed rgba(99, 102, 241, 0.4) !important;
    color: #818cf8 !important;
    margin-bottom: 12px !important;
}

.pwa-install-nav:hover {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.25), rgba(99, 102, 241, 0.1)) !important;
    border-style: solid !important;
}

/* =========================================
   ANIMATIONS
   ========================================= */
.animate-fade-in-up {
    animation: fadeInUp 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.animate-fade-out {
    animation: fadeOut 0.3s ease-out forwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }

    to {
        opacity: 0;
    }
}

/* =========================================
   LIGHT MODE
   ========================================= */
[data-theme="light"] .pwa-banner {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border-color: rgba(99, 102, 241, 0.2);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1), 0 0 30px rgba(99, 102, 241, 0.08);
}

[data-theme="light"] .pwa-banner-text strong {
    color: #1e293b;
}

[data-theme="light"] .pwa-banner-text span {
    color: #64748b;
}

[data-theme="light"] .pwa-notification-prompt {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

[data-theme="light"] .pwa-prompt-text h4 {
    color: #1e293b;
}

[data-theme="light"] .pwa-prompt-text p {
    color: #64748b;
}

[data-theme="light"] .pwa-btn-deny {
    border-color: #e2e8f0;
    color: #64748b;
}

[data-theme="light"] .pwa-btn-deny:hover {
    background: #f1f5f9;
}

/* =========================================
   RESPONSIVE
   ========================================= */
@media (max-width: 480px) {
    .pwa-banner {
        bottom: 80px;
        padding: 14px 16px;
    }

    .pwa-banner-content {
        flex-wrap: wrap;
    }

    .pwa-banner-actions {
        width: 100%;
        justify-content: center;
        margin-top: 10px;
    }

    .pwa-btn-install {
        flex: 1;
        justify-content: center;
    }
}