/*
 * TAG Legal Desk v2.1, J111: the Available or away switch (js\v21_availability.js).
 * The switch is the desk's own .switch (track and knob from desk.css), next to your chip in the header. Its name is
 * always "Available" (on or off is the switch's own state); while it is off the word "Away" shows in its place, for the
 * eye only, and "Available" stays its name for screen readers. Under 1024 px, or where the header has no room at all, it
 * leaves the header and is the first item of your chip's menu instead. Desk tokens only, so every theme reads (Light,
 * Dark, Eucalypt, Harbour, High contrast). Nothing moves but the desk's own knob, which reduced motion already keeps still.
 * No inline styles anywhere: the page's content security policy is style-src 'self'.
 */

.hdr-r .v21-avail { position: relative; flex: none; gap: 8px; padding: 0 4px; white-space: nowrap; color: var(--ink-2); }
.v21-avail .v21-avail-st { display: none; }
/* Off (away): "Away" shows in place of the name, which stays for screen readers and voice control */
.v21-avail.is-away .v21-avail-l { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.v21-avail.is-away .v21-avail-st { display: inline; color: var(--ink); font-weight: 600; }
.v21-avail.is-saving { cursor: progress; }
.hdr .v21-avail:focus-visible { outline: 3px solid var(--focus); outline-offset: -3px; border-radius: 999px; }

/* Under 1024 px, or no room at all: the header keeps its room for your chip, and your chip's menu carries the switch. */
@media (max-width: 1023px) { .hdr .v21-avail { display: none; } }
.v21-avail.is-off { display: none; }
/* The room check (js\v21_availability.js fit): for one synchronous measure, before any paint, the header row is laid
   out from its start with nothing shrinking or wrapping, so an overflow shows in its scroll width. */
.hdr-r.v21-avail-measure { justify-content: flex-start; }
.hdr-r.v21-avail-measure > * { flex-shrink: 0; white-space: nowrap; }

/* The menu item's small switch (on is available), and the one quiet line while the choice is kept on this computer. */
.v21-avail-ico rect { fill: none; stroke: currentColor; stroke-width: 1.8; }
.v21-avail-ico circle { fill: currentColor; }
.v21-avail-ico.is-on rect { fill: var(--brand); stroke: var(--brand); }
.v21-avail-ico.is-on circle { fill: var(--solid, #FFFFFF); }
.v21-avail-note { margin: 0; padding: 8px 14px 10px; max-width: 260px; border-top: 1px solid var(--glass-edge); font-size: .8125rem; line-height: 1.25rem; }

:root[data-theme="high_contrast"] .v21-avail-ico.is-on rect { fill: #000; stroke: #000; }
:root[data-theme="high_contrast"] .v21-avail-ico.is-on circle { fill: #fff; }
:root[data-theme="high_contrast"] .v21-avail-note { border-top: 2px solid #000; color: #000; }
@media (forced-colors: active) {
  .v21-avail-ico.is-on rect { fill: Highlight; stroke: Highlight; }
  .v21-avail-ico.is-on circle { fill: Canvas; }
}
