.staff-account-dock { display: contents; }
.staff-compact-placeholder { display: none; }
.staff-chat-connection, .staff-chat-attachment, .staff-chat-dictate, .staff-chat-feedback { display: none; }
.workspace-avatar {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: var(--workspace-avatar) center / cover no-repeat;
}

body[data-staff-chat-only] {
  --chat-edge: clamp(12px, 1.25vw, 24px);
  --chat-top: clamp(68px, 9vh, 90px);
  --chat-footer: 62px;
  --chat-ink: var(--brand-ink);
  --chat-canvas: #f4f5f0;
  --chat-identity: #1f553f;
  --chat-muted: var(--brand-muted);
  --chat-paper: #fdfdfd;
  --chat-line: #d7d2c6;
  --chat-hover: #eeebe3;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-staff-theme]) body[data-staff-chat-only] {
    --chat-canvas: #141a16;
    --chat-identity: #477960;
    --chat-ink: #f6f4ed;
    --chat-muted: #cbc6b9;
    --chat-paper: #252521;
    --chat-line: #45433d;
    --chat-hover: #33322b;
  }
}
:root[data-staff-theme="dark"] body[data-staff-chat-only] {
  --chat-canvas: #141a16;
  --chat-identity: #477960;
  --chat-ink: #f6f4ed;
  --chat-muted: #cbc6b9;
  --chat-paper: #252521;
  --chat-line: #45433d;
  --chat-hover: #33322b;
}
/* Existing answer cards follow the same text and surface colours as the composer. */
body.smarta-workspace[data-staff-chat-only] {
  --accent-ink: var(--brand-focus);
  --ink: var(--chat-ink);
  --ink2: var(--chat-muted);
  --ink3: var(--chat-muted);
  --surface: var(--chat-paper);
  --surface2: var(--chat-paper);
  --hair: var(--chat-line);
  --hair2: var(--chat-line);
  --fill: var(--chat-hover);
  --fill2: var(--chat-hover);
  --dlg: var(--chat-paper);
  background: var(--chat-canvas, var(--company-canvas));
  color: var(--ink);
}
:root[data-staff-theme="light"] body[data-staff-chat-only] { color-scheme: light; }
:root[data-staff-theme="dark"] body[data-staff-chat-only] { color-scheme: dark; }

body.smarta-workspace[data-staff-chat-only]::before,
body.smarta-workspace[data-staff-chat-only] .nav .in > :is(.sp, .view-title, .me, #leadLinks),
body.smarta-workspace[data-staff-chat-only] .staff-brand-label,
body.smarta-workspace[data-staff-chat-only] #staffWorkspaceNav,
body.smarta-workspace[data-staff-chat-only] #chatPanel :is(#teamKnowledge, .staff-chat-starters, #sub, .hello .av i, .bar kbd),
body.smarta-workspace[data-staff-chat-only] #chatPanel .bar label:has(:is(#img,#up)) {
  display: none !important;
}
body.smarta-workspace[data-staff-chat-only] .nav {
  position: relative;
  background: transparent;
  border: 0;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
body.smarta-workspace[data-staff-chat-only] :is(.nav, .nav .in) { height: 0; min-height: 0; padding: 0; }
body.smarta-workspace[data-staff-chat-only] .nav .brand {
  position: fixed;
  inset: calc(var(--chat-top) / 2) auto auto var(--chat-edge);
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  width: auto;
  max-width: 48vw;
  gap: 12px;
  min-height: 44px;
  padding: 0;
  text-decoration: none;
  color: var(--chat-ink);
}
body.smarta-workspace[data-staff-chat-only] .nav .brand-mark {
  display: block;
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  background: transparent;
  box-shadow: none;
}
body.smarta-workspace[data-staff-chat-only] .nav .staff-identity {
  display: flex;
  align-items: center;
  gap: 18px;
  min-width: 0;
}
body.smarta-workspace[data-staff-chat-only] .nav .staff-identity .wordmark {
  display: inline;
  font-size: 24px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -.045em;
}
body.smarta-workspace[data-staff-chat-only] .nav .staff-identity small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--chat-muted);
  font-size: 15px;
  font-weight: 400;
  line-height: 1.2;
}
body.smarta-workspace[data-staff-chat-only] .staff-brand-row {
  position: fixed;
  inset: calc(var(--chat-top) / 2) var(--chat-edge) auto auto;
  transform: translateY(-50%);
  max-width: calc(100% - 2 * var(--chat-edge));
  margin: 0;
  padding: 0;
}
body.smarta-workspace[data-staff-chat-only] .staff-brand-lockup {
  gap: clamp(13px, 1.15vw, 20px);
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}
body.smarta-workspace[data-staff-chat-only] .staff-brand-lockup img { height: clamp(22px, 1.65vw, 29px); }
body.smarta-workspace[data-staff-chat-only] .staff-brand-lockup img + img {
  padding-inline-start: clamp(13px, 1.15vw, 20px);
  border-color: var(--chat-line);
}

