/* v0.24.4 UI revision: focus indicators stay inside the control's paint box.
   Scrollable panels must keep their overflow constraints, especially on iOS. */
:where(button, a[href], input, select, textarea, summary, [tabindex], [contenteditable="true"], [role="button"]):focus-visible,
:where(input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]), select, textarea, [contenteditable="true"]):focus {
  outline: 2px solid var(--sme-ink, #bad68e);
  outline-offset: -3px !important;
}
/* Keep keyboard focus distinguishable on filled primary/accent controls. */
button.primary:focus-visible, .account-avatar:focus-visible {
  outline-color: var(--sme-onaccent, #192317);
}
/* Native small controls have less space for the inner ring. */
input:is([type="checkbox"], [type="radio"]):focus-visible {
  outline-offset: -2px !important;
}
/* Preserve existing validation colors and the custom rating focus indicator. */
:where(input, select, textarea)[aria-invalid="true"] {
  outline-offset: -3px !important;
}
.qa-rating200 input:focus-visible + span {
  outline-offset: -3px !important;
}
/* A little breathing room for every scrollable dialog and wizard, without
   changing footer positioning, scrollbar gutters or vertical scrolling. */
dialog.modal-shell201 .modal-body201 {
  padding-left: 6px;
  padding-top: 6px;
}
.wizard-content203 {
  padding-left: 6px;
  padding-top: 6px;
}
/* Preserve focus indicators in high-contrast system themes. */
@media (forced-colors: active) {
  :where(button, a[href], input, select, textarea, summary, [tabindex], [contenteditable="true"], [role="button"]):focus-visible,
  :where(input, select, textarea, [contenteditable="true"]):focus {
    outline-color: Highlight !important;
  }
}

/* v0.24.4 UI revision 2442: native date/time controls must shrink with
   their containing field, including WebKit's intrinsic date editor width.
   Keep the input type and native picker; do not hide overflow on the page. */
input:is([type="date"], [type="datetime-local"], [type="time"], [type="month"], [type="week"]) {
  -webkit-appearance: none;
  appearance: none;
  display: block;
  box-sizing: border-box;
  width: 100%;
  inline-size: 100%;
  min-width: 0;
  min-inline-size: 0;
  max-width: 100%;
  max-inline-size: 100%;
  min-height: 44px;
  font-size: max(16px, 1em);
}
/* iOS renders the date value in a separate intrinsic-size shadow element. */
input:is([type="date"], [type="datetime-local"], [type="time"], [type="month"], [type="week"])::-webkit-date-and-time-value {
  min-width: 0;
  max-width: 100%;
  width: 100%;
  text-align: left;
  margin: 0;
}
input:is([type="date"], [type="datetime-local"], [type="time"], [type="month"], [type="week"])::-webkit-datetime-edit {
  min-width: 0;
  max-width: 100%;
  padding: 0;
}
/* Let a field shrink as a flex/grid child instead of growing to its
   date editor's min-content size. Preserve the surrounding layout. */
label:has(> input:is([type="date"], [type="datetime-local"], [type="time"], [type="month"], [type="week"])) {
  min-width: 0;
  max-width: 100%;
}
.collab240-body {
  min-width: 0;
  grid-template-columns: minmax(0, 1fr);
}
@media (max-width: 480px) {
  .assignment-grid190:has(input:is([type="date"], [type="datetime-local"], [type="time"])),
  .setup-grid:has(input:is([type="date"], [type="datetime-local"], [type="time"])),
  .qa-grid200:has(input:is([type="date"], [type="datetime-local"], [type="time"])) {
    grid-template-columns: minmax(0, 1fr);
  }
}
