/* PWA Install Popup Modal */
#pwa-install-popup {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

#pwa-install-popup.show {
    opacity: 1;
    visibility: visible;
}

#pwa-install-popup.show .pwa-popup-content {
    transform: scale(1);
}

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

.pwa-popup-content {
    position: relative;
    background: white;
    border-radius: 16px;
    padding: 32px;
    max-width: 420px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transform: scale(0.9);
    transition: transform 0.3s ease;
    text-align: center;
}

.pwa-popup-close {
    position: absolute;
    top: 12px;
    right: 12px;
    background: transparent;
    border: none;
    font-size: 28px;
    color: #999;
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.pwa-popup-close:hover {
    background: #f0f0f0;
    color: #333;
}

.pwa-popup-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.3);
}

.pwa-popup-icon svg {
    color: white;
}

.pwa-popup-title {
    font-size: 24px;
    font-weight: 700;
    color: #333;
    margin: 0 0 12px 0;
}

.pwa-popup-description {
    font-size: 15px;
    color: #666;
    line-height: 1.6;
    margin: 0 0 20px 0;
}

.pwa-popup-features {
    list-style: none;
    padding: 0;
    margin: 0 0 24px 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    text-align: left;
}

.pwa-popup-features li {
    font-size: 14px;
    color: #28a745;
    font-weight: 500;
}

.pwa-popup-actions {
    display: flex;
    gap: 12px;
    flex-direction: column;
}

.pwa-popup-install {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.pwa-popup-install:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

.pwa-popup-install:active {
    transform: translateY(0);
}

.pwa-popup-install svg {
    flex-shrink: 0;
}

.pwa-popup-later {
    padding: 12px 24px;
    background: transparent;
    color: #666;
    border: 2px solid #ddd;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.pwa-popup-later:hover {
    background: #f8f8f8;
    border-color: #ccc;
}

/* Success Notification */
#pwa-success-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10001;
    background: white;
    padding: 16px 20px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    animation: slideInRight 0.3s ease;
}

#pwa-success-notification.fade-out {
    animation: slideOutRight 0.3s ease forwards;
}

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

.pwa-success-content svg {
    color: #28a745;
    flex-shrink: 0;
}

.pwa-success-content span {
    color: #333;
    font-size: 14px;
    font-weight: 500;
}

@keyframes slideInRight {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(400px);
        opacity: 0;
    }
}

/* PWA Update Banner */
#pwa-update-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 12px 20px;
    z-index: 10000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    animation: slideDown 0.3s ease;
}

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

.pwa-update-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    max-width: 1200px;
    margin: 0 auto;
}

.pwa-update-content span {
    font-weight: 500;
}

.pwa-update-button {
    padding: 6px 16px;
    background: white;
    color: #667eea;
    border: none;
    border-radius: 20px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.pwa-update-button:hover {
    background: #f0f0f0;
    transform: scale(1.05);
}

.pwa-dismiss-button {
    padding: 4px 8px;
    background: transparent;
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    transition: all 0.2s ease;
}

.pwa-dismiss-button:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
}

/* PWA Installed State - adds class to body when running as installed app */

/* Responsive adjustments */
@media (max-width: 768px) {
    #pwa-update-banner {
        padding: 10px 15px;
    }

    .pwa-update-content {
        flex-wrap: wrap;
        gap: 10px;
        font-size: 14px;
    }

    .pwa-popup-content {
        padding: 24px 20px;
        max-width: 360px;
    }

    .pwa-popup-icon {
        width: 64px;
        height: 64px;
    }

    .pwa-popup-icon svg {
        width: 36px;
        height: 36px;
    }

    .pwa-popup-title {
        font-size: 20px;
    }

    .pwa-popup-description {
        font-size: 14px;
    }

    .pwa-popup-features {
        gap: 10px;
    }

    #pwa-success-notification {
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    .pwa-popup-content {
        padding: 20px 16px;
        max-width: 320px;
    }

    .pwa-popup-features {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .pwa-popup-icon {
        width: 56px;
        height: 56px;
        border-radius: 16px;
    }

    .pwa-popup-icon svg {
        width: 32px;
        height: 32px;
    }

    .pwa-popup-title {
        font-size: 18px;
    }

    .pwa-popup-install {
        font-size: 15px;
        padding: 12px 20px;
    }

    .pwa-success-content span {
        font-size: 13px;
    }
}