body.smarta-workspace[data-staff-chat-only] .staff-account-dock {
  position: fixed;
  inset: auto auto max(7px, env(safe-area-inset-bottom, 0px)) var(--chat-edge);
  display: flex;
  align-items: center;
  gap: 4px;
}
body.smarta-workspace[data-staff-chat-only] .nav .aside { display: flex; margin: 0; }
body.smarta-workspace[data-staff-chat-only] .profile-menu { width: auto; min-width: 0; max-width: 148px; }
body.smarta-workspace[data-staff-chat-only] .profile-menu summary {
  min-height: 44px;
  width: 100%;
  gap: 7px;
  font-weight: 600;
  font-size: 14px;
  padding: 4px 8px;
  color: var(--chat-ink);
  background: transparent;
  border: 0;
  border-radius: 7px;
  box-shadow: none;
}
body.smarta-workspace[data-staff-chat-only] .profile-menu summary:hover,
body.smarta-workspace[data-staff-chat-only] .profile-menu[open] summary { background: var(--chat-hover); }
body.smarta-workspace[data-staff-chat-only] .profile-menu .profile-avatar {
  width: 27px;
  height: 27px;
  flex: 0 0 27px;
  border-radius: 7px;
  background: var(--chat-identity);
  color: #fff;
}
body.smarta-workspace[data-staff-chat-only] .profile-menu summary > span:not(.profile-avatar) {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
body.smarta-workspace[data-staff-chat-only] .staff-chat-profile {
  inset: auto auto calc(100% + 8px) 0;
  box-sizing: border-box;
  width: min(238px, calc(100vw - 2 * var(--chat-edge)));
  padding: 8px;
  gap: 6px;
  border-radius: 11px;
  box-shadow: none;
}
.staff-profile-identity { display: grid; gap: 3px; border-bottom: 1px solid var(--chat-line); padding: 5px 5px 8px; overflow-wrap: anywhere; }
.staff-profile-identity b { font-size: 15px; }
.staff-profile-actions { display: grid; grid-template-columns: 44px 44px 1fr 44px 44px; gap: 3px; }
.staff-profile-actions button {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  color: var(--chat-muted);
  cursor: pointer;
}
.staff-profile-actions button:nth-child(3) { grid-column: 4; }
.staff-profile-actions button:last-child { grid-column: 5; }
.staff-profile-actions button:is(:hover,[aria-pressed="true"]) { background: var(--chat-hover); border-color: var(--chat-line); }
.staff-profile-actions button svg, #staffDictate svg, .staff-chat-connection svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
body.smarta-workspace[data-staff-chat-only]:has(.profile-menu) .staff-chat-connection {
  display: flex;
  padding-inline: 6px;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  color: var(--chat-ink);
  font-size: 13px;
  font-weight: 650;
}
body.smarta-workspace[data-staff-chat-only] .staff-chat-profile svg { display: block; }
.staff-chat-connection .staff-tank { width: 25px; height: 25px; flex: none; }
.staff-tank-outline { fill: none; stroke: var(--chat-muted); stroke-width: 1.5; stroke-linecap: round; }
.staff-tank-liquid { fill: var(--chat-identity); stroke: none; }
body[data-company-brand="custom"] .staff-tank-liquid { fill: var(--company-selection); }
.staff-chat-connection[data-offline] .staff-tank-surface { visibility: hidden; }
.staff-chat-profile[data-settings-open] > :not(.staff-profile-settings),
.staff-chat-profile .staff-profile-settings[hidden] { display: none; }
.staff-chat-profile .staff-profile-settings { color: var(--chat-ink); padding: 0 6px; }
.staff-profile-settings-title { display: flex; align-items: center; gap: 4px; margin-inline-start: -6px; font-size: 15px; line-height: 20px; }
body.smarta-workspace .staff-chat-profile .staff-profile-settings-title button { display: grid; place-items: center; width: 44px; height: 44px; min-height: 44px; margin: 0; padding: 0; background: transparent; color: inherit; border: 0; }
.staff-profile-settings-title button svg { width: 18px; height: 18px; stroke: currentColor; }
.staff-profile-settings h3 { margin: 5px 0 0; font-size: 14px; line-height: 20px; }
.staff-profile-settings p { margin: 2px 0 7px; font-size: 12px; line-height: 17px; color: var(--chat-muted); }
.staff-profile-settings ul { list-style: none; margin: 0; padding: 0; }
.staff-profile-settings li { border-top: 1px solid var(--chat-line); padding: 6px 0; font-size: 13px; line-height: 20px; font-weight: 550; }


body.smarta-workspace[data-staff-chat-only] .wrap { width: 100%; max-width: none; margin: 0; padding: var(--chat-top) var(--chat-edge) 0; }
body.smarta-workspace[data-staff-chat-only] #chatPanel {
  position: relative;
  width: min(720px, 100%);
  margin: 0 auto;
  padding: 0 0 var(--chat-footer);
  overflow: visible;
}
body.smarta-workspace[data-staff-chat-only] #chatPanel:not(:has(#thread > .msg:not(.staff-chat-starters))) {
  justify-content: center;
  padding-bottom: calc(var(--chat-footer) + 76px);
}
body.smarta-workspace[data-staff-chat-only] #chatPanel:not(:has(#thread > .msg:not(.staff-chat-starters))) :is(#thread, #chatLogFocus) { display: none; }
body.smarta-workspace[data-staff-chat-only] #chatPanel .hello {
  display: flex;
  align-items: center;
  animation: none;
  gap: clamp(12px, 1.2vw, 20px);
  margin: 0 0 20px;
  padding: 0;
}
body.smarta-workspace[data-staff-chat-only] #chatPanel .hello .av { width: 46px; height: 46px; flex: 0 0 auto; box-shadow: none; }
body.smarta-workspace[data-staff-chat-only] #chatPanel #greet { color: var(--chat-ink); font-size: clamp(26px, 3vw, 40px); letter-spacing: -.04em; line-height: 1.16; overflow-wrap: anywhere; }
body.smarta-workspace[data-staff-chat-only] #chatPanel:has(#thread > .msg:not(.staff-chat-starters)) .hello { display: none; }

