/* Shared assistant. Page layout reserves the panel width on desktop. */
body.ebc-desktop-open:has(> .ebc-panel.is-open:not([hidden])) { margin-right: var(--ebc-reserve, 420px); }
body.ebc-desktop-open > .header, body.ebc-desktop-open .site-header,
body.ebc-desktop-open > .footer, body.ebc-desktop-open .app-footer { right: var(--ebc-reserve, 420px); }
.ebc-panel, .ebc-panel *, .ebc-fab { box-sizing: border-box; }
.ebc-panel { --ebc-muted: var(--gray-2, #a9b8ca); position: fixed; inset: 0 0 0 auto; z-index: 400; width: var(--ebc-w, 420px); max-width: 100vw; height: 100dvh; display: flex; flex-direction: column; background: var(--black, #0e1722); color: var(--white, #eff4fa); border-left: 1px solid var(--border-hover, #304154); font-family: var(--font, 'Segoe UI', sans-serif); font-size: 14px; line-height: 1.5; visibility: hidden; transform: translateX(100%); transition: transform 180ms ease-out, visibility 180ms; }
.ebc-panel.is-open { visibility: visible; transform: translateX(0); }
.ebc-panel.is-resizing { transition: none; user-select: none; }
.ebc-panel button, .ebc-panel input, .ebc-panel textarea { font: inherit; }
.ebc-panel button { min-height: 44px; cursor: pointer; }
.ebc-panel button:disabled { opacity: .5; cursor: default; }
.ebc-panel button:focus-visible, .ebc-panel input:focus-visible, .ebc-panel textarea:focus-visible, .ebc-panel a:focus-visible, .ebc-panel summary:focus-visible, .ebc-fab:focus-visible { outline: 2px solid var(--accent, #9ac7ff); outline-offset: 3px; }
.ebc-panel button:active:not(:disabled), .ebc-fab:active { transform: scale(.98); }
.ebc-panel[hidden], .ebc-panel [hidden] { display: none !important; }
.ebc-fab { position: fixed; right: 20px; bottom: 80px; z-index: 399; display: flex; align-items: center; justify-content: center; gap: 9px; min-width: 52px; height: 48px; padding: 0 15px; border: 1px solid var(--border-hover, #304154); border-radius: 12px; background: var(--accent, #5596e1); color: #fff; box-shadow: 0 5px 18px #0003; cursor: pointer; font: 600 13px var(--font, 'Segoe UI', sans-serif); }
.ebc-fab svg { width: 21px; height: 21px; }
.ebc-fab.is-hidden { visibility: hidden; pointer-events: none; }
.ebc-fab.is-open { right: calc(var(--ebc-reserve, 420px) + 14px); bottom: 18px; z-index: 401; }
.ebc-panel .ebc-close { display: flex; width: auto; gap: 5px; padding: 0 9px; color: var(--white); font-size: 12px !important; }
.ebc-fab-dot { display: none; width: 8px; height: 8px; background: #fff; border-radius: 50%; }
.ebc-fab.is-unread .ebc-fab-dot { display: block; }
.ebc-backdrop { display: none; }
.ebc-resize { position: absolute; left: -7px; top: 0; bottom: 0; width: 14px; cursor: col-resize; display: grid; place-items: center; z-index: 2; touch-action: none; }
.ebc-resize::after { content: ''; height: 48px; width: 3px; border-radius: 4px; background: var(--border-hover, #304154); }
.ebc-resize:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.ebc-resize:hover::after, .ebc-panel.is-resizing .ebc-resize::after { background: var(--accent); }
.ebc-head { display: flex; align-items: center; gap: 10px; flex-shrink: 0; min-height: 72px; padding: 12px 12px 12px 20px; }
.ebc-mark { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--accent-soft, #223b57); color: var(--accent); }
.ebc-mark svg { width: 20px; height: 20px; }
.ebc-titles { flex: 1; min-width: 0; }
.ebc-title { display: block; font-size: 16px; font-weight: 650; letter-spacing: -.2px; }
.ebc-actions { display: flex; gap: 2px; }
.ebc-act { width: 44px; height: 44px; border: 0; border-radius: 8px; background: transparent; color: var(--ebc-muted); display: grid; place-items: center; }
.ebc-act svg { width: 19px; height: 19px; }
.ebc-act:hover { background: var(--input, #ffffff08); color: var(--white); }
.ebc-head { border-bottom: 1px solid var(--border, #304154); }
.ebc-provider { display: flex; gap: 12px; align-items: center; justify-content: flex-end; padding: 8px 16px 0; font-size: 11px; color: var(--ebc-muted); }
.ebc-provider select { min-height: 44px; min-width: 100px; border-radius: 7px; border: 1px solid var(--border-hover); background: var(--card); color: var(--white); padding: 6px 10px; }
.ebc-msgs { flex: 1; min-height: 0; overflow: auto; overscroll-behavior: contain; padding: 22px 20px; display: flex; flex-direction: column; gap: 20px; scrollbar-width: thin; }
.ebc-empty { margin: 0; padding: 6px 0 12px; }
.ebc-empty h2 { font-size: 20px; font-weight: 600; letter-spacing: -.4px; margin: 0 0 6px; }
.ebc-empty p { color: var(--ebc-muted); font-size: 13px; margin: 0 0 18px; }
/* Suggestion groups: a tab row, then the prompts for the active group. */
.ebc-tabs { display: flex; flex-wrap: wrap; gap: 6px; padding: 2px 0 10px; }
.ebc-panel .ebc-tab { flex: 0 0 auto; min-height: 30px; padding: 0 11px; border-radius: 999px; border: 1px solid var(--border-hover, #304154); background: transparent; color: var(--ebc-muted); font-size: 12px !important; font-weight: 500; white-space: nowrap; }
.ebc-panel .ebc-tab:hover { color: var(--white); border-color: var(--accent, #9ac7ff); }
.ebc-panel .ebc-tab.is-active { background: var(--accent-soft, #223b57); border-color: var(--accent, #5596e1); color: var(--white); }
.ebc-starters { display: grid; gap: 6px; }
.ebc-panel .ebc-starter { width: 100%; min-height: 38px; display: flex; align-items: center; gap: 10px; text-align: left; padding: 8px 11px; background: var(--card, #142130); color: var(--gray-1, #eff4fa); border: 1px solid var(--border, #304154); border-radius: 8px; font-size: 12.5px !important; line-height: 1.35; }
.ebc-panel .ebc-starter:hover { border-color: var(--accent, #9ac7ff); }
.ebc-starter svg { width: 15px; height: 15px; color: var(--accent); flex-shrink: 0; }
.ebc-starter span { min-width: 0; overflow-wrap: anywhere; }
.ebc-drawer { max-height: min(340px, 38dvh); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; padding: 4px 2px 10px 0; margin-bottom: 8px; border-bottom: 1px solid var(--border, #304154); }
.ebc-drawer .ebc-tabs { padding-bottom: 8px; }
.ebc-composer-top { display: flex; align-items: center; margin-bottom: 8px; }
.ebc-panel .ebc-ideas { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 0 10px 0 8px; border: 1px solid var(--border-hover, #304154); border-radius: 999px; background: transparent; color: var(--ebc-muted); font-size: 12px !important; font-weight: 500; }
.ebc-panel .ebc-ideas svg { width: 15px; height: 15px; }
.ebc-panel .ebc-ideas:hover, .ebc-panel .ebc-ideas.is-on { background: var(--accent-soft, #223b57); border-color: var(--accent, #5596e1); color: var(--white); }
@media (pointer: coarse) { .ebc-panel .ebc-tab { min-height: 40px; } .ebc-panel .ebc-starter { min-height: 44px; } .ebc-panel .ebc-ideas, .ebc-panel .ebc-pin-change, .ebc-panel .ebc-pin-x { min-height: 40px; } }
/* Pinned client chip: only when the conversation targets something other than the page. */
.ebc-pin { display: flex; align-items: center; gap: 8px; min-height: 40px; margin-bottom: 8px; padding: 4px 4px 4px 10px; background: var(--accent-soft, #223b57); border: 1px solid var(--border-hover, #304154); border-radius: 8px; font-size: 12px; }
.ebc-pin > svg { width: 15px; height: 15px; flex-shrink: 0; color: var(--accent, #9ac7ff); }
.ebc-pin-text { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.ebc-pin-text strong { font-size: 12px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ebc-pin-text small { font-size: 11px; color: var(--ebc-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ebc-panel .ebc-pin-change { min-height: 30px; padding: 0 9px; border: 0; border-radius: 6px; background: transparent; color: var(--accent, #9ac7ff); font-size: 12px !important; }
.ebc-panel .ebc-pin-change:hover { background: var(--input, #ffffff08); }
.ebc-panel .ebc-pin-x { width: 32px; min-height: 30px; border: 0; border-radius: 6px; background: transparent; color: var(--ebc-muted); display: grid; place-items: center; }
.ebc-panel .ebc-pin-x:hover { background: var(--input, #ffffff08); color: var(--white); }
.ebc-pin-x svg { width: 15px; height: 15px; }
.ebc-msg { flex-shrink: 0; min-width: 0; max-width: 100%; overflow-wrap: anywhere; font-size: 13px; line-height: 1.65; }
.ebc-msg.user { align-self: flex-end; max-width: 92%; border: 1px solid var(--border-hover, #304154); border-radius: 12px 12px 3px 12px; background: var(--accent-soft, #223b57); padding: 10px 13px; }
.ebc-msg.assistant { align-self: stretch; color: var(--gray-1, #eff4fa); }
.ebc-message-label { font-size: 11px; color: var(--ebc-muted); margin-bottom: 5px; }
.ebc-msg p { margin: 0 0 10px; }.ebc-msg p:last-child { margin-bottom: 0; }
.ebc-msg ul, .ebc-msg ol { margin: 8px 0; padding-left: 22px; }.ebc-msg li { margin: 4px 0; }
.ebc-msg h3, .ebc-msg h4 { margin: 12px 0 7px; font-size: 14px; }
.ebc-msg a { color: var(--accent, #9ac7ff); text-decoration: underline; }
.ebc-msg code { background: var(--input, #ffffff08); border: 1px solid var(--border-hover, #304154); border-radius: 4px; padding: 1px 4px; font-size: 12px; }
.ebc-msg pre { max-width: 100%; overflow: auto; background: var(--card); padding: 10px; border-radius: 8px; }.ebc-msg pre code { padding: 0; border: 0; }
.ebc-table-wrap { max-width: 100%; overflow-x: auto; margin: 10px 0; }
.ebc-msg table { border-collapse: collapse; width: 100%; font-size: 12px; }
.ebc-msg th, .ebc-msg td { padding: 7px 9px; border: 1px solid var(--border-hover, #304154); text-align: left; min-width: 80px; }
.ebc-msg th { background: var(--card); font-weight: 600; }
.ebc-copy { min-height: 44px; border: 0; background: transparent; color: var(--ebc-muted); padding: 0 8px 0 0; display: inline-flex; align-items: center; gap: 6px; font-size: 11px !important; }
.ebc-copy svg { width: 14px; height: 14px; }
.ebc-typing { color: var(--ebc-muted); font-size: 12px; display: flex; align-items: center; gap: 8px; min-height: 28px; }
.ebc-typing::before { content: ''; width: 7px; height: 7px; flex-shrink: 0; border-radius: 50%; background: var(--accent); animation: ebcBlink 1s ease-in-out infinite alternate; }
@keyframes ebcBlink { to { opacity: .3; } }
.ebc-composer { padding: 12px 16px 10px; flex-shrink: 0; border-top: 1px solid var(--border, #304154); background: var(--black, #0e1722); }
.ebc-inputrow { border: 1px solid var(--border-hover, #304154); border-radius: 12px; background: var(--card, #142130); padding: 10px; }
.ebc-inputrow:focus-within { border-color: var(--accent, #9ac7ff); box-shadow: 0 0 0 1px var(--accent, #9ac7ff); }
.ebc-input { display: block; width: 100%; min-height: 52px; max-height: 184px; height: 52px; resize: none; padding: 3px 2px; background: transparent; color: var(--white, #eff4fa); border: 0; outline: 0 !important; line-height: 22px !important; font-size: 14px !important; overflow-y: auto; }
.ebc-input::placeholder { color: var(--ebc-muted); }
.ebc-compose-tools { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.ebc-compose-tools > span { flex: 1; font-size: 10px; color: var(--ebc-muted); }
.ebc-plus, .ebc-send, .ebc-stop { min-width: 44px; height: 44px; border: 0; border-radius: 8px; display: flex; align-items: center; justify-content: center; gap: 7px; }
.ebc-plus { background: transparent; color: var(--ebc-muted); }.ebc-plus:hover { background: var(--input); color: var(--white); }
.ebc-send { background: var(--accent, #5596e1); color: #fff; }.ebc-stop { padding: 0 12px; background: var(--input); color: var(--white); border: 1px solid var(--border-hover); }
.ebc-plus svg, .ebc-send svg, .ebc-stop svg { width: 18px; height: 18px; }
.ebc-composer-note { font-size: 11px; color: var(--ebc-muted); text-align: center; padding-top: 8px; }
.ebc-pin-text small { white-space: normal; }
.ebc-attach { display: flex; align-items: center; gap: 8px; min-height: 44px; margin-bottom: 8px; padding: 0 5px 0 9px; background: var(--accent-soft); border: 1px solid var(--border-hover); border-radius: 8px; font-size: 12px; }
.ebc-attach img { width: 28px; height: 28px; object-fit: cover; border-radius: 4px; }.ebc-attach-name { flex: 1; min-width: 0; overflow-wrap: anywhere; }.ebc-attach-note { color: var(--ebc-muted); font-size: 11px; }
.ebc-attach-x { width: 44px; flex-shrink: 0; border: 0; background: transparent; color: var(--white); font-size: 20px !important; }
.ebc-msg-file { display: block; padding-top: 8px; font-size: 12px; }.ebc-msg-file img { display: block; max-width: 100%; max-height: 180px; border-radius: 8px; }
.ebc-panel.is-dragging::after { content: 'Drop a file to attach'; position: absolute; inset: 12px; display: grid; place-items: center; border: 2px dashed var(--accent); border-radius: 12px; background: var(--card); z-index: 5; font-size: 18px; pointer-events: none; }
.ebc-card { border: 1px solid var(--border-hover, #304154); border-radius: 10px; background: var(--card, #142130); padding: 14px; }
.ebc-card h3 { margin: 3px 0 8px; font-size: 14px; line-height: 1.45; }.ebc-card p { margin: 0 0 12px; color: var(--ebc-muted); font-size: 12px; }
.ebc-card-kicker { color: var(--accent); font-size: 11px; }
.ebc-card-options { display: grid; gap: 4px; }
.ebc-panel .ebc-choice { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; width: 100%; min-width: 0; min-height: 32px; height: 32px; padding: 4px 9px; text-align: left; color: var(--white); border: 1px solid var(--border-hover); background: var(--black); border-radius: 6px; font-size: 12px; }
.ebc-choice-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ebc-choice-chip { flex: 0 0 auto; max-width: 42%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ebc-muted); font-size: 10px; background: var(--card); border-radius: 4px; padding: 1px 5px; }
.ebc-choice:hover { border-color: var(--accent); }
.ebc-card-actions { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.ebc-btn { padding: 8px 12px; border-radius: 7px; border: 1px solid var(--border-hover); background: transparent; color: var(--white); font-size: 12px !important; }
.ebc-btn.primary { background: var(--accent); border-color: transparent; color: #fff; font-weight: 600; }
.ebc-preview-item { padding: 10px 0; border-top: 1px solid var(--border); }.ebc-preview-item strong { display: block; font-size: 12px; }.ebc-preview-item small { display: block; color: var(--ebc-muted); font-size: 11px; margin-top: 4px; }
.ebc-check-row { display: flex; gap: 10px; align-items: flex-start; min-height: 44px; padding: 10px 0; border-top: 1px solid var(--border); cursor: pointer; }.ebc-check-row input { margin-top: 5px; width: 18px; height: 18px; accent-color: var(--accent); }.ebc-check-row span { min-width: 0; }.ebc-check-row strong, .ebc-check-row small { display: block; font-size: 12px; }.ebc-check-row small { color: var(--ebc-muted); font-size: 11px; }
.ebc-card-result { border-top: 1px solid var(--border); padding-top: 10px; font-size: 12px; color: var(--accent); }
.ebc-write-receipt { border-left: 3px solid var(--success, #34d399); padding: 10px 12px; background: var(--success-soft, #34d39910); border-radius: 0 7px 7px 0; font-size: 12px; }.ebc-write-receipt strong { display: block; }.ebc-write-receipt small { display: block; color: var(--ebc-muted); font-size: 11px; margin-top: 8px; }.ebc-write-receipt.is-unconfirmed, .ebc-write-receipt.is-partial { border-left-color: var(--warning); background: var(--warning-soft); }
.ebc-picker { display: flex; flex-direction: column; flex: 1; min-height: 0; padding: 0 16px 16px; }.ebc-picker-head { display: flex; align-items: center; gap: 10px; padding: 12px 0; }.ebc-picker-head h3 { flex: 1; margin: 0; font-size: 15px; }.ebc-search { width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid var(--border-hover); border-radius: 8px; background: var(--card); color: var(--white); margin-bottom: 10px; }.ebc-picker-results { overflow: auto; min-height: 0; flex: 1; display: flex; flex-direction: column; gap: 8px; }.ebc-picker-status { padding: 20px 3px; color: var(--ebc-muted); font-size: 12px; }
.ebc-tree { display: grid; gap: 6px; }.ebc-tree details { border-left: 1px solid var(--border-hover); padding-left: 10px; }.ebc-tree summary { display: flex; align-items: center; gap: 5px; min-height: 44px; cursor: pointer; font-size: 12px; color: var(--ebc-muted); }.ebc-tree summary::before { content: '+'; width: 15px; }.ebc-tree details[open] > summary::before { content: '-'; }.ebc-tree .ebc-choice { margin-bottom: 5px; }
.ebc-confirm { display: flex; align-items: center; gap: 8px; margin: 0 16px 10px; padding: 10px; background: var(--card); border: 1px solid var(--border-hover); border-radius: 8px; flex-wrap: wrap; font-size: 12px; }
.ebc-toast { position: fixed; right: 24px; bottom: 148px; max-width: min(340px, calc(100vw - 32px)); z-index: 450; background: var(--card, #142130); color: var(--white, #eff4fa); border: 1px solid var(--border-hover, #304154); border-radius: 8px; padding: 12px 16px; font: 13px/1.5 var(--font, sans-serif); box-shadow: 0 8px 25px #0003; }
.ebc-sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.ebc-picker-results { gap: 4px; overscroll-behavior: contain; scrollbar-gutter: stable; }
@media (min-width: 701px) { .ebc-head { min-height: 60px; padding-top: 8px; padding-bottom: 8px; } .ebc-provider select { min-height: 32px; } }
@media(max-width:700px) { body.ebc-desktop-open { margin-right: 0; }.ebc-panel { width: 100vw; border: 0; }.ebc-resize { display: none; }.ebc-head { padding-left: 16px; min-height: 64px; }.ebc-msgs { padding: 18px 16px; }.ebc-composer { padding-bottom: max(10px, env(safe-area-inset-bottom)); }.ebc-input { font-size: 16px !important; }.ebc-fab { right: 16px; }.ebc-backdrop.is-open { position: fixed; display: block; inset: 0; z-index: 399; background: #0005; } }
@media(prefers-reduced-motion:reduce) { .ebc-panel { transition: none; }.ebc-typing::before { animation: none; }.ebc-panel button:active:not(:disabled), .ebc-fab:active { transform: none; } }
@media(max-width:700px) { .ebc-fab.is-open { right: 16px; bottom: max(12px, env(safe-area-inset-bottom)); height: 44px; }.ebc-panel.is-open .ebc-composer { padding-bottom: 68px; }.ebc-panel .ebc-choice { min-height: 44px; height: 44px; } }
/* Quick to-do due date card (v5.85) */
.ebc-date-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; margin-top: 8px; }
.ebc-date-custom { display: flex; gap: 6px; margin-top: 8px; align-items: center; }
.ebc-date-custom input[type="date"] { flex: 1; min-width: 0; height: 32px; padding: 4px 8px; color: var(--white); background: var(--black); border: 1px solid var(--border-hover); border-radius: 6px; font: inherit; font-size: 12px; color-scheme: dark; }
[data-theme="light"] .ebc-date-custom input[type="date"] { color-scheme: light; }
@media(max-width:700px) { .ebc-date-custom input[type="date"] { height: 44px; } }
