.support-chat-widget {
  --support-chat-accent: var(--control-accent, #00e5ff);
  --support-chat-surface: #111315;
  --support-chat-raised: #191b1e;
  --support-chat-input: #0b0d0f;
  --support-chat-border: rgba(255, 255, 255, .075);
  --support-chat-text: var(--text-primary, #f5f5f7);
  --support-chat-muted: #a1a5aa;
  position: relative;
  z-index: 800;
  font-family: var(--font-sf-pro-text, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif);
  color: var(--support-chat-text);
}

.support-chat-widget[hidden],
.support-chat-panel[hidden] { display: none !important; }

.support-chat-launcher {
  position: fixed;
  right: 24px;
  bottom: calc(20px + env(safe-area-inset-bottom, 0px));
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  color: var(--support-chat-accent);
  background: rgba(14, 16, 18, .96);
  border: 1px solid rgba(0, 229, 255, .34);
  border-radius: 50%;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .28);
  cursor: pointer;
  transition: transform 180ms ease, background 180ms ease, border-color 180ms ease;
}
.support-chat-launcher:hover { transform: translateY(-2px); background: #171a1d; border-color: rgba(0, 229, 255, .65); }
.support-chat-launcher:active { transform: scale(.97); }
.support-chat-launcher:focus-visible,
.support-chat-close:focus-visible,
.support-chat-send:focus-visible,
.support-chat-code button:focus-visible { outline: 2px solid var(--support-chat-accent); outline-offset: 3px; }
.support-chat-launcher svg { width: 25px; height: 25px; }

.support-chat-badge {
  position: absolute;
  top: -3px;
  right: -4px;
  display: grid;
  place-items: center;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  color: #071012;
  background: var(--support-chat-accent);
  border: 2px solid #0e1012;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
}
.support-chat-badge[hidden] { display: none !important; }

.support-chat-panel {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  padding: 24px;
  pointer-events: none;
}
.support-chat-panel__backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .58);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 240ms cubic-bezier(.22, 1, .36, 1);
}
.support-chat-panel:not([hidden]) .support-chat-panel__backdrop { opacity: 1; pointer-events: auto; }
.support-chat-panel--closing .support-chat-panel__backdrop { opacity: 0; pointer-events: none; }
.support-chat-panel__dialog {
  position: relative;
  display: flex;
  flex-direction: column;
  width: min(420px, calc(100vw - 48px));
  height: min(680px, calc(100dvh - 96px));
  min-height: 360px;
  overflow: hidden;
  color: var(--support-chat-text);
  background: linear-gradient(155deg, rgba(34, 37, 41, .98), rgba(14, 16, 19, .98) 68%);
  border: 1px solid rgba(255, 255, 255, .105);
  border-radius: 26px;
  box-shadow: 0 32px 96px rgba(0, 0, 0, .56), 0 0 42px rgba(0, 229, 255, .075);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  pointer-events: auto;
  transform-origin: bottom right;
  animation: support-chat-panel-in 350ms cubic-bezier(.22, 1, .36, 1) both;
}
.support-chat-panel--closing .support-chat-panel__dialog { animation: support-chat-panel-out 220ms cubic-bezier(.22, 1, .36, 1) both; }
@keyframes support-chat-panel-in {
  from { opacity: 0; transform: translateY(18px) scale(.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes support-chat-panel-out {
  from { opacity: 1; transform: translateY(0) scale(1); }
  to { opacity: 0; transform: translateY(10px) scale(.98); }
}

.support-chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 17px 18px 15px;
  background: rgba(255, 255, 255, .025);
  border-bottom: 1px solid rgba(255, 255, 255, .075);
}
.support-chat-header__identity { display: flex; align-items: center; gap: 11px; min-width: 0; }
.support-chat-header__avatar {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  background: transparent;
  border: 0;
  border-radius: 50%;
  box-shadow: none;
}
.support-chat-header__title-wrap { min-width: 0; }
.support-chat-header h2 {
  margin: 0;
  color: var(--support-chat-text);
  font-family: var(--font-sf-pro-display, var(--font-sf-pro-text, sans-serif));
  font-size: 15px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -.01em;
}
.support-chat-header__note { margin: 2px 0 0; color: #9ba1a6; font-size: 11px; line-height: 1.35; }
.support-chat-connection { display: flex; align-items: center; gap: 6px; margin-top: 5px; color: #aeb4b9; font-size: 10px; line-height: 1.25; }
.support-chat-connection__dot { width: 6px; height: 6px; flex: 0 0 6px; border-radius: 50%; background: #858b90; box-shadow: 0 0 0 3px rgba(133, 139, 144, .12); }
.support-chat-connection[data-state="connected"] .support-chat-connection__dot { background: #42d99a; box-shadow: 0 0 0 3px rgba(66, 217, 154, .13); }
.support-chat-connection[data-state="connecting"] .support-chat-connection__dot,
.support-chat-connection[data-state="reconnecting"] .support-chat-connection__dot { background: #f1c46b; box-shadow: 0 0 0 3px rgba(241, 196, 107, .12); }
.support-chat-connection[data-state="offline"] .support-chat-connection__dot { background: #f27e79; box-shadow: 0 0 0 3px rgba(242, 126, 121, .12); }
.support-chat-close {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  margin: 0 -4px 0 0;
  padding: 0;
  color: #b4b9be;
  background: rgba(255, 255, 255, .055);
  border: 1px solid rgba(255, 255, 255, .075);
  border-radius: 50%;
  cursor: pointer;
  transition: color 180ms ease, background 180ms ease, transform 180ms ease;
}
.support-chat-close svg { width: 16px; height: 16px; }
.support-chat-close:hover { color: #fff; background: rgba(255, 255, 255, .12); transform: rotate(90deg); }
.support-chat-launcher:focus-visible,
.support-chat-close:focus-visible,
.support-chat-send:focus-visible,
.support-chat-code button:focus-visible { outline: 2px solid var(--support-chat-accent); outline-offset: 3px; }

.support-chat-order-context {
  display: grid;
  gap: 6px;
  padding: 11px 17px;
  color: var(--support-chat-muted);
  background: rgba(255, 255, 255, .018);
  border-bottom: 1px solid rgba(255, 255, 255, .06);
  font-size: 12px;
}
.support-chat-order-context[hidden] { display: none !important; }
.support-chat-order-select {
  width: 100%;
  min-height: 40px;
  padding: 8px 11px;
  color: var(--support-chat-text);
  background: rgba(7, 10, 12, .64);
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 12px;
  font: inherit;
}
.support-chat-order-select:focus-visible { outline: 2px solid rgba(0, 229, 255, .45); outline-offset: 1px; }

.support-chat-messages {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-height: 0;
  overflow: auto;
  padding: 17px 16px 19px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .018), transparent 30%);
  overscroll-behavior: contain;
  scrollbar-color: rgba(255, 255, 255, .18) transparent;
  scrollbar-width: thin;
}
.support-chat-empty {
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 8px;
  width: min(100%, 280px);
  margin: auto;
  padding: 28px 14px;
  color: var(--support-chat-muted);
  text-align: center;
}
.support-chat-empty__icon { display: grid; place-items: center; width: 42px; height: 42px; margin-bottom: 4px; color: var(--support-chat-accent); background: rgba(0, 229, 255, .075); border: 1px solid rgba(0, 229, 255, .12); border-radius: 50%; }
.support-chat-empty__icon svg { width: 21px; height: 21px; }
.support-chat-empty__title { margin: 0; color: var(--support-chat-text); font-size: 15px; font-weight: 600; line-height: 1.35; }
.support-chat-empty__description { margin: 0; font-size: 13px; line-height: 1.5; }

.support-chat-message {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  align-self: flex-start;
  width: fit-content;
  max-width: min(88%, 350px);
  margin-top: 11px;
  color: #e9ecef;
}
.support-chat-message:first-child,
.support-chat-system-card:first-child { margin-top: 0; }
.support-chat-message__avatar {
  display: grid;
  place-items: center;
  width: 29px;
  height: 29px;
  flex: 0 0 29px;
  margin-bottom: 2px;
  background: transparent;
  border: 0;
  border-radius: 50%;
  box-shadow: none;
}
.support-chat-header__avatar img,
.support-chat-message__avatar img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 50%;
}
.support-chat-widget--admin .support-chat-header__avatar {
  color: #061719;
  background: linear-gradient(135deg, #77f4f5, #00b6c0);
  border: 1px solid rgba(255, 255, 255, .22);
  box-shadow: 0 5px 18px rgba(0, 201, 210, .2);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -.04em;
}
.support-chat-widget--admin .support-chat-message__avatar {
  color: #d9fafa;
  background: linear-gradient(145deg, #31363a, #191d20);
  border: 1px solid rgba(255, 255, 255, .12);
  box-shadow: 0 4px 12px rgba(0, 0, 0, .24);
  font-size: 10px;
  font-weight: 650;
}
.support-chat-widget--admin .support-chat-message__avatar--assistant {
  color: #052124;
  background: linear-gradient(145deg, #63edf0, #00aeb9);
  border-color: rgba(155, 250, 252, .45);
  font-size: 15px;
}
.support-chat-message__bubble {
  min-width: 0;
  max-width: 100%;
  padding: 9px 13px 8px;
  color: #edf0f2;
  background: rgba(39, 43, 47, .88);
  border: 1px solid rgba(255, 255, 255, .095);
  border-radius: 18px 18px 18px 5px;
  box-shadow: 0 5px 17px rgba(0, 0, 0, .2);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  font-size: 14px;
  line-height: 1.48;
  letter-spacing: -.006em;
  overflow-wrap: anywhere;
  transform-origin: left bottom;
  transition: transform 200ms cubic-bezier(.22, 1, .36, 1), box-shadow 200ms ease, border-color 200ms ease;
}
.support-chat-message--customer { align-self: flex-end; justify-content: flex-end; }
.support-chat-message--customer .support-chat-message__bubble {
  color: #061719;
  background: linear-gradient(135deg, #62edf0 0%, #00b5bf 100%);
  border-color: rgba(183, 255, 255, .34);
  border-radius: 18px 18px 5px 18px;
  box-shadow: 0 8px 22px rgba(0, 167, 178, .18);
  transform-origin: right bottom;
}
.support-chat-message--assistant .support-chat-message__bubble { background: linear-gradient(145deg, rgba(35, 46, 49, .94), rgba(28, 32, 35, .91)); border-color: rgba(0, 229, 255, .17); }
.support-chat-message--system .support-chat-message__bubble { color: #d7dbde; background: rgba(31, 34, 37, .86); border-color: rgba(255, 255, 255, .07); }
.support-chat-message--grouped-before { margin-top: 3px; }
.support-chat-message--customer.support-chat-message--grouped-before .support-chat-message__bubble { border-top-right-radius: 7px; }
.support-chat-message--admin.support-chat-message--grouped-before .support-chat-message__bubble,
.support-chat-message--assistant.support-chat-message--grouped-before .support-chat-message__bubble,
.support-chat-message--system.support-chat-message--grouped-before .support-chat-message__bubble { border-top-left-radius: 7px; }
.support-chat-message--customer.support-chat-message--grouped-after .support-chat-message__bubble { border-bottom-right-radius: 7px; }
.support-chat-message--admin.support-chat-message--grouped-after .support-chat-message__bubble,
.support-chat-message--assistant.support-chat-message--grouped-after .support-chat-message__bubble,
.support-chat-message--system.support-chat-message--grouped-after .support-chat-message__bubble { border-bottom-left-radius: 7px; }
.support-chat-message--grouped-before .support-chat-message__sender { display: none; }
.support-chat-message--grouped-before .support-chat-message__avatar { visibility: hidden; }
.support-chat-message--grouped-after .support-chat-message__time { display: none; }
.support-chat-message__sender { display: block; margin: 0 0 3px; color: #b8c0c5; font-size: 11px; font-weight: 550; line-height: 1.3; }
.support-chat-message--customer .support-chat-message__sender { color: rgba(3, 35, 38, .72); }
.support-chat-message__text { white-space: pre-wrap; }
.support-chat-message__text a,
.support-chat-system-card__title a { color: #75e8ec; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 2px; overflow-wrap: anywhere; }
.support-chat-message--customer .support-chat-message__text a { color: #06484d; }
.support-chat-message__text a:focus-visible,
.support-chat-system-card__title a:focus-visible { border-radius: 2px; outline: 2px solid currentColor; outline-offset: 2px; }
.support-chat-message__time { display: block; margin-top: 5px; color: #9ca4a9; font-size: 10px; font-variant-numeric: tabular-nums; line-height: 1.2; text-align: right; }
.support-chat-message--customer .support-chat-message__time { color: rgba(3, 35, 38, .64); }
.support-chat-message--entering { animation: support-chat-message-in-left 350ms cubic-bezier(.22, 1, .36, 1) both; }
.support-chat-message--customer.support-chat-message--entering { animation-name: support-chat-message-in-right; }
@keyframes support-chat-message-in-left {
  from { opacity: 0; transform: translateX(-20px) translateY(12px) scale(.96); }
  to { opacity: 1; transform: translateX(0) translateY(0) scale(1); }
}
@keyframes support-chat-message-in-right {
  from { opacity: 0; transform: translateX(20px) translateY(12px) scale(.96); }
  to { opacity: 1; transform: translateX(0) translateY(0) scale(1); }
}
@media (hover: hover) {
  .support-chat-message__bubble:hover { transform: translateY(-1px) scale(1.01); border-color: rgba(255, 255, 255, .15); box-shadow: 0 9px 24px rgba(0, 0, 0, .29); }
  .support-chat-message--customer .support-chat-message__bubble:hover { border-color: rgba(207, 255, 255, .57); box-shadow: 0 10px 27px rgba(0, 167, 178, .25); }
}

.support-chat-system-card {
  align-self: flex-start;
  width: min(92%, 350px);
  margin-top: 11px;
  padding: 13px;
  color: var(--support-chat-text);
  background: linear-gradient(145deg, rgba(37, 41, 45, .94), rgba(23, 26, 29, .96));
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 18px;
  box-shadow: 0 7px 22px rgba(0, 0, 0, .23);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.support-chat-system-card.support-chat-message--entering { animation: support-chat-message-in-left 350ms cubic-bezier(.22, 1, .36, 1) both; }
.support-chat-system-card__title { margin: 3px 0 6px; color: var(--support-chat-text); font-size: 14px; font-weight: 600; line-height: 1.45; overflow-wrap: anywhere; }
.support-chat-system-card__details { margin: 0 0 8px; color: var(--support-chat-muted); font-size: 12px; line-height: 1.45; overflow-wrap: anywhere; }
.support-chat-system-card .support-chat-message__time { margin-top: 9px; }
.support-chat-code { display: flex; align-items: center; gap: 8px; min-width: 0; margin-top: 7px; padding: 8px; background: rgba(255, 255, 255, .045); border: 1px solid rgba(255, 255, 255, .06); border-radius: 11px; }
.support-chat-code code { min-width: 0; flex: 1; color: #e7e9eb; font: 12px/1.45 ui-monospace, SFMono-Regular, Consolas, monospace; overflow-wrap: anywhere; user-select: all; }
.support-chat-code button { flex: 0 0 auto; min-height: 32px; padding: 6px 10px; color: #041a1c; background: linear-gradient(135deg, #6cf1f3, #00c4ce); border: 1px solid rgba(179, 255, 255, .32); border-radius: 10px; font: 600 11px/1.2 var(--font-sf-pro-text, sans-serif); cursor: pointer; transition: transform 180ms ease, filter 180ms ease; }
.support-chat-code button:hover { transform: translateY(-1px); filter: brightness(1.07); }

.support-chat-compose {
  flex: 0 0 auto;
  padding: 12px 14px max(12px, env(safe-area-inset-bottom, 0px));
  background: rgba(15, 17, 20, .94);
  border-top: 1px solid rgba(255, 255, 255, .075);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.support-chat-compose__row {
  display: flex;
  align-items: flex-end;
  gap: 9px;
  padding: 5px;
  background: rgba(6, 9, 11, .74);
  border: 1px solid rgba(255, 255, 255, .09);
  border-radius: 17px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .025);
  transition: border-color 180ms ease, background 180ms ease, box-shadow 180ms ease;
}
.support-chat-compose__row:focus-within { background: rgba(7, 13, 15, .9); border-color: rgba(0, 229, 255, .47); box-shadow: 0 0 0 3px rgba(0, 229, 255, .075); }
.support-chat-input { display: block; flex: 1; width: 100%; min-width: 0; min-height: 38px; max-height: 120px; resize: none; padding: 9px 10px; color: var(--support-chat-text); background: transparent; border: 0; border-radius: 11px; outline: 0; box-shadow: none; font: 400 14px/1.45 var(--font-sf-pro-text, sans-serif); }
.support-chat-input::placeholder { color: #818a90; opacity: 1; }
.support-chat-input:focus-visible { outline: 0; border-color: transparent; background: transparent; box-shadow: none; }
.support-chat-send { display: grid; place-items: center; width: 38px; height: 38px; flex: 0 0 38px; margin-bottom: 0; padding: 0; color: #041719; background: linear-gradient(135deg, #65eff1, #00b6c0); border: 1px solid rgba(194, 255, 255, .35); border-radius: 12px; box-shadow: 0 4px 12px rgba(0, 170, 180, .2); cursor: pointer; transition: transform 180ms cubic-bezier(.22, 1, .36, 1), opacity 180ms ease, filter 180ms ease, box-shadow 180ms ease; }
.support-chat-send svg { display: block; width: 18px; height: 18px; }
.support-chat-send:hover:not(:disabled) { transform: translateY(-1px) scale(1.03); filter: brightness(1.07); box-shadow: 0 7px 18px rgba(0, 170, 180, .28); }
.support-chat-send:active:not(:disabled) { transform: scale(.96); }
.support-chat-send:disabled { color: #a6adaf; background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .055); box-shadow: none; cursor: not-allowed; opacity: .48; }
.support-chat-error { min-height: 16px; margin: 5px 3px 0; color: #ff8c86; font-size: 12px; line-height: 1.35; }
.support-chat-error[hidden] { display: block; visibility: hidden; }

.support-chat-ai-typing {
  display: flex;
  align-items: center;
  align-self: flex-start;
  gap: 4px;
  width: fit-content;
  margin: 7px 0 2px 37px;
  padding: 10px 13px;
  color: var(--support-chat-muted);
  background: rgba(37, 41, 45, .9);
  border: 1px solid rgba(255, 255, 255, .085);
  border-radius: 17px 17px 17px 5px;
  box-shadow: 0 5px 16px rgba(0, 0, 0, .18);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  animation: support-chat-typing-in 180ms ease-out both;
}
.support-chat-ai-typing--leaving { animation: support-chat-typing-out 180ms ease-in both; }
.support-chat-ai-typing__dots { display: flex; align-items: center; gap: 5px; height: 10px; }
.support-chat-ai-typing__dots span { width: 6px; height: 6px; border-radius: 50%; background: var(--support-chat-accent); box-shadow: 0 0 8px rgba(0, 229, 255, .2); animation: support-chat-dot-pulse 800ms infinite ease-in-out; }
.support-chat-ai-typing__dots span:nth-child(2) { animation-delay: 130ms; }
.support-chat-ai-typing__dots span:nth-child(3) { animation-delay: 260ms; }
.support-chat-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
@keyframes support-chat-dot-pulse { 0%, 65%, 100% { opacity: .38; transform: translateY(0) scale(.78); } 32% { opacity: 1; transform: translateY(-3px) scale(1); } }
@keyframes support-chat-typing-in { from { opacity: 0; transform: translateX(-6px) scale(.96); } to { opacity: 1; transform: translateX(0) scale(1); } }
@keyframes support-chat-typing-out { to { opacity: 0; transform: translateY(4px) scale(.96); } }
.support-chat-message--assistant .support-chat-message__sender { color: #71e9ed; }

@media (max-width: 680px) {
  .support-chat-launcher { right: 17px; bottom: calc(17px + env(safe-area-inset-bottom, 0px)); width: 52px; height: 52px; }
  .support-chat-panel { position: fixed; inset: 0; align-items: stretch; justify-content: stretch; padding: 0; }
  .support-chat-panel__backdrop { background: rgba(0, 0, 0, .66); }
  .support-chat-panel__dialog {
    position: fixed;
    left: 0;
    right: 0;
    top: var(--support-chat-viewport-top, 0px);
    width: 100%;
    height: var(--support-chat-viewport-height, 100dvh);
    min-height: 0;
    max-height: none;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-sizing: border-box;
    border: 0;
    border-radius: 0;
    padding-left: env(safe-area-inset-left, 0px);
    padding-right: env(safe-area-inset-right, 0px);
    transform-origin: center bottom;
  }
  .support-chat-header { padding-top: max(15px, env(safe-area-inset-top, 0px)); }
  .support-chat-messages { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 14px 13px 16px; }
  .support-chat-compose { flex: 0 0 auto; padding: 10px 11px max(10px, env(safe-area-inset-bottom, 0px)); }
  .support-chat-input { font-size: 16px; }
  .support-chat-message { max-width: 94%; }
  .support-chat-system-card { width: 96%; }
  .support-chat-ai-typing { margin-left: 35px; }
  body.support-chat-open { overflow: hidden; overscroll-behavior: none; }
}

@media (max-width: 680px) {
  body.support-chat-open .support-chat-widget:not(.support-chat-widget--admin) { z-index: 9999; }
  .support-chat-widget:not(.support-chat-widget--admin) .support-chat-panel {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    padding: 0;
    margin: 0;
    z-index: 9999;
  }
  .support-chat-widget:not(.support-chat-widget--admin) .support-chat-panel__dialog {
    position: fixed;
    top: var(--support-chat-viewport-top, 0px);
    left: 0;
    right: auto;
    width: 100%;
    height: var(--support-chat-viewport-height, 100dvh);
    min-height: 0;
    max-height: none;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: none;
    animation: none;
  }
  .support-chat-widget:not(.support-chat-widget--admin) .support-chat-header,
  .support-chat-widget:not(.support-chat-widget--admin) .support-chat-compose {
    flex: 0 0 auto;
  }
  .support-chat-widget:not(.support-chat-widget--admin) .support-chat-messages {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-height: 0;
    height: auto;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-y: contain;
    touch-action: pan-y;
    scroll-behavior: auto;
  }
  .support-chat-widget:not(.support-chat-widget--admin) .support-chat-messages > * {
    flex-shrink: 0;
  }
  .support-chat-widget:not(.support-chat-widget--admin) .support-chat-message__bubble,
  .support-chat-widget:not(.support-chat-widget--admin) .support-chat-system-card,
  .support-chat-widget:not(.support-chat-widget--admin) .support-chat-ai-typing {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .14);
  }
  .support-chat-widget:not(.support-chat-widget--admin) .support-chat-message__bubble {
    animation-duration: 120ms;
    transition: none;
  }
  .support-chat-widget:not(.support-chat-widget--admin) .support-chat-ai-typing__dots span {
    animation-duration: 1200ms;
    box-shadow: none;
  }
}
@media (max-width: 680px) and (prefers-reduced-motion: no-preference) {
  .support-chat-widget:not(.support-chat-widget--admin) .support-chat-panel:not([hidden]) .support-chat-panel__dialog {
    animation: support-chat-mobile-in 180ms ease-out both;
  }
  .support-chat-widget:not(.support-chat-widget--admin) .support-chat-panel--closing .support-chat-panel__dialog {
    animation: support-chat-mobile-out 150ms ease-in both;
  }
  @keyframes support-chat-mobile-in {
    from { opacity: 0; }
    to { opacity: 1; }
  }
  @keyframes support-chat-mobile-out {
    from { opacity: 1; }
    to { opacity: 0; }
  }
}
@media (max-width: 360px) {
  .support-chat-header { padding-inline: 15px; }
  .support-chat-messages { padding-inline: 11px; }
  .support-chat-message { max-width: 96%; gap: 6px; }
  .support-chat-message__avatar { width: 26px; height: 26px; flex-basis: 26px; }
  .support-chat-system-card { width: 100%; }
  .support-chat-code { align-items: flex-start; flex-wrap: wrap; }
  .support-chat-code button { margin-left: auto; }
}
@media (prefers-reduced-motion: reduce) {
  .support-chat-panel__backdrop,
  .support-chat-close,
  .support-chat-code button,
  .support-chat-compose__row,
  .support-chat-send,
  .support-chat-message__bubble { transition: none !important; }
  .support-chat-panel__dialog,
  .support-chat-message--entering,
  .support-chat-system-card.support-chat-message--entering,
  .support-chat-ai-typing,
  .support-chat-ai-typing--leaving { animation: none !important; transform: none !important; opacity: 1 !important; }
  .support-chat-ai-typing__dots span { animation: none !important; opacity: .75; transform: none; }
  .support-chat-message__bubble:hover { transform: none; }
}

/* Admin Chat AI Mode Indicator */
.admin-chat-ai-mode { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 12px; font-size: 12px; font-weight: 600; }
.admin-chat-ai-mode--ai { background: var(--accent-bg, #2a2a4e); color: var(--accent, #6c5ce7); }
.admin-chat-ai-mode--human { background: var(--success-bg, #1a3a1a); color: var(--success, #51cf66); }
.admin-chat-ai-actions { display: flex; gap: 8px; margin-left: auto; }
