/* ══ Vercion 2.0 22:14 ══════════════════════════════════════════════ */
/* CONTENEDOR PRINCIPAL DE LA CALCULADORA */
.calc-credito {
    --red: #007ce2;
    --red-dark: #032782;
    --black: #0a0a0a;
    --dark: #111111;
    --surface: #1a1a1a;
    --surface2: #222222;
    --border: #2e2e2e;
    --text: #ffffff;
    --muted: #888888;
    --radius: 4px;

    max-width: 990px;
    margin: 0 auto;
    padding: 40px 24px 80px;
    font-family: 'Barlow', sans-serif;
    color: var(--text);
    background: transparent; /* no toca el body */
}

/* ══ CARD ═════════════════════════════════════════════════════════ */
.calc-credito .card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 2px;
    padding: 32px 36px;
}

@media(max-width:600px) {
    .calc-credito .card {
        padding: 24px 18px;
    }
}

/* ══ SECTION LABEL ════════════════════════════════════════════════ */
.calc-credito .sec-label {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 1px;
    color: var(--red);
    text-transform: uppercase;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.calc-credito .sec-label::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

/* ══ GRID ═════════════════════════════════════════════════════════ */
.calc-credito .g2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.calc-credito .g3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 20px;
}

@media(max-width:680px) {
    .calc-credito .g2,
    .calc-credito .g3 {
        grid-template-columns: 1fr;
    }
}

/* ══ FORM ELEMENTS ════════════════════════════════════════════════ */
.calc-credito .field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.calc-credito label {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 14px;
    font-weight: 700;
    color: var(--muted);
    text-transform: uppercase;
}

.calc-credito select,
.calc-credito input[type="number"] {
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: 2px;
    color: var(--text);
    font-family: 'Barlow', sans-serif;
    font-size: 15px;
    font-weight: 500;
    padding: 13px 16px;
    outline: none;
    transition: border-color .2s, box-shadow .2s;
    width: 100%;
}

.calc-credito select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 40px;
}

.calc-credito select:focus,
.calc-credito input:focus {
    border-color: var(--red);
    box-shadow: 0 0 0 2px rgb(40 6 227 / 35%);
}

.calc-credito select option {
    background: #1a1a1a;
}

/* ══ PRICE DISPLAY ════════════════════════════════════════════════ */
.calc-credito .price-display {
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: 2px;
    padding: 13px 16px;
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 20px;
    font-weight: 700;
    color: var(--red);
    letter-spacing: 1px;
    min-height: 50px;
}

.calc-credito .price-display.empty {
    color: var(--muted);
    font-size: 14px;
    font-family: 'Barlow', sans-serif;
    font-weight: 400;
}

/* ══ DIVIDER ══════════════════════════════════════════════════════ */
.calc-credito .div {
    border: none;
    border-top: 1px solid var(--border);
    margin: 28px 0;
}

/* ══ SLIDER ═══════════════════════════════════════════════════════ */
.calc-credito .slider-row {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 2% 0%;
}

.calc-credito input[type="range"] {
    flex: 1;
    -webkit-appearance: none;
    appearance: none;
    height: 4px;
    border-radius: 2px;
    outline: none;
    cursor: pointer;
    background: linear-gradient(to right, var(--red) 0%, var(--red) var(--pct, 0%), var(--border) var(--pct, 0%), var(--border) 100%);
}

.calc-credito input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 22px;
    height: 22px;
    border-radius: 0;
    background: var(--red);
    box-shadow: 0 4px 20px rgb(30 6 227 / 40%);
    cursor: pointer;
    clip-path: polygon(15% 0%, 85% 0%, 100% 15%, 100% 85%, 85% 100%, 15% 100%, 0% 85%, 0% 15%);
    transition: transform .15s;
}

.calc-credito input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.15);
}

.calc-credito .slider-hint {
    font-size: 16px;
    color: var(--muted);
    margin-top: 14px;
}

.calc-credito .slider-hint strong {
    color: #fff;
}

/* ══ TERM BUTTONS ═════════════════════════════════════════════════ */
.calc-credito .terms-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

