/* â”€â”€ Variables â”€â”€ */
:root {
  --ley2025-cream: #f4f4f4;
  --ley2025-warm-white: #fff;
  --ley2025-navy: #1a2535;
  --ley2025-navy-light: #2c3e55;
  --ley2025-gold: #333;
/*  --ley2025-gold-light: #d4af7a; */
  --ley2025-gold-pale: #f0e6d3;
  --ley2025-text: #2e2e2e;
  --ley2025-muted: #7a7067;
  --ley2025-border: #ddd5c8;
  --ley2025-success: #2e6b4f;
}

.ley2025-wrap {
  font-family: "DM Sans", "Segoe UI", Helvetica, Arial, sans-serif;
  background-color: var(--ley2025-cream);
  color: var(--ley2025-text);
  padding: 32px 16px 48px;
  border-radius: 16px;
  margin: 32px 0;
}

.ley2025-header {
  text-align: center;
  margin-bottom: 28px;
}

.ley2025-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #fff;
  border: 1px solid var(--color-primario);
  background: var(--color-primario);
  padding: 5px 14px;
  border-radius: 20px;
  margin-bottom: 12px;
}

.ley2025-header h2 {
  font-size: 1.7rem;
  font-weight: 300;
  color: var(--ley2025-navy);
  line-height: 1.15;
  margin: 0 0 8px;
}

.ley2025-header h2 em {
  font-style: italic;
  color: var(--ley2025-gold);
}

.ley2025-header p {
  font-size: 13px;
  color: var(--ley2025-muted);
  line-height: 1.6;
  max-width: 440px;
  margin: 0 auto;
}

.ley2025-stepper {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
}

.ley2025-step-dot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
}

.ley2025-step-circle {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 2px solid #ff;
  background: var(--ley2025-warm-white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 500;
  color: var(--ley2025-muted);
  transition: all 0.3s ease;
}

.ley2025-step-circle.active {
  border-color: var(--ley2025-gold);
  background: var(--ley2025-gold);
  color: #fff;
}
.ley2025-step-circle.done {
  border-color: var(--ley2025-success);
  background: var(--ley2025-success);
  color: #fff;
}

.ley2025-step-line {
  width: 56px;
  height: 2px;
  background: var(--color-secundario);
  transition: background 0.3s ease;
}

.ley2025-step-line.done {
  background: var(--ley2025-success);
}

.ley2025-step-label {
  font-size: 10px;
  color: var(--ley2025-muted);
  font-weight: 400;
  letter-spacing: 0.04em;
}

.ley2025-step-label.active {
  color: var(--ley2025-gold);
  font-weight: 500;
}
.ley2025-step-label.done {
  color: var(--ley2025-success);
}

.ley2025-card {
  background: var(--ley2025-warm-white);
  border: 1px solid var(--ley2025-warm-white);
  border-radius: 14px;
  padding: 32px;
  box-shadow: 0 2px 18px rgba(26, 37, 53, 0.06);
  max-width: 620px;
  margin: 0 auto;
}

.ley2025-panel {
  display: none;
}

.ley2025-panel.active {
  display: block;
  animation: ley2025FadeUp 0.3s ease;
}

@keyframes ley2025FadeUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.ley2025-step-title {
  font-size: 1.3rem;
  font-weight: 400;
  color: var(--ley2025-navy);
  margin-bottom: 4px;
}
.ley2025-step-subtitle {
  font-size: 12.5px;
  color: var(--ley2025-muted);
  margin-bottom: 24px;
  line-height: 1.55;
}

.ley2025-field {
  margin-bottom: 18px;
}

.ley2025-field label {
  display: block;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--ley2025-gold);
  margin-bottom: 7px;
}

.ley2025-input-wrap {
  position: relative;
}

.ley2025-input-prefix {
  position: absolute;
  left: 13px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1rem;
  color: var(--ley2025-gold);
  pointer-events: none;
}

.ley2025-input,
.ley2025-select {
  width: 100%;
  padding: 12px 12px 12px 30px;
  background: var(--ley2025-cream);
  border: 1.5px solid var(--ley2025-warm-white);
  border-radius: 9px;
  font-family: inherit;
  font-size: 14px;
  color: var(--ley2025-navy);
  outline: none;
  transition:
    border-color 0.2s,
    box-shadow 0.2s;
  -moz-appearance: textfield;
}

