/* Always-floated outlined labels: unambiguous for selects, dates and autofill. */
/* Shared by public, authentication and every workspace, independent of role. */
:is(.workspace-shell, .public-shell) .material-outline {
  --material-focus: #1976d2;
  position: relative; display: block; min-width: 0; width: 100%;
  margin-block: 10px 4px; background: var(--surface);
  border-radius: 6px;
}
:is(.workspace-shell, .public-shell) .material-outline > :is(input,select,textarea).material-control {
  display: block; width: 100%; min-width: 0; min-height: 56px; height: 56px;
  margin: 0; padding: 16px 14px; border: 1px solid var(--muted_readable,var(--muted));
  border-radius: 6px; background: transparent; color: var(--text);
  font: inherit; font-size: 15px; line-height: 1.5; box-shadow: none;
  outline: none; transition: border-color .15s ease;
}
:is(.workspace-shell, .public-shell) .material-outline > select.material-control { padding-inline-end: 48px; }
:is(.workspace-shell, .public-shell) .material-outline > select:not([multiple]):not([size]) {
  appearance: none;
}
:is(.workspace-shell, .public-shell) .material-outline:has(> select:not([multiple]):not([size]))::after {
  content: ""; position: absolute; inset-inline-end: 20px; top: 24px;
  width: 7px; height: 7px; border-right: 2px solid var(--text);
  border-bottom: 2px solid var(--text); transform: rotate(45deg);
  pointer-events: none;
}
:is(.workspace-shell, .public-shell) .material-outline:has(> select:disabled)::after { opacity: .5; }
:is(.workspace-shell, .public-shell) .material-outline > textarea.material-control { min-height: 128px; height: auto; resize: vertical; }
:is(.workspace-shell, .public-shell) .material-outline > .material-outline-label {
  position: absolute; inset-block-start: 0; inset-inline-start: 10px;
  transform: translateY(-50%); z-index: 1; display: block;
  width: auto; max-width: calc(100% - 28px); margin: 0; padding: 0 5px;
  background: var(--surface); color: var(--muted_readable,var(--muted));
  font-size: 12px; font-weight: 500; line-height: 1.4;
  overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
  cursor: text;
}
:is(.workspace-shell, .public-shell) .material-outline > :is(input,select,textarea):hover:not(:disabled) { border-color: var(--text); }
:is(.workspace-shell, .public-shell) .material-outline > :is(input,select,textarea):focus {
  border-color: var(--material-focus); outline: 1px solid var(--material-focus); outline-offset: -2px;
}
:is(.workspace-shell, .public-shell) .material-outline:focus-within > .material-outline-label { color: var(--material-focus); }
:is(.workspace-shell, .public-shell) .material-outline > .material-control[aria-invalid="true"] { border-color: var(--error,#b42318); }
:is(.workspace-shell, .public-shell) .material-outline:has(> [aria-invalid="true"]) > .material-outline-label { color: var(--error,#b42318); }
:is(.workspace-shell, .public-shell) .material-outline > .material-control[aria-invalid="true"]:focus { outline-color: var(--error,#b42318); }
:is(.workspace-shell, .public-shell) .material-outline > .material-control:disabled { cursor: not-allowed; opacity: .65; border-style: dashed; }
:is(.workspace-shell, .public-shell) .material-outline > .material-control[readonly] { background: var(--bg); }
:is(.workspace-shell, .public-shell) .material-outline > input::placeholder,
:is(.workspace-shell, .public-shell) .material-outline > textarea::placeholder { color: var(--muted_readable,var(--muted)); opacity: 1; }
:is(.workspace-shell, .public-shell) .field > :is(small,.field-error) { margin-inline: 14px; }
:is(.workspace-shell, .public-shell) :is(.topbar,.public-header,.sidebar) .material-outline { margin-block: 6px; }
:is(.workspace-shell, .public-shell) :is(.topbar,.public-header,.sidebar) .material-outline > :is(input,select) { min-height: 42px; height: 42px; padding-block: 10px; font-size: 12px; }
:is(.workspace-shell, .public-shell) :is(.topbar,.public-header,.sidebar) .material-outline > .material-outline-label { font-size: 10px; }
:is(.workspace-shell, .public-shell) :is(.topbar,.public-header,.sidebar) .material-outline:has(> select)::after { top: 17px; inset-inline-end: 16px; }
:is(.workspace-shell, .public-shell) .navbar-search .material-outline > input { padding-inline-end: 88px; }
:is(.workspace-shell, .public-shell) .nav-search .material-outline > input { padding-inline-end: 32px; }
:is(.workspace-shell, .public-shell) .sidebar .material-outline { --surface: var(--primary); --text: #fff; --muted_readable: #dbe5ee; }
@media(max-width:700px) {
  :is(.workspace-shell, .public-shell) .navbar-search .material-outline > input { padding-inline-end: 42px; }
}
/* Workspace identity stays legible on two lines; the native select handles interaction. */
.workspace-shell .sidebar .context-form { margin: 12px 16px 20px; }
.workspace-shell .sidebar .context-form .material-context { display: grid; margin-block: 8px; }
.workspace-shell .sidebar .context-form .material-context > select {
  min-height: 80px; padding: 18px 44px 14px 16px;
  color: transparent; background: transparent; cursor: pointer;
  border-color: color-mix(in srgb, white 40%, transparent);
  grid-area: 1 / 1; height: 100%;
}
.workspace-shell .sidebar .context-form .material-context > select option { color: white; }
.workspace-shell .sidebar .context-form .material-context > .material-outline-label {
  font: 500 11px/1.4 system-ui, sans-serif; text-transform: none;
  letter-spacing: normal; inset-inline-start: 12px; color: #dbe5ee;
}
.workspace-shell .sidebar .context-form .material-context::after { top: calc(50% - 5px); inset-inline-end: 18px; }
.workspace-shell .sidebar .context-form .material-context-copy {
  grid-area: 1 / 1; margin: 18px 44px 14px 16px; pointer-events: none; min-width: 0;
  display: flex; flex-direction: column; justify-content: center; gap: 4px;
  text-align: start; line-height: 1.4;
}
.workspace-shell .sidebar .context-form .material-context-copy strong {
  font: 600 13px/1.4 system-ui, sans-serif; color: white;
  overflow-wrap: anywhere;
}
.workspace-shell .sidebar .context-form .material-context-copy > span {
  color: #dbe5ee; font: 400 12px/1.4 system-ui, sans-serif;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.workspace-shell .sidebar .context-form .material-context-copy > span[hidden] { display: none; }
.workspace-shell .sidebar .context-form .material-context:focus-within > select { border-color: white; outline-color: white; }
@media(forced-colors:active) {
  .workspace-shell .sidebar .context-form .material-context-copy { display: none; }
  .workspace-shell .sidebar .context-form .material-context > select { color: CanvasText; }
}
@media(prefers-reduced-motion:reduce) {
  :is(.workspace-shell, .public-shell) .material-outline > :is(input,select,textarea).material-control { transition: none; }
}
@media(forced-colors:active) {
  :is(.workspace-shell, .public-shell) .material-outline > select:not([multiple]):not([size]) { appearance: auto; }
  :is(.workspace-shell, .public-shell) .material-outline:has(> select)::after { display: none; }
  :is(.workspace-shell, .public-shell) .material-outline > :is(input,select,textarea):focus { outline: 2px solid Highlight; outline-offset: 2px; }
}
