/* Treatment Sheets — Anesthesia tab (n166): the sheet's patient header, then the Anesia record filling the rest */
.ts-anes{display:flex;flex-direction:column;gap:12px}
.ts-anes-frame{display:block;width:100%;border:0;border-radius:16px;background:transparent;min-height:420px}
/* n169 — Expand: the Anesthesia record covers the sheet and fills the window (iPad and desktop) */
.ts-anes.expanded{position:fixed;inset:0;z-index:5000;gap:0;padding:0;background:var(--page-bg,#080E1A);view-transition-name:ts-anes}
.ts-anes.expanded .ts-anes-head{display:none}
.ts-anes.expanded .ts-anes-frame{height:100%!important;min-height:0;border-radius:0}
html.ts-anes-lock,html.ts-anes-lock body{overflow:hidden!important}
::view-transition-group(ts-anes){animation-duration:.36s;animation-timing-function:cubic-bezier(.32,.72,0,1)}
@media (prefers-reduced-motion:reduce){::view-transition-group(*),::view-transition-old(*),::view-transition-new(*){animation-duration:.15s!important}::view-transition-group(ts-anes){animation-name:none}}
/* the sheet's view animates in with a transform, which would trap a fixed box inside it */
html.ts-anes-lock #view-clinical,html.ts-anes-lock #ctab-anes{transform:none!important;animation:none!important;filter:none!important}
/* n176 — the record's state on the tab: under anesthesia (green, minutes), ended but unsigned (amber), signed (quiet) */
#clinSwitcher .seg-badge.anes{letter-spacing:0;font-weight:700}
#clinSwitcher .seg-badge.anes.live{background:#5CC75A;color:#0A1222;padding-left:14px;position:relative}
#clinSwitcher .seg-badge.anes.live::before{content:"";position:absolute;left:5px;top:50%;width:6px;height:6px;margin-top:-3px;border-radius:50%;background:#0A1222;animation:tsAnesPulse 2s ease-in-out infinite}
#clinSwitcher .seg-badge.anes.over{background:#F2C744;color:#0A1222}
#clinSwitcher .seg-badge.anes.done{display:none}
@keyframes tsAnesPulse{0%,100%{opacity:1}50%{opacity:.35}}
@media (prefers-reduced-motion:reduce){#clinSwitcher .seg-badge.anes.live::before{animation:none}}
#clinSwitcher .seg-badge.anes.rec{background:#8B4DB5;color:#fff}
