:root { --support-dialog-height: 100dvh; }
body.support-dialog-open { overflow: hidden; }
.support-dialog[hidden] { display: none; }
.support-dialog { position: fixed; inset: 0; z-index: 10050; display: grid; place-items: center; padding: 20px; font-family: inherit; }
.support-dialog-backdrop { position: absolute; inset: 0; border: 0; background: rgba(18, 28, 45, .58); backdrop-filter: blur(7px); }
.support-dialog-card { position: relative; width: min(720px, 100%); height: min(790px, calc(100vh - 40px)); max-height: calc(100vh - 40px); overflow: hidden; border: 1px solid rgba(255,255,255,.72); border-radius: 23px; background: #fff; box-shadow: 0 28px 80px rgba(13, 24, 40, .34); }
.support-chat { display: grid; width: 100%; height: 100%; min-height: 0; grid-template-rows: auto auto minmax(0, 1fr) auto; color: #2b394e; }
.support-dialog-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; padding: 19px 21px 15px; border-bottom: 1px solid #dce5ef; background: linear-gradient(135deg, #f0f7ff, #fff 65%, #f3fbf6); }
.support-chat-eyebrow { margin: 0 0 2px; color: #247650; font-size: 10px; font-weight: 950; letter-spacing: .09em; }
.support-dialog-head h2 { margin: 0; color: #233c5d; font-size: 21px; letter-spacing: -.035em; }
.support-dialog-head p:not(.support-chat-eyebrow) { margin: 4px 0 0; color: #748296; font-size: 12px; font-weight: 700; }
.support-dialog-close { min-width: 43px; min-height: 35px; border: 1px solid #c7d4e2; border-radius: 999px; background: #fff; color: #45586f; font: inherit; font-size: 11px; font-weight: 900; cursor: pointer; }
.support-chat-connection { margin: 8px 13px 0; border: 1px solid #b8dfc8; border-radius: 10px; background: #effaf3; color: #23643e; padding: 8px 10px; font-size: 11px; font-weight: 800; line-height: 1.4; }
.support-chat-connection[hidden] { display: none; }
.support-chat-messages { display: grid; align-content: start; gap: 11px; min-height: 0; overflow: auto; overscroll-behavior: contain; padding: 17px 19px; background: linear-gradient(180deg, #f8fafc, #f1f5f9); }
.support-chat-welcome { display: grid; place-items: center; gap: 6px; margin: 18px auto; border: 1px dashed #c8d6e5; border-radius: 15px; background: rgba(255,255,255,.8); color: #627188; padding: 20px; font-size: 13px; text-align: center; }
.support-chat-welcome strong { color: #344b68; font-size: 15px; }
.support-chat-message { display: grid; width: fit-content; max-width: 84%; gap: 3px; border: 1px solid #d8e1eb; border-radius: 15px 15px 15px 4px; background: #fff; padding: 10px 12px; box-shadow: 0 3px 10px rgba(31, 57, 88, .05); }
.support-chat-message b { color: #64748a; font-size: 10px; font-weight: 950; }
.support-chat-message p { margin: 0; color: #2a394d; font-size: 13px; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
.support-chat-message time { color: #8b98a9; font-size: 10px; font-weight: 700; }
.support-chat-message.is-customer { justify-self: end; border-color: #4b9d76; border-radius: 15px 15px 4px 15px; background: linear-gradient(135deg, #237a55, #166541); }
.support-chat-message.is-customer b, .support-chat-message.is-customer p, .support-chat-message.is-customer time { color: #fff; }
.support-chat-message.is-bot { border-color: #c8d9ec; background: #f0f7ff; }
.support-chat-message.is-agent { border-color: #c7dccd; background: #f1fbf4; }
.support-chat-message.is-system { justify-self: center; max-width: 92%; border-radius: 10px; background: #eaf0f5; text-align: center; }
.support-chat-message.is-sending { opacity: .68; }
.support-chat-message.is-failed { border-color: #df9ca3; background: #fff8f8; }
.support-chat-retry { width: fit-content; min-height: 28px; margin-top: 3px; border: 1px solid #d4a1a8; border-radius: 8px; background: #fff; color: #9b3542; padding: 0 8px; font: inherit; font-size: 10px; font-weight: 900; cursor: pointer; }
.support-chat-attachments { display: grid; gap: 4px; margin: 3px 0 0; padding: 0; list-style: none; }
.support-chat-attachments a { color: inherit; font-size: 11px; font-weight: 800; overflow-wrap: anywhere; }
.support-chat-composer { display: grid; gap: 7px; border-top: 1px solid #dce5ee; background: #fff; padding: 10px 13px 13px; box-shadow: 0 -6px 17px rgba(32, 58, 86, .05); }
.support-chat-form-status { min-height: 0; margin: 0; color: #267047; font-size: 11px; font-weight: 800; }
.support-chat-form-status:empty { display: none; }
.support-chat-form-status.is-error { color: #b93744; }
.support-chat-input-wrap { border: 1px solid #bdcbda; border-radius: 14px; background: #fbfdff; padding: 7px 8px; }
.support-chat-input-wrap:focus-within { border-color: #4285ba; box-shadow: 0 0 0 3px rgba(66,133,186,.15); }
.support-chat-input-wrap textarea { box-sizing: border-box; display: block; width: 100%; min-height: 48px; max-height: 130px; border: 0; outline: 0; background: transparent; color: #26394e; padding: 7px 8px; font: inherit; font-size: 14px; line-height: 1.45; resize: none; }
.support-chat-composer-actions { display: flex; align-items: center; justify-content: flex-end; gap: 6px; padding: 2px 1px 0; }
.support-chat-file-button, .support-chat-agent-button, .support-chat-composer-actions .button { min-height: 33px; border: 1px solid #c5d2df; border-radius: 9px; background: #fff; color: #4d6076; padding: 0 9px; font: inherit; font-size: 11px; font-weight: 900; cursor: pointer; }
.support-chat-file-button { display: inline-flex; align-items: center; }
.support-chat-file-button input { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.support-chat-agent-button { border-color: #b9d7c6; background: #f3fbf6; color: #21623f; }
.support-chat-composer-actions .button.primary { border-color: #247a55; background: #247a55; color: #fff; }
.support-chat-agent-button:disabled, .support-chat-composer-actions button:disabled { cursor: not-allowed; opacity: .58; }
.support-chat-file-list { display: grid; gap: 3px; margin: 0; padding: 0; color: #718095; font-size: 10px; list-style: none; }
.support-chat-file-list:empty { display: none; }
.support-chat-notice { margin: 0; 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; }
.support-chat button:focus-visible, .support-dialog-close:focus-visible { outline: 3px solid rgba(50,128,190,.35); outline-offset: 2px; }
@media (max-width: 640px) {
  .support-dialog { inset: 0; display: block; padding: 0; }
  .support-dialog-card { width: 100%; height: var(--support-dialog-height); max-height: none; border-width: 0; border-radius: 0; }
  .support-dialog-head { padding: 14px 15px 12px; }
  .support-chat-messages { padding: 13px; }
  .support-chat-message { max-width: 91%; }
  .support-chat-composer { padding: 9px 10px calc(11px + env(safe-area-inset-bottom)); }
  .support-chat-composer-actions { flex-wrap: wrap; }
}
@media (prefers-reduced-motion: reduce) { .support-chat-messages { scroll-behavior: auto; } }
