[data-live-chat]{display:inline-flex;align-items:center;gap:.4rem;white-space:nowrap}
.voyatur-chat-badge{background:#1760a2;color:white;min-width:1.3rem;height:1.3rem;border-radius:999px;display:inline-grid;place-items:center;padding-inline:.2rem;font-size:.75rem;font-weight:700}
.voyatur-chat-badge[hidden],.voyatur-chat [hidden]{display:none!important}
dialog.voyatur-chat,dialog.voyatur-chat-alert{color:#17314a;background:#fff;border:1px solid #d2e1ea;border-radius:16px;padding:0;box-shadow:0 24px 72px #09213748;max-height:calc(100dvh - 2rem);max-width:calc(100vw - 1rem);margin:auto}
dialog.voyatur-chat::backdrop,dialog.voyatur-chat-alert::backdrop{background:#102c4a66}
dialog.voyatur-chat-thread{width:min(740px,98vw)}
dialog.voyatur-chat-inbox{width:min(850px,98vw)}
dialog.voyatur-chat-alert{width:min(460px,95vw)}
.voyatur-chat-head{display:flex;align-items:center;justify-content:space-between;gap:.7rem;background:#edf5f9;color:#17314a;padding:.85rem 1.1rem;border-bottom:1px solid #e1eaf0}
.voyatur-chat-head h2{font-size:1.03rem;margin:0;overflow-wrap:anywhere}
.voyatur-chat-head button{padding:.3rem .6rem}
.voyatur-chat-list{max-height:65dvh;overflow:auto;padding:.75rem}
.voyatur-chat-grid{display:grid;align-items:center;grid-template-columns:minmax(0,1fr) minmax(0,1.4fr) minmax(3rem,.5fr) minmax(3rem,.45fr);gap:.4rem;width:100%;box-sizing:border-box;text-align:left;padding:.55rem .45rem;font-size:.86rem}
.voyatur-chat-grid span{overflow-wrap:anywhere}
.voyatur-chat-captions{color:#40586e;font-weight:700}
button.voyatur-chat-row{margin:.2rem 0;color:#17314a;background:#f3f5f7;border:1px solid #dbe5ed;border-radius:8px}
button.voyatur-chat-row.has-unread{background:#e8f3ff}
button.voyatur-chat-row:hover,button.voyatur-chat-row:focus-visible{background:#cfebff;border-color:#7cb5de}
.voyatur-chat-stream{height:clamp(140px,43dvh,440px);overflow:auto;display:flex;flex-direction:column;gap:.55rem;padding:.65rem;background:#f8fafc;overscroll-behavior:contain}
.voyatur-chat-empty{margin:auto;color:#4b667b;text-align:center}
.voyatur-chat-message{align-self:flex-start;border:1px solid #d6dfe6;background:#eceff2;max-width:min(87%,560px);border-radius:0 13px 13px 13px;padding:.48rem .65rem;overflow-wrap:anywhere}
.voyatur-chat-message.unread{background:#dbeeff;border-color:#aacfe9}
.voyatur-chat-message.mine{align-self:flex-end;border-radius:13px 0 13px 13px}
.voyatur-chat-message p{margin:.3rem 0;color:#17314a;white-space:pre-wrap}
.voyatur-chat-meta{display:flex;flex-wrap:wrap;gap:.35rem .65rem;align-items:center;font-size:.72rem;color:#3d566a}
.voyatur-chat-meta button{font-size:.7rem;padding:.15rem .4rem}
.voyatur-chat-compose{display:grid;gap:.35rem;padding:.65rem .85rem;margin:0}
.voyatur-chat-compose textarea{width:100%;box-sizing:border-box;resize:vertical;min-height:3rem;max-height:15dvh;font:inherit}
.voyatur-chat-compose-actions{display:flex;gap:.4rem;justify-content:flex-end}
.voyatur-chat-error{font-size:.83rem;color:#9a2625;margin:0}
.voyatur-chat-error:empty{display:none}
.voyatur-chat-older{display:block;margin:.35rem auto}
@media(max-width:500px){.voyatur-chat-grid{grid-template-columns:minmax(0,1fr) minmax(0,1.1fr) minmax(2.65rem,.5fr) minmax(2.65rem,.45fr);font-size:.68rem;gap:.3rem}.voyatur-chat-message{max-width:91%}.voyatur-chat-stream{height:38dvh}}
/* Sender identity remains distinct in both directions; reading state uses fill and a text label. */
.voyatur-chat-message.customer-bubble{border-inline-start:4px solid #24689c}
.voyatur-chat-message.admin-bubble{border-inline-start:4px solid #514ca0}
.voyatur-chat-message.customer-bubble.unread{background:#dbeeff}
.voyatur-chat-message.admin-bubble.unread{background:#e4eaff}
.voyatur-chat-message.customer-bubble.seen{background:#e9eef3}
.voyatur-chat-message.admin-bubble.seen{background:#efedf4}
.voyatur-chat-message.customer-bubble strong{color:#1c5586}
.voyatur-chat-message.admin-bubble strong{color:#3c3680}
