*{box-sizing:border-box}
html,body{margin:0;width:100%;height:100%;color:#253249;background:#fff;font:13px/1.45 'Inter',system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}
.chat-app{height:100vh;height:100dvh;min-height:0;display:flex;flex-direction:column;overflow:hidden;background:#fff}
.chat-header{flex-shrink:0;display:flex;align-items:center;gap:12px;padding:13px 16px;border-bottom:1px solid #e7e9ee;background:#f5f7f9;min-height:69px}
.chat-avatar{width:42px;height:42px;position:relative;flex:0 0 42px;display:flex;justify-content:center;align-items:center;border:1px solid #dbb053;border-radius:50%;background:linear-gradient(135deg,#fbe8ac,#dfac38);font-family:Georgia,serif;font-size:19px;color:#fff;box-shadow:0 2px 6px #cba84a3a}
.chat-presence{position:absolute;right:0;bottom:0;width:10px;height:10px;background:#deaa43;border:2px solid #fff;border-radius:50%}
.chat-heading{display:flex;flex-direction:column;flex:1;min-width:0;gap:2px}
.chat-heading strong{font-size:16px;font-weight:800;letter-spacing:-.01em;color:#12243e}
.chat-heading span{font-size:11px;color:#8390a2}
.chat-close{border-radius:50%;border:1px solid #dce2ea;width:31px;height:31px;background:#fff;color:#8a97aa;font-size:20px;font-weight:400;line-height:1;cursor:pointer}
.chat-close:focus-visible{outline:2px solid #d7a235}
.chat-stream{flex:1 1 auto;min-height:60px;overflow-y:auto;display:flex;flex-direction:column;gap:11px;padding:16px 15px;background:#fff;scroll-behavior:smooth}
.chat-welcome{align-self:flex-start;background:#f2f5f9;color:#344258;border:1px solid #e4e8ee;border-radius:12px 12px 12px 3px;padding:12px 14px;box-shadow:0 2px 4px #1b2b410d}
.chat-message{align-self:flex-end;max-width:88%;background:#fff7e9;border:1px solid #edd6a9;border-radius:13px 13px 3px 13px;padding:10px 12px;white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.5}
.chat-message[data-sender=staff]{align-self:flex-start;background:#f3f5f8;border-color:#e0e6ed;border-radius:13px 13px 13px 3px}
.chat-message small{display:block;margin-bottom:4px;color:#9b7a35;font-size:10px;font-weight:700}
.chat-message[data-sender=staff] small{color:#6f7d90}
.chat-issues{padding:10px 14px 6px;display:grid;gap:7px;max-height:47%;overflow:auto;flex:0 0 auto;background:#fff}
.chat-issues[hidden]{display:none}
.chat-issue{text-align:left;background:#fff;border:1px solid #eedfc0;border-radius:11px;color:#30415d;min-height:37px;padding:9px 13px;cursor:pointer;font-family:inherit;font-weight:600;font-size:12px;line-height:1.3;box-shadow:0 1px 3px #8c6f3010}
.chat-issue:hover,.chat-issue[aria-pressed=true]{background:#fff4db;border-color:#dba52c;color:#735113}
.chat-issue:focus-visible{outline:2px solid #d6a43b;outline-offset:1px}
.chat-state{margin:0;padding:4px 15px;min-height:21px;font-size:10px;color:#8491a4;overflow-wrap:anywhere;background:#fff;flex:0 0 auto}
.chat-state[data-error=true]{color:#bb4f31}
#morvenChatForm{padding:8px 13px 10px;border-top:1px solid #e9ebef;background:#fff;display:grid;gap:8px;flex:0 0 auto}
.chat-details{font-size:10px;color:#718197}
.chat-details[hidden]{display:none}
.chat-details>summary{cursor:pointer;user-select:none;color:#6f7e94}
.chat-identity{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:8px}
.chat-identity label{display:grid;gap:4px;font-size:10px;color:#617089}
.chat-identity input{width:100%;min-width:0;border:1px solid #e4e7ed;border-radius:8px;padding:7px;font:inherit;font-size:11px;color:#1f3047;background:#fff}
.chat-composer{display:flex;align-items:stretch;gap:7px}
.chat-composer-label{position:absolute!important;width:1px!important;height:1px!important;overflow:hidden!important;clip:rect(0 0 0 0)!important}
.chat-composer textarea{font:inherit;font-size:12px;color:#27364c;background:#fff;flex:1;min-width:0;height:49px;min-height:49px;max-height:90px;resize:vertical;border:1px solid #ecdcb9;border-radius:10px;padding:12px 10px}
.chat-composer textarea:disabled{background:#f7f8fa;color:#8e9bab}
.chat-composer textarea:focus{outline:2px solid #e4ae3c;outline-offset:1px}
.chat-composer button{border:0;border-radius:10px;color:#253249;background:linear-gradient(125deg,#ffe091,#e4ae32);width:45px;min-width:45px;font-size:19px;box-shadow:0 3px 7px #dbad4d32;cursor:pointer}
.chat-composer button:disabled{opacity:.55;cursor:not-allowed;box-shadow:none}
.chat-compose-help{display:flex;justify-content:space-between;gap:8px;flex-wrap:wrap;font-size:9px;color:#718197}
.chat-compose-help output[data-error=true]{color:#bb4f31;font-weight:700}
.chat-disclaimer{font-size:9px;line-height:1.3;color:#9ba6b4;padding:0 14px 8px;margin:0;flex:0 0 auto}
@media(max-height:440px){.chat-app{overflow-y:auto}.chat-issues{max-height:35%;min-height:44px;flex-shrink:1}.chat-header{padding:7px 10px;min-height:52px}.chat-avatar{width:34px;height:34px;flex-basis:34px}.chat-stream{padding:9px}.chat-disclaimer{display:none}}

/* Required pre-chat fields fit both the panel and public iframe. */
.chat-identity{margin-top:0;grid-template-columns:minmax(0,1fr) minmax(0,1fr)}
.chat-identity input,.chat-identity select{width:100%;min-width:0;border:1px solid #e4e7ed;border-radius:8px;padding:7px;font:inherit;font-size:11px;color:#1f3047;background:#fff}
.chat-identity input:focus,.chat-identity select:focus{outline:2px solid #e4ae3c;outline-offset:1px}
#morvenChatForm{max-height:60%;overflow-y:auto;min-height:82px;flex-shrink:1}
@media(max-width:260px){.chat-identity{grid-template-columns:minmax(0,1fr)}}
