/* ROI Calculator Styles */

/* Section */
.calculator-section {
  background: #FAFAF8;
  min-height: calc(100vh - 80px);
  padding: 3rem 0 4rem;
}

/* Header */
.calculator-header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.calculator-title {
  font-family: 'Recoleta', Georgia, serif;
  font-size: clamp(2rem, 1.5rem + 2vw, 2.75rem);
  font-weight: 500;
  color: #2A2A2A;
  margin-bottom: 0.5rem;
}

.calculator-subtitle {
  font-size: 1.125rem;
  color: #6B6B6B;
}

/* Main Layout */
.calculator-layout {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 3rem;
  align-items: start;
  max-width: 1200px;
  margin: 0 auto;
}

/* Left: Inputs */
.calculator-inputs {
  background: #FFFFFF;
  border-radius: 16px;
  padding: 1.5rem;
  box-shadow:
    0 1px 3px rgba(0, 0, 0, 0.04),
    0 4px 12px rgba(0, 0, 0, 0.04);
}

/* Mode Toggle */
.mode-toggle {
  display: flex;
  background: #F3F3F1;
  border-radius: 10px;
  padding: 4px;
  margin-bottom: 1.5rem;
}

.mode-toggle__btn {
  flex: 1;
  padding: 0.625rem 1rem;
  border: none;
  background: transparent;
  font-size: 0.875rem;
  font-weight: 500;
  color: #6B6B6B;
  cursor: pointer;
  border-radius: 8px;
  transition: all 0.2s ease;
  font-family: inherit;
}

.mode-toggle__btn--active {
  background: #FFFFFF;
  color: #2A2A2A;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.mode-toggle__btn:hover:not(.mode-toggle__btn--active) {
  color: #2A2A2A;
}

/* Input Group */
.input-group {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.input-group[hidden] {
  display: none;
}

/* Input Field */
.input-field {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.input-field__header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.input-field__header label {
  font-size: 0.875rem;
  font-weight: 500;
  color: #2A2A2A;
}

.input-field__value {
  font-size: 0.9375rem;
  font-weight: 600;
  color: #2F5A1E;
  font-variant-numeric: tabular-nums;
}

.input-field__range {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: #9CA3AF;
}

/* Slider */
.slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  background: #E5E5E5;
  border-radius: 3px;
  outline: none;
  cursor: pointer;
}

.slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  background: #2F5A1E;
  border-radius: 50%;
  cursor: pointer;
  border: 3px solid #FFFFFF;
  box-shadow: 0 2px 6px rgba(47, 90, 30, 0.3);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.slider::-webkit-slider-thumb:hover {
  transform: scale(1.1);
  box-shadow: 0 3px 8px rgba(47, 90, 30, 0.4);
}

.slider::-webkit-slider-thumb:active {
  transform: scale(0.95);
}

.slider::-moz-range-thumb {
  width: 20px;
  height: 20px;
  background: #2F5A1E;
  border-radius: 50%;
  cursor: pointer;
  border: 3px solid #FFFFFF;
  box-shadow: 0 2px 6px rgba(47, 90, 30, 0.3);
}

/* Assumptions Section */
.assumptions-section {
  margin-top: 1.5rem;
  border-top: 1px solid #E8E8E6;
  padding-top: 1rem;
}

.assumptions-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0.5rem 0;
  border: none;
  background: transparent;
  font-size: 0.875rem;
  font-weight: 500;
  color: #6B6B6B;
  cursor: pointer;
  font-family: inherit;
}

.assumptions-toggle:hover {
  color: #2A2A2A;
}

.assumptions-toggle .chevron {
  transition: transform 0.2s ease;
}

.assumptions-toggle[aria-expanded="true"] .chevron {
  transform: rotate(180deg);
}

.assumptions-content {
  padding-top: 1rem;
}

