.support-chat { position: fixed; z-index: 70; right: max(1rem, env(safe-area-inset-right)); bottom: max(5rem, calc(env(safe-area-inset-bottom) + 5rem)); color: #fff; font-family: var(--body, "Segoe UI", sans-serif); font-size: .9rem; line-height: 1.5; }
.support-chat [hidden], .support-chat-admin [hidden] { display: none !important; }
.support-chat-toggle, .support-chat-fallback { display: inline-flex; min-height: 2.85rem; align-items: center; justify-content: center; padding: .7rem 1rem; border: 1px solid #fb727a; border-radius: .35rem; background: #b50b16; color: #fff; font-weight: 800; text-decoration: none; box-shadow: 0 .5rem 1.5rem #0008; }
.support-chat-toggle:hover, .support-chat-fallback:hover { background: #d30c19; }
.support-chat-panel { position: absolute; right: 0; bottom: calc(100% + .75rem); display: flex; flex-direction: column; width: min(25rem, calc(100vw - 2rem)); max-height: min(38rem, calc(100dvh - 9.5rem)); border: 1px solid #686868; border-top: 3px solid var(--red, #e30613); border-radius: .4rem; background: #111; box-shadow: 0 1rem 3rem #000a; overflow: auto; overscroll-behavior: contain; }
.support-chat-heading { position: sticky; z-index: 2; top: 0; display: flex; flex: 0 0 auto; justify-content: space-between; align-items: flex-start; gap: .65rem; padding: .65rem .85rem; border-bottom: 1px solid #454545; background: #111; }
.support-chat .support-chat-kicker { margin: 0 0 .25rem; color: #ccc; font-size: .7rem; letter-spacing: .06em; }
.support-chat h2 { max-width: none; margin: 0; font-family: var(--body, sans-serif); font-size: 1.05rem; line-height: 1.25; text-transform: none; letter-spacing: 0; }
.support-chat-icon { min-width: 2.5rem; min-height: 2.5rem; padding: .2rem; border: 1px solid #777; border-radius: .2rem; background: #1d1d1d; color: #fff; font-size: 1.5rem; line-height: 1; }
.support-chat-intro { flex: 0 0 auto; padding: .55rem .85rem 0; font-size: .75rem; line-height: 1.35; color: #d6d6d6; }
.support-chat-preview { margin: 0; padding: .5rem 1rem; border-bottom: 1px solid #d29b38; background: #33250d; color: #ffe1a0; font-size: .8rem; font-weight: 700; }
.support-chat-intro p { margin: 0 0 .35rem; }
.support-chat .support-chat-status { color: #fff; font-weight: 700; }
.support-chat-messages { display: flex; flex: 1 1 14rem; flex-direction: column; gap: .55rem; min-height: 8.75rem; max-height: 24rem; margin: 0; padding: .65rem .85rem; list-style: none; overflow: auto; overscroll-behavior: contain; }
.support-chat-messages:empty { display: none; }
.support-chat-message { max-width: 100%; padding: .65rem .75rem; border: 1px solid #555; border-radius: .3rem; background: #242424; overflow-wrap: anywhere; }
.support-chat-message strong { display: block; margin-bottom: .25rem; font-size: .75rem; }
.support-chat-message p { margin: 0; white-space: pre-wrap; }
.support-chat-message-links { display: grid; gap: .35rem; margin: .5rem 0 0; padding-left: 1rem; font-size: .8rem; }
.support-chat-message-links a { color: #fff; text-decoration: underline; text-underline-offset: .2em; overflow-wrap: anywhere; }
.support-chat-message small { display: block; margin-top: .3rem; color: #c4c4c4; font-size: .68rem; }
.support-chat-message-visitor { margin-left: 1rem; border-color: #91686b; background: #331b1d; }
.support-chat-message-admin { margin-right: 1rem; border-color: #777; background: #202b25; }
.support-chat-message-bot { margin-right: 1rem; }
.support-chat-compose { display: grid; grid-template-columns: minmax(0, 1fr) auto; flex: 0 0 auto; gap: .3rem .5rem; margin: 0; padding: .5rem .85rem; border-top: 1px solid #454545; }
.support-chat-compose label { grid-column: 1 / -1; font-size: .75rem; font-weight: 800; line-height: 1.3; }
.support-chat-compose textarea { grid-column: 1; grid-row: 2; width: 100%; height: 3rem; min-height: 3rem; max-height: 5rem; padding: .35rem; border: 1px solid #888; border-radius: .2rem; background: #080808; color: #fff; resize: vertical; font-size: .85rem; line-height: 1.3; }
.support-chat-compose [data-support-send] { grid-column: 2; grid-row: 2; align-self: stretch; min-height: 3rem; padding: .4rem .55rem; font-size: .7rem; }
.support-chat .button { min-height: 2.65rem; padding: .55rem .8rem; font-size: .75rem; }
.support-chat-hint { grid-column: 1 / -1; margin: 0; color: #c4c4c4; font-size: .68rem; line-height: 1.3; }
.support-chat-start { padding: 0 1rem; }
.support-chat-actions, .support-chat-erase-confirm { display: flex; flex: 0 0 auto; flex-wrap: wrap; gap: .15rem .75rem; padding: .15rem .85rem .35rem; }
.support-chat-erase-confirm p { flex-basis: 100%; margin: 0; }
.support-chat-text-button { min-height: 2rem; padding: .2rem 0; border: 0; background: transparent; color: #fff; text-align: left; text-decoration: underline; text-underline-offset: .2em; font-size: .75rem; }
.support-chat button:disabled, .support-chat textarea:disabled { opacity: .55; cursor: default; }
.support-chat-footer { flex: 0 0 auto; padding: .45rem .85rem; border-top: 1px solid #454545; color: #d6d6d6; font-size: .7rem; line-height: 1.35; }
.support-chat-footer p { margin: 0 0 .35rem; }
.support-chat-footer p:last-child { margin: 0; }
.support-chat-footer a { color: #fff; text-decoration: underline; overflow-wrap: anywhere; }
.support-chat-active-help { display: none; }
.support-chat-panel:has([data-support-erase]:not([hidden])) { height: min(38rem, calc(100dvh - 9.5rem)); }
.support-chat-panel:has([data-support-erase]:not([hidden])) .support-chat-intro > p:first-child,
.support-chat-panel:has([data-support-erase]:not([hidden])) .support-chat-before-start { display: none; }
.support-chat-panel:has([data-support-erase]:not([hidden])) .support-chat-active-help { display: block; }
.support-chat-panel:has([data-support-erase]:not([hidden])) .support-chat-heading { padding-top: .5rem; padding-bottom: .5rem; }
.support-chat-panel:has([data-support-erase]:not([hidden])) .support-chat-preview { padding: .2rem .85rem; font-size: .65rem; line-height: 1.2; }
.support-chat-panel:has([data-support-erase]:not([hidden])) .support-chat-intro { padding-top: .3rem; }
.support-chat-panel:has([data-support-erase]:not([hidden])) [data-support-availability] { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: .2rem; }
.support-chat-panel:has([data-support-erase]:not([hidden])) .support-chat-status { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; margin-bottom: .2rem; }
.support-chat-panel:has([data-support-erase]:not([hidden])) .support-chat-hint { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
.support-chat-panel:has([data-support-erase]:not([hidden])) .support-chat-footer { padding-top: .25rem; padding-bottom: .25rem; }
.support-chat-panel:has([data-support-error]:not([hidden])) .support-chat-intro .support-chat-status { display: none; }
.support-chat-panel:has([data-support-start]:not([hidden])) .support-chat-compose { display: none; }
.support-chat-panel:not(:has([data-support-erase]:not([hidden]))) .support-chat-actions { display: none; }
.support-chat-error { margin: .25rem 1rem; padding: .5rem; border: 1px solid #e88a91; background: #3a1317; color: #fff; font-size: .8rem; }
.support-chat :focus-visible, .support-chat-admin :focus-visible { outline: 3px solid #fff; outline-offset: 3px; box-shadow: 0 0 0 5px #000; }
.support-chat-admin { max-width: 100%; }
.support-chat-admin .admin-section-heading h1 { max-width: none; font-size: clamp(2rem, 5vw, 4rem); }
.support-chat-admin-grid { display: grid; grid-template-columns: minmax(14rem, .7fr) minmax(0, 1.3fr); gap: 1rem; margin-top: 1rem; }
.support-chat-admin-list { display: grid; gap: .65rem; margin: 0; padding: 0; list-style: none; }
.support-chat-admin-list a { display: grid; gap: .2rem; padding: .8rem; border: 1px solid var(--line, #555); color: #fff; text-decoration: none; overflow-wrap: anywhere; }
.support-chat-admin-list a[aria-current="page"] { border-color: #f56c76; background: #2b1416; }
.support-chat-admin-list span, .support-chat-admin-list small { color: #d0d0d0; }
.support-chat-admin .support-chat-admin-messages { max-height: 32rem; min-height: 6rem; padding: .5rem 0 1rem; }
.support-chat-admin .support-chat-message { max-width: 100%; }
.support-chat-admin .admin-form-actions { margin-top: 1rem; }
@media (max-width: 760px) { .support-chat-admin-grid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 420px) { .support-chat { right: .65rem; } .support-chat-panel { width: calc(100vw - 1.3rem); } .support-chat-heading { padding: .75rem .8rem .5rem; } .support-chat-intro, .support-chat-compose, .support-chat-footer { padding-right: .8rem; padding-left: .8rem; } }
@media (prefers-reduced-motion: reduce) { .support-chat *, .support-chat-admin * { scroll-behavior: auto !important; transition: none !important; } }
