.chat-messages { display:flex; flex-direction:column; gap:10px; min-height:160px; height:300px; overflow:auto; padding:12px; background:var(--brand-soft,#f5f6f8); border-radius:10px; scrollbar-width:none; }
.chat-messages::-webkit-scrollbar { display:none; }
.chat-message { align-self:flex-start; max-width:88%; padding:10px 12px; border-radius:10px; background:var(--brand-surface,#fff); color:var(--brand-text,#151922); overflow-wrap:anywhere; }
.chat-message.is-own { align-self:flex-end; background:#fff2a3; }
.chat-message small { display:block; font-size:10px; color:var(--brand-muted,#626772); }
.chat-message p { white-space:pre-wrap; font-size:14px; line-height:1.5; margin:4px 0 0; }
.visitor-chat[open] { display:flex; flex-direction:column; gap:14px; width:min(480px,calc(100% - 24px)); max-height:calc(100dvh - 32px); padding:24px; }
.visitor-chat .contact-heading { margin:0; padding-right:28px; }
.visitor-chat .contact-heading h2 { font-size:20px; }
.visitor-chat .contact-heading p { font-size:12px; color:var(--brand-muted,#656970); }
.visitor-chat .chat-messages { flex:1 1 260px; min-height:120px; }
.visitor-chat form { display:grid; gap:8px; }
.visitor-chat label { display:grid; gap:5px; font-size:12px; }
.visitor-chat input,.visitor-chat textarea { width:100%; padding:10px 12px; border:1px solid var(--brand-border,#d7dce4); border-radius:8px; font:inherit; background:var(--brand-surface,#fff); color:var(--brand-text,#151922); min-width:0; }
.visitor-chat textarea { resize:vertical; max-height:160px; }
.chat-contacts { display:grid; grid-template-columns:1fr 1fr; gap:8px; }
.visitor-chat button svg { width:20px; height:20px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
.visitor-chat .contact-submit { display:flex; align-items:center; justify-content:center; gap:10px; }
.visitor-chat[open] { height:min(600px,calc(100dvh - 32px)); }
.visitor-chat .chat-composer { position:relative; display:block; margin-top:auto; flex:none; }
.visitor-chat .chat-composer textarea { display:block; min-height:54px; max-height:130px; padding:16px 60px 16px 14px; border-radius:14px; font-size:14px; line-height:20px; resize:none; scrollbar-width:none; }
.visitor-chat .chat-send { position:absolute; right:7px; bottom:7px; display:grid; place-items:center; width:40px; height:40px; border:0; border-radius:10px; background:var(--brand-accent,#fed702); color:var(--brand-accent-text,#151922); cursor:pointer; }
.visitor-chat .chat-send:hover { background:var(--brand-accent-hover,#ffe751); }
.visitor-chat .chat-send:disabled { opacity:.5; cursor:wait; }
.visitor-chat .contact-status:empty { display:none; }
.manager-chats { display:grid; grid-template-columns:280px minmax(0,1fr); gap:20px; max-width:1200px; }
.manager-chats aside { max-height:75vh; overflow:auto; }
.chat-thread { display:grid; gap:5px; width:100%; padding:12px; border:0; border-bottom:1px solid var(--brand-border,#e4e6eb); background:var(--brand-surface,white); text-align:left; color:var(--brand-text,#151922); cursor:pointer; }
.chat-thread[aria-pressed=true] { background:#fff2a3; }
.manager-chats aside { min-width:0; }
.chat-thread { transition:background-color .18s ease,color .18s ease,transform .12s ease; }
.chat-thread:hover { background:var(--brand-soft,#f5f6f8); }
.chat-thread:active { transform:scale(.98); }
.chat-thread[aria-pressed=true],.chat-thread[aria-pressed=true]:hover { background:var(--brand-text,#151922); color:var(--brand-accent,#fed702); }
.chat-thread[aria-pressed=true] .chat-thread-details small { color:#c5c9d1; }
.chat-thread[aria-pressed=true] .chat-thread-preview > span:last-child { color:var(--brand-inverse,#fff); }
.chat-thread[aria-pressed=true] .chat-receipt { color:#b4bac5; }
.chat-thread[aria-pressed=true] .chat-receipt.is-read { color:#6fd1ff; }
.chat-thread:focus-visible { outline:2px solid #997e00; outline-offset:-2px; }
@media(prefers-reduced-motion:reduce) { .chat-thread { transition:none; } .chat-thread:active { transform:none; } }
.chat-thread span { font-size:12px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.chat-workspace form { display:grid; gap:10px; margin-top:16px; }
.chat-workspace .chat-messages { height:45vh; }
.chat-workspace .chat-composer { position:relative; display:block; }
.chat-workspace .chat-composer[hidden] { display:none; }
.chat-workspace .chat-composer textarea { display:block; width:100%; box-sizing:border-box; min-height:54px; max-height:130px; padding:16px 60px 16px 14px; border:1px solid var(--brand-border,#d7dce4); border-radius:14px; font:inherit; font-size:14px; line-height:20px; resize:none; background:var(--brand-surface,#fff); color:var(--brand-text,#151922); }
.chat-workspace .chat-send { position:absolute; right:7px; bottom:7px; display:grid; place-items:center; width:40px; height:40px; padding:0; border:0; border-radius:10px; background:var(--brand-accent,#fed702); color:var(--brand-accent-text,#151922); cursor:pointer; }
.chat-workspace .chat-send:hover { background:var(--brand-accent-hover,#ffe751); }
.chat-workspace .chat-send:disabled { opacity:.5; cursor:wait; }
.chat-workspace .chat-send svg { width:20px; height:20px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
.chat-receipt { display:block; width:24px; height:16px; margin:4px 0 0 auto; color:var(--brand-muted,#626772); }
.chat-receipt svg { display:block; width:24px; height:16px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
.chat-receipt .receipt-second { display:none; }
.chat-receipt.is-read { color:#087aab; }
.chat-receipt.is-read .receipt-second { display:block; }
.chat-thread { grid-template-columns:40px minmax(0,1fr); align-items:center; gap:12px; }
.chat-avatar { flex:none; width:40px; height:40px; object-fit:cover; border-radius:50%; background:#fff0aa; }
.chat-thread-details { display:grid; gap:4px; min-width:0; }
.chat-thread-details strong { overflow-wrap:anywhere; }
.chat-thread-details small { font-size:11px; color:var(--brand-muted,#626772); }
.chat-thread-preview { display:flex; align-items:center; gap:5px; min-width:0; }
.chat-thread-preview .chat-receipt { flex:0 0 24px; margin:0; }
.chat-thread-preview > span:last-child { min-width:0; }
[data-chat-title] { display:flex; align-items:center; gap:12px; overflow-wrap:anywhere; }
@media(max-width:700px) { .manager-chats { grid-template-columns:1fr; } .manager-chats aside { max-height:220px; } .visitor-chat[open] { width:100%; max-height:calc(100dvh - 12px); padding:20px 16px; } }
.visitor-chat .chat-email-gate{margin-top:auto;gap:10px}.chat-email-gate p{margin:0;font-size:12px;color:var(--brand-muted,#656970)}.visitor-chat .chat-email-gate button{min-height:44px;padding:10px 18px;border:0;border-radius:10px;background:var(--brand-accent,#fed702);color:var(--brand-accent-text,#151922);font:inherit;cursor:pointer}.visitor-chat form[hidden]{display:none}
.visitor-chat .chat-email-gate{padding:16px;border:1px solid var(--brand-border,#e8e9eb);border-radius:10px;background:var(--brand-surface,#fff)}.visitor-chat .chat-email-gate .chat-email-consent{font-size:11px;line-height:1.5;margin:0;color:var(--brand-muted,#656970)}.visitor-chat .chat-email-gate button:disabled{opacity:.6;cursor:wait}
.visitor-chat .chat-consent-check{display:flex;flex-direction:row;align-items:flex-start;gap:10px;font-size:12px;line-height:1.5;color:var(--brand-text,#151922)}.visitor-chat .chat-consent-check input{appearance:none;display:block;flex:0 0 18px;width:18px;min-width:18px;height:18px;min-height:18px;padding:0;margin:2px 0 0;border:1px solid #858b94;border-radius:4px;background:var(--brand-surface,#fff);cursor:pointer}.visitor-chat .chat-consent-check input:checked{background:var(--brand-accent,#fed702);border-color:var(--brand-link,#756000)}.visitor-chat .chat-consent-check input:checked::after{content:'';display:block;width:9px;height:5px;margin:4px 0 0 3px;border-left:2px solid #151922;border-bottom:2px solid #151922;transform:rotate(-45deg)}.visitor-chat .chat-consent-check input:focus-visible{outline:2px solid var(--brand-link,#756000);outline-offset:3px}.chat-email-gate a{color:var(--brand-link,#756000);text-decoration:underline;text-underline-offset:2px}
.visitor-chat .chat-consent-check{font-size:11px;line-height:1.5;gap:8px;margin-top:2px}.visitor-chat .chat-consent-check span{min-width:0}.visitor-chat .chat-email-gate .chat-policy-link{padding-left:26px;margin-top:-4px;font-size:10px;line-height:1.5}.chat-policy-link a{color:var(--brand-muted,#656970)}
.chat-legal-row{display:flex;align-items:center;gap:12px;flex-wrap:nowrap;min-width:0}.visitor-chat .chat-legal-row .chat-consent-check{align-items:center;margin:0;font-size:12px;white-space:nowrap}.visitor-chat .chat-legal-row input{margin:0}.chat-legal-row .chat-policy-inline{padding-left:12px;border-left:1px solid var(--brand-border,#e8e9eb);font-size:12px;line-height:18px;white-space:nowrap;color:var(--brand-muted,#656970)}
.visitor-chat .chat-legal-row .chat-consent-check,.chat-legal-row .chat-policy-inline{font-size:14px;line-height:22px}.chat-legal-row{gap:14px}
.visitor-chat .chat-legal-row .chat-consent-check{white-space:normal;flex:1;min-width:0;align-items:flex-start}.visitor-chat .chat-legal-row .chat-consent-check input{margin-top:2px}.chat-legal-row{align-items:flex-start}.chat-legal-row .chat-policy-inline{flex:none;margin-top:2px}
.chat-legal-row{flex-direction:column;align-items:stretch;gap:10px}.visitor-chat .chat-legal-row .chat-consent-check{flex:none}