@media(max-width:500px) {
    .calc-credito .terms-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.calc-credito .term-btn {
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: 2px;
    color: var(--muted);
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 32px;
    font-weight: 700;
    padding: 20px 8px;
    cursor: pointer;
    transition: all .2s;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.calc-credito .term-btn span {
    display: block;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 1px;
    margin-top: 0px;
    color: var(--muted);
}

.calc-credito .term-btn:hover {
    border-color: var(--red);
    color: #fff;
}

.calc-credito .term-btn.active {
    background: var(--red);
    border-color: var(--red);
    color: #fff;
    box-shadow: 0 4px 20px rgb(40 6 227 / 80%);
}

.calc-credito .term-btn.active span {
    color: rgba(255, 255, 255, .8);
}

/* ══ CALCULATE BUTTON ══════════════════════════════════════════════ */
.calc-credito .btn-calc {
    width: 100%;
    margin-top: 8px;
    background: var(--red);
    border: none;
    border-radius: 2px;
    color: #fff;
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 19px;
    font-weight: 700;
        /* letter-spacing: 3px;*/ 
    text-transform: uppercase;
    padding: 18px;
    cursor: pointer;
    box-shadow: 0 4px 20px rgb(40 6 227 / 35%);
    transition: background .15s, transform .15s, box-shadow .15s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.calc-credito .btn-calc:hover {
    background: var(--red-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgb(30 6 227 / 40%);
}

.calc-credito .btn-calc:active {
    transform: none;
}

.calc-credito .btn-logo {
    height: 40px;
    width: auto;
    display: block;
    flex-shrink: 0;
    filter: brightness(0) invert(1);
}

/* ══ ERROR MSG ════════════════════════════════════════════════════ */
.calc-credito .err {
    color: var(--red);
    font-size: 12px;
    margin-top: 4px;
    display: none;
}

.calc-credito .err.show {
    display: block;
}

/* ══ RESULTS ══════════════════════════════════════════════════════ */
.calc-credito .results {
    display: none;
    margin-top: 40px;
    animation: fadeUp .4s ease both;
}

.calc-credito .results.show {
    display: block;
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(24px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ── Table ── */
.calc-credito .tbl-wrap {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 2px;
    overflow: hidden;
}

.calc-credito .tbl-head {
    padding: 16px 22px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #111;
}

.calc-credito .tbl-title {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 19px;
    font-weight: 700;
    text-transform: uppercase;
    
}

.calc-credito .tbl-scroll {
    overflow-x: auto;
    max-height: 400px;
    overflow-y: auto;
}

.calc-credito table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.calc-credito thead th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: #0f0f0f;
    padding: 10px 16px;
    text-align: right;
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 2px;
    color: var(--muted);
    text-transform: uppercase;
    border-bottom: 1px solid var(--border);
}

.calc-credito thead th:first-child {
    text-align: left;
}

.calc-credito tbody tr {
    border-bottom: 1px solid rgba(46, 46, 46, .6);
    transition: background .12s;
}

.calc-credito tbody tr:hover {
    background: rgba(255, 255, 255, .03);
}

.calc-credito tbody tr:last-child {
    border: none;
}

.calc-credito td {
    padding: 10px 16px;
    text-align: right;
    font-size: 13px;
}

.calc-credito td:first-child {
    text-align: left;
    font-weight: 700;
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 15px;
    letter-spacing: 1px;
    color: var(--muted);
}

.calc-credito .c-green {
    color: #34d399;
}

.calc-credito .c-red {
    color: #f87171;
}
/* --- BOTONES DE ACCIÓN (PRE-APRUEBA Y HABLAR CON ASESOR) --- */
.calc-actions-row {
    display: flex;
    gap: 15px;
    margin-top: 60px;
}

.btn-action {
    flex: 1;
    background-color: #007ce2;
    color: #ffffff;
    border: none;
    padding: 14px 10px;
    font-weight: bold;
    font-size: 14px;
    letter-spacing: 0.5px;
    border-radius: 4px;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    transition: background-color 0.2s ease;
}

.btn-action:hover {
    background-color: #032782;
    color: #ffffff;
}

/* --- WRAPPER Y TÍTULO DEL FORMULARIO CF7 --- */
.cf7-wrapper {
    margin-top: 25px;
    padding: 20px;
    background-color: #262626;
    border-radius: 8px;
    border: 1px solid #3d3d3d;
}

.cf7-car-title {
    color: #ffffff;
    font-size: 18px;
    font-weight: bold;
    text-align: center;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
}
/* ══ FORM ELEMENTS (AJUSTE DE TAMAÑO UNIFICADO) ════════════════════ */
.calc-credito .g2 {
    align-items: flex-end; /* Alinea ambas cajas en la base, resolviendo diferencias si los labels tienen distinto alto */
}

/* Forzar misma altura, rellenos y centrado exacto para el SELECT y el PRICE-DISPLAY */
.calc-credito select,
.calc-credito .price-display {
    height: 48px !important;
    min-height: 48px !important;
    max-height: 48px !important;
    box-sizing: border-box !important;
    padding: 0 16px !important;
    display: flex !important;
    align-items: center !important;
    margin: 0 !important;
    line-height: 1 !important;
}

/* Ajustes finos de tipografía para el display del precio */
.calc-credito .price-display {
    font-size: 18px;
}

.calc-credito .price-display.empty {
    font-size: 14px;
}
.cuotas-wrapper {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.btn-guardar-cuotas {
    margin-top: 12px;
    background-color: #007ce2;
    color: #ffffff;
    border: none;
    padding: 8px 16px;
    font-size: 12px;
    font-weight: bold;
    letter-spacing: 0.5px;
    border-radius: 4px;
    cursor: pointer;
    text-transform: uppercase;
    transition: background-color 0.2s ease;
}

.btn-guardar-cuotas:hover {
    background-color: #032782;
}