.ley2025-select {
  padding-left: 12px;
  cursor: pointer;
}

.ley2025-input::-webkit-inner-spin-button,
.ley2025-input::-webkit-outer-spin-button {
  -webkit-appearance: none;
}

.ley2025-input:focus,
.ley2025-select:focus {
  border-color: var(--ley2025-gold);
  box-shadow: 0 0 0 3px rgba(184, 149, 90, 0.11);
}

.ley2025-input[readonly] {
  background: var(--ley2025-cream);
  color: var(--ley2025-navy);
  cursor: default;
}

.ley2025-radio-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 18px;
}

.ley2025-radio-card {
  position: relative;
  cursor: pointer;
}
.ley2025-radio-card input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.ley2025-radio-face {
  border: 1.5px solid var(--ley2025-border);
  border-radius: 11px;
  padding: 14px 12px;
  background: var(--ley2025-cream);
  text-align: center;
  transition: all 0.2s ease;
}

.ley2025-radio-card input:checked + .ley2025-radio-face {
  border-color: var(--ley2025-gold);
  background: var(--ley2025-gold-pale);
  box-shadow: 0 0 0 3px rgba(184, 149, 90, 0.14);
}

.ley2025-radio-icon {
  font-size: 1.4rem;
  display: block;
  margin-bottom: 5px;
}
.ley2025-radio-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--ley2025-navy);
  display: block;
}
.ley2025-radio-sub {
  font-size: 11px;
  color: var(--ley2025-muted);
  display: block;
  margin-top: 2px;
}

.ley2025-tipo-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 16px;
  background: var(--ley2025-cream);
  border: 1.5px solid var(--ley2025-gold);
  border-radius: 9px;
  color: var(--ley2025-navy);
}

.ley2025-tipo-badge .ley2025-radio-icon {
  font-size: 1.4rem;
}
.ley2025-tipo-badge strong {
  font-size: 13.5px;
  display: block;
}
.ley2025-tipo-badge small {
  font-size: 11px;
  color: var(--ley2025-muted);
  display: block;
  margin-top: 1px;
}

.ley2025-tipo-aviso {
  font-size: 12px;
  color: var(--ley2025-muted);
  background: var(--ley2025-cream);
  border-left: 3px solid var(--ley2025-gold);
  padding: 8px 12px;
  border-radius: 0 6px 6px 0;
  margin-bottom: 10px;
}

.ley2025-checkbox-row {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  padding: 14px;
  background: var(--ley2025-cream);
  border: 1.5px solid var(--ley2025-border);
  border-radius: 9px;
  cursor: pointer;
  transition: all 0.2s;
  margin-bottom: 12px;
}

.ley2025-checkbox-row:hover {
  border-color: var(--ley2025-gold-light);
}

.ley2025-checkbox-row input[type="checkbox"] {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
  margin-top: 2px;
  accent-color: var(--ley2025-gold);
  cursor: pointer;
}

.ley2025-checkbox-text strong {
  font-size: 13px;
  color: var(--ley2025-navy);
  display: block;
}
.ley2025-checkbox-text span {
  font-size: 11.5px;
  color: var(--ley2025-muted);
}

.ley2025-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 13px 24px;
  border: none;
  border-radius: 9px;
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.ley2025-btn-primary {
  background: var(--color-primario);
  color: #fff;
  width: 100%;
}
.ley2025-btn-primary:hover {
  background: var(--ley2025-navy-light);
  transform: translateY(-1px);
  box-shadow: 0 5px 18px rgba(26, 37, 53, 0.2);
}

.ley2025-btn-gold {
  background: var(--ley2025-gold);
  color: #fff;
  width: 100%;
}
.ley2025-btn-gold:hover {
  background: var(--ley2025-gold-light);
  transform: translateY(-1px);
  box-shadow: 0 5px 18px rgba(184, 149, 90, 0.28);
}

