/* simulador.css */

.simulador-container {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  background: #f9fafb;
  padding: 2rem;
  border-radius: 10px;
  font-family: 'Inter', sans-serif;
}

.simulador-formulario,
.simulador-resultado {
  flex: 1 1 45%;
  background: white;
  border-radius: 10px;
  padding: 2rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.simulador-formulario h2,
.simulador-resultado h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: #1f2937;
}

.simulador-formulario label {
  display: block;
  margin-bottom: 1.5rem;
  font-weight: 600;
  color: #374151;
}

.simulador-formulario input:not([type="range"]),
.simulador-formulario select {
  display: block;
  width: 100%;
  margin-top: 0.25rem;
  padding: 0.5rem;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 1rem;
  background: #fff;
}

.range-output {
  margin-top: 0.25rem;
  font-size: 0.875rem;
  color: #6b7280;
}

button {
  background-color: #0f172a;
  color: white;
  padding: 0.75rem 1.5rem;
  font-weight: 600;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  margin-top: 1rem;
}

button:hover {
  background-color: #1e293b;
}

.simulador-resultado {
  background-color: #eff6ff;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.cuota-mensual {
  margin-bottom: 1rem;
}

.cuota-mensual h3 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
  color: #1f2937;
}

.cuota {
  font-size: 2rem;
  font-weight: bold;
  color: #0f172a;
}

.resumen-detallado {
  list-style: none;
  padding: 0;
  margin-bottom: 2rem;
  color: #1f2937;
}

.resumen-detallado li {
  margin-bottom: 0.5rem;
  font-size: 1rem;
}

.barras {
  display: flex;
  height: 12px;
  border-radius: 6px;
  overflow: hidden;
  background: #e5e7eb;
}

.barra {
  height: 100%;
}

#barra-ahorro {
  background-color: #6ee7b7;
}

#barra-hipoteca {
  background-color: #3b82f6;
}

#barra-interes {
  background-color: #1e40af;
}

/* Fix sliders: evitar herencia y mostrar correctamente la línea y el thumb */

input[type="range"] {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  width: 100%;
  height: 8px;
  background: transparent;
  margin-top: 0px;
  padding: 0;
  border: none;
  box-shadow: none;
}

input[type="range"]::-webkit-slider-runnable-track {
  height: 8px;
  background: #d1d5db;
  border-radius: 4px;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  height: 20px;
  width: 20px;
  background: #0f766e;
  border-radius: 50%;
  cursor: pointer;
  margin-top: -6px;
  border: none;
  box-shadow: 0 0 2px rgba(0, 0, 0, 0.2);
}

input[type="range"]::-moz-range-track {
  height: 8px;
  background: #d1d5db;
  border-radius: 4px;
}

input[type="range"]::-moz-range-thumb {
  height: 20px;
  width: 20px;
  background: #0f766e;
  border-radius: 50%;
  cursor: pointer;
  border: none;
  box-shadow: 0 0 2px rgba(0, 0, 0, 0.2);
}

input[type="range"]::-ms-track {
  height: 8px;
  background: transparent;
  border-color: transparent;
  color: transparent;
}

input[type="range"]::-ms-fill-lower,
input[type="range"]::-ms-fill-upper {
  background: #d1d5db;
  border-radius: 4px;
}

input[type="range"]::-ms-thumb {
  height: 20px;
  width: 20px;
  background: #0f766e;
  border-radius: 50%;
  cursor: pointer;
  border: none;
  box-shadow: 0 0 2px rgba(0, 0, 0, 0.2);
}
.leyenda-barras {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 2rem;
  margin-top: 0.75rem;
  font-size: 0.875rem;
  color: #374151;
}

.leyenda-barras span {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  white-space: nowrap;
}

.color-caja {
  display: inline-block;
  width: 16px;
  height: 8px;
  border-radius: 4px;
}

.color-caja.ahorro {
  background-color: #6ee7b7;
}

.color-caja.hipoteca {
  background-color: #3b82f6;
}

.color-caja.interes {
  background-color: #1e40af;
}
.range-wrapper {
  display: block;
  width: 100%;
  padding: 0.5rem;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  background: #fff;
  box-sizing: border-box;
}