:root { --public-chat-ink: #25364d; --public-chat-muted: #718096; --public-chat-line: #dce4ed; --public-chat-accent: #247a55; }
* { box-sizing: border-box; }
.public-chat-body { min-height: 100dvh; margin: 0; background: #edf2f7; color: var(--public-chat-ink); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
.public-chat-app { display: grid; min-height: 100dvh; grid-template-rows: auto minmax(0, 1fr); background: #fff; }
.public-chat-header { display: flex; align-items: center; justify-content: space-between; gap: 14px; border-bottom: 1px solid var(--public-chat-line); background: rgba(255,255,255,.98); padding: 12px max(17px, env(safe-area-inset-right)) 11px max(17px, env(safe-area-inset-left)); }
.public-chat-brand { color: #28557c; font-size: 17px; font-weight: 900; letter-spacing: -.04em; text-decoration: none; }
.public-chat-status { display: grid; gap: 2px; color: var(--public-chat-muted); font-size: 11px; text-align: right; }
.public-chat-status strong { color: #31445b; font-size: 12px; }
.public-chat-panel { display: grid; min-height: 0; grid-template-rows: auto auto minmax(0, 1fr) auto; overflow: hidden; background: #fff; }
.public-chat-panel-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; border-bottom: 1px solid #edf1f5; padding: 17px max(18px, env(safe-area-inset-right)) 13px max(18px, env(safe-area-inset-left)); }
.public-chat-eyebrow { margin: 0 0 3px; color: #247a55; font-size: 10px; font-weight: 950; letter-spacing: .1em; }
.public-chat-panel-head h1 { margin: 0; color: #253c59; font-size: 21px; letter-spacing: -.04em; }
.public-chat-panel-head > p { max-width: 185px; margin: 0; color: var(--public-chat-muted); font-size: 11px; line-height: 1.45; text-align: right; }
.public-chat-connection { margin: 8px 14px 0; border: 1px solid #b9dec8; border-radius: 10px; background: #f0fbf4; color: #21633e; padding: 8px 10px; font-size: 11px; font-weight: 800; line-height: 1.4; }
.public-chat-connection[hidden] { display: none; }
.public-chat-messages { display: grid; align-content: start; gap: 12px; min-height: 0; overflow: auto; overscroll-behavior: contain; padding: 18px max(18px, env(safe-area-inset-right)) 24px max(18px, env(safe-area-inset-left)); background: linear-gradient(180deg, #f8fafc, #f1f5f9); }
.public-chat-app .support-chat-welcome { display: grid; place-items: center; gap: 6px; margin: 18px auto; border: 1px dashed #c7d5e4; border-radius: 16px; background: rgba(255,255,255,.82); color: #66758b; padding: 22px; font-size: 13px; text-align: center; }
.public-chat-app .support-chat-welcome strong { color: #344b68; font-size: 16px; }
.public-chat-app .support-chat-message { display: grid; width: fit-content; max-width: min(82%, 620px); gap: 3px; border: 1px solid #d8e1eb; border-radius: 16px 16px 16px 5px; background: #fff; padding: 10px 12px; box-shadow: 0 3px 10px rgba(31,57,88,.05); }
.public-chat-app .support-chat-message b { color: #64748a; font-size: 10px; font-weight: 950; }
.public-chat-app .support-chat-message p { margin: 0; color: #2a394d; font-size: 14px; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
.public-chat-app .support-chat-message time { color: #8996a6; font-size: 10px; font-weight: 700; }
.public-chat-app .support-chat-message.is-customer { justify-self: end; border-color: #4b9d76; border-radius: 16px 16px 5px 16px; background: linear-gradient(135deg, #247c57, #176541); }
.public-chat-app .support-chat-message.is-customer b, .public-chat-app .support-chat-message.is-customer p, .public-chat-app .support-chat-message.is-customer time { color: #fff; }
.public-chat-app .support-chat-message.is-bot { border-color: #c9d9ec; background: #f1f7ff; }
.public-chat-app .support-chat-message.is-agent { border-color: #c7ddce; background: #f1fbf4; }
.public-chat-app .support-chat-message.is-system { justify-self: center; max-width: 92%; border-radius: 10px; background: #eaf0f5; text-align: center; }
.public-chat-app .support-chat-message.is-sending { opacity: .68; }
.public-chat-app .support-chat-message.is-failed { border-color: #df9da4; background: #fff8f8; }
.public-chat-app .support-chat-retry { width: fit-content; min-height: 29px; margin-top: 3px; border: 1px solid #d5a1a8; border-radius: 8px; background: #fff; color: #9b3542; padding: 0 8px; font: inherit; font-size: 10px; font-weight: 900; cursor: pointer; }
.public-chat-app .support-chat-attachments { display: grid; gap: 4px; margin: 3px 0 0; padding: 0; list-style: none; }
.public-chat-app .support-chat-attachments a { color: inherit; font-size: 11px; font-weight: 800; overflow-wrap: anywhere; }
.public-chat-composer { display: grid; gap: 8px; border-top: 1px solid var(--public-chat-line); background: rgba(255,255,255,.98); padding: 10px max(12px, env(safe-area-inset-right)) calc(12px + env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left)); box-shadow: 0 -6px 18px rgba(32,54,81,.05); }
.public-chat-form-status { min-height: 0; margin: 0 4px; color: #247347; font-size: 11px; font-weight: 800; }
.public-chat-form-status:empty { display: none; }
.public-chat-form-status.is-error { color: #b83240; }
.public-chat-input-wrap { display: flex; align-items: flex-end; gap: 8px; border: 1px solid #c3cfdd; border-radius: 18px; background: #fbfdff; padding: 6px 7px 6px 12px; }
.public-chat-input-wrap:focus-within { border-color: #4186bc; box-shadow: 0 0 0 3px rgba(65,134,188,.15); }
.public-chat-input-wrap label { display: block; flex: 1 1 auto; min-width: 0; }
.public-chat-input-wrap textarea { display: block; width: 100%; min-height: 43px; max-height: 130px; border: 0; outline: 0; background: transparent; color: var(--public-chat-ink); padding: 10px 0; font: inherit; font-size: 16px; line-height: 1.45; resize: none; }
.public-chat-input-wrap button, .public-chat-actions button { min-height: 39px; border: 0; border-radius: 12px; background: #236f4d; color: #fff; padding: 0 12px; font: inherit; font-size: 12px; font-weight: 900; cursor: pointer; }
.public-chat-actions { display: flex; justify-content: flex-start; }
.public-chat-actions button { min-height: 32px; border: 1px solid #b8d8c6; background: #f2fbf6; color: #21643f; font-size: 11px; }
.public-chat-actions button:disabled, .public-chat-input-wrap button:disabled { cursor: not-allowed; opacity: .58; }
.public-chat-notice { margin: 0 4px; color: #8794a5; font-size: 10px; line-height: 1.4; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.public-chat-app button:focus-visible { outline: 3px solid rgba(48,128,187,.35); outline-offset: 2px; }
@media (min-width: 700px) { .public-chat-app { max-width: 900px; margin: 0 auto; border-right: 1px solid var(--public-chat-line); border-left: 1px solid var(--public-chat-line); } .public-chat-panel-head, .public-chat-messages { padding-right: 28px; padding-left: 28px; } }
@media (max-width: 420px) { .public-chat-panel-head > p { max-width: 130px; font-size: 10px; } .public-chat-app .support-chat-message { max-width: 89%; } }
@media (prefers-reduced-motion: reduce) { .public-chat-messages { scroll-behavior: auto; } }
