/* =========================
   HIPOTECA PRO IDEALISTA
========================= */

.hpc{
    max-width:1200px;
    margin:auto;
    display:flex;
    gap:30px;
    font-family:system-ui;
    padding:20px;
}

.panel{
    flex:1;
    background:#fff;
    border-radius:18px;
    padding:30px;
    box-shadow:0 4px 18px rgba(0,0,0,.06);
}

.field{
    margin-bottom:28px;
}

label{
    display:block;
    margin-bottom:8px;
    font-weight:600;
    color:#000;
}

/* INPUT GROUP */

.input-group{
    display:flex;
    align-items:center;
    justify-content:space-between;
    border:1px solid #ddd;
    border-radius:12px;
    padding:10px 14px;
    background:#fff !important;
    gap:10px;
}

.input-inline{
    display:flex;
    align-items:center;
    justify-content:center;
    gap:6px;
    flex:1;
}

/* INPUTS */

.input-group input,
input[type=number],
input[type=text]{
    border:none !important;
    outline:none !important;
    text-align:right;
    font-size:16px;
    font-weight:600;
    background:#fff !important;
    color:#000 !important;
    box-shadow:none !important;
    appearance:textfield;
    -moz-appearance:textfield;
    width:100%;
}

input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button{
    -webkit-appearance:none;
    margin:0;
}

/* BOTONES */

.btn-mini{
    border:none;
    background:none;
    cursor:pointer;
    font-size:22px;
    color:#95b700;
    width:32px;
    height:32px;
    display:flex;
    align-items:center;
    justify-content:center;
    flex-shrink:0;
}

/* SUFFIX */

.suffix{
    color:#000 !important;
    font-weight:600;
    white-space:nowrap;
}

.percent{
    color:#666;
    font-size:13px;
    white-space:nowrap;
}

/* =========================
   SLIDER
========================= */

input[type=range]{
    width:100%;
    margin-top:16px;
    -webkit-appearance:none;
    appearance:none;
    height:10px;
    border-radius:20px;

    /* PARTE VERDE + PARTE GRIS */
    background:
        linear-gradient(
            to right,
            #95b700 0%,
            #95b700 var(--fill, 50%),
            #dfe6d0 var(--fill, 50%),
            #dfe6d0 100%
        );
}

/* THUMB */

input[type=range]::-webkit-slider-thumb{
    -webkit-appearance:none;
    width:22px;
    height:22px;
    border-radius:50%;
    background:#95b700;
    cursor:pointer;
    border:3px solid #fff;
    box-shadow:0 2px 8px rgba(0,0,0,.15);
    margin-top:-6px;
}

input[type=range]::-moz-range-thumb{
    width:22px;
    height:22px;
    border-radius:50%;
    background:#95b700;
    cursor:pointer;
    border:3px solid #fff;
    box-shadow:0 2px 8px rgba(0,0,0,.15);
}

/* TRACK FIREFOX */

input[type=range]::-moz-range-track{
    height:10px;
    border-radius:20px;
    background:#dfe6d0;
}

/* INFO */

.info-box{
    background:#eef5e3;
    padding:14px;
    border-radius:10px;
    font-size:13px;
    margin-bottom:22px;
    color:#000;
    line-height:1.5;
}

.adjust-link{
    color:#2563eb;
    cursor:pointer;
    margin-left:6px;
    font-weight:600;
}

/* RADIOS */

.radio-group{
    display:flex;
    gap:18px;
    color:#000;
}

.interest-row{
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:20px;
}

.rate-label{
    margin-top:12px;
    font-size:14px;
    color:#666;
    line-height:1.5;
}

.rate-label strong{
    color:#000;
}

/* RESULTADO */

.title{
    font-size:18px;
    color:#666;
}

.total{
    font-size:42px;
    font-weight:700;
    margin-top:10px;
    color:#000;
}

/* BLOQUES */

.block{
    margin-top:28px;
}

.line{
    display:flex;
    justify-content:space-between;
    align-items:center;
    margin:10px 0;
    color:#000;
    gap:10px;
}

.line-left{
    display:flex;
    align-items:center;
    gap:10px;
}

/* =========================
   VIÑETAS RECTANGULARES
========================= */

.dot{
    width:18px;
    height:10px;
    border-radius:3px;
    display:inline-block;
    flex-shrink:0;
}

.dot.price{
    background:#d4a017;
}

.dot.tax{
    background:#9b6d00;
}

.dot.entry{
    background:#53d6c3;
}

.dot.mortgage{
    background:#0f9d8a;
}

.dot.interest{
    background:#0b5f57;
}

.total-line{
    font-weight:700;
}

/* BARRAS */

.bar-big{
    display:flex;
    height:18px;
    background:#eee;
    border-radius:20px;
    overflow:hidden;
    margin-top:12px;
}

.seg{
    height:100%;
    transition:.3s;
}

.price{
    background:#d4a017;
}

.tax{
    background:#9b6d00;
}

.entry{
    background:#53d6c3;
}

.mortgage{
    background:#0f9d8a;
}

.interest{
    background:#0b5f57;
}

/* LEYENDA */

.legend{
    display:flex;
    justify-content:space-between;
    font-size:12px;
    margin:12px 0;
    color:#666;
}

/* BOTÓN */

.btn{
    width:100%;
    padding:14px;
    margin-top:30px;
    background:#2563eb;
    border:none;
    border-radius:12px;
    color:#fff;
    font-weight:600;
    cursor:pointer;
    transition:.2s;
}

.btn:hover{
    opacity:.9;
}

/* TABLA */

.hidden{
    display:none;
}

#table-wrapper{
    margin-top:20px;
    max-height:320px;
    overflow:auto;
}

.amortization-table{
    width:100%;
    border-collapse:collapse;
    font-size:13px;
}

.amortization-table th,
.amortization-table td{
    padding:10px;
    border-bottom:1px solid #eee;
    text-align:right;
    color:#000;
    background:#fff !important;
}

.amortization-table th:first-child,
.amortization-table td:first-child{
    text-align:left;
}

.amortization-table thead{
    position:sticky;
    top:0;
    background:#fff !important;
    z-index:5;
}

/* RESPONSIVE */

@media(max-width:900px){

    .hpc{
        flex-direction:column;
        padding:14px;
    }

    .panel{
        padding:22px;
    }

    .total{
        font-size:32px;
    }

    .interest-row{
        flex-direction:column;
        align-items:flex-start;
    }

}