.help-chat,.chat-dashboard { --chat-brand:#242d72; --chat-accent:#d64d87; --chat-border:#dce2ec; color:#293449; font-size:14px; }
.help-chat [hidden],.chat-dashboard [hidden] { display:none !important; }
.help-chat { position:fixed; display:flex; flex-direction:column; align-items:flex-end; right:22px; bottom:22px; z-index:1040; }
.help-chat-launch { order:2; display:flex; align-items:center; gap:8px; padding:12px 18px; border:0; border-radius:8px; background:var(--chat-brand); color:#fff; box-shadow:0 5px 20px #242d7233; font-size:14px; }
.help-chat-panel { display:flex; flex-direction:column; width:380px; max-width:calc(100vw - 28px); height:590px; max-height:calc(100dvh - 100px); margin-bottom:12px; border:1px solid var(--chat-border); border-radius:8px; background:#fff; box-shadow:0 12px 40px #19234233; overflow:hidden; }
.chat-brand-header { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:16px 18px; background:var(--chat-brand); border-bottom:3px solid var(--chat-accent); color:#fff; }
.chat-brand-header strong { display:block; font-size:16px; }
.chat-brand-header span { display:block; margin-top:3px; color:#efbfd4; font-size:11px; }
.chat-icon-button { display:grid; place-items:center; width:32px; height:32px; padding:0; border:0; border-radius:4px; background:transparent; color:inherit; }
.chat-modes { display:flex; margin:12px 14px; padding:3px; border:1px solid var(--chat-border); border-radius:5px; background:#f4f5fa; }
.chat-modes button { flex:1; padding:8px; border:0; border-radius:3px; background:transparent; font-size:12px; color:#586780; }
.chat-modes button[aria-selected=true] { background:var(--chat-brand); color:#fff; }
.chat-privacy { margin:0 14px 10px; color:#6a6372; font-size:11px; line-height:1.6; }
.chat-error { margin:8px 14px; padding:10px 12px; border-left:3px solid #c83849; background:#fff1f3; color:#942f3f; line-height:1.5; overflow-wrap:anywhere; }
.chat-tools { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:6px; padding:0 14px 8px; font-size:11px; color:#647189; }
.chat-text-button { padding:6px 9px; border:1px solid var(--chat-border); border-radius:4px; background:#fff; color:var(--chat-brand); font-size:12px; }
.chat-primary { display:inline-flex; justify-content:center; align-items:center; gap:7px; padding:9px 13px; border:1px solid var(--chat-brand); border-radius:5px; background:var(--chat-brand); color:#fff; font-size:12px; }
.chat-primary:disabled { opacity:.5; }
.chat-messages { flex:1; min-height:0; margin:0; padding:16px; overflow-y:auto; list-style:none; background:#f7f8fb; }
.chat-message { max-width:90%; margin:0 0 12px; padding:10px 12px; border:1px solid var(--chat-border); border-radius:7px; background:#fff; overflow-wrap:anywhere; }
.chat-message--mine { margin-left:auto; background:#edf0fc; border-color:#d2d9f2; }
.chat-message--system { max-width:100%; margin:8px 0 14px; padding:6px 0; border:0; background:transparent; color:#69768a; font-size:12px; text-align:center; }
.chat-message-meta { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:5px 12px; color:#62718b; font-size:10px; }
.chat-message p { margin:6px 0 0; white-space:pre-wrap; line-height:1.7; font-size:13px; }
.chat-message a { display:inline-block; margin-top:8px; color:var(--chat-brand); font-size:12px; }
.chat-message .chat-suggestion { display:block; width:100%; margin-top:8px; text-align:left; white-space:normal; }
.chat-receipt { display:block; margin-top:7px; color:#68768b; font-size:10px; }
.chat-empty { padding:32px 10px; color:#798397; text-align:center; font-size:13px; }
.chat-composer { display:flex; align-items:flex-end; gap:10px; padding:12px; border-top:1px solid var(--chat-border); background:#fff; }
.chat-composer textarea { flex:1; min-width:0; resize:vertical; max-height:120px; padding:9px 10px; border:1px solid #cbd3e2; border-radius:5px; color:#293449; font-size:13px; }
.chat-widget-footer { display:flex; flex-wrap:wrap; align-items:center; gap:12px; padding:8px 14px 12px; border-top:1px solid #edf0f6; font-size:11px; }
.chat-widget-footer a { color:var(--chat-brand); }
.chat-start-form { padding:12px 16px; overflow:auto; }
.chat-start-form label,.chat-create-form label { display:block; margin:8px 0 5px; color:#526078; font-size:12px; }
.chat-start-form input,.chat-create-form input:not([type=checkbox]),.chat-create-form select,.chat-dashboard-heading select { width:100%; padding:9px 10px; border:1px solid #cbd3e2; border-radius:5px; font-size:13px; background:#fff; }
.chat-muted { color:#69768b; font-size:12px; line-height:1.6; }
.chat-dashboard-heading { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:14px; margin-bottom:16px; }
.chat-dashboard-heading h3 { margin:0; color:var(--chat-brand); font-size:20px; }
.chat-dashboard-heading label { display:flex; align-items:center; gap:10px; font-size:12px; }
.chat-dashboard .chat-privacy { margin:0 0 16px; }
.chat-dashboard .chat-error { margin:0 0 16px; }
.chat-workspace { display:grid; grid-template-columns:260px minmax(0,1fr); min-height:560px; border-top:1px solid var(--chat-border); border-bottom:1px solid var(--chat-border); }
.chat-conversation-list { max-height:680px; overflow-y:auto; padding:14px 14px 14px 0; border-right:1px solid var(--chat-border); }
.chat-conversation { display:block; width:100%; margin-bottom:6px; padding:13px 12px; border:0; border-left:3px solid transparent; border-radius:4px; background:transparent; text-align:left; color:#35445b; }
.chat-conversation:hover { background:#f5f6fb; }
.chat-conversation[aria-pressed=true] { border-left-color:var(--chat-accent); background:#edf0fa; }
.chat-conversation strong { display:flex; justify-content:space-between; gap:10px; font-size:13px; }
.chat-conversation small { display:block; margin-top:5px; color:#68758b; font-size:11px; overflow-wrap:anywhere; }
.chat-unread { padding:1px 6px; border-radius:4px; background:var(--chat-brand); color:#fff; font-size:10px; }
.chat-thread { display:flex; flex-direction:column; min-width:0; height:680px; max-height:75dvh; }
.chat-thread-heading { display:flex; flex-wrap:wrap; align-items:start; justify-content:space-between; gap:10px; padding:16px; border-bottom:1px solid var(--chat-border); }
.chat-thread-heading h4 { margin:0 0 5px; font-size:15px; color:var(--chat-brand); overflow-wrap:anywhere; }
.chat-thread-heading p { margin:0; }
.chat-thread-actions { display:flex; gap:7px; }
.chat-thread > .chat-text-button { align-self:start; margin:8px 14px; }
.chat-create-form { margin:0 0 20px; padding:18px; border:1px solid var(--chat-border); border-radius:6px; background:#f7f8fc; }
.chat-create-heading { display:flex; align-items:center; justify-content:space-between; }
.chat-create-heading h4 { font-size:16px; color:var(--chat-brand); }
.chat-directory { margin:16px 0; border:0; padding:0; }
.chat-directory legend { font-size:13px; }
#staff-directory { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:5px 16px; max-height:220px; overflow:auto; }
#staff-directory label { display:flex; align-items:center; gap:9px; margin:0; padding:8px 0; }
.chat-dashboard input[type=checkbox] { accent-color:var(--chat-brand); }
.help-chat button:focus-visible,.chat-dashboard button:focus-visible,.help-chat input:focus-visible,.chat-dashboard input:focus-visible { outline:2px solid var(--chat-accent); outline-offset:2px; }
@media(max-width:900px) { .chat-workspace { grid-template-columns:minmax(0,1fr); } .chat-conversation-list { max-height:220px; border-right:0; border-bottom:1px solid var(--chat-border); padding:10px 0; } .chat-thread { max-height:none; height:560px; } }
@media(max-width:575px) { .help-chat { right:12px; bottom:12px; } .help-chat-panel { width:calc(100vw - 24px); max-height:calc(100dvh - 86px); } #staff-directory { grid-template-columns:minmax(0,1fr); } .chat-thread { height:500px; } .chat-thread-actions { flex-wrap:wrap; } }