/* The existing case workspace, with a persistent conversation and its map. */
.workbench.conversation-workspace {
  --sidebar-width:178px;
  --conversation-width:clamp(345px,30vw,460px);
  --inspector-width:350px;
  --layout-gap:14px;
  --conversation-left:calc(16px + var(--sidebar-width) + var(--layout-gap));
  --map-left:calc(var(--conversation-left) + var(--conversation-width) + var(--layout-gap));
  --workspace-top:84px;
  --line:#405368;
  --panel:#151f2de8;
  --panel-deep:#101724f0;
  background:radial-gradient(ellipse at 68% 0,#294355 0,#131c2a 36%,#101722 76%);
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
}
.conversation-workspace [hidden] { display:none!important; }
.workbench.conversation-workspace .sidebar { top:14px; bottom:14px; border-radius:17px; }
.workbench.conversation-workspace .connectionbar {
  top:14px; left:var(--conversation-left); right:14px; height:56px; padding:8px 13px;
  border-radius:15px; background:#1b2735c9; backdrop-filter:blur(22px) saturate(135%);
}
.conversation-workspace .workspace-context { grid-template-columns:1fr; gap:0; }
.conversation-workspace .workspace-context > span { display:none; }
.workbench.conversation-workspace .workspace-title { font-size:17px; font-weight:690; letter-spacing:-.02em; }
.workspace-actions { gap:8px; align-items:center; display:flex; flex:none; }
.workspace-switch,.workspace-cases { display:none; }
.conversation-pane {
  position:absolute; inset:var(--workspace-top) auto 14px var(--conversation-left);
  width:var(--conversation-width); z-index:620; display:flex; flex-direction:column; min-height:0;
  border:1px solid #53667c; border-radius:20px; overflow:hidden;
  color:#eef6fa; background:linear-gradient(150deg,#253448f0,#162333f5 60%,#152232f2);
  box-shadow:0 12px 40px #02071157,inset 0 1px #ffffff12; backdrop-filter:blur(25px) saturate(135%);
}
.conversation-header {
  display:flex; justify-content:space-between; align-items:center; gap:8px;
  min-height:68px; padding:12px 17px; background:#16233078; border-bottom:1px solid #50627780;
}
.conversation-header h1 { margin:0; font-size:19px; line-height:1.15; font-weight:710; letter-spacing:-.035em; }
.conversation-header p { color:#b3c9d7; font-size:12px; margin:4px 0 0; }
.conversation-record,.thread-link,.thread-totals button,.thread-sources button,.workspace-cases,.workspace-switch button {
  appearance:none; color:#d5edf4; background:#29435580; border:1px solid #59778b; border-radius:10px;
  font-family:inherit; font-size:12px; font-weight:650;
  min-height:32px; padding:5px 8px; cursor:pointer;
}
.conversation-record { display:inline-flex; align-items:center; gap:5px; flex:none; }
.conversation-record .icon { width:13px; height:13px; }
.case-thread {
  flex:1; min-height:0; overflow:auto; overscroll-behavior:contain; scrollbar-color:#597280 transparent;
  padding:15px 15px 18px; display:flex; flex-direction:column; align-items:stretch; gap:11px;
}
.thread-empty { margin:auto 3px; padding:24px 4px; max-width:32ch; }
.thread-empty-icon {
  display:grid; place-items:center; width:42px; height:42px; border:1px solid #538b91; border-radius:13px;
  background:#325158; color:#9ce7de; font-size:24px; margin-bottom:13px;
}
.thread-empty h2 { margin:0 0 8px; font-size:clamp(25px,2.4vw,36px); letter-spacing:-.04em; line-height:1.08; }
.thread-empty p { margin:0; color:#c2d3e2; font-size:14px; line-height:1.5; }
.thread-entry { display:flex; gap:8px; min-width:0; }
.thread-officer { justify-content:flex-end; padding-left:20px; }
.thread-card { min-width:0; max-width:100%; padding:10px 11px; border-radius:11px; border:1px solid #4b627751; background:#182b3a78; }
.thread-officer .thread-card { background:#294b60; border-color:#5c8097; border-bottom-right-radius:4px; }
.thread-update .thread-card { flex:1; }
.thread-meta { display:flex; flex-wrap:wrap; align-items:baseline; gap:4px 8px; }
.thread-meta strong,.thread-next strong { color:#f0f7fa; font-size:13px; font-weight:700; line-height:1.32; }
.thread-meta time { color:#b6cfdf; font-size:10px; white-space:nowrap; }
.thread-card p,.thread-next p { color:#d8e6ef; font-size:13px; line-height:1.46; margin:5px 0 0; overflow-wrap:anywhere; white-space:pre-wrap; }
.thread-dot { margin-top:15px; flex:0 0 7px; height:7px; border-radius:50%; background:#93d0ce; }
.thread-sources { display:flex; flex-wrap:wrap; gap:5px; margin-top:7px; }
.thread-sources button { max-width:100%; overflow-wrap:anywhere; text-align:left; }
.thread-link { margin-top:7px; min-height:27px; padding:3px 7px; border:0; background:#2b48576e; color:#bfeeed; }
.thread-totals { display:flex; flex-wrap:wrap; gap:7px; }
.thread-totals button { color:#c5deeb; background:#283d516e; }
.thread-totals b { color:#f2fafb; }
.thread-next { border:1px solid #639994; background:#274951a3; padding:10px 11px; border-radius:12px; }
.workbench.conversation-workspace .conversation-pane .report-dock {
  position:relative; inset:auto; width:auto; min-width:0; min-height:0; margin:0; transform:none;
  padding:10px 12px 12px; background:#111c29f0; border:0; border-radius:0; border-top:1px solid #566e86;
  backdrop-filter:none; box-shadow:none; max-height:54%; overflow:auto; flex:none;
}
.workbench.conversation-workspace .report-dock-header { min-height:0; justify-content:flex-start; margin:0 0 7px; }
.workbench.conversation-workspace .composer-status { color:#bdd7df; line-height:1.3; }
.workbench.conversation-workspace.has-investigation .report-dock:not(.composer-open) > :not(.report-dock-header) { display:revert; }
.workbench.conversation-workspace .report-dock .incident-options,
.workbench.conversation-workspace .report-dock .composer-bottom { display:flex!important; flex-wrap:wrap; align-items:center; gap:6px; justify-content:space-between; }
.workbench.conversation-workspace .composer-bottom > div { display:flex; gap:5px; }
.workbench.conversation-workspace .report-dock .report-input {
  display:block!important; min-height:66px; width:100%; max-height:128px; margin:0 0 7px; resize:vertical;
  color:#f3f8fa; background:#182636; border:1px solid #557184; border-radius:12px; font-size:14px;
}
.workbench.conversation-workspace .report-dock .incident-options { justify-content:flex-start; margin-bottom:6px; }
.workbench.conversation-workspace #pin-status { display:none; }
.workbench.conversation-workspace .report-dock .fact-chips,.workbench.conversation-workspace .report-dock .attachment-chips { display:flex; max-height:62px; overflow:auto; gap:4px; }
.workbench.conversation-workspace .report-dock .fact-chips:empty,.workbench.conversation-workspace .report-dock .attachment-chips:empty { display:none; }
.workbench.conversation-workspace .report-dock .exact-pin-button,.workbench.conversation-workspace .report-dock .direction-toggle { min-height:29px; font-size:11px; padding:4px 7px; }
.workbench.conversation-workspace .report-dock .direction-toggle > span { display:none; }
.workbench.conversation-workspace .report-dock .submit-report { min-height:36px; border-radius:10px; line-height:1.15; font-weight:720; }
.workbench.conversation-workspace .report-dock .direction-options[hidden] { display:none!important; }
.workbench.conversation-workspace .report-dock .direction-options label { min-width:86px; }
.workbench.conversation-workspace .map-stage {
  position:absolute; inset:var(--workspace-top) 14px 14px var(--map-left); min-height:0; height:auto; width:auto;
  border:1px solid #526779; border-radius:20px; overflow:hidden; background:#111a26;
}
.workbench.conversation-workspace .map-stage .map-search { left:12px; top:12px; width:min(278px,calc(100% - 176px)); }
.workbench.conversation-workspace .map-stage .map-toolbar { right:10px; top:11px; gap:5px; }
.workbench.conversation-workspace .map-stage .map-tool { height:32px; width:32px; }
.workbench.conversation-workspace .map-stage .osiris-basemap-switch { top:55px; left:12px; }
.workbench.conversation-workspace .map-stage .layers-popover { top:52px; right:11px; }
.workbench.conversation-workspace .map-stage .tool-prompt,.workbench.conversation-workspace .map-stage .map-status { top:106px; left:12px; bottom:auto; max-width:calc(100% - 24px); }
.workbench.conversation-workspace .continuous-objective { left:12px; top:103px; max-width:calc(100% - 24px); }
.workbench.conversation-workspace .continuous-legend { left:12px; top:151px; max-width:calc(100% - 24px); gap:5px 9px; }
.workbench.conversation-workspace .continuous-controller { bottom:34px; left:12px; right:12px; max-width:700px; }
.workbench.conversation-workspace .osiris-map-context { bottom:8px; left:12px; }
.workbench.conversation-workspace .maplibregl-ctrl-bottom-left { left:2px; bottom:32px; }
.workbench.conversation-workspace .maplibregl-ctrl-bottom-right { right:5px; bottom:4px; }
.workbench.conversation-workspace .maplibregl-ctrl-top-right { top:55px; right:4px; }
.workbench.conversation-workspace .routes-pane { display:none; position:absolute; inset:calc(var(--workspace-top) + 52px) 25px 25px auto; width:var(--inspector-width); border-radius:16px; }
.workbench.conversation-workspace[data-inspector=open] .routes-pane { display:flex; }
.workbench.conversation-workspace[data-inspector=open] .continuous-controller { right:min(calc(var(--inspector-width) + 18px),45%); }
.workbench.conversation-workspace .routes-header { padding:11px 12px; }
.workbench.conversation-workspace :focus-visible { outline:2px solid #b1f1e7; outline-offset:3px; }
@media (max-width:1230px) and (min-width:941px) {
  .workbench.conversation-workspace { --sidebar-width:64px; --conversation-width:360px; --inspector-width:326px; }
  .workbench.conversation-workspace .sidebar { padding:12px 6px; align-items:center; }
  .workbench.conversation-workspace .brand { padding:0; margin-bottom:16px; }
  .workbench.conversation-workspace .brand > span:nth-child(2),
  .workbench.conversation-workspace .nav-button span,.workbench.conversation-workspace .new-case span,
  .workbench.conversation-workspace .account > span:nth-child(2),.workbench.conversation-workspace .account > .icon,
  .workbench.conversation-workspace:not([data-case-menu=open]) .sidebar .case-list { display:none; }
  .workbench.conversation-workspace .sidebar .nav-button,.workbench.conversation-workspace .new-case,.workbench.conversation-workspace .account { justify-content:center; }
  .workbench.conversation-workspace .workspace-cases { display:inline-block; }
  .workbench.conversation-workspace[data-case-menu=open] .sidebar .case-list {
    display:block; position:absolute; top:55px; left:65px; width:252px; max-height:70vh; border:1px solid #607884;
    padding:8px; background:#192939; border-radius:11px; z-index:710; }
  .workbench.conversation-workspace .sidebar { z-index:690; }
}
@media (max-width:940px) {
  .workbench.conversation-workspace { position:relative; display:block; height:100dvh; min-height:440px; overflow:hidden;
    --sidebar-width:0px; --conversation-left:8px; --map-left:8px; --workspace-top:105px; --inspector-width:min(360px,calc(100vw - 33px)); }
  .workbench.conversation-workspace .sidebar {
    position:absolute; inset:6px 8px auto; width:auto; height:43px; padding:0 8px; display:flex; flex-direction:row;
    justify-content:space-between; gap:5px; border-radius:12px; z-index:690;
  }
  .workbench.conversation-workspace .brand { padding:0 2px; margin:0; font-size:18px; }
  .workbench.conversation-workspace .brand > span:nth-child(2) { display:inline; }
  .workbench.conversation-workspace .sidebar-nav { display:flex; flex-direction:row; width:auto; gap:1px; margin:0 0 0 auto; }
  .workbench.conversation-workspace .sidebar .nav-button { min-width:29px; width:auto; margin:0; padding:5px; justify-content:center; }
  .workbench.conversation-workspace .nav-button span,.workbench.conversation-workspace .new-case span,
  .workbench.conversation-workspace .account > span:nth-child(2),.workbench.conversation-workspace .account > .icon,
  .workbench.conversation-workspace .sidebar .case-list { display:none; }
  .workbench.conversation-workspace .new-case { margin:0; padding:4px 6px; min-width:28px; justify-content:center; }
  .workbench.conversation-workspace .sidebar-foot { display:flex; align-items:center; width:auto; gap:1px; margin:0; padding:0; border:0; }
  .workbench.conversation-workspace .sidebar-foot > .nav-button { display:inline-flex; }
  .workbench.conversation-workspace .account { padding:3px; min-width:29px; }
  .workbench.conversation-workspace .connectionbar { position:absolute; top:53px; left:8px; right:8px; height:43px; gap:5px; padding:5px 7px; border-radius:12px; }
  .workbench.conversation-workspace .workspace-title { font-size:13px; max-width:100%; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
  .workbench.conversation-workspace .workspace-actions { gap:3px; }
  .workbench.conversation-workspace .workspace-actions > .connections { display:none; }
  .workspace-cases { display:inline-block; padding:3px 6px; min-height:29px; font-size:11px; }
  .workspace-switch { display:flex; align-items:center; gap:1px; }
  .workspace-switch button { padding:3px 6px; min-height:29px; font-size:11px; border-color:transparent; background:transparent; }
  .workspace-switch button[aria-pressed=true] { border-color:#678a98; background:#365661; color:#f1faf9; }
  .workbench.conversation-workspace[data-case-menu=open] .sidebar .case-list {
    display:block; position:absolute; top:47px; right:0; width:min(292px,100%); max-height:68vh;
    padding:8px; border:1px solid #63808e; background:#1a2e3e; border-radius:11px;
  }
  .workbench.conversation-workspace .conversation-pane { inset:var(--workspace-top) 8px 8px; width:auto; border-radius:15px; }
  .conversation-workspace .conversation-header { min-height:53px; padding:9px 10px; }
  .conversation-workspace .conversation-header h1 { font-size:17px; }
  .conversation-workspace .case-thread { padding:10px; gap:8px; }
  .conversation-workspace .thread-empty { padding-block:4px; }
  .workbench.conversation-workspace .conversation-pane .report-dock { padding:8px; max-height:58%; }
  .workbench.conversation-workspace .report-dock .report-input { font-size:16px; min-height:58px; }
  .workbench.conversation-workspace .map-stage { inset:var(--workspace-top) 8px 8px; border-radius:15px; }
  /* Keep the native map mounted while the conversation is in front. */
  .workbench.conversation-workspace:not([data-workspace-pane=map]) .map-stage { visibility:hidden; pointer-events:none; }
  .workbench.conversation-workspace[data-workspace-pane=map] .conversation-pane { display:none; }
  .workbench.conversation-workspace .routes-pane { inset:calc(var(--workspace-top) + 52px) 15px 15px auto; }
  .workbench.conversation-workspace[data-inspector=open] .continuous-controller { right:12px; }
  .workbench.conversation-workspace .map-stage .map-tool { width:28px; height:29px; padding:3px; }
  .workbench.conversation-workspace .map-stage .map-toolbar { gap:3px; }
  .workbench.conversation-workspace .continuous-stage-heading strong { font-size:12px; }
  .workbench.conversation-workspace .continuous-legend { font-size:9px; }
}
@media (prefers-reduced-motion:reduce) {
  .conversation-workspace * { scroll-behavior:auto!important; }
}
.workbench.conversation-workspace #cancel-tool { background:#294355; color:#e4f4f4; padding:4px; border:1px solid #536e80; }

.workbench.conversation-workspace .report-dock-header:has(.composer-status:empty) { display:none; }
.composer-options { position:relative; }
.composer-options summary {
  display:block; min-height:29px; padding:6px 8px; border:1px solid #416173; border-radius:8px;
  background:#213442; color:#d5e9ef; font-size:11px; cursor:pointer;
}
.composer-options > div { display:flex; gap:4px; padding-top:4px; }

.workbench.conversation-workspace .report-dock .fact-chips {
  flex-wrap:nowrap; max-height:29px; width:100%; overflow-x:auto; overflow-y:hidden;
  scrollbar-width:thin; margin:4px 0;
}
.workbench.conversation-workspace .report-dock .fact-chip { display:inline-flex; flex:none; white-space:nowrap; max-width:100%; padding:3px 6px; }
