/* What If Calculator - OneGold Style */
.what-if-calculator {
  display: grid;
  grid-template-columns: 400px 1fr;
  gap: 2rem;
  margin-bottom: 3rem;
  min-height: 600px;
}

.calculator-card {
  background: white;
  padding: 2.5rem;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  display: flex;
  flex-direction: column;
}

.calculator-card h2 {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--navy-primary);
  margin-bottom: 0.5rem;
  line-height: 1.3;
}

.calculator-card p {
  color: #6C757D;
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.metal-toggle {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.allocation-header {
  font-size: 0.85rem;
  font-weight: 600;
  color: #6C757D;
  margin-bottom: 0.5rem;
}

.metal-allocation-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem;
  border: 1px solid #E8E8E8;
  border-radius: 8px;
  background: white;
  transition: all 0.2s;
}

.metal-allocation-item:hover {
  border-color: var(--navy-primary);
}

.metal-allocation-item input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
}

.metal-name {
  flex: 1;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--navy-primary);
}

.metal-percentage-input {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.metal-percentage-input input {
  width: 60px;
  padding: 0.35rem 0.5rem;
  border: 1px solid #E8E8E8;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 600;
  text-align: center;
}

.metal-percentage-input input:disabled {
  background: #F8F9FA;
  color: #999;
}

.metal-percentage-input span {
  font-size: 0.9rem;
  color: #6C757D;
}

.allocation-total {
  padding: 0.5rem;
  background: #F8F9FA;
  border-radius: 6px;
  text-align: center;
  font-size: 0.85rem;
  color: #6C757D;
  margin-top: 0.5rem;
}

.allocation-total.valid {
  background: #d4edda;
  color: #155724;
}

.allocation-total.invalid {
  background: #f8d7da;
  color: #721c24;
}

.input-group {
  margin-bottom: 1.5rem;
}

.input-group label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--navy-primary);
  margin-bottom: 0.5rem;
}

.slider-container {
  position: relative;
  margin-bottom: 0.75rem;
}

.amount-slider {
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: #E8E8E8;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}

.amount-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #007bff;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.amount-slider::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #007bff;
  cursor: pointer;
  border: none;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.amount-display {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--navy-primary);
  margin-bottom: 0.5rem;
}

.monthly-checkbox {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.monthly-checkbox input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
}

.monthly-checkbox label {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--navy-primary);
  cursor: pointer;
  margin: 0;
}

.monthly-amount-input {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.monthly-amount-input input {
  flex: 1;
  padding: 0.75rem;
  border: 1px solid #E8E8E8;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 600;
}

.time-period-select {
  padding: 0.75rem;
  border: 1px solid #E8E8E8;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  width: 100%;
  background: white;
  cursor: pointer;
}

.date-input {
  padding: 0.75rem;
  border: 1px solid #E8E8E8;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  width: 100%;
  background: white;
  cursor: pointer;
  color: var(--navy-primary);
}

.strategy-callout {
  background: #FFF9E6;
  border-left: 4px solid #FFD700;
  padding: 1rem;
  margin-bottom: 1.5rem;
  border-radius: 4px;
}

.strategy-callout p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--navy-primary);
  font-weight: 600;
}

.calculate-btn {
  width: 100%;
  padding: 1rem;
  background: var(--navy-primary);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: auto;
}

.calculate-btn:hover {
  background: #0a2557;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(10, 31, 68, 0.3);
}

.results-panel {
  background: #F8F9FA;
  padding: 2rem;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
}

.results-header {
  margin-bottom: 1.5rem;
}

.results-header h3 {
  font-size: 0.9rem;
  color: #6C757D;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.results-value {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--navy-primary);
  margin-bottom: 0.5rem;
}

.results-gain {
  font-size: 1.1rem;
  font-weight: 600;
  color: #00C805;
}

.chart-wrapper-whatif {
  flex: 1;
  position: relative;
  min-height: 400px;
}

.chart-wrapper-whatif canvas {
  height: 100% !important;
}

.timeline-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 1rem;
  font-size: 0.85rem;
  color: #6C757D;
}

@media (max-width: 1024px) {
  .what-if-calculator {
    grid-template-columns: 1fr;
  }
  
  .calculator-card {
    padding: 1.5rem;
  }
  
  .results-panel {
    min-height: 500px;
  }
}
