/* ============================================================================
   Confirmación de registro por WhatsApp
   Estilos globales (el proyecto usa CSS global, no scoped) para:
     - el contador reutilizable (.omni-countdown)
     - la página pública /confirmar-registro (.confirmreg-*)
     - el modal posterior al registro (.postreg-*)
   ========================================================================== */

/* ---- Contador regresivo reutilizable --------------------------------------- */
.omni-countdown {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 132px;
    font-variant-numeric: tabular-nums;
    font-weight: 800;
    font-size: 2.6rem;
    line-height: 1;
    letter-spacing: 2px;
    color: #4f46e5;
    padding: 14px 22px;
    border-radius: 16px;
    background: #eef2ff;
    box-shadow: inset 0 0 0 1px rgba(79, 70, 229, .12);
    transition: color .2s ease, background .2s ease, box-shadow .2s ease;
}

.omni-countdown--warning {
    color: #dc2626;
    background: #fee2e2;
    box-shadow: inset 0 0 0 1px rgba(220, 38, 38, .2);
    animation: omni-countdown-pulse 1s ease-in-out infinite;
}

@keyframes omni-countdown-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: .6; transform: scale(1.02); }
}

/* ---- Modal posterior al registro ------------------------------------------ */
.postreg-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, .6);
    backdrop-filter: blur(3px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    z-index: 2000;
    animation: postreg-fade .2s ease;
}

.postreg-modal {
    position: relative;
    width: 100%;
    max-width: 430px;
    background: #fff;
    border-radius: 22px;
    padding: 34px 30px 30px;
    text-align: center;
    box-shadow: 0 30px 70px rgba(15, 23, 42, .35);
    animation: postreg-pop .22s cubic-bezier(.2, .9, .3, 1.2);
}

/* Franja superior de acento tipo "encabezado de modal". */
.postreg-modal::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 6px;
    border-radius: 22px 22px 0 0;
    background: linear-gradient(90deg, #4f46e5, #7c3aed, #22c55e);
}

.postreg-icon {
    font-size: 3rem;
    line-height: 1;
    margin-bottom: 10px;
}

.postreg-title {
    font-size: 1.4rem;
    font-weight: 800;
    color: #0f172a;
    margin: 0 0 14px;
}

.postreg-text {
    color: #475569;
    font-size: .98rem;
    line-height: 1.55;
    margin: 0 0 10px;
}

.postreg-text strong { color: #0f172a; }

.postreg-text--muted {
    color: #94a3b8;
    font-size: .85rem;
}

.postreg-timer {
    display: flex;
    justify-content: center;
    margin: 20px 0 22px;
}

.postreg-note {
    background: #fef3c7;
    color: #92400e;
    border-radius: 10px;
    padding: 10px 14px;
    font-size: .9rem;
    margin: 6px 0 14px;
}

.postreg-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 14px 20px;
    border: none;
    border-radius: 13px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    margin-top: 8px;
    transition: transform .1s ease, box-shadow .2s ease, opacity .2s ease;
}

.postreg-btn--primary {
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    color: #fff;
    box-shadow: 0 10px 24px rgba(79, 70, 229, .32);
}

.postreg-btn--primary:hover:not(:disabled) { transform: translateY(-1px); }
.postreg-btn--primary:active:not(:disabled) { transform: translateY(0); }

.postreg-btn--ghost {
    background: transparent;
    color: #64748b;
    box-shadow: none;
}

.postreg-btn--ghost:hover { color: #334155; }

.postreg-btn:disabled { opacity: .6; cursor: not-allowed; }

@keyframes postreg-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes postreg-pop {
    from { opacity: 0; transform: translateY(12px) scale(.96); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

/* ---- Página pública /confirmar-registro ----------------------------------- */
.confirmreg-shell {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: linear-gradient(160deg, #eef2ff 0%, #f8fafc 60%);
}

.confirmreg-card {
    position: relative;
    width: 100%;
    max-width: 440px;
    background: #fff;
    border-radius: 22px;
    box-shadow: 0 20px 50px rgba(15, 23, 42, .14);
    padding: 44px 34px 38px;
    text-align: center;
    overflow: hidden;
}

.confirmreg-card::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 6px;
    background: linear-gradient(90deg, #4f46e5, #7c3aed, #22c55e);
}

.confirmreg-icon { font-size: 3rem; line-height: 1; margin-bottom: 12px; }

.confirmreg-title {
    font-size: 1.6rem;
    font-weight: 800;
    color: #0f172a;
    margin: 0 0 10px;
}

.confirmreg-sub {
    color: #475569;
    font-size: 1rem;
    line-height: 1.55;
    margin: 0 0 10px;
}

.confirmreg-timer-label {
    margin-top: 22px;
    font-size: .82rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: #64748b;
}

.confirmreg-timer { display: flex; justify-content: center; margin: 10px 0 20px; }

.confirmreg-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 15px 20px;
    border: none;
    border-radius: 13px;
    font-size: 1.02rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform .1s ease, box-shadow .2s ease, opacity .2s ease;
    margin-top: 8px;
}

.confirmreg-btn--primary {
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    color: #fff;
    box-shadow: 0 10px 24px rgba(79, 70, 229, .3);
}

.confirmreg-btn--primary:hover:not(:disabled) { transform: translateY(-1px); }
.confirmreg-btn:disabled { opacity: .55; cursor: not-allowed; }

.confirmreg-foot {
    margin-top: 20px;
    font-size: .82rem;
    color: #94a3b8;
    line-height: 1.5;
}

.confirmreg-error {
    background: #fee2e2;
    color: #b91c1c;
    border-radius: 10px;
    padding: 10px 14px;
    font-size: .9rem;
    margin: 6px 0 4px;
}

.confirmreg-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    color: #64748b;
    padding: 24px 0;
}

.confirmreg-spinner {
    width: 42px;
    height: 42px;
    border: 4px solid #e2e8f0;
    border-top-color: #4f46e5;
    border-radius: 50%;
    animation: confirmreg-spin 1s linear infinite;
}

@keyframes confirmreg-spin { to { transform: rotate(360deg); } }

@media (max-width: 480px) {
    .postreg-modal { padding: 28px 20px 24px; }
    .confirmreg-card { padding: 36px 22px 30px; }
    .omni-countdown { font-size: 2.2rem; }
}
