/* Dedicated furniture-workbench side conversation. */
.workbench-shell { display:flex; width:100%; min-width:0; min-height:0; align-items:stretch; }
.workbench-shell > .flow-workspace { flex:1 1 0; min-width:0; }
.workbench-chat { box-sizing:border-box; flex:0 0 340px; width:340px; height:var(--wb-panel-height,calc(100dvh - 54px)); min-height:0; display:flex; flex-direction:column; gap:8px; padding:12px; border-left:1px solid #e8e8e8; background:#fff; color:#222; overflow:hidden; }
.workbench-chat[hidden] { display:none; }
.workbench-chat:focus { outline:none; }
.wc-header,.wc-title,.wc-notes-heading,.wc-compose-tools { display:flex; align-items:center; justify-content:space-between; gap:8px; }
.wc-header { min-height:32px; flex-shrink:0; }
.wc-title strong { font-size:15px; font-weight:600; }
.wc-mode { padding:3px 6px; border-radius:20px; background:#f3f3f3; color:#737373; font-size:10px; white-space:nowrap; }
.wc-close { border:0; background:#f3f3f3; padding:7px 10px; border-radius:20px; color:#555; font-size:12px; cursor:pointer; }
.wc-context { box-sizing:border-box; display:flex; gap:8px; align-items:center; min-height:52px; padding:6px 8px; border-radius:14px; background:#f5f5f7; flex-shrink:0; }
.wc-context-image { flex:0 0 auto; width:40px; height:40px; object-fit:contain; border-radius:8px; background:#fff; }
.wc-context-text { min-width:0; flex:1; }
.wc-context-text strong { display:block; font-size:12px; font-weight:500; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.wc-context-text p { margin:2px 0 0; font-size:11px; color:#6e6e73; line-height:1.4; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.wc-link { padding:5px 3px; border:0; background:transparent; color:#555; font:inherit; font-size:11px; cursor:pointer; text-decoration:underline; text-underline-offset:3px; white-space:nowrap; }
.wc-target { display:flex; flex:0 1 auto; min-width:0; align-items:center; gap:4px; font-size:11px; color:#86868b; }
.wc-target select { min-width:0; max-width:120px; min-height:32px; padding:4px 8px; border:1px solid #e3e3e3; border-radius:10px; background:#fff; color:#333; font:inherit; font-size:12px; }
.wc-target-label { flex-shrink:0; }
.wc-notes { flex-shrink:0; padding:6px 10px; border:1px solid #ececec; border-radius:12px; background:#fafafa; }
.wc-notes-heading strong { font-size:11px; font-weight:500; }
.wc-notes p { margin:4px 0 0; white-space:pre-wrap; overflow-wrap:anywhere; max-height:52px; overflow:auto; font-size:11px; line-height:1.5; color:#666; }
.wc-messages { flex:1 1 0; min-height:0; display:flex; flex-direction:column; gap:10px; overflow-y:auto; overscroll-behavior:contain; scrollbar-width:thin; padding:2px 1px 6px; }
.wc-message { flex-shrink:0; max-width:100%; padding:10px 11px; border-radius:5px 16px 16px 16px; background:#f5f5f5; font-size:12px; line-height:1.6; overflow-wrap:anywhere; }
.wc-message > p { margin:0; white-space:pre-wrap; }
.wc-message-user { align-self:flex-end; max-width:90%; background:#282828; color:#fff; border-radius:16px 16px 5px 16px; }
.wc-shortcuts { display:flex; flex-shrink:0; gap:6px; overflow-x:auto; overscroll-behavior:contain; scrollbar-width:none; padding-bottom:2px; }
.wc-shortcut { white-space:nowrap; border:1px solid #e5e5e5; border-radius:20px; padding:6px 9px; font:inherit; font-size:10px; color:#555; background:#fff; cursor:pointer; }
.wc-compose { flex-shrink:0; border:1px solid #dedede; border-radius:18px; padding:9px 10px 7px; background:#fff; box-shadow:0 2px 8px rgba(0,0,0,.025); }
.wc-compose textarea { display:block; box-sizing:border-box; width:100%; min-height:44px; max-height:120px; padding:0; border:0; outline:none; resize:none; font:inherit; font-size:12px; line-height:1.5; color:#222; background:transparent; }
.wc-compose:focus-within { border-color:#999; }
.wc-send { border:0; min-height:32px; padding:6px 14px; border-radius:20px; background:#262626; color:#fff; font:inherit; font-size:11px; cursor:pointer; }
.wc-send:disabled { opacity:.45; cursor:progress; }
.wc-status { flex-shrink:0; margin:0; min-height:14px; font-size:10px; color:#777; line-height:1.4; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.wc-status:empty { display:none; }
.wc-pending { display:flex; align-items:center; gap:8px; color:#777; font-size:11px; padding:7px; }
.wc-dots { display:flex; gap:4px; }
.wc-dots i { width:4px; height:4px; border-radius:50%; background:#888; animation:wc-dot 1.1s ease-in-out infinite; }
.wc-dots i:nth-child(2) { animation-delay:.15s; }.wc-dots i:nth-child(3) { animation-delay:.3s; }
@keyframes wc-dot { 0%,70%,100% { opacity:.3; transform:translateY(0); } 35% { opacity:1; transform:translateY(-3px); } }
.wc-note-action,.wc-apply { padding:6px 9px; min-height:30px; border:1px solid #d7d7d7; border-radius:14px; background:#fff; color:#333; font:inherit; font-size:10px; cursor:pointer; }
.wc-note-action { margin-top:9px; }
.wc-note-action:disabled,.wc-apply:disabled { opacity:.45; cursor:default; }
.wc-recommendations { display:flex; flex-direction:column; gap:7px; margin-top:7px; }
.wc-fabric-card { display:flex; gap:7px; align-items:center; padding:6px; border:1px solid #e7e7e7; border-radius:12px; background:#fff; }
.wc-fabric-card img { width:44px; height:48px; border-radius:7px; object-fit:cover; }
.wc-fabric-copy { flex:1; min-width:0; display:flex; flex-direction:column; gap:3px; font-size:10px; line-height:1.4; }
.wc-fabric-copy strong { font-size:11px; font-weight:500; }
.wc-fabric-copy span { color:#777; max-height:28px; overflow:auto; }
.wc-apply { white-space:nowrap; }
.wc-example-label { display:block; margin-top:9px; color:#888; font-size:10px; }
.workbench-chat-launcher { position:fixed; z-index:150; right:16px; top:calc(54px + 8px); min-height:38px; padding:9px 14px; background:rgba(255,255,255,.9); backdrop-filter:saturate(180%) blur(20px); -webkit-backdrop-filter:saturate(180%) blur(20px); color:#333; border:0.5px solid #e0e0e0; border-radius:20px; font:inherit; font-size:12px; font-weight:500; box-shadow:0 4px 14px rgba(0,0,0,.08); cursor:pointer; transition:all .15s ease; }
.workbench-chat-launcher:hover { background:rgba(250,250,250,.95); border-color:#c0c0c0; box-shadow:0 6px 18px rgba(0,0,0,.12); }
.workbench-chat-launcher:active { transform:scale(.96); }
.workbench-chat-launcher[hidden] { display:none; }
.wc-scrim { display:none; }
@media (max-width:1100px) {
  .workbench-chat { display:none; position:fixed; z-index:230; bottom:calc(12px + var(--wb-bottom-inset,0px)); left:12px; right:12px; width:auto; max-width:520px; margin-inline:auto; flex:none; height:min(680px,var(--wb-panel-height)); border:1px solid #e3e3e3; border-radius:24px; box-shadow:0 12px 40px rgba(0,0,0,.12); padding:12px; overscroll-behavior:contain; contain:layout paint; }
  .workbench-chat.is-open { display:flex; }
  .wc-scrim:not([hidden]) { display:block; position:fixed; z-index:220; inset:0; width:100%; height:100%; padding:0; border:0; background:rgba(0,0,0,.22); font-size:0; cursor:default; }
  .wc-compose textarea { font-size:16px; min-height:24px; max-height:96px; }
  .wc-close,.wc-send,.wc-link,.wc-shortcut,.wc-note-action,.wc-apply,.wc-target select { min-height:44px; font-size:13px; }
  .wc-target select { font-size:16px; }
  .wc-close,.wc-send { padding:0 16px; }
  .wc-shortcut { padding:0 14px; }
  .wc-context-text strong { font-size:13px; }
  .wc-context-text p,.wc-target,.wc-message { font-size:13px; }
  .wc-status { font-size:11px; }
  .wc-notes p { max-height:36px; }
}
@media (max-width:390px) {
  .graph-toolbar { flex-wrap:wrap; max-width:calc(100vw - 32px); }
  .workbench-chat-launcher { right:12px; }
}
/* Mobile: launcher sits in the header's right group in normal layout. */
@media (max-width:767px) {
  .workbench-chat-launcher.is-header-action { position:static; top:auto; right:auto; z-index:auto; flex:0 0 auto; min-height:44px; min-width:44px; padding:0 12px; margin:0; display:inline-flex; align-items:center; justify-content:center; background:#fff; backdrop-filter:none; -webkit-backdrop-filter:none; border:1px solid #e0e0e0; border-radius:22px; color:#333; font-size:12px; line-height:1; white-space:nowrap; box-shadow:none; }
  .workbench-chat-launcher.is-header-action[hidden] { display:none; }
  .workbench-chat-launcher.is-header-action:focus-visible { outline:2px solid #333; outline-offset:2px; }
  .flow-header-right { display:flex; align-items:center; gap:6px; min-width:0; }
}
@media (max-width:360px) {
  .workbench-chat-launcher.is-header-action { padding:0 9px; font-size:11px; }
}
@media (prefers-reduced-motion:reduce) { .wc-dots i { animation:none; } .workbench-chat-launcher { transition:none; } }
/* Phone: compact consultation sheet (heading, conversation, one-row compose). */
@media (max-width:767px) {
  .workbench-chat { left:0; right:0; bottom:var(--wb-bottom-inset,0px); max-width:520px; height:min(360px,var(--wb-panel-height,calc(100dvh - 24px))); max-height:min(480px,var(--wb-panel-height,calc(100dvh - 24px))); gap:6px; padding:6px 14px max(10px,env(safe-area-inset-bottom,0px)); border:0; border-radius:20px 20px 0 0; box-shadow:0 -6px 28px rgba(0,0,0,.10); }
  .wc-header { min-height:44px; margin-right:-8px; }
  .wc-mode,.wc-notes,.wc-context .wc-target,.wc-context .wc-link,.wc-compose-tools .wc-link,.wc-note-action,.wc-apply { display:none; }
  /* Compact one-line context: optional thumbnail + furniture / fabric summary. */
  .wc-context { min-height:0; gap:10px; padding:6px 10px; border-radius:12px; }
  .wc-context[hidden],.wc-shortcuts[hidden],.wc-context-image[hidden],.wc-context-image:not([src]) { display:none; }
  .wc-context-image { width:32px; height:32px; border-radius:7px; }
  .wc-context-text { display:flex; align-items:baseline; gap:6px; }
  .wc-context-text strong { flex:0 1 auto; max-width:60%; min-width:0; font-size:13px; }
  .wc-context-text p { flex:1 1 0; min-width:0; margin:0; font-size:12px; }
  /* Two quick questions only; hidden while typing to give the log room. */
  .wc-shortcuts { gap:8px; overflow:hidden; padding:0; }
  .wc-shortcut { flex:0 1 auto; min-width:0; overflow:hidden; text-overflow:ellipsis; padding:0 14px; border-radius:22px; font-size:13px; }
  .wc-shortcut:nth-child(n+3) { display:none; }
  .workbench-chat:has(.wc-compose textarea:focus) .wc-shortcuts { display:none; }
  .wc-title strong { font-size:16px; }
  .wc-close { display:inline-flex; align-items:center; justify-content:center; width:44px; min-width:44px; height:44px; min-height:44px; padding:0; border-radius:22px; background:transparent; color:transparent; font-size:0; }
  .wc-close::before { content:"×"; content:"×" / ""; color:#8e8e93; font-size:24px; line-height:1; }
  .wc-close:active { background:#f2f2f4; }
  .wc-close:focus-visible { outline:2px solid #333; outline-offset:-4px; }
  .wc-messages { flex:1 1 0; min-height:72px; gap:8px; padding:4px 0 8px; scrollbar-width:none; -ms-overflow-style:none; }
  .wc-messages::-webkit-scrollbar { display:none; width:0; height:0; }
  .wc-message { font-size:15px; line-height:1.55; padding:9px 12px; background:#f4f4f5; border-radius:6px 18px 18px 18px; }
  .wc-message-user { background:#282828; border-radius:18px 18px 6px 18px; }
  .wc-fabric-copy { font-size:12px; }
  .wc-fabric-copy strong { font-size:13px; }
  .wc-compose { display:flex; align-items:flex-end; gap:8px; min-height:44px; padding:0 0 0 14px; border:0; border-radius:22px; background:#f2f2f4; box-shadow:none; }
  .wc-compose:focus-within { box-shadow:inset 0 0 0 1px #c7c7cc; }
  .wc-compose textarea { flex:1 1 auto; width:auto; min-width:0; min-height:44px; max-height:96px; padding:11px 0; font-size:16px; line-height:22px; }
  .wc-compose-tools { flex:0 0 auto; }
  .wc-send { min-height:44px; padding:0 18px; border-radius:22px; font-size:15px; }
  .wc-status { white-space:normal; font-size:12px; color:#6e6e73; }
}