body.smarta-workspace[data-staff-chat-only] #chatPanel #thread .msg.me > .b {
  width: fit-content;
  max-width: min(85%, 580px);
  padding: 9px 15px;
  border-radius: 14px 14px 4px 14px;
  background: var(--chat-hover);
  color: var(--chat-ink);
}
body.smarta-workspace[data-staff-chat-only] #chatPanel #thread .msg.marta > img {
  width: 32px;
  height: 32px;
  margin-top: 0;
}
/* Leave the speaker in the reading order. Operational badges remain visible. */
body.smarta-workspace[data-staff-chat-only] #chatPanel #thread .marta > .b > .name:not(:has(> *)) {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  margin: 0;
}
/* At this width the composer and the open account panel fit alongside each other. */
@media (min-width: 1280px) {
  body.smarta-workspace[data-staff-chat-only] #chatPanel:has(#thread > .msg:not(.staff-chat-starters)) {
    padding-bottom: max(0px, env(safe-area-inset-bottom));
  }
}

body.smarta-workspace[data-staff-chat-only] #chatPanel #thread { margin: 8px 0 12px; padding-inline: 2px; }
body.smarta-workspace[data-staff-chat-only] #chatPanel .box {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 44px 44px;
  align-items: center;
  gap: 4px;
  padding: 8px;
  border-radius: 15px;
  box-shadow: none;
}
body.smarta-workspace[data-staff-chat-only] #chatPanel .box .bar { display: contents; }
body.smarta-workspace[data-staff-chat-only] #chatPanel .box textarea { grid-area: 1 / 2; min-height: 44px; max-height: 25dvh; padding: 11px 4px; line-height: 1.4; }
body.smarta-workspace[data-staff-chat-only] #chatPanel .bar :is(.staff-chat-attachment, #staffDictate) {
  display: flex;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  color: var(--chat-muted);
  background: transparent;
  font-size: 0;
}
body.smarta-workspace[data-staff-chat-only] #chatPanel .bar :is(.staff-chat-attachment, #staffDictate):hover { background: var(--chat-hover); }
body.smarta-workspace[data-staff-chat-only] #chatPanel .staff-chat-attachment:focus-within { outline: 2px solid var(--accent-ink); }
body.smarta-workspace[data-staff-chat-only] #chatPanel .staff-chat-attachment svg { width: 19px; height: 19px; }
body.smarta-workspace[data-staff-chat-only] #chatPanel .staff-chat-attachment { grid-area: 1 / 1; }
body.smarta-workspace[data-staff-chat-only] #chatPanel #staffDictate { grid-area: 1 / 3; }
body.smarta-workspace[data-staff-chat-only] #chatPanel #staffDictate[aria-pressed="true"] { background: var(--bad-soft); color: var(--bad); }
body.smarta-workspace[data-staff-chat-only] #chatPanel .bar #go { grid-area: 1 / 4; width: 44px; height: 44px; margin: 0; border-radius: 11px; padding: 0; }
body.smarta-workspace[data-staff-chat-only] #chatPanel .bar #go:not(:disabled) { background: var(--brand-action); }
body.smarta-workspace[data-staff-chat-only] #chatPanel .bar #go:not(:disabled):hover { background: var(--brand-action-hover); }
body.smarta-workspace[data-staff-chat-only] #chatPanel :is(#pasteHint, #more) { grid-column: 1 / -1; }
body.smarta-workspace[data-staff-chat-only] #staffChatFeedback:not(:empty) {
  display: block;
  margin: 7px 0 0;
  color: var(--chat-muted);
  font-size: 13px;
}
/* Match the JUD desktop header and empty chat. Keep the compact layouts below. */
@media (width >= 1024px) and (height > 500px) {
  body[data-staff-chat-only] { --chat-edge: 24px; --chat-top: 76px; }
  body.smarta-workspace[data-staff-chat-only] #chatPanel:not(:has(#thread > .msg:not(.staff-chat-starters))) {
    justify-content: flex-start;
    padding-top: clamp(30px, calc(42dvh - 155px), 360px);
  }
  body.smarta-workspace[data-staff-chat-only] #chatPanel .hello { gap: 16px; }
  body.smarta-workspace[data-staff-chat-only] #chatPanel .hello .av { width: 48px; height: 48px; }
  body.smarta-workspace[data-staff-chat-only] #chatPanel:not(:has(#thread > .msg:not(.staff-chat-starters))) #greet {
    font-size: 2.5rem;
    line-height: 1.1;
    letter-spacing: -.025em;
  }
  body.smarta-workspace[data-staff-chat-only] #chatPanel .box { min-height: 64px; }
}
@media (max-height: 500px) {
  body[data-staff-chat-only] { --chat-top: 55px; }
  body.smarta-workspace[data-staff-chat-only] #chatPanel:not(:has(#thread > .msg:not(.staff-chat-starters))) { padding-bottom: var(--chat-footer); }
}
@media (max-width: 480px) {
  body.smarta-workspace[data-staff-chat-only] #chatPanel .box textarea:placeholder-shown {
    white-space: nowrap;
    overflow-x: hidden;
    text-overflow: ellipsis;
  }
  body.smarta-workspace[data-staff-chat-only] #chatPanel .box textarea::placeholder {
    color: transparent;
    white-space: nowrap;
  }
  /* Native textareas clip their placeholder without painting an ellipsis in Chromium. */
  body.smarta-workspace[data-staff-chat-only] #chatPanel #q:placeholder-shown + .staff-compact-placeholder {
    display: block;
    grid-area: 1 / 2;
    min-width: 0;
    padding-inline: 4px;
    z-index: 1;
    pointer-events: none;
    color: var(--chat-muted);
    font: inherit;
    font-size: 16px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
  }
  body.smarta-workspace[data-staff-chat-only] #chatPanel .box { padding: 5px; }
  body.smarta-workspace[data-staff-chat-only] #chatPanel .hello .av { width: 42px; height: 42px; }
}

