/* Estilos personalizados para la calculadora */
:root {
  --color-primary: #4f46e5;
  --color-primary-light: #818cf8;
  --color-secondary: #10b981;
  --color-danger: #ef4444;
  --color-warning: #f59e0b;
}

body {
  background-color: #f9fafb;
  color: #1f2937;
}

/* Estilos para los inputs */
.input-field {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  background-color: #f9fafb;
  transition: all 0.2s;
  font-size: 1rem;
}

.input-field:focus {
  outline: none;
  border-color: var(--color-primary-light);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

/* Estilos para grupos de formularios */
.form-group {
  margin-bottom: 1rem;
}

/* Estilos para resultados */
.result-group {
  margin-bottom: 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #f3f4f6;
}

.result-value {
  font-size: 1.5rem;
  font-weight: 600;
  color: #4b5563;
}

/* Personalización del slider */
input[type="range"] {
  height: 8px;
  appearance: none;
  margin: 10px 0;
  background: #ddd;
  border-radius: 8px;
  background: linear-gradient(to right, var(--color-primary) 0%, var(--color-primary) 50%, #ddd 50%, #ddd 100%);
  background-size: 200% 100%;
  background-position: right bottom;
  transition: all 0.2s ease;
}

input[type="range"]::-webkit-slider-thumb {
  appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--color-primary);
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
  cursor: pointer;
  transition: all 0.2s ease;
}

input[type="range"]::-webkit-slider-thumb:hover {
  box-shadow: 0 0 10px rgba(79, 70, 229, 0.3);
  transform: scale(1.1);
}

/* Animaciones para los resultados */
.highlight {
  animation: highlight 1s ease;
}

@keyframes highlight {
  0% {
    background-color: rgba(79, 70, 229, 0.1);
  }
  100% {
    background-color: transparent;
  }
}

/* Responsive */
@media (max-width: 768px) {
  .result-value {
    font-size: 1.25rem;
  }
}

/* Tooltip para información adicional */
/* Estilos de tooltip eliminados: ahora usaremos una implementación basada en Tailwind */

/* Estilos para botones de tooltip */
.tooltip-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  margin-left: 4px;
  position: relative;
  outline: none;
}

/* Efecto hover para el botón */
.tooltip-btn:hover svg {
  transform: scale(1.2);
}

/* Transición suave */
.tooltip-btn svg {
  transition: transform 0.2s ease;
}

/* Estilos para los tooltips nativos */
.tooltip-btn::before {
  content: attr(title);
  position: absolute;
  background-color: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  z-index: 99999;
  visibility: hidden;
  opacity: 0;
  top: -40px;
  left: 50%;
  transform: translateX(-50%);
  transition: opacity 0.3s, visibility 0.3s, top 0.3s;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.25);
  pointer-events: none;
}

/* Flecha del tooltip */
.tooltip-btn::after {
  content: "";
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  border-width: 8px 8px 0 8px;
  border-style: solid;
  border-color: rgba(0, 0, 0, 0.8) transparent transparent transparent;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.3s, visibility 0.3s, top 0.3s;
  pointer-events: none;
}

/* Mostrar tooltip al hover */
.tooltip-btn:hover::before,
.tooltip-btn:hover::after {
  visibility: visible;
  opacity: 1;
  top: -45px;
}

/* Variaciones para posicionamiento adaptable */
@media (max-width: 768px) {
  .tooltip-btn::before {
    width: 150px;
    white-space: normal;
    text-align: center;
  }
}

