/* Calculadora Salarial - Estilos */

.salary-calculator {
  max-width: 900px;
  margin: 2rem auto;
  padding: 2rem;
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Títulos de Sección */
.section-title {
  font-size: 1.3rem;
  font-weight: 600;
  color: #1a365d;
  margin: 1.5rem 0 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid #e0e0e0;
}

.section-title:first-child {
  margin-top: 0;
}

/* Grupos de Formulario */
.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: #333;
  font-size: 0.95rem;
}

.form-group input,
.form-group select {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 1rem;
  transition: border-color 0.3s ease;
  background: #fff;
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: #1a365d;
  box-shadow: 0 0 0 3px rgba(26, 54, 93, 0.1);
}

.form-group input::placeholder {
  color: #999;
}

.form-group small {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.85rem;
  color: #666;
  font-style: italic;
}

/* Campo de Momento de Pago - Centrado */
.payment-timing {
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

/* Contenedor del Botón */
.button-container {
  text-align: center;
  margin: 2rem 0;
}

#calculateBtn {
  background-color: #1a365d;
  color: white;
  border: none;
  padding: 1rem 3rem;
  font-size: 1.1rem;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 6px rgba(26, 54, 93, 0.2);
}

#calculateBtn:hover {
  background-color: #2d4a7c;
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(26, 54, 93, 0.3);
}

#calculateBtn:active {
  transform: translateY(0);
}

/* Sección de Resultados */
.results-section {
  display: none;
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 3px solid #1a365d;
  animation: slideIn 0.5s ease;
}

.results-section.active {
  display: block;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Tarjeta de Resultado Principal */
.result-card {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  padding: 2rem;
  border-radius: 10px;
  text-align: center;
  margin-bottom: 2rem;
  border: 3px solid #1a365d;
}

.result-card.primary {
  background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.02);
  }
}

.result-label {
  font-size: 1.1rem;
  color: #555;
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.result-value {
  font-size: 2.5rem;
  font-weight: 700;
  color: #1a365d;
  margin: 0;
}

/* Desglose */
.breakdown-section {
  margin: 2rem 0;
}

.breakdown-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.breakdown-item {
  background: #f8f9fa;
  padding: 1rem;
  border-radius: 8px;
  border-left: 4px solid #1a365d;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.breakdown-label {
  font-size: 0.9rem;
  color: #666;
  font-weight: 500;
}

.breakdown-value {
  font-size: 1.3rem;
  font-weight: 700;
  color: #1a365d;
}

/* Sección de Resumen */
.summary-section {
  margin: 2rem 0;
}

.summary-table {
  overflow-x: auto;
  margin-top: 1rem;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.summary-table table {
  width: 100%;
  border-collapse: collapse;
  background: white;
}

.summary-table thead {
  background-color: #1a365d;
  color: white;
}

.summary-table th {
  padding: 1rem;
  text-align: left;
  font-weight: 600;
  font-size: 0.95rem;
}

.summary-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #e0e0e0;
  font-size: 0.95rem;
}

.summary-table tbody tr:hover {
  background-color: #f8f9fa;
}

.summary-table tbody tr:nth-child(even) {
  background-color: #f9f9f9;
}

.summary-table tbody tr:nth-child(even):hover {
  background-color: #f0f0f0;
}

.summary-table .highlight-row {
  background-color: #d4edda !important;
  font-weight: 600;
}

.summary-table .highlight-row:hover {
  background-color: #c3e6cb !important;
}

/* Responsive Design */
@media (max-width: 768px) {
  .salary-calculator {
    padding: 1.5rem;
    margin: 1rem;
  }

  .section-title {
    font-size: 1.1rem;
  }

  .result-value {
    font-size: 2rem;
  }

  .breakdown-grid {
    grid-template-columns: 1fr;
  }

  #calculateBtn {
    width: 100%;
    padding: 1rem 2rem;
  }

  .summary-table {
    font-size: 0.85rem;
  }

  .summary-table th,
  .summary-table td {
    padding: 0.5rem;
  }
}

@media (max-width: 480px) {
  .salary-calculator {
    padding: 1rem;
    margin: 0.5rem;
  }

  .section-title {
    font-size: 1rem;
    margin: 1rem 0 0.75rem;
  }

  .form-group label {
    font-size: 0.9rem;
  }

  .form-group input,
  .form-group select {
    padding: 0.6rem;
    font-size: 0.95rem;
  }

  .form-group small {
    font-size: 0.8rem;
  }

  .result-card {
    padding: 1.5rem 1rem;
  }

  .result-label {
    font-size: 1rem;
  }

  .result-value {
    font-size: 1.75rem;
  }

  .breakdown-value {
    font-size: 1.1rem;
  }

  #calculateBtn {
    font-size: 1rem;
    padding: 0.875rem 1.5rem;
  }

  .summary-table th,
  .summary-table td {
    padding: 0.4rem 0.3rem;
    font-size: 0.8rem;
  }

  .summary-table th {
    font-size: 0.85rem;
  }
}