/* On a narrow screen the company marks sit under the product name. */
@media (max-width: 620px) {
  body[data-staff-chat-only] { --chat-top: 90px; }
  body.smarta-workspace[data-staff-chat-only] .nav .brand {
    top: 4px;
    transform: none;
    max-width: calc(100vw - 2 * var(--chat-edge));
  }
  body.smarta-workspace[data-staff-chat-only] .staff-brand-row {
    inset: 52px auto auto var(--chat-edge);
    transform: none;
  }
}

/* The same header serves every configured company with one or two loaded marks. */
[data-company-logos] img[hidden], [data-entry-logos] img[hidden], .staff-profile-product { display: none; }
body[data-chat-logo-count] .staff-profile-product { display: inline; }
body.smarta-workspace[data-staff-chat-only][data-chat-logo-count] {
  --chat-logo-header-height: 76px;
  --chat-logo-gutter: 24px;
  --chat-top: var(--chat-logo-header-height);
}
body[data-staff-chat-only][data-chat-logo-count] .nav .brand { display: none; }
body[data-staff-chat-only][data-chat-logo-count] .staff-brand-row {
  inset: calc(var(--chat-logo-header-height) / 2) auto auto var(--chat-logo-gutter);
  transform: translateY(-50%);
}
body[data-staff-chat-only][data-chat-logo-count] .staff-brand-lockup {
  gap: 20px;
  min-height: 44px;
}
body[data-staff-chat-only][data-chat-logo-count="2"] .staff-brand-lockup::before {
  content: "";
  order: 1;
  width: 1px;
  height: 22px;
  background: var(--chat-line);
}
body[data-staff-chat-only][data-chat-logo-count] .staff-brand-lockup img { height: 28px; max-width: min(230px, 36vw); }
body[data-staff-chat-only][data-chat-logo-count] .staff-brand-lockup img + img {
  order: 2;
  border: 0;
  padding: 0;
}
@media (max-width: 520px) {
  body.smarta-workspace[data-staff-chat-only][data-chat-logo-count] { --chat-logo-header-height: 68px; --chat-logo-gutter: 16px; }
  body[data-staff-chat-only][data-chat-logo-count] .staff-brand-lockup { gap: 12px; }
  body[data-staff-chat-only][data-chat-logo-count] .staff-brand-lockup img { height: 20px; max-width: min(131px, 36vw); }
  body[data-staff-chat-only][data-chat-logo-count="2"] .staff-brand-lockup::before { height: 17px; }
}

/* Keep the question directly below the greeting when zoom or a keyboard reduces the viewport. */
@media (max-height: 430px) {
  body.smarta-workspace[data-staff-chat-only][data-chat-logo-count] .wrap { padding-inline: var(--chat-logo-gutter); }
  body.smarta-workspace[data-staff-chat-only][data-chat-logo-count] #chatPanel:not(:has(#thread > .msg:not(.staff-chat-starters))) {
    justify-content: flex-start;
    padding-top: 12px;
  }
  body.smarta-workspace[data-staff-chat-only][data-chat-logo-count] #chatPanel .hello { margin-bottom: 10px; }
  body.smarta-workspace[data-staff-chat-only][data-chat-logo-count] #chatPanel .hello .av { width: 32px; height: 32px; margin-block: -2px; border-radius: 50%; }
}
