/* ==========================================
   SIMULADOR DE AHORRO
   Añadir al final de components.css
   Mobile-first, igual que el resto del sistema
   ========================================== */


/* --- Objetivos predefinidos (chips) --- */

.goal-presets {
  display:       flex;
  flex-wrap:     wrap;
  gap:           var(--s-2);
  margin-bottom: var(--s-4);
}

.goal-preset {
  padding:       var(--s-2) var(--s-3);
  font-size:     var(--text-sm);
  font-weight:   var(--weight-medium);
  font-family:   inherit;
  color:         var(--color-text-muted);
  background:    var(--color-bg);
  border:        1px solid var(--color-border);
  border-radius: var(--radius-sm);
  cursor:        pointer;
  transition:    background var(--transition), color var(--transition), border-color var(--transition);
}

.goal-preset:hover {
  color:        var(--color-text);
  border-color: var(--color-text-muted);
}

.goal-preset.is-active {
  background:   var(--green-light);
  color:        var(--green-text);
  border-color: var(--color-accent);
}

/* --- Nota contextual del objetivo elegido --- */

.preset-note {
  font-size:     var(--text-sm);
  line-height:   1.6;
  color:         var(--color-text-muted);
  border-left:   2px solid var(--color-border);
  padding-left:  var(--s-3);
  margin-bottom: var(--s-5);
}

/* --- Etiqueta "opcional" dentro de un label --- */

.field__hint {
  font-weight:    var(--weight-normal);
  font-size:      var(--text-xs);
  color:          var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-left:    var(--s-2);
}


/* --- Resultado destacado --- */
/* En móvil queda fijo bajo el header (60px) mientras el usuario
   ajusta los controles: el número no se pierde al hacer scroll */

.headline-result {
  position:      sticky;
  top:           60px;
  z-index:       90;
  background:    var(--color-bg-card);
  border:        1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding:       var(--s-5);
  margin-bottom: var(--s-5);
  text-align:    center;
}

.headline-result__label,
.headline-result__hint {
  font-size: var(--text-xs);
  color:     var(--color-text-muted);
}

.headline-result__value {
  font-size:      var(--text-4xl);
  font-weight:    var(--weight-bold);
  color:          var(--color-accent);
  line-height:    1.1;
  letter-spacing: -0.02em;
  margin:         var(--s-2) 0;
}


/* --- Palancas: qué hacer si no llegas --- */

.levers {
  background:    var(--color-bg-soft);
  border:        1px solid var(--color-border);
  border-radius: var(--radius);
  padding:       var(--s-4);
  margin-bottom: var(--s-5);
}

.levers[hidden] {
  display: none;
}

.levers__title {
  font-size:     var(--text-sm);
  font-weight:   var(--weight-medium);
  color:         var(--color-text);
  margin-bottom: var(--s-4);
}

.lever + .lever {
  margin-top:  var(--s-3);
  padding-top: var(--s-3);
  border-top:  1px solid var(--color-border-soft);
}

.lever__name {
  font-size:     var(--text-xs);
  font-weight:   var(--weight-medium);
  color:         var(--color-accent);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--s-1);
}

.lever__detail {
  font-size:   var(--text-sm);
  line-height: 1.5;
  color:       var(--color-text-soft);
}


/* --- Comparativa: parado vs rentabilizado --- */

.scenario {
  border:        1px solid var(--color-border-soft);
  border-radius: var(--radius);
  padding:       var(--s-4);
  margin-bottom: var(--s-5);
}

.scenario__title {
  font-size:     var(--text-xs);
  font-weight:   var(--weight-medium);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color:         var(--color-text-muted);
  margin-bottom: var(--s-3);
}

.scenario__row {
  display:         flex;
  justify-content: space-between;
  align-items:     baseline;
  gap:             var(--s-4);
  font-size:       var(--text-sm);
  color:           var(--color-text-soft);
  padding:         var(--s-2) 0;
}

.scenario__row + .scenario__row {
  border-top: 1px solid var(--color-border-soft);
}

.scenario__row strong {
  font-weight: var(--weight-bold);
  color:       var(--color-text);
  white-space: nowrap;
}

.scenario__gap {
  font-size:   var(--text-xs);
  color:       var(--color-accent);
  font-weight: var(--weight-medium);
  margin-top:  var(--s-3);
  text-align:  right;
}


/* ==========================================
   PANTALLAS MEDIANAS Y GRANDES (≥768px)
   ========================================== */

@media (min-width: 768px) {

  /* Con las dos columnas visibles a la vez, el sticky ya no aporta */
  .headline-result {
    position: static;
    padding:  var(--s-6);
  }

  .headline-result__value {
    font-size: 3rem;
  }

}
