/* ═══════════════════════════════════════════════════════════════════════
   INSCRIPCIONES — estilos (paleta azul del tema · Outfit)
   Todo scoped bajo .ins-* para no colisionar con el resto del tema.
   Adaptado de /nivelaciones/ y /pagos/.
═══════════════════════════════════════════════════════════════════════ */

.ins-wrap {
    max-width: 980px;
    margin: 0 auto 80px;
    padding: 0 40px;
    font-family: 'Outfit', sans-serif;
    color: var(--color-texto-principal);
}

/* ── Botones ── */
.ins-btn {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: 16px;
    letter-spacing: .3px;
    border: none;
    border-radius: 10px;
    padding: 12px 26px;
    cursor: pointer;
    transition: background .18s, box-shadow .18s, transform .05s;
    text-transform: uppercase;
    white-space: nowrap;
    display: inline-block;
    text-align: center;
}
.ins-btn:active { transform: translateY(1px); }
.ins-btn--primary { background: var(--color-azul-700); color: #fff; box-shadow: var(--shadow-btn); }
.ins-btn--primary:hover { background: var(--color-azul-900); color: #fff; }
.ins-btn--accent { background: var(--color-azul-500); color: #fff; }
.ins-btn--accent:hover { background: var(--color-azul-700); color: #fff; }
.ins-btn--ghost { background: var(--color-azul-100); color: var(--color-azul-900); }
.ins-btn--ghost:hover { background: var(--color-azul-300); color: #fff; }
.ins-btn--block { display: block; width: 100%; }
.ins-btn:disabled { opacity: .55; cursor: not-allowed; box-shadow: none; }

/* ── Inputs / selects ── */
.ins-input, .ins-select {
    font-family: 'Outfit', sans-serif;
    font-size: 16px;
    color: var(--color-texto-principal);
    border: 1.5px solid var(--color-azul-100);
    border-radius: 10px;
    padding: 13px 18px;
    outline: none;
    background: #fff;
    width: 100%;
    transition: border-color .18s;
}
.ins-input:focus, .ins-select:focus { border-color: var(--color-azul-500); }
.ins-select:disabled { background: var(--color-azul-50); color: var(--color-disabled); cursor: not-allowed; }
.ins-input.is-invalid, .ins-select.is-invalid { border-color: #c0392b; background: #fdf4f4; }

/* ── Campos ── */
.ins-field { display: block; margin-top: 16px; }
.ins-field > span {
    display: block; font-size: 15px; font-weight: 700;
    color: var(--color-texto-secundario); margin-bottom: 6px;
}
.ins-hint { font-size: 15px; color: var(--color-texto-secundario); margin: 12px 0 0; line-height: 1.5; }
.ins-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
.ins-field--wide { grid-column: 1 / -1; }

.ins-list {
    margin: 10px 0 0; padding-left: 20px;
    font-size: 15px; line-height: 1.6; color: var(--color-texto-secundario);
}
.ins-list li { margin-bottom: 6px; }

/* ── Cards ── */
.ins-card {
    border: 1px solid var(--color-azul-100);
    border-radius: 16px;
    padding: 24px 28px;
    margin-top: 22px;
    box-shadow: 0 2px 14px rgba(11, 42, 74, .05);
    background: #fff;
}
.ins-card--center { text-align: center; }
.ins-card--center p { font-size: 16px; color: var(--color-texto-secundario); line-height: 1.55; margin: 0 0 20px; }
.ins-block-title {
    font-size: 18px; font-weight: 800; color: var(--color-azul-900);
    margin: 26px 0 4px; padding-top: 6px;
}
.ins-block-title:first-child { margin-top: 0; padding-top: 0; }

/* ═══════════════════ HERO ═══════════════════ */
.ins-hero {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    display: flex;
    min-height: 200px;
    align-items: center;
    background: linear-gradient(120deg, var(--color-azul-900) 0%, var(--color-azul-700) 55%, var(--color-azul-500) 100%);
    box-shadow: var(--shadow-azul);
}
.ins-hero[hidden] { display: none !important; }
.ins-hero-body { padding: 40px 44px; }
.ins-hero-title { font-size: 42px; font-weight: 900; line-height: 1; color: #fff; margin: 0; letter-spacing: -1px; }
.ins-hero-sub { font-size: 18px; font-weight: 400; color: var(--color-azul-100); margin: 14px 0 0; max-width: 620px; }

/* ═══════════════════ WIZARD ═══════════════════ */
.ins-steps {
    display: flex; gap: 10px; list-style: none; margin: 22px 0 0; padding: 0;
    justify-content: center; flex-wrap: wrap;
}
.ins-step {
    display: flex; align-items: center; gap: 8px;
    font-size: 15px; font-weight: 700; color: var(--color-texto-secundario);
    border: 1.5px solid var(--color-azul-100); border-radius: 999px; padding: 8px 18px; background: #fff;
}
.ins-step span {
    display: inline-flex; align-items: center; justify-content: center;
    width: 22px; height: 22px; border-radius: 50%;
    background: var(--color-azul-100); color: var(--color-azul-900); font-size: 15px;
}
.ins-step.is-active { border-color: var(--color-azul-700); color: var(--color-azul-900); box-shadow: 0 0 0 2px rgba(21,101,192,.18); }
.ins-step.is-active span { background: var(--color-azul-700); color: #fff; }
.ins-step.is-done span { background: #16a34a; color: #fff; }

.ins-panel { display: none; }
.ins-panel.is-current { display: block; }

/* Valor de la mensualidad */
.ins-value {
    margin-top: 18px; padding: 14px 18px; border-radius: 12px;
    background: var(--color-azul-50); border: 1px solid var(--color-azul-100);
    font-size: 16px; color: var(--color-texto-secundario);
}
.ins-value strong { color: var(--color-azul-900); font-size: 20px; font-weight: 800; }

/* Enlaces */
.ins-link { color: var(--color-azul-700); font-weight: 600; text-decoration: underline; }
.ins-link:hover { color: var(--color-azul-900); }

/* Archivos */
.ins-file input[type="file"] {
    font-family: 'Outfit', sans-serif; font-size: 15px; width: 100%;
    border: 1.5px dashed var(--color-azul-300); border-radius: 10px;
    padding: 12px; background: var(--color-azul-50); cursor: pointer;
}
.ins-file-status { display: block; margin-top: 8px; font-size: 15px; color: var(--color-texto-secundario); }
.ins-file-status.is-ok { color: #16794a; font-weight: 600; }
.ins-file-status.is-err { color: #a30000; font-weight: 600; }

/* Checkbox */
.ins-check {
    display: flex; align-items: flex-start; gap: 10px; margin-top: 22px;
    font-size: 15px; color: var(--color-texto-principal); cursor: pointer; line-height: 1.5;
}
.ins-check input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--color-azul-700); cursor: pointer; flex-shrink: 0; }

/* Acciones */
.ins-actions { display: flex; justify-content: space-between; gap: 12px; margin-top: 24px; }
.ins-actions .ins-btn { flex: 1; }
.ins-actions--end { justify-content: flex-end; }
.ins-actions--end .ins-btn { flex: 0 0 auto; min-width: 200px; }

/* ── Pagos ── */
.ins-pay-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 14px; }
.ins-pay {
    display: flex; align-items: center; justify-content: space-between; gap: 14px;
    text-align: left; border: 1.5px solid var(--color-azul-100); border-radius: 14px;
    padding: 16px; background: #fff; cursor: pointer;
    font-family: 'Outfit', sans-serif;
    transition: border-color .18s, box-shadow .18s, opacity .18s;
}
.ins-pay:hover:not(:disabled) { border-color: var(--color-azul-500); box-shadow: 0 4px 16px rgba(11,42,74,.08); }
.ins-pay:disabled { opacity: .5; cursor: not-allowed; }
.ins-pay-body { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.ins-pay-body strong { font-size: 16px; color: var(--color-azul-900); }
.ins-pay-body span { font-size: 15px; color: var(--color-texto-secundario); line-height: 1.45; }
.ins-pay-logo { flex-shrink: 0; height: auto; max-height: 34px; max-width: 96px; object-fit: contain; display: block; }

/* ═══════════════════ RESULTADO ═══════════════════ */
.ins-done-title { font-size: 30px; font-weight: 800; color: var(--color-azul-700); margin: 0 0 14px; line-height: 1.15; }
.ins-done-note {
    text-align: left; margin: 0 0 22px;
    background: var(--color-azul-50, #f3f8fe); border: 1px solid var(--color-azul-100);
    border-radius: 12px; padding: 16px 20px;
}
.ins-done-note .ins-hint { margin: 0; font-weight: 700; color: var(--color-azul-900); }
.ins-done-note .ins-list { margin-top: 8px; }
.ins-done-note .ins-list li:last-child { margin-bottom: 0; }


/* ═══════════════════ ALERTAS / TOAST ═══════════════════ */
.ins-alert { margin-top: 18px; border-radius: 10px; padding: 12px 16px; font-size: 15px; font-weight: 600; }
.ins-alert--error { background: #fdecec; border: 1px solid #f5c2c2; color: #c0392b; }
.ins-toast {
    position: fixed; left: 50%; bottom: 30px; transform: translateX(-50%);
    background: var(--color-azul-900); color: #fff; padding: 14px 22px; border-radius: 12px;
    font-weight: 600; font-size: 15px; box-shadow: var(--shadow-azul-hover); z-index: 10000;
    animation: insToast .25s ease; max-width: 90vw; text-align: center;
}
.ins-toast--ok { background: #16794a; }
.ins-toast--err { background: #a30000; }
@keyframes insToast { from { transform: translate(-50%, 12px); opacity: 0; } }

/* ═══════════════════ SPINNER ═══════════════════ */
.ins-spinner { display: flex; justify-content: center; padding: 40px 0; }
.ins-spinner-ring {
    width: 54px; height: 54px; border-radius: 50%;
    border: 5px solid var(--color-azul-100); border-top-color: var(--color-azul-700);
    animation: insSpin 1s linear infinite;
}
@keyframes insSpin { to { transform: rotate(360deg); } }

/* ═══════════════════ MODALES ═══════════════════ */
.ins-modal { position: fixed; inset: 0; z-index: 9999; display: flex; align-items: center; justify-content: center; padding: 20px; }
.ins-modal[hidden], .ins-spinner[hidden], .ins-alert[hidden], .ins-value[hidden],
.ins-done[hidden], .ins-blocked[hidden], .ins-wizard[hidden] { display: none !important; }
.ins-modal-backdrop { position: absolute; inset: 0; background: rgba(11, 42, 74, .55); backdrop-filter: blur(2px); }
.ins-modal-card {
    position: relative; background: #fff; border-radius: 18px;
    width: 100%; max-width: 560px; padding: 26px 28px;
    box-shadow: var(--shadow-azul-hover); animation: insPop .18s ease; max-height: 88vh; overflow-y: auto;
}
.ins-modal-card--sm { max-width: 420px; }
@keyframes insPop { from { transform: translateY(12px) scale(.98); opacity: 0; } }
.ins-modal-x { position: absolute; top: 14px; right: 16px; background: none; border: none; font-size: 26px; line-height: 1; color: var(--color-disabled); cursor: pointer; }
.ins-modal-x:hover { color: var(--color-azul-900); }
.ins-modal-title { font-size: 20px; font-weight: 800; margin: 0 0 14px; color: var(--color-azul-900); }
.ins-modal-text { font-size: 15px; color: var(--color-texto-secundario); margin: 0 0 12px; line-height: 1.5; }
.ins-modal-actions { display: flex; gap: 10px; margin-top: 18px; }
.ins-modal-actions--end { justify-content: flex-end; }
.ins-modal-foot-note { font-size: 15px; color: var(--color-texto-secundario); margin: 12px 0 0; text-align: center; }
.ins-pse-list { margin: 0 0 16px; padding-left: 20px; font-size: 15px; line-height: 1.6; color: var(--color-texto-principal); }

/* ═══════════════════ RESPONSIVE ═══════════════════ */
@media (max-width: 780px) {
    .ins-wrap { padding: 0 18px; }
    .ins-hero-body { padding: 30px 24px; }
    .ins-hero-title { font-size: 32px; }
    .ins-hero-sub { font-size: 16px; }
    .ins-grid { grid-template-columns: 1fr; }
    .ins-pay-grid { grid-template-columns: 1fr; }
    .ins-actions { flex-direction: column-reverse; }
    .ins-actions--end .ins-btn { min-width: 0; width: 100%; }
    .ins-card { padding: 20px 18px; }
    .ins-pay-logo { max-height: 30px; max-width: 84px; }
}
