/* === Calculadora Renta — Vael Asesores === */

#calculadora-renta {
    font-family: inherit;
    color: #0a1f44;
    line-height: 1.6;
}

/* === Tabla principal === */
#calculadora-renta .table-wrapper {
    overflow-x: auto;
}

#calculadora-renta table {
    border-collapse: separate;
    border-spacing: 0;
    width: 100%;
}

/* === Cabecera === */
#calculadora-renta > .table-wrapper > table > thead th {
    background: #e8eef6;
    color: #0a1f44;
    font-size: 15px;
    font-weight: 600;
    padding: 18px 24px;
    text-align: left;
    border-bottom: 2px solid #c8d6e8;
}

/* === Filas del body === */
#calculadora-renta > .table-wrapper > table > tbody > tr {
    border-bottom: 1px solid #edf0f5;
    transition: background 0.15s ease;
}

#calculadora-renta > .table-wrapper > table > tbody > tr:hover {
    background: #f5f8fc;
}

#calculadora-renta > .table-wrapper > table > tbody th,
#calculadora-renta > .table-wrapper > table > tbody td {
    padding: 14px 24px;
    vertical-align: top;
    font-size: 14px;
}

/* === Sección tipo contribuyente === */
#calculadora-renta tbody tr.tipo {
    background: #fafbfd;
}

#calculadora-renta tbody tr.tipo > th > ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

#calculadora-renta tbody tr.tipo > th > ul > li {
    font-size: 14px;
    font-weight: 600;
    color: #0a1f44;
    margin-bottom: 12px;
}

#calculadora-renta tbody tr.tipo blockquote {
    margin: 0;
    padding: 0;
    border: none;
    background: none;
}

#calculadora-renta tbody tr.tipo blockquote > table {
    width: 100%;
    border: none;
}

#calculadora-renta tbody tr.tipo blockquote > table td {
    padding: 10px 12px;
    font-size: 14px;
    border: none;
    border-bottom: none;
}

#calculadora-renta tbody tr.tipo blockquote > table tr {
    border-bottom: none;
    border-radius: 6px;
    transition: background 0.15s ease;
}

#calculadora-renta tbody tr.tipo blockquote > table tr:hover {
    background: #eef3fa;
}

/* Sub-lista Particular */
#calculadora-renta tbody tr.tipo blockquote ul {
    margin: 6px 0 0 4px;
    padding: 0;
    list-style: none;
}

#calculadora-renta tbody tr.tipo blockquote ul li {
    font-size: 13px;
    color: #5a6a7e;
    font-weight: 400;
    padding: 2px 0 2px 16px;
    position: relative;
}

#calculadora-renta tbody tr.tipo blockquote ul li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: #0a1f44;
}

/* === Radio buttons === */
#calculadora-renta input[type="radio"] {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border: 2px solid #c8d6e8;
    border-radius: 50%;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s;
    position: relative;
    vertical-align: middle;
    margin-top: 2px;
}

#calculadora-renta input[type="radio"]:hover {
    border-color: #0a1f44;
}

#calculadora-renta input[type="radio"]:checked {
    border-color: #0a1f44;
    background: #0a1f44;
    box-shadow: inset 0 0 0 3px #fff;
}

/* === Checkboxes === */
#calculadora-renta input[type="checkbox"] {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border: 2px solid #c8d6e8;
    border-radius: 4px;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
    position: relative;
    vertical-align: middle;
}

#calculadora-renta input[type="checkbox"]:hover {
    border-color: #0a1f44;
}

#calculadora-renta input[type="checkbox"]:checked {
    border-color: #0a1f44;
    background: #0a1f44;
}

#calculadora-renta input[type="checkbox"]:checked::after {
    content: "";
    position: absolute;
    left: 5px;
    top: 1px;
    width: 6px;
    height: 11px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

/* === Opciones (filas de checkbox) === */
#calculadora-renta tbody tr.opcion th {
    font-weight: 400;
}

#calculadora-renta tbody tr.opcion ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

#calculadora-renta tbody tr.opcion ul li {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

/* === Select viviendas (compacto) === */
#calculadora-renta select[name="num_viviendas"] {
    width: 64px;
    padding: 6px 10px;
    border: 2px solid #c8d6e8;
    border-radius: 6px;
    font-size: 14px;
    color: #0a1f44;
    background: #fff;
    cursor: pointer;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M6 8L1 3h10z' fill='%230a1f44'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    padding-right: 28px;
}

#calculadora-renta select[name="num_viviendas"]:focus {
    border-color: #0a1f44;
    box-shadow: 0 0 0 3px rgba(10, 31, 68, 0.12);
}

/* === Importes === */
#calculadora-renta .importe {
    font-weight: 600;
    font-size: 15px;
    color: #0a1f44;
    white-space: nowrap;
    text-align: right;
    min-width: 80px;
}

/* === Footer tabla === */
#calculadora-renta > .table-wrapper > table > tfoot td,
#calculadora-renta > .table-wrapper > table > tfoot th {
    padding: 14px 24px;
    font-size: 14px;
}

#calculadora-renta > .table-wrapper > table > tfoot > tr:first-child {
    border-top: 2px solid #e8eef6;
}

/* Cupón input */
#calculadora-renta input[name="cupon_descuento"] {
    padding: 8px 14px;
    border: 2px solid #c8d6e8;
    border-radius: 6px;
    font-size: 14px;
    width: 180px;
    color: #0a1f44;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

#calculadora-renta input[name="cupon_descuento"]:focus {
    border-color: #0a1f44;
    box-shadow: 0 0 0 3px rgba(10, 31, 68, 0.12);
}

/* Descuento */
#calculadora-renta .porcentaje_descuento,
#calculadora-renta .importe_descuento {
    color: #2e7d32;
    font-weight: 600;
}

/* IVA */
#calculadora-renta .porcentaje_iva,
#calculadora-renta .importe_iva {
    color: #5a6a7e;
}

/* === Fila TOTAL === */
#calculadora-renta > .table-wrapper > table > tfoot > tr:last-child {
    background: #0a1f44;
    border-radius: 0 0 8px 8px;
}

#calculadora-renta > .table-wrapper > table > tfoot > tr:last-child th {
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    padding: 18px 24px;
}

#calculadora-renta > .table-wrapper > table > tfoot > tr:last-child th.total {
    font-size: 22px;
    letter-spacing: 0.5px;
}

/* === Aviso === */
#calculadora-renta + .aviso_presupuesto,
.aviso_presupuesto {
    font-size: 12px;
    color: #8a95a5;
    padding: 14px 24px;
    margin: 0;
    font-style: italic;
}

/* === Responsive === */
@media (max-width: 640px) {
    #calculadora-renta > .table-wrapper > table > thead th {
        padding: 14px 16px;
        font-size: 13px;
    }

    #calculadora-renta > .table-wrapper > table > tbody th,
    #calculadora-renta > .table-wrapper > table > tbody td,
    #calculadora-renta > .table-wrapper > table > tfoot td,
    #calculadora-renta > .table-wrapper > table > tfoot th {
        padding: 12px 16px;
    }

    #calculadora-renta input[name="cupon_descuento"] {
        width: 140px;
    }

    #calculadora-renta > .table-wrapper > table > tfoot > tr:last-child th.total {
        font-size: 18px;
    }
}
