.support-chat {
  --sc-accent: var(--btn-primary-bg, #fe7200);
  --sc-accent-hover: var(--btn-primary-bg-hover, #c67c0c);
  --sc-text: var(--body-c, #222);
  --sc-muted: #69707a;
  --sc-border: rgba(0, 0, 0, .09);
  --sc-radius: var(--border-radius-1, 12px);
  --sc-shadow: 0 18px 55px rgba(28, 32, 38, .18), 0 3px 12px rgba(28, 32, 38, .1);
  position: fixed;
  z-index: 1034;
  right: 86px;
  bottom: 20px;
  font-family: var(--body-font, "Open Sans", Arial, sans-serif);
  font-size: 14px;
  line-height: 1.4;
  color: var(--sc-text);
  text-align: left;
}

.support-chat *, .support-chat *::before, .support-chat *::after { box-sizing: border-box; }
.support-chat [hidden] { display: none !important; }
.support-chat button, .support-chat textarea { font: inherit; }
.support-chat button { -webkit-tap-highlight-color: transparent; }

.support-chat__launcher {
  position: relative;
  display: flex;
  width: 58px;
  height: 58px;
  align-items: center;
  justify-content: center;
  margin-left: auto;
  padding: 0;
  color: #fff;
  background: linear-gradient(145deg, #ff8a2e, var(--sc-accent));
  border: 0;
  border-radius: 18px;
  box-shadow: 0 10px 28px rgba(254, 114, 0, .3);
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}
.support-chat__launcher:hover { transform: translateY(-2px); box-shadow: 0 13px 32px rgba(254, 114, 0, .36); }
.support-chat__launcher:active { transform: translateY(0); }
.support-chat__launcher-icon { width: 29px; height: 29px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.support-chat__badge {
  position: absolute;
  top: -7px;
  right: -7px;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  line-height: 22px;
  text-align: center;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  background: #d94747;
  border: 2px solid #fff;
  border-radius: 12px;
}

.support-chat__panel {
  position: absolute;
  z-index: 1;
  right: 0;
  bottom: 0;
  display: flex;
  overflow: hidden;
  width: 410px;
  height: 620px;
  max-width: calc(100vw - 32px);
  max-height: calc(100vh - 40px);
  max-height: calc(100dvh - 40px);
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--sc-border);
  border-radius: 20px;
  box-shadow: var(--sc-shadow);
  transform-origin: right bottom;
  animation: support-chat-open .18s ease-out;
}

.support-chat__header {
  display: flex;
  min-height: 76px;
  flex: 0 0 auto;
  align-items: center;
  gap: 11px;
  padding: 12px 12px 12px 16px;
  color: #fff;
  background: linear-gradient(125deg, #f77f20, var(--sc-accent));
}
.support-chat__identity { display: flex; width: 42px; height: 42px; flex: 0 0 42px; align-items: center; justify-content: center; background: rgba(255,255,255,.17); border-radius: 14px; }
.support-chat__identity svg { width: 25px; height: 25px; fill: currentColor; }
.support-chat__heading { min-width: 0; flex: 1 1 auto; }
.support-chat__heading h2 { margin: 0 0 2px; color: inherit; font-size: 17px; font-weight: 700; line-height: 1.2; }
.support-chat__heading p { overflow: hidden; margin: 0; color: rgba(255,255,255,.9); font-size: 11.5px; white-space: nowrap; text-overflow: ellipsis; }
.support-chat__header-button { display: flex; width: 36px; height: 36px; flex: 0 0 36px; align-items: center; justify-content: center; padding: 0; color: #fff; background: rgba(255,255,255,.12); border: 0; border-radius: 11px; cursor: pointer; }
.support-chat__header-button:hover { background: rgba(255,255,255,.23); }
.support-chat__header-button svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.support-chat__connection { flex: 0 0 auto; padding: 7px 14px; color: #725518; background: #fff5d9; border-bottom: 1px solid #f3e3ba; font-size: 12px; text-align: center; }
.support-chat__connection[data-kind="error"] { color: #8d3434; background: #fff0f0; border-color: #f2d2d2; }
.support-chat__connection[data-kind="ok"] { color: #37683c; background: #edf8ef; border-color: #d5ead8; }

.support-chat__content { position: relative; display: flex; min-height: 0; flex: 1 1 auto; flex-direction: column; overflow-y: auto; overflow-x: hidden; padding: 16px; background: linear-gradient(#fafafa, #f7f7f7); overscroll-behavior: contain; scrollbar-width: thin; }
.support-chat__loading { display: flex; min-height: 100%; align-items: center; justify-content: center; gap: 9px; color: var(--sc-muted); }
.support-chat__welcome, .support-chat__closed { max-width: 310px; margin: auto; padding: 24px 10px; text-align: center; }
.support-chat__welcome-icon, .support-chat__closed-icon { display: flex; width: 62px; height: 62px; align-items: center; justify-content: center; margin: 0 auto 15px; color: var(--sc-accent); background: rgba(254,114,0,.09); border-radius: 22px; }
.support-chat__welcome-icon svg { width: 34px; height: 34px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.support-chat__closed-icon { font-size: 28px; font-weight: 700; color: #4f8754; background: #edf7ee; }
.support-chat__welcome h3, .support-chat__closed h3 { margin: 0 0 8px; color: #30343a; font-size: 18px; font-weight: 700; }
.support-chat__welcome p, .support-chat__closed p { margin: 0; color: var(--sc-muted); font-size: 13px; line-height: 1.55; }
.support-chat__secondary-button { min-height: 40px; margin-top: 18px; padding: 0 17px; color: var(--sc-accent); background: #fff; border: 1px solid rgba(254,114,0,.35); border-radius: var(--sc-radius); cursor: pointer; }
.support-chat__secondary-button:hover { color: #fff; background: var(--sc-accent); }

.support-chat__older { align-self: center; margin: 0 0 13px; padding: 6px 11px; color: #656b73; background: #fff; border: 1px solid var(--sc-border); border-radius: 14px; font-size: 11px; cursor: pointer; }
.support-chat__messages { display: flex; flex-direction: column; gap: 10px; margin-top: auto; }
.support-chat__message { position: relative; display: flex; max-width: 84%; flex-direction: column; align-self: flex-start; }
.support-chat__message--customer { align-self: flex-end; align-items: flex-end; }
.support-chat__bubble { min-width: 66px; padding: 9px 12px 6px; color: #34383e; background: #fff; border: 1px solid var(--sc-border); border-radius: 5px 15px 15px 15px; box-shadow: 0 2px 7px rgba(0,0,0,.04); overflow-wrap: anywhere; white-space: pre-wrap; }
.support-chat__message--customer .support-chat__bubble { color: #fff; background: var(--sc-accent); border-color: transparent; border-radius: 15px 5px 15px 15px; }
.support-chat__message--deleted .support-chat__bubble { color: #777; background: #f0f0f0; border-color: transparent; font-style: italic; }
.support-chat__meta { display: flex; align-items: center; justify-content: flex-end; gap: 5px; margin-top: 4px; font-size: 9.5px; color: rgba(255,255,255,.78); }
.support-chat__message--operator .support-chat__meta, .support-chat__message--deleted .support-chat__meta { color: #92979e; }
.support-chat__message-menu { position: absolute; top: -7px; right: calc(100% + 3px); }
.support-chat__message-menu-button { display: flex; width: 28px; height: 28px; align-items: center; justify-content: center; padding: 0; color: #7b8086; background: transparent; border: 0; border-radius: 8px; opacity: 0; cursor: pointer; }
.support-chat__message:hover .support-chat__message-menu-button, .support-chat__message-menu-button:focus { opacity: 1; }
.support-chat__message-actions { position: absolute; z-index: 4; top: 28px; right: 0; min-width: 132px; padding: 5px; background: #fff; border: 1px solid var(--sc-border); border-radius: 10px; box-shadow: 0 8px 25px rgba(0,0,0,.14); }
.support-chat__message-actions button { display: block; width: 100%; padding: 8px 10px; color: #41464d; background: transparent; border: 0; border-radius: 7px; text-align: left; cursor: pointer; }
.support-chat__message-actions button:hover { background: #f2f2f2; }
.support-chat__message-actions button:last-child { color: #b64040; }
.support-chat__retry { margin-top: 4px; padding: 2px 0; color: #9b3e3e; background: transparent; border: 0; font-size: 10px; text-decoration: underline; cursor: pointer; }
.support-chat__message--pending { opacity: .72; }

.support-chat__new-message { position: sticky; bottom: 4px; align-self: center; margin-top: 8px; padding: 6px 12px; color: #fff; background: #5f6670; border: 0; border-radius: 15px; font-size: 11px; box-shadow: 0 3px 10px rgba(0,0,0,.15); cursor: pointer; }
.support-chat__edit-bar { display: flex; min-height: 52px; flex: 0 0 auto; align-items: center; gap: 10px; padding: 8px 12px; background: #fff8f1; border-top: 1px solid #f3dfca; }
.support-chat__edit-bar > div { min-width: 0; flex: 1 1 auto; }
.support-chat__edit-bar strong, .support-chat__edit-bar span { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.support-chat__edit-bar strong { color: var(--sc-accent); font-size: 11px; }
.support-chat__edit-bar span { color: #6b7077; font-size: 11px; }
.support-chat__edit-bar button { width: 32px; height: 32px; padding: 0; color: #777; background: transparent; border: 0; font-size: 22px; cursor: pointer; }

.support-chat__composer { position: relative; display: flex; min-height: 72px; flex: 0 0 auto; align-items: flex-end; gap: 9px; padding: 11px 12px; background: #fff; border-top: 1px solid var(--sc-border); }
.support-chat__composer textarea { width: 100%; min-height: 42px; max-height: 116px; flex: 1 1 auto; resize: none; overflow-y: auto; padding: 10px 11px; color: var(--sc-text); background: #f6f6f6; border: 1px solid transparent; border-radius: 13px; outline: none; line-height: 20px; }
.support-chat__composer textarea:focus { background: #fff; border-color: rgba(254,114,0,.55); box-shadow: 0 0 0 3px rgba(254,114,0,.1); }
.support-chat__counter { position: absolute; right: 68px; bottom: 3px; color: #8b9096; font-size: 9px; }
.support-chat__send { display: flex; width: 43px; height: 43px; flex: 0 0 43px; align-items: center; justify-content: center; padding: 0; color: #fff; background: var(--sc-accent); border: 0; border-radius: 13px; cursor: pointer; }
.support-chat__send:hover:not(:disabled) { background: var(--sc-accent-hover); }
.support-chat__send:disabled { color: #999; background: #e7e7e7; cursor: default; }
.support-chat__send svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.support-chat__send .support-chat__spinner { display: none; }
.support-chat__send.is-loading svg { display: none; }
.support-chat__send.is-loading .support-chat__spinner { display: block; }
.support-chat__error { flex: 0 0 auto; padding: 8px 13px; color: #983d3d; background: #fff0f0; border-top: 1px solid #f3d1d1; font-size: 11.5px; }
.support-chat__spinner { display: inline-block; width: 17px; height: 17px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: support-chat-spin .65s linear infinite; }
.support-chat__sr-only { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0,0,0,0) !important; white-space: nowrap !important; border: 0 !important; }

.support-chat button:focus-visible, .support-chat textarea:focus-visible { outline: 3px solid rgba(0, 92, 180, .42); outline-offset: 2px; }

@keyframes support-chat-open { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes support-chat-spin { to { transform: rotate(360deg); } }

@media (max-width: 767px) {
  .support-chat { right: 80px; bottom: calc(100px + env(safe-area-inset-bottom, 0px)); }
  .support-chat__launcher { width: 54px; height: 54px; border-radius: 17px; }
  .support-chat__panel { position: fixed; z-index: 1035; inset: 0; width: 100%; max-width: none; height: 100vh; height: 100dvh; max-height: none; border: 0; border-radius: 0; transform-origin: center bottom; }
  .support-chat__header { min-height: calc(70px + env(safe-area-inset-top, 0px)); padding-top: calc(10px + env(safe-area-inset-top, 0px)); }
  .support-chat__content { padding: 14px 12px; }
  .support-chat__composer { padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px)); }
  .support-chat__message { max-width: 88%; }
  .support-chat__message-menu-button { opacity: 1; }
  body.support-chat-open { overflow: hidden !important; overscroll-behavior: none; }
}

@media (max-width: 374px) {
  .support-chat { right: 76px; }
  .support-chat__heading p { max-width: 185px; }
  .support-chat__header { gap: 7px; padding-left: 10px; padding-right: 8px; }
  .support-chat__identity { width: 38px; height: 38px; flex-basis: 38px; }
}

@media (prefers-reduced-motion: reduce) {
  .support-chat *, .support-chat *::before, .support-chat *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
