/* Profile Calibration card styles
 *
 * Rendered inside the outer `.card` helper on element show pages.
 * The outer card supplies its own border/padding; this stylesheet
 * styles the inner per-profile calibration block.
 */

.calibration-card {
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 6px;
  padding: 1rem;
  margin-bottom: 1rem;
  background: var(--surface-raised, #f9fafb);
}

.calibration-card-summary {
  cursor: pointer;
  padding: 0.25rem 0 0.5rem;
  font-weight: 600;
  list-style: none;
}

.calibration-card-summary::-webkit-details-marker {
  display: none;
}

.calibration-card-summary::before {
  content: "▸";
  display: inline-block;
  width: 1em;
  transition: transform 0.15s ease;
}

details[open] > .calibration-card-summary::before {
  transform: rotate(90deg);
}

.calibration-summary-label {
  font-weight: 600;
}

.calibration-summary-stats {
  font-weight: normal;
  color: var(--text-muted, #6b7280);
  font-size: 0.9em;
}

.dirty-indicator {
  font-size: 0.85em;
  color: var(--alert-warning-text, #92400e);
}

.calibration-sliders {
  margin-bottom: 0.75rem;
}

.slider-row {
  display: grid;
  grid-template-columns: 8em 1fr 5em;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 0.25rem;
}

.slider-row .help-text {
  grid-column: 2 / 4;
  color: var(--text-muted, #6b7280);
  font-size: 0.8em;
}

.calibration-bands {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.25rem;
  margin-bottom: 0.75rem;
}

.calibration-bands input[type="number"] {
  width: 5em;
}

.calibration-grid {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 0.75rem;
}

.calibration-grid th,
.calibration-grid td {
  text-align: right;
  padding: 0.25rem 0.5rem;
  border-bottom: 1px solid var(--border, #e5e7eb);
}

.calibration-grid th:first-child,
.calibration-grid td:first-child {
  text-align: left;
}

.badge-configured {
  color: var(--success-color, #28a745);
}

.badge-nearest-match {
  color: var(--alert-warning-text, #92400e);
}

.calibration-footer {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.form-errors {
  color: var(--danger-color, #dc3545);
  font-size: 0.85em;
  margin-bottom: 0.5rem;
}

.form-errors ul {
  margin: 0;
  padding-left: 1.25rem;
}
