﻿/* =========================================================
   ADINER - Solicitud Wizard (SOLO estilos de esta página)
   Archivo: solicitudwizard.css
   - Se apoya en aprobados.css (base)
   - No redefine body / h1 / .btn global
   ========================================================= */

/* ---------- (Opcional) Ajustes locales del wizard ---------- */
:root {
    /* puedes ajustar sin romper el base */
    --wiz-gap: 18px;
    --wiz-card-pad: 18px;
    --wiz-card-pad-lg: 22px;
}

/* =========================================================
   LAYOUT GENERAL DEL WIZARD
   ========================================================= */
.ap-flow--wizard {
    /* fondo suave como tu captura, sin tocar body global */
    padding: 20px 0 34px;
}

.ap-flow__container {
    /* ap-container ya controla el ancho; aquí solo espaciado */
}

.ap-flow__header {
    margin: 12px 0 14px;
}

.ap-flow__title {
    margin: 0 0 6px;
    font-size: clamp(30px, 3.1vw, 46px);
    font-weight: 950;
    letter-spacing: -0.02em;
    color: var(--ap-text, #0f172a);
}

.ap-flow__subtitle {
    margin: 0;
    color: rgba(15,23,42,.62);
    font-weight: 650;
    line-height: 1.45;
}

/* Grid: Form + Resumen */
.ap-flow__grid {
    display: grid;
    grid-template-columns: 1.25fr .75fr;
    gap: var(--wiz-gap);
    align-items: start;
    margin-top: 14px;
}

/* En mobile: stack */
@media (max-width: 992px) {
    .ap-flow__grid {
        grid-template-columns: 1fr;
    }
}

/* =========================================================
   CARD FORM
   ========================================================= */
.ap-card--form {
    border-radius: 18px;
    padding: var(--wiz-card-pad-lg);
    overflow: hidden;
}

.ap-card__title {
    margin: 0 0 14px;
    font-size: 26px;
    font-weight: 950;
    letter-spacing: -0.01em;
    color: var(--ap-text, #0f172a);
}

/* =========================================================
   FORM: GRID Y CAMPOS
   ========================================================= */
.ap-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

/* Grid 2 columnas dentro del form */
.ap-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

@media (max-width: 620px) {
    .ap-grid-2 {
        grid-template-columns: 1fr;
    }
}

/* Campo */
.ap-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

/* Label estilo “mini caps” */
.ap-field__label {
    font-size: 12px;
    font-weight: 900;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: rgba(15,23,42,.70);
}

/* Hint */
.ap-field__hint {
    font-size: 12.5px;
    color: rgba(15,23,42,.60);
    font-weight: 600;
    margin-top: -2px;
}

/* =========================================================
   INPUTS (solo clases ap-*, no global)
   ========================================================= */
.ap-input {
    width: 100%;
    height: 44px;
    padding: 10px 12px;
    border-radius: 14px;
    border: 1px solid rgba(2,6,23,.14);
    background: rgba(255,255,255,.92);
    color: var(--ap-text, #0f172a);
    font-weight: 750;
    outline: none;
    transition: box-shadow .18s ease, border-color .18s ease, background .18s ease;
}

    .ap-input::placeholder {
        color: rgba(15,23,42,.45);
        font-weight: 650;
    }

    .ap-input:focus {
        border-color: rgba(11, 99, 209, .55);
        box-shadow: 0 0 0 4px rgba(11, 99, 209, .12);
    }

    /* Disabled: que se vea “bloqueado” pero legible */
    .ap-input:disabled {
        opacity: .78;
        cursor: not-allowed;
        background: rgba(248,250,252,.95);
    }

/* Error por input */
.ap-input--error {
    border-color: rgba(239,68,68,.60) !important;
    background: rgba(239,68,68,.06) !important;
}

.ap-field__error {
    margin-top: 4px;
    font-size: 12.5px;
    color: #b42318;
    font-weight: 750;
}

/* =========================================================
   BOTONES DEL FORM (usa .ap-btn del base)
   ========================================================= */
.ap-actions {
    display: flex;
    gap: 12px;
    margin-top: 6px;
    align-items: center;
}

@media (max-width: 520px) {
    .ap-actions {
        flex-direction: column;
        align-items: stretch;
    }
}

/* Tamaño XL solo para el wizard */
.ap-btn--xl {
    padding: 12px 18px;
    font-size: 15px;
}

/* =========================================================
   NOTA / INFO
   ========================================================= */
.ap-note {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-top: 4px;
    padding: 12px 14px;
    border-radius: 14px;
    background: rgba(11,99,209,.06);
    border: 1px solid rgba(11,99,209,.12);
    color: rgba(15,23,42,.80);
    font-weight: 650;
    font-size: 13px;
    line-height: 1.35;
}

    .ap-note i {
        margin-top: 2px;
        color: var(--ap-primary, #0b63d1);
    }

/* =========================================================
   ALERTAS (si tu base ya trae .ap-alert, aquí solo mejoras)
   ========================================================= */
.ap-alert {
    border-radius: 14px;
    padding: 10px 12px;
    font-weight: 700;
    border: 1px solid rgba(2,6,23,.10);
    box-shadow: 0 10px 22px rgba(2,6,23,.06);
}

.ap-alert--info {
    background: rgba(59,130,246,.10);
    border-color: rgba(59,130,246,.18);
    color: #0b3f8f;
}

.ap-alert--success {
    background: rgba(34,197,94,.10);
    border-color: rgba(34,197,94,.18);
    color: #166534;
}

.ap-alert--error {
    background: rgba(239,68,68,.10);
    border-color: rgba(239,68,68,.20);
    color: #7f1d1d;
}

/* =========================================================
   RESUMEN (LoanSummaryCard)
   - Le damos “sticky” sin adivinar clases internas
   ========================================================= */
@media (min-width: 992px) {
    .ap-flow__grid > :last-child {
        position: sticky;
        top: 92px; /* debajo del header */
    }
}

/* =========================================================
   MODAL / OVERLAY VERIFICACIÓN (tu bloque, afinado)
   ========================================================= */
.ap-verify-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, .45);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
    z-index: 9999;
}

.ap-verify-card {
    width: min(560px, 100%);
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 25px 60px rgba(2, 6, 23, .35);
    padding: 18px 18px 16px;
    border: 1px solid rgba(2,6,23,.10);
}

.ap-verify-head {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    margin-bottom: 10px;
}

.ap-verify-badge {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(11, 99, 209, .10);
    color: var(--ap-primary, #0b63d1);
    flex: 0 0 auto;
}

.ap-verify-title {
    font-size: 18px;
    font-weight: 950;
    color: var(--ap-text, #0f172a);
    line-height: 1.15;
}

.ap-verify-sub {
    font-size: 13px;
    color: rgba(15, 23, 42, .70);
    margin-top: 2px;
}

.ap-verify-codebox {
    margin-top: 12px;
    border: 1px solid rgba(11, 99, 209, .18);
    border-radius: 16px;
    padding: 14px;
    background: radial-gradient(900px 220px at 25% 0%, rgba(11,99,209,.14), transparent 60%);
}

.ap-verify-label {
    font-size: 12px;
    font-weight: 900;
    letter-spacing: .10em;
    color: rgba(15, 23, 42, .70);
    margin-bottom: 8px;
}

.ap-verify-input {
    width: 100%;
    text-align: center;
    font-size: 22px;
    letter-spacing: .35em;
    font-weight: 950;
    height: 54px;
    border-radius: 14px;
    border: 1px solid rgba(2,6,23,.14);
    outline: none;
    transition: box-shadow .18s ease, border-color .18s ease;
}

    .ap-verify-input:focus {
        border-color: rgba(11,99,209,.55);
        box-shadow: 0 0 0 4px rgba(11,99,209,.12);
    }

    .ap-verify-input:disabled {
        opacity: .78;
        cursor: not-allowed;
        background: rgba(248,250,252,.95);
    }

.ap-verify-hint {
    margin-top: 8px;
    font-size: 12px;
    color: rgba(15, 23, 42, .65);
    font-weight: 650;
}

.ap-verify-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 14px;
}

@media (max-width: 520px) {
    .ap-verify-actions {
        flex-direction: column;
    }

        .ap-verify-actions .ap-btn {
            width: 100%;
        }
}





/* =========================================================
   FIX FORM WIZARD (tu sección no toma estilos)
   - fuerza estilos sobre input/select dentro del card
   - arregla select (flecha + appearance)
   ========================================================= */

.ap-card--form {
    background: rgba(255,255,255,.92);
    border: 1px solid rgba(2,6,23,.10);
    border-radius: 18px;
    box-shadow: 0 18px 45px rgba(2, 6, 23, .10);
    padding: 18px;
}

    /* Título dentro de la card */
    .ap-card--form .ap-card__title {
        margin: 0 0 12px;
        font-size: 28px;
        font-weight: 950;
        letter-spacing: -0.01em;
        color: var(--ap-text, #0f172a);
    }

    /* Layout del form */
    .ap-card--form .ap-form {
        display: flex;
        flex-direction: column;
        gap: 14px;
    }

    .ap-card--form .ap-grid-2 {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }

@media (max-width: 620px) {
    .ap-card--form .ap-grid-2 {
        grid-template-columns: 1fr;
    }
}

/* Campo */
.ap-card--form .ap-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

/* Label mini caps */
.ap-card--form .ap-field__label {
    font-size: 12px;
    font-weight: 900;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: rgba(15,23,42,.70);
}

/* INPUT + SELECT: fuerza estilo (por si Bootstrap gana) */
.ap-card--form .ap-input {
    width: 100% !important;
    height: 44px !important;
    padding: 10px 12px !important;
    border-radius: 14px !important;
    border: 1px solid rgba(2,6,23,.14) !important;
    background: rgba(255,255,255,.92) !important;
    color: var(--ap-text, #0f172a) !important;
    font-weight: 750 !important;
    outline: none !important;
    transition: box-shadow .18s ease, border-color .18s ease, background .18s ease !important;
}

    .ap-card--form .ap-input::placeholder {
        color: rgba(15,23,42,.45) !important;
        font-weight: 650 !important;
    }

    .ap-card--form .ap-input:focus {
        border-color: rgba(11, 99, 209, .55) !important;
        box-shadow: 0 0 0 4px rgba(11, 99, 209, .12) !important;
    }

/* SELECT: evita look “default” y agrega flecha */
.ap-card--form select.ap-input {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    padding-right: 44px !important;
    background-image: linear-gradient(45deg, transparent 50%, rgba(15,23,42,.65) 50%), linear-gradient(135deg, rgba(15,23,42,.65) 50%, transparent 50%), linear-gradient(to right, rgba(2,6,23,.10), rgba(2,6,23,.10));
    background-position: calc(100% - 18px) 18px, calc(100% - 13px) 18px, calc(100% - 42px) 50%;
    background-size: 5px 5px, 5px 5px, 1px 22px;
    background-repeat: no-repeat;
}

/* Disabled */
.ap-card--form .ap-input:disabled {
    opacity: .78 !important;
    cursor: not-allowed !important;
    background: rgba(248,250,252,.96) !important;
}

/* Error */
.ap-card--form .ap-input--error {
    border-color: rgba(239,68,68,.60) !important;
    background: rgba(239,68,68,.06) !important;
}

.ap-card--form .ap-field__error {
    margin-top: 4px;
    font-size: 12.5px;
    color: #b42318;
    font-weight: 750;
}

/* Hint */
.ap-card--form .ap-field__hint {
    font-size: 12.5px;
    color: rgba(15,23,42,.60);
    font-weight: 650;
    margin-top: -2px;
}

/* Acciones */
.ap-card--form .ap-actions {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-top: 6px;
}

@media (max-width: 520px) {
    .ap-card--form .ap-actions {
        flex-direction: column;
        align-items: stretch;
    }
}

/* XL local */
.ap-card--form .ap-btn--xl {
    padding: 12px 18px;
    font-size: 15px;
}

/* Nota */
.ap-card--form .ap-note {
    display: flex;
    gap: 10px;
    margin-top: 4px;
    padding: 12px 14px;
    border-radius: 14px;
    background: rgba(11,99,209,.06);
    border: 1px solid rgba(11,99,209,.12);
    color: rgba(15,23,42,.80);
    font-weight: 650;
    font-size: 13px;
    line-height: 1.35;
}

    .ap-card--form .ap-note i {
        margin-top: 2px;
        color: var(--ap-primary, #0b63d1);
    }
/* =========================================================
   AJUSTES I18N (CO/ES): textos mas largos sin romper layout
   ========================================================= */
.ap-card--form .ap-field__label,
.ap-verify-sub,
.ap-verify-hint {
    overflow-wrap: anywhere;
}

.ap-card--form .ap-actions .ap-btn,
.ap-verify-actions .ap-btn {
    min-height: 44px;
    white-space: normal;
    line-height: 1.2;
}

.ap-card--form select.ap-input {
    text-overflow: ellipsis;
}

/* =========================================================
   BOTON CONTINUAR - LOADING
   ========================================================= */
.ap-btn--loading {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-width: 188px;
}

.ap-btn__spinner {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,.35);
    border-top-color: #fff;
    animation: ap-spin .8s linear infinite;
    flex: 0 0 16px;
}

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