/* Shared, durable AI conversation history for both authorized roles. */
.wb-page [hidden] { display: none !important; }
.wb-view-tabs { display:flex; gap:24px; margin-bottom:14px; border-bottom:1px solid #e3e8ed; flex-shrink:0; }
.wb-view-tabs button { background:none; border:0; padding:9px 0; color:#778797; font:inherit; font-size:13px; cursor:pointer; }
.wb-view-tabs button[aria-pressed="true"] { color:#487ba8; border-bottom:2px solid #487ba8; font-weight:600; }
.wb-chat-layout { grid-template-columns:225px minmax(0,1fr); gap:0; border:1px solid #e3e8ed; border-radius:8px; background:#fff; overflow:hidden; }
.wb-chat-layout .wb-query { border:0; border-radius:0; }
.wb-task-layout { grid-template-columns:minmax(0,1fr); }
.wb-history { display:flex; flex-direction:column; gap:12px; background:#f8fafc; border-right:1px solid #e3e8ed; padding:16px 12px; min-height:0; min-width:0; }
.wb-history-new { background:#fff; border:1px solid #dce4eb; border-radius:6px; padding:9px; color:#425b70; cursor:pointer; font:inherit; font-size:13px; }
.wb-history-search { width:100%; min-width:0; border:1px solid #e1e7ed; border-radius:6px; background:#fff; padding:8px 10px; font:inherit; font-size:12px; }
.wb-history-list { flex:1; min-height:0; overflow-y:auto; overscroll-behavior:contain; }
.wb-history-item { display:block; text-align:left; width:100%; border:0; border-radius:6px; padding:10px; margin:3px 0; background:transparent; color:#425569; cursor:pointer; }
.wb-history-item:hover, .wb-history-item[aria-pressed="true"] { background:#eaf2f9; color:#487ba8; }
.wb-history-item strong { display:block; font-size:13px; font-weight:500; overflow-wrap:anywhere; }
.wb-history-item small { display:block; font-size:11px; color:#7c8997; margin-top:3px; }
.wb-history button:disabled { cursor:default; opacity:.6; }
.wb-history-note { margin:0; font-size:11px; color:#82909e; padding:10px 6px 0; border-top:1px solid #e1e7ed; }
.wb-history-toggle { display:none; }
.wb-chat-actions { display:flex; align-items:center; gap:10px; flex-shrink:0; }
.wb-save-state { color:#428169; font-size:11px; }
.wb-chat-layout .wb-title { min-width:0; }
.wb-chat-layout .wb-title > div { min-width:0; }
.wb-chat-layout .wb-title h2 { font-size:15px; overflow-wrap:anywhere; }
.wb-chat-layout .wb-panel-head { gap:12px; border-bottom:1px solid #edf0f3; padding:16px 20px; }
.wb-chat-layout .wb-query-sub { margin-top:10px; }
.wb-older { display:block; margin:0 auto 18px; border:1px solid #dce4eb; background:#fff; color:#527eae; border-radius:5px; padding:7px 12px; cursor:pointer; }
@media (max-width:1050px) {
  .wb-chat-layout { height:calc(100dvh - 240px); min-height:540px; }
  .wb-chat-layout .wb-query { height:100%; min-height:0; }
  .wb-chat-layout .wb-history { height:100%; }
  .wb-task-layout .wb-tasks { max-height:none; }
}
@media (max-width:650px) {
  .wb-chat-layout { display:flex; flex-direction:column; min-height:540px; height:calc(100dvh - 195px); position:relative; }
  .wb-chat-layout .wb-history { display:none; }
  .wb-chat-layout .wb-history.is-open { display:flex; position:absolute; inset:0; z-index:5; padding-top:52px; }
  .wb-history-toggle { display:block; border:1px solid #dce4eb; background:#fff; border-radius:5px; padding:6px 9px; font:inherit; font-size:12px; color:#527eae; }
  .wb-chat-layout:has(.wb-history.is-open) .wb-history-toggle { position:absolute; top:10px; right:12px; z-index:6; }
  .wb-chat-layout .wb-query { flex:1; width:100%; }
  .wb-chat-layout .wb-panel-head { padding:12px; align-items:flex-start; flex-wrap:wrap; }
  .wb-chat-layout .wb-title { flex:1; }
  .wb-chat-actions { flex-wrap:wrap; justify-content:flex-end; max-width:110px; }
  .wb-history-search { font-size:16px; }
}
