/* PWA Install Modal Styles */

.pwa-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.pwa-modal-show {
    animation: modalShow 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes modalShow {
    from {
        transform: scale(0.9) translateY(20px);
        opacity: 0;
    }

    to {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

.pwa-modal-content {
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 420px;
    width: 100%;
    overflow: hidden;
    animation: slideUp 0.4s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(40px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.pwa-modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    background: none;
    border: none;
    font-size: 28px;
    color: #999;
    cursor: pointer;
    padding: 0;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
    z-index: 1;
}

.pwa-modal-close:hover {
    background: #f0f0f0;
    color: #333;
}

.pwa-modal-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 40px 20px;
    text-align: center;
    position: relative;
}

.pwa-modal-icon {
    width: 80px;
    height: 80px;
    border-radius: 20px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    animation: iconBounce 0.6s ease;
}

@keyframes iconBounce {
    0% {
        transform: scale(0.8) translateY(10px);
        opacity: 0;
    }

    50% {
        transform: scale(1.05);
    }

    100% {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

.pwa-modal-body {
    padding: 30px 24px;
    text-align: center;
}

.pwa-modal-body h2 {
    font-size: 22px;
    font-weight: 700;
    color: #222;
    margin: 0 0 12px 0;
    line-height: 1.3;
}

.pwa-modal-body p {
    font-size: 14px;
    color: #666;
    margin: 0 0 24px 0;
    line-height: 1.6;
}

.pwa-features {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin: 0;
}

.pwa-feature {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 12px;
    background: #f8f9ff;
    border-radius: 12px;
    border: 1px solid #e3e8f3;
    transition: all 0.2s ease;
}

.pwa-feature:hover {
    background: #f0f4ff;
    border-color: #667eea;
    transform: translateY(-2px);
}

.pwa-feature-icon {
    font-size: 24px;
    margin-bottom: 6px;
    display: block;
}

.pwa-feature-text {
    font-size: 12px;
    color: #555;
    font-weight: 500;
    line-height: 1.3;
}

.pwa-modal-footer {
    padding: 16px 24px 24px 24px;
    display: flex;
    gap: 12px;
    justify-content: center;
}

.pwa-btn-primary,
.pwa-btn-secondary {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    flex: 1;
    max-width: 180px;
}

.pwa-btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.pwa-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.pwa-btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(102, 126, 234, 0.3);
}

.pwa-btn-secondary {
    background: #f0f0f0;
    color: #333;
    border: 1px solid #e0e0e0;
}

.pwa-btn-secondary:hover {
    background: #e8e8e8;
    border-color: #ccc;
}

.pwa-btn-secondary:active {
    background: #ddd;
}

/* Responsive Design */
@media (max-width: 480px) {
    .pwa-modal {
        padding: 16px;
    }

    .pwa-modal-content {
        max-width: 100%;
    }

    .pwa-modal-header {
        padding: 32px 20px;
    }

    .pwa-modal-body {
        padding: 24px 16px;
    }

    .pwa-modal-body h2 {
        font-size: 20px;
        margin-bottom: 10px;
    }

    .pwa-modal-body p {
        font-size: 13px;
        margin-bottom: 20px;
    }

    .pwa-features {
        gap: 10px;
    }

    .pwa-feature {
        padding: 10px;
    }

    .pwa-feature-icon {
        font-size: 20px;
        margin-bottom: 4px;
    }

    .pwa-feature-text {
        font-size: 11px;
    }

    .pwa-modal-footer {
        padding: 12px 16px 20px 16px;
        gap: 8px;
    }

    .pwa-btn-primary,
    .pwa-btn-secondary {
        padding: 10px 16px;
        font-size: 14px;
        max-width: 100%;
    }
}

@media (max-width: 360px) {
    .pwa-modal-icon {
        width: 64px;
        height: 64px;
    }

    .pwa-modal-body h2 {
        font-size: 18px;
    }

    .pwa-features {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .pwa-feature {
        flex-direction: row;
        gap: 10px;
        justify-content: flex-start;
    }

    .pwa-feature-icon {
        margin-bottom: 0;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .pwa-modal-content {
        background: #2a2a2a;
    }

    .pwa-modal-close {
        color: #888;
    }

    .pwa-modal-close:hover {
        background: #444;
        color: #fff;
    }

    .pwa-modal-body h2 {
        color: #fff;
    }

    .pwa-modal-body p {
        color: #aaa;
    }

    .pwa-feature {
        background: #333;
        border-color: #444;
    }

    .pwa-feature:hover {
        background: #3a3a3a;
        border-color: #667eea;
    }

    .pwa-feature-text {
        color: #bbb;
    }

    .pwa-btn-secondary {
        background: #444;
        color: #fff;
        border-color: #555;
    }

    .pwa-btn-secondary:hover {
        background: #555;
        border-color: #666;
    }

    .pwa-btn-secondary:active {
        background: #666;
    }
}

/* Print styles */
@media print {
    .pwa-modal {
        display: none !important;
    }
}