/* Presentation only. Native authentication, gateway and controls are unchanged. */
:root {
  color-scheme:dark!important;
  --theme-background-seed:#100b25!important;
  --background-base:#100b25!important;
  --background:#100b25!important;
  --midground:var(--tmo-accent,#ff4e85)!important;
  --foreground:#f5f2fc!important;
  --hairline:#3b3052!important;
  --hairline-strong:#604082!important;
  --theme-sidebar-seed:#17102e!important;
  --theme-card-seed:#1c1537!important;
  --theme-elevated-seed:#251d3d!important;
  --theme-bubble-seed:#302047!important;
  --theme-foreground:#f5f2fc!important;
  --theme-primary:var(--tmo-accent,#ff4e85)!important;
  --theme-secondary:#392352!important;
  --theme-accent-soft:#302047!important;
  --theme-midground:var(--tmo-accent,#ff4e85)!important;
  --theme-warm:var(--tmo-accent,#ff4e85)!important;
  --dt-muted:#251d3d!important;
  --dt-input:#302547!important;
  --dt-ring:var(--tmo-accent,#ff4e85)!important;
  --dt-border:#3b3052!important;
  --dt-sidebar-border:#3b3052!important;
  --dt-primary-foreground:#100b25!important;
  --dt-primary-solid:#c71f58!important;
  --dt-primary-solid-foreground:#fff!important;
  --dt-composer-ring:var(--tmo-accent,#ff2d6d)!important;
  --dt-user-bubble-border:#604082!important;
  background-color:#100b25!important;
}
html,body,#root {background-color:#100b25!important;color:#f5f2fc;}
body:has(>main .provider-form){font-family:ui-sans-serif,system-ui,sans-serif;}
body>main>.brand {margin-bottom:36px;letter-spacing:normal;}
body>main>.brand img {display:block;width:min(100%,320px);height:auto;margin:auto;}
body>main>.card {background:#1c1537;}
/* Replace only the stock new-session wordmark; bot names stay readable. */
.wordmark[aria-label="HERMES AGENT"] {
  background:url('/tmo-brand/tmo-logo-light.png') center/contain no-repeat;
  min-height:100px;max-width:420px;height:clamp(80px,14vw,126px);
  mix-blend-mode:normal!important;overflow:hidden;
}
.wordmark[aria-label="HERMES AGENT"]>span {visibility:hidden;}
[data-slot="aui_intro"] {position:relative;}
[data-slot="aui_intro"]::after {
  content:'AGENCY HEADQUARTERS';display:block;margin:24px auto 0;
  color:#bcb3cf;font:500 10px/1.5 ui-sans-serif,system-ui,sans-serif;letter-spacing:.24em;
}
/* Native uploaded avatars retain crisp pixel edges at roster and card sizes. */
img[alt*="avatar" i],img[alt*="Operations Director"],img[alt*="Website Production"] {image-rendering:pixelated;}
button[aria-label*="Operations Director"] img,button[aria-label*="Website Production"] img,[data-slot="bot_chat_empty"] img {image-rendering:pixelated;object-fit:contain!important;border-radius:0!important;}
/* Native sidebar header: keep its tabs at the bottom, with the agency logo above. */
[data-tree-group]:has(>[data-panel-header] [data-pane-tab-id="sessions"])>[data-panel-header] {
  height:128px!important;min-height:128px!important;
}
[data-tree-group]:has(>[data-panel-header] [data-pane-tab-id="sessions"])>[data-panel-header]::before {
  content:'';position:absolute;top:38px;left:40px;right:40px;height:40px;
  background:url('/tmo-brand/tmo-logo-light.png') center center/contain no-repeat;
  pointer-events:none;
}
@media(max-width:600px){.wordmark[aria-label="HERMES AGENT"]{max-width:85%;min-height:75px;}}
/* Keep the native composer and drag affordance; give the typing surface air. */
[data-slot="composer-dock"]:not([data-popped-out]) {
  width:calc(min(var(--composer-width),calc(100% - 5rem)) + 10px)!important;
}
[data-slot="composer-surface"],
[data-slot="composer-surface"]:has([data-slot="composer-rich-input"]:focus-visible) {
  border:1.5px solid var(--tmo-accent,#ff2d6d)!important;
  border-radius:28px!important;
  padding:4px 8px!important;
}
[data-slot="composer-surface"]:has([data-slot="composer-rich-input"]:focus-visible) {
  box-shadow:0 0 0 3px color-mix(in srgb,var(--tmo-accent,#ff2d6d) 12%,transparent)!important;
}
[data-slot="composer-root"],[data-slot="composer-drag-region"] {border-radius:32px!important;}
/* Important utility-layer borders otherwise outrank unlayered overrides. */
@layer base {
  :root [data-slot="composer-surface"],
  :root [data-slot="composer-surface"]:has([data-slot="composer-rich-input"]:focus-visible) {
    border-color:var(--tmo-accent,#ff2d6d)!important;border-width:1.5px!important;
  }
}
@media(max-width:700px){[data-slot="composer-dock"]:not([data-popped-out]){width:calc(min(var(--composer-width),calc(100% - 2rem)) + 10px)!important;}}

/* Keep a friendly name and role readable together in native bot rows. */
button[aria-label*=' · @'] span.font-medium {white-space:normal;overflow:visible;line-height:1.3;}

/* Let native live-dictation captions wrap while speaking. */
[data-slot='composer-root'] [role='status']:has(svg.lucide-mic) {height:auto;min-height:32px;padding-top:8px;padding-bottom:8px;}
[data-slot='composer-root'] [role='status']:has(svg.lucide-mic) span.truncate.font-medium {white-space:normal;overflow:visible;overflow-wrap:anywhere;}

/* Keep conversation text and its composer comfortably inset on wide tiles. */
[data-slot="composer-bounds"] {container-type:inline-size;}
[data-slot="aui_thread-content"] {
  --tmo-chat-gutter:clamp(24px,calc((100cqw - 640px) / 2),300px);
  padding-inline:var(--tmo-chat-gutter)!important;
}
[data-slot="composer-dock"]:not([data-popped-out]) {
  width:calc(min(var(--composer-width),calc(100% - 2 * clamp(24px,calc((100cqw - 640px) / 2),300px))) + 10px)!important;
}
@container(max-width:700px) {
  [data-slot="aui_thread-content"] {padding-inline:16px!important;}
  [data-slot="composer-dock"]:not([data-popped-out]) {
    width:calc(min(var(--composer-width),calc(100% - 2rem)) + 10px)!important;
  }
}

/* Distinguish speakers through opposite-side insets, without changing text. */
[data-slot="aui_assistant-message-root"] {
  width:calc(100% - clamp(24px,8cqw,120px))!important;
  align-self:flex-start!important;
  margin-inline-end:auto!important;
}
[data-slot="aui_user-message-root"] {
  width:calc(100% - clamp(24px,8cqw,120px))!important;
  max-width:calc(100% - clamp(24px,8cqw,120px))!important;
  align-self:flex-end!important;
  margin-inline-start:auto!important;
  margin-inline-end:0!important;
  padding-inline:0!important;
}
@container(max-width:700px) {
  [data-slot="aui_assistant-message-root"], [data-slot="aui_user-message-root"] {
    width:calc(100% - 16px)!important;
    max-width:calc(100% - 16px)!important;
  }
}
/* Softer native chat bubbles; colors and contents remain native. */
.composer-human-message,[data-slot='aui_assistant-message-content']{border-radius:24px!important;}

/* Give agency teammates room to show their full character art. */
[data-slot="bots-roster"] button[data-roster-key] {min-height:108px!important;padding:10px 12px!important;gap:12px!important;}
[data-slot="bots-roster"] button[data-roster-key]>div:first-child {width:64px!important;height:88px!important;flex:none!important;display:grid;place-items:center;}
[data-slot="bots-roster"] button[data-roster-key]>div:first-child img {width:64px!important;height:88px!important;object-fit:contain!important;border-radius:0!important;image-rendering:pixelated;}
[data-slot="bots-roster"] button[data-roster-key]>div:first-child svg {width:54px!important;height:64px!important;}
[data-slot="bots-roster"] button[data-roster-key] span.font-medium {white-space:normal!important;line-height:1.35!important;font-size:14px!important;}
@media(min-width:1000px){
  div:has(>[data-tree-group="grp-sessions"]) {min-width:320px!important;flex-basis:320px!important;}
}
/* Keep pill corners comfortably away from user message text. */
.composer-human-message {padding:14px 22px!important;}
@container(max-width:700px){.composer-human-message {padding:12px 18px!important;}}

/* Accent-aware focus cue: selected teammate, independent of busy/online state. */
[data-slot="bots-roster"] button[data-roster-key][class*="bg-(--ui-row-active-background)"] {
  position:relative;
  animation:tmo-team-pulse 3.2s ease-in-out infinite;
}
[data-slot="bots-roster"] button[data-roster-key][class*="bg-(--ui-row-active-background)"]::after {
  content:"";position:absolute;inset:12px 0 12px auto;width:3px;border-radius:8px;
  background:var(--tmo-accent,#ff4e85);
  box-shadow:0 0 12px 3px color-mix(in srgb,var(--tmo-accent,#ff4e85) 45%,transparent);
  pointer-events:none;
}
@keyframes tmo-team-pulse {
  0%,100% {box-shadow:inset -1px 0 0 color-mix(in srgb,var(--tmo-accent,#ff4e85) 40%,transparent),8px 0 18px -8px color-mix(in srgb,var(--tmo-accent,#ff4e85) 25%,transparent);}
  50% {box-shadow:inset -1px 0 0 var(--tmo-accent,#ff4e85),10px 0 26px -7px color-mix(in srgb,var(--tmo-accent,#ff4e85) 65%,transparent);}
}
/* Lift only the conversation canvas by a few dark RGB steps. */
[data-slot="composer-bounds"] {background-color:#141026!important;}
@media(prefers-reduced-motion:reduce){
  [data-slot="bots-roster"] button[data-roster-key][class*="bg-(--ui-row-active-background)"] {animation:none;box-shadow:inset -1px 0 0 var(--tmo-accent,#ff4e85);}
}

/* Emit the pulse into the chat gutter instead of around all four card edges. */
[data-slot="bots-roster"] button[data-roster-key][class*="bg-(--ui-row-active-background)"] {animation:none;box-shadow:none!important;}
[data-slot="bots-roster"] button[data-roster-key][class*="bg-(--ui-row-active-background)"]::after {box-shadow:none;opacity:.8;}
[data-tmo-team-glow] {
 position:fixed;z-index:8;width:8px;pointer-events:none;
 background:radial-gradient(ellipse at 0% 50%,color-mix(in srgb,var(--tmo-accent,#ff4e85) 46%,transparent) 0%,color-mix(in srgb,var(--tmo-accent,#ff4e85) 21%,transparent) 30%,transparent 74%);
 transform-origin:left center;animation:tmo-team-side-pulse 3.2s ease-in-out infinite;
}
[data-tmo-team-glow][hidden] {display:none!important;}
@keyframes tmo-team-side-pulse {0%,100%{opacity:.4;transform:scaleX(.78);}50%{opacity:.9;transform:scaleX(1);}}
@media(prefers-reduced-motion:reduce){[data-tmo-team-glow]{animation:none;opacity:.55;}}
