/* The stage always occupies the same rectangle. Conversation modes are overlays. */
.cv-root.cv-panel-overlay .cv-body{position:relative;display:block;gap:0;padding:0;min-height:0}
.cv-root.cv-panel-overlay .cv-center{position:absolute;inset:0;width:100%;height:100%;min-width:0}
.cv-root.cv-panel-overlay .cv-left{position:absolute;z-index:42;left:0;top:0;bottom:0;width:var(--cv-panel-width,390px);min-width:0;max-width:calc(100% - 24px);height:100%;margin-left:0;flex:none;opacity:1;transform:none;visibility:visible;pointer-events:auto;border-radius:0;border-top:0;background:#fff;transition:opacity .12s ease,visibility .12s ease}
.cv-root.cv-panel-overlay .cv-left.collapsed{margin-left:0;opacity:0;visibility:hidden;pointer-events:none}
.cv-root.cv-panel-overlay #cvPanelToggle,.cv-root.cv-panel-overlay #cvPanelHandle,.cv-root.cv-panel-overlay .cv-agent-top{display:none!important}
.cv-root .cv-panel-control{width:32px;height:32px;flex:0 0 32px;justify-content:center;padding:6px;border-radius:8px;color:#333}
.cv-root .cv-panel-control:hover{background:#f1f1f1}
.cv-root #cvPanelHeaderToggle{margin-left:2px;margin-right:2px}
.cv-panel-resize{position:absolute;top:0;bottom:0;right:0;width:12px;z-index:100;cursor:col-resize;touch-action:none;user-select:none;outline:none}
.cv-panel-resize:before{content:"";position:absolute;top:0;bottom:0;right:0;width:2px;background:transparent;transition:background .12s}
.cv-panel-resize:hover:before,.cv-panel-resize:focus-visible:before,.cv-panel-resizing .cv-panel-resize:before{background:#a5a5a5}
.cv-panel-resize:focus-visible{box-shadow:inset 0 0 0 1px #aaa}
.cv-root.cv-panel-resizing,.cv-root.cv-panel-resizing *{cursor:col-resize!important;user-select:none!important}
.cv-root.cv-panel-chat-max .cv-panel-resize,.cv-left.collapsed .cv-panel-resize{display:none}
.cv-root.cv-panel-chat-max .cv-left{left:50%;width:min(1360px,calc(100% - 64px));max-width:none;transform:translateX(-50%);border:0}
.cv-root.cv-panel-chat-max .cv-center{visibility:hidden;pointer-events:none}
.cv-root.cv-panel-chat-max .cv-agent-msgs{padding:28px clamp(20px,5vw,64px);overflow-anchor:none}
.cv-root.cv-panel-chat-max .cv-agent-in{padding:12px clamp(20px,5vw,64px) 20px}
.cv-root.cv-panel-chat-max .cv-conversation-title{font-size:14px!important}
.cv-panel-chat-backdrop{position:absolute;inset:0;background:#fff;z-index:40;pointer-events:auto}
.cv-panel-chat-backdrop[hidden]{display:none}
.cv-root .cv-history-dropdown{position:absolute;left:10px;right:10px;top:42px;max-height:min(480px,calc(100% - 60px));z-index:96;background:#fff;border:1px solid #e9e9e9;border-radius:14px;padding:12px;box-shadow:0 8px 30px #0000000d;display:flex;flex-direction:column;gap:8px;font:13px/1.5 Inter,"PingFang SC",sans-serif;box-sizing:border-box}
.cv-root .cv-history-dropdown input{width:100%;box-sizing:border-box;border:1px solid #eee;border-radius:9px;background:#f7f7f7;padding:9px 11px;outline:none;color:#282828;font:inherit;flex:none}
.cv-root .cv-history-dropdown input:focus{border-color:#aaa;background:#fff}
.cv-history-heading{font-size:11px;color:#999;padding:2px 3px;flex:none}
.cv-history-list{overflow:auto;min-height:0;display:flex;flex-direction:column;gap:3px}
.cv-history-item{border:0;border-radius:9px;background:transparent;text-align:left;padding:10px 9px;color:#333;cursor:pointer;display:flex;flex-direction:column;gap:3px;min-width:0;flex:none;font:inherit}
.cv-history-item:hover,.cv-history-item.active{background:#f4f4f4}
.cv-history-title{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:100%}
.cv-history-item small{color:#aaa;font-size:11px}
.cv-history-empty{color:#aaa;font-size:12px;text-align:center;padding:14px 6px;margin:0}
@media(max-width:1150px){.cv-root.cv-panel-overlay .cv-left{width:var(--cv-panel-width,330px)}.cv-root.cv-panel-chat-max .cv-left{width:calc(100% - 40px)}}
@media(max-width:850px){.cv-root.cv-panel-overlay .cv-left{width:var(--cv-panel-width,290px)}.cv-root.cv-panel-chat-max .cv-left{left:0;width:100%;max-width:none;transform:none}.cv-root.cv-panel-chat-max .cv-agent-msgs,.cv-root.cv-panel-chat-max .cv-agent-in{padding-left:20px;padding-right:20px}}
@media(prefers-reduced-motion:reduce){.cv-root.cv-panel-overlay .cv-left{transition:none}}

/* Flush workspace edges; keep the separator fully inside its clipping panel. */
body.is-canvas .container{padding-inline:0!important;margin-inline:0;max-width:none}
.cv-root,.cv-root .cv-topbar,.cv-root .cv-stage{border-radius:0}

.cv-root .cv-topbar{height:48px;min-height:48px;box-sizing:border-box;flex:none}
