/* styles.css — Marketing Mix Modeling Lab specific styles */

/* Mode Toggle */
.mode-toggle-bar {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: var(--app-surface-variant, #f1f5f9);
  padding: 0.5rem 1rem;
  border-radius: 8px;
  margin-bottom: 1.5rem;
}

.mode-toggle-bar label {
  font-weight: 600;
  color: var(--app-text, #1e293b);
}

.mode-pills {
  display: flex;
  gap: 0.25rem;
  background: var(--app-card-bg, #fff);
  padding: 0.25rem;
  border-radius: 6px;
  border: 1px solid var(--app-border, #cbd5e1);
}

.mode-pill {
  padding: 0.35rem 0.85rem;
  border: none;
  background: transparent;
  border-radius: 4px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  color: var(--app-muted, #64748b);
  transition: all 0.2s ease;
}

.mode-pill.active {
  background: var(--app-accent, #2a7de1);
  color: #fff;
}

/* Sliders Grid for Channels */
.channel-sliders-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.channel-slider-card {
  background: var(--app-card-bg, #fff);
  border: 1px solid var(--app-border, #e2e8f0);
  border-radius: 8px;
  padding: 1rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.channel-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--app-border, #e2e8f0);
  padding-bottom: 0.5rem;
  margin-bottom: 0.75rem;
}

.channel-name-badge {
  font-weight: 700;
  font-size: 1rem;
  color: var(--app-text, #1e293b);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.channel-color-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

.slider-group {
  margin-bottom: 0.85rem;
}

.slider-label-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  margin-bottom: 0.25rem;
}

.slider-param-name {
  color: var(--app-text, #334155);
  font-weight: 600;
}

.slider-value-badge {
  font-family: monospace;
  font-weight: 700;
  color: var(--app-accent, #2a7de1);
}

.slider-subtext {
  font-size: 0.75rem;
  color: var(--app-muted, #64748b);
  margin-top: 0.15rem;
}

/* Summary metrics top bar */
.mmm-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.mmm-metric-card {
  background: var(--app-card-bg, #fff);
  border: 1px solid var(--app-border, #e2e8f0);
  border-radius: 8px;
  padding: 1rem;
  text-align: center;
}

.mmm-metric-val {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--app-accent, #2a7de1);
  margin: 0.25rem 0;
}

.mmm-metric-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--app-muted, #64748b);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

/* Table Verdict Badges */
.verdict-badge {
  display: inline-block;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
}

.verdict-badge--headroom {
  background: #dcfce7;
  color: #15803d;
}

.verdict-badge--saturated {
  background: #fee2e2;
  color: #b91c1c;
}

.verdict-badge--moderate {
  background: #e0f2fe;
  color: #0369a1;
}

.verdict-badge--minimal {
  background: #f1f5f9;
  color: #64748b;
}

/* Move the Money Reallocation View */
.reallocation-header-card {
  background: linear-gradient(135deg, #f0fdf4 0%, #ecfdf5 100%);
  border: 1px solid #bbf7d0;
  border-radius: 8px;
  padding: 1.25rem;
  margin-bottom: 1.5rem;
}

.reallocation-gain-stat {
  font-size: 1.8rem;
  font-weight: 800;
  color: #16a34a;
}

.reallocation-bound-note {
  font-size: 0.85rem;
  color: #374151;
  margin-top: 0.5rem;
}

.shift-limit-control {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 1rem 0;
}

/* Response curves grid */
.response-curves-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1rem;
  margin: 1.5rem 0;
}

.response-curve-card {
  background: var(--app-card-bg, #fff);
  border: 1px solid var(--app-border, #e2e8f0);
  border-radius: 8px;
  padding: 1rem;
}

/* Diagnostics chip list */
.diagnostics-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1rem 0;
}

.diagnostic-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.75rem;
  border-radius: 6px;
  font-size: 0.82rem;
  font-weight: 600;
}

.diagnostic-chip--caution {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fde68a;
}

.diagnostic-chip--info {
  background: #e0f2fe;
  color: #0369a1;
  border: 1px solid #bae6fd;
}

.diagnostic-chip--watch {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

/* Reveal the Truth Card */
.truth-card {
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 1.25rem;
  margin-top: 1.5rem;
}

.truth-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.truth-channel-box {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 0.75rem;
}

.truth-val-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  margin: 0.25rem 0;
}

/* Chart containers */
.chart-mount {
  min-height: 380px;
  width: 100%;
}