.ley2025-btn-ghost {
  background: transparent;
  color: var(--ley2025-muted);
  border: 1.5px solid var(--ley2025-border);
  padding: 11px 18px;
}
.ley2025-btn-ghost:hover {
  border-color: var(--ley2025-navy);
  color: var(--ley2025-navy);
}

.ley2025-btn-row {
  display: flex;
  gap: 9px;
  margin-top: 6px;
}
.ley2025-btn-row .ley2025-btn-ghost {
  flex-shrink: 0;
}
.ley2025-btn-row .ley2025-btn-primary,
.ley2025-btn-row .ley2025-btn-gold {
  flex: 1;
}

.ley2025-result-header {
  background: var(--ley2025-gold);
  margin: -32px -32px 24px;
  padding: 24px 32px;
  border-radius: 13px 13px 0 0;
}

.ley2025-result-header .ley2025-label {
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ley2025-cream);
  margin-bottom: 5px;
  display: block;
}

.ley2025-result-total {
  font-size: 2.2rem;
  font-weight: 300;
  color: #fff;
  line-height: 1;
}
.ley2025-result-total span {
  font-size: 3rem;
  margin-right: 3px;
  color: var(--ley2025-cream);
}
.ley2025-result-sub {
  font-size: 11.5px;
  color: rgba(255, 255, 255, 0.5);
  margin-top: 4px;
}

.ley2025-section-label {
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ley2025-muted);
  margin: 18px 0 8px;
}

.ley2025-cost-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 9px 0;
  border-bottom: 1px solid var(--ley2025-border);
  font-size: 13px;
}

.ley2025-cost-line:last-child {
  border-bottom: none;
}
.ley2025-cost-name {
  color: var(--ley2025-text);
}
.ley2025-cost-name small {
  display: block;
  font-size: 10.5px;
  color: var(--ley2025-muted);
  margin-top: 1px;
}

.ley2025-cost-amount {
  font-weight: 500;
  color: var(--ley2025-navy);
  font-size: 13.5px;
  white-space: nowrap;
}

.ley2025-cost-amount.ley2025-highlight {
  color: var(--ley2025-gold);
}
.ley2025-cost-amount.ley2025-success {
  color: var(--ley2025-success);
}

.ley2025-total-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0 0;
  margin-top: 4px;
  border-top: 2px solid var(--ley2025-navy);
  font-size: 1.1rem;
}

.ley2025-total-line .ley2025-t-label {
  color: var(--ley2025-navy);
  font-weight: 600;
  font-size: 13px;
}
.ley2025-total-line .ley2025-t-value {
  color: var(--ley2025-gold);
  font-weight: 600;
  font-size: 13px;
}

.ley2025-alert-law {
  margin-top: 18px;
  padding: 13px 15px;
  background: var(--ley2025-gold-pale);
  border: 1px solid var(--ley2025-gold-light);
  border-radius: 9px;
  font-size: 11.5px;
  color: var(--ley2025-navy-light);
  line-height: 1.6;
}

.ley2025-alert-law strong {
  color: var(--ley2025-gold);
}

.ley2025-recap-row {
  margin-bottom: 14px;
}

.ley2025-recap-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--ley2025-gold-pale);
  border: 1px solid var(--ley2025-gold-light);
  border-radius: 20px;
  padding: 4px 11px;
  font-size: 11px;
  color: var(--ley2025-navy);
  margin: 0 4px 7px 0;
}

.ley2025-divider {
  height: 1px;
  background: var(--ley2025-border);
  margin: 18px 0;
}

.ley2025-disclaimer {
  margin-top: 14px;
  font-size: 10.5px;
  color: var(--ley2025-muted);
  line-height: 1.6;
  text-align: center;
  padding: 0 6px;
}

@media (max-width: 480px) {
  .ley2025-card {
    padding: 20px 16px;
  }
  .ley2025-result-header {
    margin: -20px -16px 20px;
    padding: 20px 16px;
  }
  .ley2025-step-line {
    width: 32px;
  }
  .ley2025-radio-group {
    grid-template-columns: 1fr;
  }
  .ley2025-result-total {
    font-size: 1.8rem;
  }
}

/* Tooltip: Arreglo para [i] de precios orientativos 
   AVISO: Este bloque solo es utilizado en la v3 de calculadora_ley2025
------------------------------------------------------------------------- */

