/**
 * Vulcanica Form Processor — Overlay styles
 */

/* ── Overlay fullscreen ────────────────────────────────────────────────────── */
.vcm-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(3px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999999;
    animation: vcm-fade-in 0.3s ease;
}

@keyframes vcm-fade-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* ── Card centrale ─────────────────────────────────────────────────────────── */
.vcm-card {
    background: #fff;
    border-radius: 16px;
    padding: 52px 44px;
    width: 90%;
    max-width: 480px;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
    animation: vcm-slide-up 0.35s ease;
}

@keyframes vcm-slide-up {
    from { transform: translateY(24px); opacity: 0; }
    to   { transform: translateY(0);    opacity: 1; }
}

/* ── Titoli ────────────────────────────────────────────────────────────────── */
.vcm-title {
    font-size: 22px;
    font-weight: 700;
    color: #1a1a2e;
    margin: 20px 0 8px;
    line-height: 1.3;
}
.vcm-title--success { color: #16a34a; }
.vcm-title--error   { color: #dc2626; }

/* ── Testo descrittivo ─────────────────────────────────────────────────────── */
.vcm-desc {
    color: #555;
    font-size: 15px;
    margin: 8px 0 24px;
    line-height: 1.5;
}

/* ── Step label ────────────────────────────────────────────────────────────── */
.vcm-step-label {
    color: #444;
    font-size: 14px;
    min-height: 22px;
    margin: 6px 0 20px;
    transition: opacity 0.3s;
}

/* ── Nota piccola ──────────────────────────────────────────────────────────── */
.vcm-note {
    color: #999;
    font-size: 12px;
    margin-top: 18px;
    line-height: 1.5;
}
.vcm-note strong { color: #666; }

/* ── Spinner ───────────────────────────────────────────────────────────────── */
.vcm-spinner-wrap {
    display: flex;
    justify-content: center;
    margin-bottom: 4px;
}

.vcm-spinner {
    width: 56px;
    height: 56px;
    border: 4px solid #e5e7eb;
    border-top-color: #16a34a;
    border-radius: 50%;
    animation: vcm-spin 0.9s linear infinite;
}

@keyframes vcm-spin {
    to { transform: rotate(360deg); }
}

/* ── Progress bar ──────────────────────────────────────────────────────────── */
.vcm-progress-track {
    width: 100%;
    height: 6px;
    background: #e5e7eb;
    border-radius: 99px;
    overflow: hidden;
    margin: 0 0 4px;
}

.vcm-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #16a34a, #22c55e);
    border-radius: 99px;
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Icona successo / errore ───────────────────────────────────────────────── */
.vcm-icon {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    font-weight: 700;
    margin: 0 auto 4px;
    animation: vcm-pop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.vcm-icon--success { background: #dcfce7; color: #16a34a; }
.vcm-icon--error   { background: #fee2e2; color: #dc2626; }

@keyframes vcm-pop {
    from { transform: scale(0); opacity: 0; }
    to   { transform: scale(1); opacity: 1; }
}

/* ── Countdown ─────────────────────────────────────────────────────────────── */
#vcm-countdown {
    display: inline-block;
    font-size: 18px;
    font-weight: 800;
    color: #16a34a;
    min-width: 24px;
}

/* ── Pulsanti ──────────────────────────────────────────────────────────────── */
.vcm-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 24px;
    flex-wrap: wrap;
}

.vcm-btn {
    padding: 11px 28px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.vcm-btn--primary {
    background: #16a34a;
    color: #fff;
}
.vcm-btn--primary:hover {
    background: #15803d;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(22, 163, 74, 0.3);
}

.vcm-btn--secondary {
    background: #f3f4f6;
    color: #374151;
}
.vcm-btn--secondary:hover {
    background: #e5e7eb;
}

/* ── Responsive ────────────────────────────────────────────────────────────── */
@media (max-width: 520px) {
    .vcm-card {
        padding: 40px 24px;
    }
    .vcm-title {
        font-size: 19px;
    }
}
