/* FitPanel Component Styles */

.mint-fit-panel {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

/* Dark --border-light equals --bg-card; row and band hairlines need --border-color there. */
:where(html.dark) .mint-fit-panel {
  --border-light: var(--border-color);
}

/* Action bar */
.mint-fit-panel__actions {
  display: flex;
  gap: 0.5rem;
}

/* Progress */
.mint-fit-panel__progress {
  padding: 0.25rem 0;
}

/* Results (9b): values mono, tabular, never colored. */
.mint-fit-panel__results {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background-color: var(--bg-card);
  overflow: hidden;
}

.mint-fit-panel__series {
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid var(--border-light);
}

/* Series switch (9b): no track; the active series gets a tinted chip, no raised shadow. */
.mint-fit-panel__series .mint-segmented-control--card {
  padding: 0;
  background-color: transparent;
}

.mint-fit-panel__series .mint-segmented-control__option--card {
  color: var(--text-secondary);
}

.mint-fit-panel__series .mint-segmented-control__option--card.mint-segmented-control__option--active {
  background-color: var(--bg-tertiary);
  color: var(--text-primary);
  box-shadow: none;
}

/* Parameter table: parameter (mono unit) / value / 95% CI. */
.mint-fit-panel__result-list {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8125rem;
}

.mint-fit-panel__result-head th {
  padding: 0.375rem 0.75rem;
  border-bottom: 1px solid var(--border-light);
  background-color: var(--bg-primary);
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-secondary);
  text-align: left;
}

.mint-fit-panel__result-row > * {
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid var(--border-light);
}

.mint-fit-panel__result-row:last-child > * {
  border-bottom: none;
}

.mint-fit-panel__result-label {
  font-weight: 400;
  color: var(--text-primary);
  text-align: left;
}

.mint-fit-panel__result-unit {
  margin-left: 0.25rem;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  color: var(--text-secondary);
}

/* Numeric columns hug their content and align right. */
.mint-fit-panel__result-list .mint-fit-panel__result-num {
  width: 1%;
  white-space: nowrap;
  text-align: right;
}

.mint-fit-panel__result-value,
.mint-fit-panel__result-ci {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-variant-numeric: tabular-nums;
  color: var(--text-primary);
}

.mint-fit-panel__result-ci {
  color: var(--text-secondary);
}

/* Verdicts: icon shape + text, below the table. */
.mint-fit-panel__checks {
  display: flex;
  flex-wrap: wrap;
  gap: 0.875rem;
  padding: 0.625rem 0.75rem;
}

.mint-fit-panel__result-list + .mint-fit-panel__checks {
  border-top: 1px solid var(--border-light);
}

.mint-fit-panel__check {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.75rem;
  color: var(--text-secondary-strong);
}

.mint-fit-panel__check-icon {
  flex-shrink: 0;
  width: 0.75rem;
  height: 0.75rem;
}

.mint-fit-panel__check-stroke {
  stroke: var(--mint-success-hover);
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.mint-fit-panel__check-shape { fill: var(--text-secondary); }
.mint-fit-panel__check--warning .mint-fit-panel__check-shape { fill: var(--mint-warning); }
.mint-fit-panel__check--error .mint-fit-panel__check-shape { fill: var(--mint-error); }

.mint-fit-panel__check-mark {
  stroke: white;
  stroke-width: 1.8;
  stroke-linecap: round;
}
