/* Wealth Checker - Page-specific styles */

/* Mode Toggle */
.mode-toggle {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  background: var(--accent);
  padding: 0.5rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
}

.mode-toggle button {
  flex: 1;
  padding: 0.75rem 1rem;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-weight: 500;
  transition: all 0.2s ease;
}

.mode-toggle button.active {
  background: var(--surface);
  border-color: var(--primary);
  color: var(--primary);
  box-shadow: var(--shadow-sm);
}

.mode-toggle button:hover:not(.active) {
  background: rgba(37, 99, 235, 0.05);
}

/* Form Sections */
.form-section {
  display: none;
}

.form-section.active {
  display: block;
}

.input-group {
  margin-bottom: 1rem;
}

.input-group label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.tooltip-icon {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--text-light);
  color: var(--surface);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  cursor: help;
  position: relative;
}

.tooltip-icon:hover::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: var(--text);
  color: var(--surface);
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  white-space: nowrap;
  margin-bottom: 0.5rem;
  z-index: 100;
  box-shadow: var(--shadow-lg);
}

.tooltip-icon:hover::before {
  content: '';
  position: absolute;
  bottom: calc(100% - 5px);
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: var(--text);
}

/* Net Worth Display */
.net-worth-display {
  background: var(--accent);
  border: 2px solid var(--primary);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  margin: 1.5rem 0;
  text-align: center;
}

.net-worth-display .label {
  color: var(--text-light);
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.net-worth-display .value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary);
}

.net-worth-display .value.negative {
  color: var(--danger);
}

.net-worth-display .value.positive {
  color: var(--success);
}

/* Results */
.result-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--accent);
  width: fit-content;
  font-weight: 600;
  margin-bottom: 1rem;
}

.result-badge.below-average {
  border-color: var(--danger);
  background: rgba(239, 68, 68, 0.1);
  color: var(--danger);
}

.result-badge.above-average {
  border-color: var(--warning);
  background: rgba(245, 158, 11, 0.1);
  color: var(--warning);
}

.result-badge.comfortable {
  border-color: var(--success);
  background: rgba(34, 197, 94, 0.1);
  color: var(--success);
}

.result-badge.wealthy {
  border-color: var(--primary);
  background: rgba(37, 99, 235, 0.1);
  color: var(--primary);
}

/* KPIs Grid */
.kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
  margin: 1.5rem 0;
}

.kpi {
  background: var(--accent);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1rem;
}

.kpi .label {
  color: var(--text-light);
  font-size: 0.85rem;
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.kpi .value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
}

/* CSS Chart */
.css-chart {
  margin: 1.5rem 0;
  padding: 1rem;
  background: var(--accent);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
}

.chart-title {
  font-size: 0.9rem;
  color: var(--text-light);
  margin-bottom: 1rem;
  font-weight: 500;
}

.chart-bars {
  display: flex;
  align-items: flex-end;
  gap: 1rem;
  height: 200px;
  padding: 0.5rem 0;
}

.chart-bar {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.chart-bar-fill {
  width: 100%;
  background: linear-gradient(to top, var(--primary), var(--primary-light));
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  min-height: 10px;
  position: relative;
  transition: height 0.3s ease;
}

.chart-bar-fill.you {
  background: linear-gradient(to top, var(--success), #4ade80);
}

.chart-bar-fill.p50 {
  background: linear-gradient(to top, var(--warning), #fbbf24);
}

.chart-bar-fill.p90 {
  background: linear-gradient(to top, var(--primary), var(--primary-light));
}

.chart-bar-label {
  font-size: 0.75rem;
  color: var(--text-light);
  font-weight: 500;
  text-align: center;
}

.chart-bar-value {
  font-size: 0.85rem;
  color: var(--text);
  font-weight: 600;
  text-align: center;
  margin-top: 0.25rem;
}

/* Projection Section */
.projection-section {
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 2px solid var(--border);
}

.projection-inputs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.projection-results {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}

.projection-card {
  background: var(--accent);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1rem;
  text-align: center;
}

.projection-card .years {
  font-size: 0.85rem;
  color: var(--text-light);
  margin-bottom: 0.5rem;
}

.projection-card .amount {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
}

/* Tips */
.tips {
  margin-top: 1.5rem;
  display: grid;
  gap: 0.75rem;
}

.tip {
  border: 1px solid var(--border);
  background: var(--accent);
  border-radius: var(--radius-md);
  padding: 1rem;
  line-height: 1.6;
}

.tip strong {
  color: var(--text);
  display: block;
  margin-bottom: 0.25rem;
}

.tip-content {
  color: var(--text-light);
  font-size: 0.9rem;
}

/* Methodology & FAQ */
.methodology-section,
.faq-section {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 2px solid var(--border);
}

.methodology-section h2,
.faq-section h2 {
  margin-bottom: 1rem;
}

.methodology-section h3 {
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
  font-size: 1.1rem;
}

.methodology-section ul {
  margin-left: 1.5rem;
  margin-top: 0.5rem;
}

.methodology-section li {
  margin-bottom: 0.5rem;
  line-height: 1.6;
}

.faq-item {
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 1rem;
}

.faq-item:last-child {
  border-bottom: none;
}

.faq-item summary {
  font-weight: 600;
  cursor: pointer;
  padding: 0.5rem 0;
  color: var(--text);
}

.faq-item summary:hover {
  color: var(--primary);
}

.faq-item p {
  margin-top: 0.75rem;
  color: var(--text-light);
  line-height: 1.6;
}

/* Error Messages */
.error-message {
  color: var(--danger);
  font-size: 0.875rem;
  margin-top: 0.25rem;
  display: none;
}

.error-message.show {
  display: block;
}

.input-error {
  border-color: var(--danger) !important;
}

/* Loading State */
.loading {
  opacity: 0.6;
  pointer-events: none;
}

/* Responsive */
@media (max-width: 768px) {
  .kpis {
    grid-template-columns: 1fr 1fr;
  }
  
  .projection-inputs,
  .projection-results {
    grid-template-columns: 1fr;
  }
  
  .chart-bars {
    height: 150px;
    gap: 0.5rem;
  }
}

@media (max-width: 480px) {
  .kpis {
    grid-template-columns: 1fr;
  }
  
  .net-worth-display .value {
    font-size: 1.5rem;
  }
}

