/* Calculadora de Jubilación - Estilos */

.retirement-calculator {
  background: #ffffff;
  border-radius: 12px;
  padding: 30px;
  margin: 30px auto;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  max-width: 900px;
}

.calculator-form {
  display: grid;
  gap: 25px;
  margin-bottom: 30px;
}

.section-title {
  font-size: 18px;
  font-weight: 700;
  color: #1a365d;
  margin: 15px 0 10px 0;
  padding-bottom: 8px;
  border-bottom: 2px solid #e0e0e0;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  align-items: end;
}

.form-row.center-row {
  display: flex;
  justify-content: center;
  margin-top: 10px;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-field.center-field {
  width: 100%;
  max-width: 450px;
}

.form-field.info-field {
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.form-field label {
  font-weight: 600;
  color: #333;
  font-size: 14px;
}

.info-box {
  background: linear-gradient(135deg, #e8f0fe 0%, #d4e4fc 100%);
  padding: 12px 20px;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  align-items: center;
  border: 2px solid #1a365d;
  box-shadow: 0 2px 8px rgba(26, 54, 93, 0.15);
  width: 100%;
}

.info-box strong {
  color: #1a365d;
  font-size: 13px;
}

.info-box span {
  color: #1a365d;
  font-size: 20px;
  font-weight: 700;
}

.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.currency-symbol {
  position: absolute;
  left: 12px;
  color: #666;
  font-weight: 500;
  pointer-events: none;
  z-index: 1;
}

.percent-symbol {
  position: absolute;
  right: 12px;
  color: #666;
  font-weight: 500;
  pointer-events: none;
  z-index: 1;
}

.form-field input,
.form-field select {
  width: 100%;
  padding: 12px;
  padding-left: 32px;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  font-size: 16px;
  transition: border-color 0.3s;
  background: #f9f9f9;
}

.form-field input:focus,
.form-field select:focus {
  outline: none;
  border-color: #1a365d;
  background: #ffffff;
}

.form-field input.no-symbol {
  padding-left: 12px;
}

.form-field input.has-percent {
  padding-right: 32px;
}

.form-field select {
  padding-left: 12px;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}

.calculate-btn {
  background: #1a365d;
  color: #ffffff;
  padding: 16px 60px;
  border: none;
  border-radius: 8px;
  font-size: 18px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  width: auto;
  min-width: 300px;
  box-shadow: 0 4px 12px rgba(26, 54, 93, 0.3);
}

.calculate-btn:hover {
  background: #2d4a7c;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(26, 54, 93, 0.4);
}

.calculate-btn:active {
  transform: translateY(0);
}

.results-section {
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
  border-radius: 12px;
  padding: 25px;
  margin-top: 30px;
  display: none;
}

.results-section.active {
  display: block;
  animation: slideIn 0.4s ease-out;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.result-card {
  background: #ffffff;
  border-radius: 10px;
  padding: 20px;
  margin-bottom: 15px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.result-card.primary-result {
  text-align: center;
  border: 2px solid #1a365d;
  background: linear-gradient(135deg, #ffffff 0%, #f0f4f8 100%);
}

.result-card.secondary-result {
  text-align: center;
  border: 2px solid #28a745;
  background: linear-gradient(135deg, #ffffff 0%, #f0fff4 100%);
}

.result-card h3 {
  color: #1a365d;
  font-size: 20px;
  margin-bottom: 15px;
  text-align: center;
}

.result-label {
  color: #666;
  font-size: 14px;
  margin-bottom: 8px;
  font-weight: 500;
}

.result-value {
  color: #333;
  font-size: 28px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.result-value.primary {
  color: #1a365d;
  font-size: 36px;
}

.result-value.secondary {
  color: #28a745;
  font-size: 32px;
}

.result-breakdown {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 15px;
  margin-top: 20px;
}

.breakdown-item {
  background: #ffffff;
  border-radius: 8px;
  padding: 15px;
  text-align: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}

.breakdown-label {
  color: #666;
  font-size: 13px;
  margin-bottom: 8px;
  font-weight: 500;
}

.breakdown-value {
  color: #1a365d;
  font-size: 20px;
  font-weight: 600;
}

.result-card.summary-card {
  background: #fff;
  margin-top: 15px;
}

.summary-content {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  padding: 10px 15px;
  border-radius: 6px;
  background: #f8f9fa;
  font-size: 15px;
  align-items: center;
}

.summary-row.total {
  background: #e8f0fe;
  border: 1px solid #1a365d;
  margin-top: 5px;
  font-size: 16px;
}

.projection-toggle {
  margin-top: 20px;
  text-align: center;
}

.toggle-btn {
  background: #ffffff;
  color: #1a365d;
  padding: 12px 30px;
  border: 2px solid #1a365d;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
}

.toggle-btn:hover {
  background: #1a365d;
  color: #ffffff;
}

.projection-table {
  margin-top: 20px;
  overflow-x: auto;
  display: none;
}

.projection-table.active {
  display: block;
  animation: slideIn 0.4s ease-out;
}

.projection-table table {
  width: 100%;
  border-collapse: collapse;
  background: #ffffff;
  border-radius: 8px;
  overflow: hidden;
}

.projection-table th {
  background: #1a365d;
  color: #ffffff;
  padding: 12px;
  text-align: left;
  font-weight: 600;
  font-size: 14px;
}

.projection-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #e0e0e0;
  font-size: 14px;
  color: #333;
}

.projection-table tr:hover {
  background: #f5f7fa;
}

.projection-table tr:last-child td {
  border-bottom: none;
}

.projection-table td.phase-work {
  background: #e8f5e9;
}

.projection-table td.phase-retirement {
  background: #fff3e0;
}

/* Responsive Design */
@media (max-width: 768px) {
  .retirement-calculator {
    padding: 20px;
    margin: 20px 10px;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .form-field.center-field {
    max-width: 100%;
  }

  .section-title {
    font-size: 16px;
  }

  .result-value {
    font-size: 24px;
  }

  .result-value.primary {
    font-size: 28px;
  }

  .result-value.secondary {
    font-size: 26px;
  }

  .result-breakdown {
    grid-template-columns: 1fr;
  }

  .calculate-btn {
    padding: 14px 40px;
    font-size: 16px;
    min-width: 250px;
  }

  .summary-row {
    flex-direction: column;
    gap: 5px;
    align-items: flex-start;
  }

  .projection-table {
    font-size: 12px;
  }

  .projection-table th,
  .projection-table td {
    padding: 8px;
    font-size: 12px;
  }
}

@media (max-width: 480px) {
  .retirement-calculator {
    padding: 15px;
    margin: 15px 5px;
  }

  .section-title {
    font-size: 15px;
  }

  .form-field label {
    font-size: 13px;
  }

  .form-field input,
  .form-field select {
    font-size: 14px;
    padding: 10px;
    padding-left: 28px;
  }

  .form-field input.no-symbol {
    padding-left: 10px;
  }

  .info-box {
    padding: 10px 15px;
  }

  .info-box strong {
    font-size: 12px;
  }

  .info-box span {
    font-size: 18px;
  }

  .result-value {
    font-size: 20px;
  }

  .result-value.primary {
    font-size: 24px;
  }

  .result-value.secondary {
    font-size: 22px;
  }

  .breakdown-value {
    font-size: 18px;
  }

  .breakdown-label {
    font-size: 12px;
  }

  .calculate-btn {
    min-width: 200px;
    padding: 12px 30px;
  }

  .toggle-btn {
    padding: 10px 20px;
    font-size: 14px;
  }

  .summary-row {
    padding: 8px 12px;
    font-size: 13px;
  }
}