.assumption-options {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.assumption-option {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.75rem;
  background: #F8F8F6;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s ease;
}

.assumption-option:hover {
  background: #F0F0EE;
}

.assumption-option input[type="radio"] {
  margin-top: 3px;
  accent-color: #2F5A1E;
}

.assumption-option__label {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.assumption-option__label strong {
  font-size: 0.875rem;
  font-weight: 500;
  color: #2A2A2A;
}

.assumption-option__label small {
  font-size: 0.75rem;
  color: #6B6B6B;
}

/* Custom Assumptions */
.custom-assumptions {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid #E8E8E6;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.custom-assumptions[hidden] {
  display: none;
}

/* Right: Results */
.calculator-results {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* Summary Cards */
.results-summary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.result-card {
  background: #FFFFFF;
  border-radius: 12px;
  padding: 1.25rem 1.5rem;
  box-shadow:
    0 1px 3px rgba(0, 0, 0, 0.04),
    0 4px 12px rgba(0, 0, 0, 0.04);
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.result-card--primary {
  background: linear-gradient(135deg, #2F5A1E 0%, #3D7328 100%);
}

.result-card__label {
  font-size: 0.8125rem;
  font-weight: 500;
  color: #6B6B6B;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.result-card--primary .result-card__label {
  color: rgba(255, 255, 255, 0.8);
}

.result-card__value {
  font-size: 2rem;
  font-weight: 700;
  color: #2A2A2A;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}

.result-card--primary .result-card__value {
  color: #FFFFFF;
}

.result-card__subtext {
  font-size: 0.8125rem;
  color: #6B6B6B;
}

/* Chart */
.chart-container {
  background: #FFFFFF;
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow:
    0 1px 3px rgba(0, 0, 0, 0.04),
    0 4px 12px rgba(0, 0, 0, 0.04);
}

.chart-title {
  font-size: 1rem;
  font-weight: 600;
  color: #2A2A2A;
  margin-bottom: 1rem;
}

.chart-wrapper {
  position: relative;
  height: 240px;
}

.chart-caption {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8125rem;
  color: #6B6B6B;
  margin-top: 1rem;
}

.chart-marker {
  width: 12px;
  height: 12px;
  background: #2F5A1E;
  border-radius: 50%;
  border: 2px solid #FFFFFF;
  box-shadow: 0 0 0 2px #2F5A1E;
}

/* Breakdown */
.results-breakdown {
  background: #FFFFFF;
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow:
    0 1px 3px rgba(0, 0, 0, 0.04),
    0 4px 12px rgba(0, 0, 0, 0.04);
}

.breakdown-title {
  font-size: 1rem;
  font-weight: 600;
  color: #2A2A2A;
  margin-bottom: 1rem;
}

.breakdown-item {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.breakdown-item:last-child {
  margin-bottom: 0;
}

.breakdown-item__bar {
  height: 8px;
  background: #E8E8E6;
  border-radius: 4px;
  overflow: hidden;
}

.breakdown-item__fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.4s ease;
}

.breakdown-item__bar--fte .breakdown-item__fill {
  background: linear-gradient(90deg, #2F5A1E, #4ADE80);
}

.breakdown-item__bar--leakage .breakdown-item__fill {
  background: linear-gradient(90deg, #6FB87E, #A7F3D0);
}

.breakdown-item__info {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.breakdown-item__label {
  font-size: 0.875rem;
  color: #6B6B6B;
}

.breakdown-item__value {
  font-size: 0.9375rem;
  font-weight: 600;
  color: #2A2A2A;
  font-variant-numeric: tabular-nums;
}

/* CTA */
.results-cta {
  text-align: center;
  padding-top: 0.5rem;
}

.results-cta .btn-large {
  padding: 1rem 2.5rem;
  font-size: 1rem;
}

/* ============================================
   RESPONSIVE
   ============================================ */

/* Tablet */
@media (max-width: 1024px) {
  .calculator-layout {
    grid-template-columns: 340px 1fr;
    gap: 2rem;
  }
}

/* Mobile */
@media (max-width: 768px) {
  .calculator-section {
    padding: 2rem 0 3rem;
  }

  .calculator-layout {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .calculator-inputs {
    order: 1;
  }

  .calculator-results {
    order: 2;
  }

  .results-summary {
    grid-template-columns: 1fr 1fr;
  }

  .result-card__value {
    font-size: 1.5rem;
  }

  .chart-wrapper {
    height: 200px;
  }
}

/* Small mobile */
@media (max-width: 480px) {
  .calculator-inputs {
    padding: 1.25rem;
  }

  .results-summary {
    grid-template-columns: 1fr;
  }

  .mode-toggle__btn {
    padding: 0.5rem 0.75rem;
    font-size: 0.8125rem;
  }
}
