/* output_limits.css — the Output Limits header's mode tag + Reset, and the changed-value marks
   (static/js/output_limits.js). Every rule sits under #sb-output-limits-sec. */

#sb-output-limits-sec { --ol-accent: var(--gold); }
/* Light --gold is 3.3:1 as text on the sidebar; the app's chip ink reaches 4.5:1. */
[data-theme="light"] #sb-output-limits-sec { --ol-accent: #6f560f; }

#sb-output-limits-sec .ol-tag {
  color: var(--ol-accent);
  white-space: nowrap;
}
#sb-output-limits-sec .ol-tag::before {
  content: "\00B7";
  margin: 0 4px;
  color: var(--muted);
}

/* Ghost button on the header line. 32px tall to the pointer, but the negative margins keep the
   header row exactly as tall as it was, and it is always laid out (visibility, not display),
   so showing it never moves anything. */
#sb-output-limits-sec .ol-reset {
  margin: -10px -8px -10px auto;
  min-height: 32px;
  padding: 0 8px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 0;
  border-radius: var(--r);
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 12px;
  font-weight: 400;
  letter-spacing: normal;
  text-transform: none;
  cursor: pointer;
  transition: background-color .15s ease, color .15s ease, opacity .2s ease;
}
#sb-output-limits-sec .ol-reset svg {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
  transition: transform .3s cubic-bezier(.16, 1, .3, 1);
}
#sb-output-limits-sec .ol-reset:hover { background: var(--s3); color: var(--text); }
#sb-output-limits-sec .ol-reset:hover svg { transform: rotate(-60deg); }
#sb-output-limits-sec .ol-reset:active { background: var(--border); }
#sb-output-limits-sec .ol-reset:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
#sb-output-limits-sec .ol-reset.is-off { visibility: hidden; opacity: 0; }

#sb-output-limits-sec .ol-live {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

/* A limit that is not its default: the number itself says so. */
#sb-output-limits-sec .ol-row[data-mod] .stepper-input {
  color: var(--ol-accent);
  font-weight: 600;
}

/* One soft flash on the rows a mode switch changed. The row's own width grows by the inset it
   pads back, so the content does not move. */
#sb-output-limits-sec .ol-row {
  margin-inline: -4px;
  padding-inline: 4px;
  border-radius: var(--r);
}
#sb-output-limits-sec .ol-row.ol-flash { animation: ol-flash .7s cubic-bezier(.16, 1, .3, 1); }
@keyframes ol-flash {
  from { background-color: var(--gold-bg); }
  to   { background-color: transparent; }
}

@media (prefers-reduced-motion: reduce) {
  #sb-output-limits-sec .ol-reset,
  #sb-output-limits-sec .ol-reset svg { transition: none; }
  #sb-output-limits-sec .ol-reset:hover svg { transform: none; }
  #sb-output-limits-sec .ol-row.ol-flash { animation: none; }
}