/* Tooltip de gastos de gestiÃ³n */
.ley2025-info-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  margin-left: 6px;
  vertical-align: middle;
}

.ley2025-info-icon {
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  color: var(--ley2025-gold);
  opacity: 0.8;
  transition: opacity 0.2s;
}

.ley2025-info-icon:hover {
  opacity: 1;
}

.ley2025-info-tooltip {
  display: none;
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: #1a2535;
  color: #fff;
  font-size: 0.78rem;
  font-weight: 400;
  line-height: 1.4;
  padding: 8px 12px;
  border-radius: 6px;
  white-space: nowrap;
  max-width: 280px;
  white-space: normal;
  z-index: 10;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  pointer-events: none;
}

/* Flechita del tooltip */
.ley2025-info-tooltip::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: #1a2535;
}

/* Escritorio: hover muestra el tooltip */
@media (hover: hover) {
  .ley2025-info-wrap:hover .ley2025-info-tooltip {
    display: block;
  }
}

/* MÃ³vil: tap toggle via clase, y el texto se muestra inline (sin posiciÃ³n absoluta) */
@media (hover: none) {
  .ley2025-info-tooltip {
    display: none;
    position: static;
    transform: none;
    background: var(--ley2025-gold-pale);
    color: inherit;
    border: 1px solid var(--ley2025-gold-light);
    border-radius: 6px;
    margin-top: 6px;
    font-size: 0.78rem;
    white-space: normal;
    pointer-events: auto;
    box-shadow: none;
    width: 100%;
  }

  .ley2025-info-tooltip::after {
    display: none;
  }

  .ley2025-info-open .ley2025-info-tooltip {
    display: block;
  }

  /* En mÃ³vil el label con el icono se hace flex-wrap para que el texto quede debajo */
  .ley2025-section-label {
    flex-wrap: wrap;
    align-items: center;
  }
}


/* Reglas añadidas para correcto funcionamiento de Calculadora V2 */

/* ─────────────────────────────────────────────────────────────────────────────
   CALCULADORA v4 — Nuevos componentes
   Añadir al final de calculadora_ley2025.css
   ─────────────────────────────────────────────────────────────────────────────  */

/* Botones LTV (80/90/100/Otros) */
.l25-ltv-group {
    display: flex;
    gap: 7px;
    flex-wrap: wrap;
    margin-bottom: .9rem;
}
.l25-ltv-btn {
    flex: 1;
    min-width: 65px;
    padding: 9px 4px;
    border: 2px solid var(--ley2025-border);
    border-radius: 8px;
    background: var(--ley2025-cream);
    cursor: pointer;
    font-weight: 600;
    font-size: .88rem;
    text-align: center;
    transition: all .18s;
    color: var(--ley2025-muted);
    font-family: inherit;
}
.l25-ltv-btn:hover {
    border-color: var(--color-primario);
    color: var(--color-primario);
}
.l25-ltv-btn.active {
    background: var(--color-primario);
    border-color: var(--color-primario);
    color: #fff;
}
.l25-ltv-otros { display: none; margin-top: 7px; }
.l25-ltv-otros.vis { display: block; }

