/* ── Formulario de registro ─────────────────────────────────────── */
.spap-form-wrap {
    max-width: 480px;
    margin: 0 auto;
    text-align: center;
}
.spap-titulo { font-size: 1.5rem; margin-bottom: 8px; }
.spap-desc   { color: #555; margin-bottom: 24px; }

.spap-form { display: flex; flex-direction: column; gap: 12px; }

.spap-field input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1rem;
    box-sizing: border-box;
}
.spap-field input:focus { outline: none; border-color: #000; }

.spap-btn {
    padding: 14px;
    background: #000;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    cursor: pointer;
    letter-spacing: .05em;
    text-transform: uppercase;
}
.spap-btn:disabled { opacity: .5; cursor: not-allowed; }

.spap-error   { color: #c62828; font-size: .9rem; text-align: left; }
.spap-success { padding: 20px; background: #f0fdf4; border: 1px solid #86efac; border-radius: 4px; color: #166534; font-size: 1rem; }

/* Registro cerrado */
.spap-cerrado { padding: 24px; background: #fafafa; border: 1px solid #ddd; border-radius: 6px; }
.spap-cerrado-titulo { font-size: 1.2rem; font-weight: 700; margin: 0 0 8px; }
.spap-cerrado-desc   { color: #555; margin: 0; }

/* ── Modal ──────────────────────────────────────────────────────── */
.spap-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.55);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    animation: spap-fade-in .25s ease;
}
.spap-modal-overlay.spap-modal-saliendo {
    animation: spap-fade-out .3s ease forwards;
}

.spap-modal {
    background: #fff;
    border-radius: 8px;
    padding: 40px 32px;
    max-width: 480px;
    width: calc(100% - 32px);
    position: relative;
    text-align: center;
    animation: spap-slide-up .3s ease;
    overflow: hidden;
}

/* Con imagen: sin padding-top, la imagen ocupa todo el ancho */
.spap-modal.spap-modal-con-imagen {
    padding-top: 0;
}

.spap-modal-imagen {
    margin: 0 -32px;  /* cancela el padding lateral del modal */
    margin-top: 0;
    line-height: 0;
}
.spap-modal-imagen img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    display: block;
}

/* Con imagen: body con padding superior */
.spap-modal-con-imagen .spap-modal-body {
    padding-top: 28px;
}

.spap-modal-cerrar {
    position: absolute;
    top: 12px;
    right: 16px;
    background: rgba(0,0,0,.35);
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    font-size: 1.2rem;
    cursor: pointer;
    color: #fff;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
}
.spap-modal-cerrar:hover { background: rgba(0,0,0,.6); }

/* Sin imagen: X oscura sobre fondo blanco */
.spap-modal:not(.spap-modal-con-imagen) .spap-modal-cerrar {
    background: none;
    color: #999;
    width: auto;
    height: auto;
    border-radius: 0;
}
.spap-modal:not(.spap-modal-con-imagen) .spap-modal-cerrar:hover { color: #000; background: none; }

.spap-modal-titulo   { font-size: 1.4rem; font-weight: 700; margin: 0 0 10px; }
.spap-modal-subtexto { color: #555; margin: 0 0 24px; font-size: 1rem; }

.spap-modal-btn {
    display: inline-block;
    padding: 13px 28px;
    background: #000;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    font-size: 1rem;
    letter-spacing: .05em;
    text-transform: uppercase;
}
.spap-modal-btn:hover { background: #222; color: #fff; }

/* En el modal el form no necesita max-width */
.spap-modal .spap-form-wrap { max-width: 100%; }

@keyframes spap-fade-in    { from { opacity: 0 } to { opacity: 1 } }
@keyframes spap-fade-out   { from { opacity: 1 } to { opacity: 0 } }
@keyframes spap-slide-up   { from { transform: translateY(20px); opacity: 0 } to { transform: translateY(0); opacity: 1 } }

/* ── Página de bloqueado + countdown ───────────────────────────── */
.spap-bloqueado-wrap {
    max-width: 560px;
    margin: 0 auto;
    text-align: center;
    padding: 40px 20px;
}
.spap-bloqueado-icono  { font-size: 3rem; margin-bottom: 16px; }
.spap-bloqueado-titulo { font-size: 1.8rem; margin: 0 0 12px; }
.spap-bloqueado-desc   { color: #555; font-size: 1.05rem; margin: 0 0 32px; }

.spap-countdown {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-bottom: 36px;
}
.spap-countdown-bloque {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 72px;
}
.spap-countdown-num {
    font-size: 2.8rem;
    font-weight: 700;
    line-height: 1;
    background: #000;
    color: #fff;
    border-radius: 6px;
    padding: 12px 16px;
    min-width: 72px;
    text-align: center;
    font-variant-numeric: tabular-nums;
}
.spap-countdown-label {
    font-size: .75rem;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: #888;
    margin-top: 6px;
}
.spap-countdown-sep {
    font-size: 2rem;
    font-weight: 700;
    color: #ccc;
    margin-bottom: 20px;
}

.spap-bloqueado-email-aviso {
    background: #f8f8f8;
    border-left: 4px solid #000;
    padding: 16px 20px;
    border-radius: 0 6px 6px 0;
    text-align: left;
    margin-bottom: 24px;
}
.spap-bloqueado-email-aviso p { margin: 0; font-size: 1rem; }
.spap-bloqueado-fin { color: #888; font-size: .9rem; }

@media (max-width: 480px) {
    .spap-countdown-num   { font-size: 2rem; padding: 10px 12px; min-width: 56px; }
    .spap-countdown-bloque { min-width: 56px; }
}

/* ── Admin badges de fase ───────────────────────────────────────── */
.spap-fase-badge {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 4px;
    margin-bottom: 20px;
    font-size: .95rem;
}
.spap-fase-inactivo     { background: #f5f5f5; color: #666; }
.spap-fase-espera       { background: #e8f4fd; color: #0d47a1; }
.spap-fase-pre_registro { background: #fff8e1; color: #e65100; }
.spap-fase-activo       { background: #fce4ec; color: #880e4f; font-weight: 700; }
.spap-fase-terminado    { background: #e8f5e9; color: #1b5e20; }
