/* ─── Modal Overlay ─── */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(6px);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
}

.modal-overlay.active {
    display: flex;
}

.modal-box {
    background: #fff;
    border-radius: 20px;
    padding: 2.5rem 2rem;
    max-width: 480px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    text-align: center;
    animation: modal-pop 0.3s ease;
}

@keyframes modal-pop {
    from {
        transform: scale(0.9);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

.modal-box h2 {
    color: #1a1a1a;
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
}

.modal-box p {
    color: #666;
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
}

.template-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 1.5rem;
}

.template-btn {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 20px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    background: #f9fafb;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    transition: all 0.2s ease;
}

.template-btn:hover {
    border-color: #7c3aed;
    background: #f5f3ff;
    transform: translateX(4px);
}

.template-btn strong {
    color: #1a1a1a;
}

.template-arrow {
    font-size: 1.2rem;
    color: #7c3aed;
}

.template-loading {
    padding: 20px;
    color: #999;
    font-size: 0.95rem;
}

.modal-close {
    padding: 10px 30px;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    background: transparent;
    color: #666;
    font-weight: 600;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    transition: all 0.2s;
}

.modal-close:hover {
    background: #f3f4f6;
    border-color: #d1d5db;
}