/* Semáforo ratio de endeudamiento */
.l25-ratio-box {
    border-radius: 10px;
    padding: 15px;
    margin-top: 10px;
    text-align: center;
    transition: background .3s;
}
.l25-ratio-box.verde { background: #d4edda; color: #155724; }
.l25-ratio-box.ambar { background: #fff3cd; color: #856404; }
.l25-ratio-box.rojo  { background: #f8d7da; color: #721c24; }
.l25-ratio-val {
    font-size: 2rem;
    font-weight: 700;
}
.l25-ratio-label {
    font-size: .84rem;
    margin-top: 4px;
}

/* Caja Fondos Propios */
.l25-fondos {
    background: var(--ley2025-gold-pale);
    border: 1px solid var(--ley2025-border);
    border-radius: 10px;
    padding: 13px 16px;
    margin: 11px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.l25-fondos-label {
    font-size: .84rem;
    color: var(--ley2025-muted);
}
.l25-fondos-val {
    font-size: 1.18rem;
    font-weight: 700;
    color: var(--color-primario);
}

/* Tarjetas selector ITP */
.l25-itp-opt {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 13px;
    border: 2px solid var(--ley2025-border);
    border-radius: 8px;
    cursor: pointer;
    transition: all .18s;
    background: var(--ley2025-cream);
}
.l25-itp-opt:has(input:checked) {
    border-color: var(--color-primario);
    background: var(--ley2025-gold-pale);
}
.l25-itp-opt input[type=radio] {
    accent-color: var(--color-primario);
    width: 15px;
    height: 15px;
    flex-shrink: 0;
}
.l25-itp-pct {
    font-weight: 700;
    font-size: 1.02rem;
    min-width: 38px;
    color: var(--ley2025-navy);
}
.l25-itp-desc {
    font-size: .8rem;
    color: var(--ley2025-muted);
}

/* Resultado automático ITP (caja azul) */
.l25-itp-resultado-box {
    background: var(--ley2025-gold-pale);
    border: 2px solid var(--color-primario);
    border-radius: 10px;
    padding: 14px 16px;
}
.l25-itp-resultado-box .l25-itp-subtit {
    font-size: .78rem;
    color: var(--ley2025-muted);
    margin-bottom: 4px;
}
.l25-itp-resultado-box .l25-itp-bigval {
    font-size: 2rem;
    font-weight: 700;
    color: var(--color-primario);
    line-height: 1;
}
.l25-itp-resultado-box .l25-itp-bigdesc {
    font-size: .85rem;
    color: var(--ley2025-navy);
    margin-top: 3px;
}

/* Aviso ámbar de requisitos de renta */
.l25-aviso-renta {
    font-size: .8rem;
    color: #856404;
    background: #fff3cd;
    border-left: 3px solid #ffc107;
    border-radius: 0 7px 7px 0;
    padding: 8px 12px;
    margin-top: 8px;
    line-height: 1.5;
}

/* Nota CCAA */
.l25-nota-ca {
    font-size: .77rem;
    color: var(--ley2025-muted);
    font-style: italic;
    margin-top: 6px;
    line-height: 1.5;
}

/* Bloque banco informativo (opacidad reducida) */
.l25-banco-wrap { opacity: .65; }
.l25-banco-nota {
    font-size: .77rem;
    color: var(--ley2025-muted);
    font-style: italic;
    margin: 3px 0 10px;
    line-height: 1.5;
}

/* Checkbox perfil comprador */
.l25-check-perfil {
    display: flex;
    align-items: flex-start;
    gap: 11px;
    padding: 11px 14px;
    background: var(--ley2025-cream);
    border: 1.5px solid var(--ley2025-border);
    border-radius: 9px;
    cursor: pointer;
    transition: border-color .18s;
    margin-bottom: 8px;
}
.l25-check-perfil:hover { border-color: var(--color-primario); }
.l25-check-perfil input[type=checkbox] {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    margin-top: 2px;
    accent-color: var(--color-primario);
    cursor: pointer;
}
.l25-check-perfil strong {
    font-size: 13px;
    color: var(--ley2025-navy);
    display: block;
}
.l25-check-perfil span {
    font-size: 11.5px;
    color: var(--ley2025-muted);
}

/* Stepper 5 pasos: reducir líneas en móvil */
@media (max-width: 480px) {
    .l25-ltv-group { gap: 5px; }
    .l25-ltv-btn { font-size: .8rem; padding: 8px 2px; }
    .l25-ratio-val { font-size: 1.6rem; }
}

/* Barra visual ratio endeudamiento */
.l25-ratio-barra {
    height: 6px;
    background: rgba(0,0,0,.08);
    border-radius: 3px;
    margin-top: 10px;
    overflow: hidden;
}
.l25-ratio-barra-fill {
    height: 100%;
    border-radius: 3px;
    transition: width .4s ease, background .3s;
}

/* Aviso límite precio (azul informativo) */
.l25-aviso-precio {
    font-size: .8rem;
    color: #0c5460;
    background: #d1ecf1;
    border-left: 3px solid #17a2b8;
    border-radius: 0 7px 7px 0;
    padding: 8px 12px;
    margin-top: 8px;
    line-height: 1.5;
}