.rg-site-chat,
.rg-site-chat * {
  box-sizing: border-box;
}

.rg-site-chat {
  bottom: 24px;
  font-family: Arial, sans-serif;
  position: fixed;
  right: 24px;
  z-index: 700;
}

.rg-site-chat__toggle {
  align-items: center;
  background: #ec482f;
  border: 0;
  border-radius: 50%;
  box-shadow: 0 10px 30px rgba(236, 72, 47, .32);
  color: #fff;
  cursor: pointer;
  display: flex;
  font-size: 0;
  font-weight: 700;
  height: 46px;
  justify-content: center;
  min-width: 46px;
  padding: 0;
  position: relative;
  width: 46px;
}

.rg-site-chat__toggle::before {
  background-color: #fff;
  background-image:
    radial-gradient(circle at 7px 8px, #ec482f 0 1.5px, transparent 1.7px),
    radial-gradient(circle at 12px 8px, #ec482f 0 1.5px, transparent 1.7px),
    radial-gradient(circle at 17px 8px, #ec482f 0 1.5px, transparent 1.7px);
  border: 0;
  border-radius: 7px;
  content: '';
  height: 16px;
  position: absolute;
  width: 24px;
}

.rg-site-chat__toggle::after {
  border-right: 7px solid transparent;
  border-top: 7px solid #fff;
  bottom: 10px;
  content: '';
  height: 0;
  left: 12px;
  position: absolute;
  transform: rotate(8deg);
  width: 0;
}

.rg-site-chat__voice-logo,
.rg-site-chat__voice-ring { display: none; }

.rg-site-chat--voice-circle.rg-site-chat--open .rg-site-chat__panel { display: none; }
.rg-site-chat--voice-circle .rg-site-chat__toggle {
  display: flex;
  background: #fff;
  color: #ec482f;
  box-shadow: 0 10px 30px rgba(236, 72, 47, .19);
}
.rg-site-chat--voice-circle.rg-site-chat--voice-speaking .rg-site-chat__toggle {
  background: #ec482f;
  color: #fff;
}
.rg-site-chat--voice-circle .rg-site-chat__toggle::before,
.rg-site-chat--voice-circle .rg-site-chat__toggle::after { content: none; }
.rg-site-chat--voice-circle .rg-site-chat__voice-logo {
  display: block;
  width: 24px;
  height: 24px;
  fill: currentColor;
}
.rg-site-chat--voice-circle .rg-site-chat__voice-ring {
  display: block;
  position: absolute;
  inset: -1px;
  border: 1px solid #ec482f;
  border-radius: 50%;
  transform: scale(var(--ring-scale, 1));
  transition: transform 65ms ease-out;
  pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
  .rg-site-chat--voice-circle .rg-site-chat__voice-ring { transform: none; transition: none; }
}

.rg-site-chat__toggle:focus,
.rg-site-chat__close:focus,
.rg-site-chat__mini-expand:focus,
.rg-site-chat__mini-stop:focus,
.rg-site-chat__send:focus,
.rg-site-chat__attach:focus,
.rg-site-chat__mic:focus,
.rg-site-chat__voice-cancel:focus,
.rg-site-chat__document:focus,
.rg-site-chat__document-remove:focus,
.rg-site-chat__handoff-confirm:focus,
.rg-site-chat__handoff-decline:focus {
  outline: 3px solid rgba(236, 72, 47, .28);
  outline-offset: 2px;
}

.rg-site-chat__panel {
  background: #fff;
  border: 2px solid #ec482f;
  border-radius: 18px;
  bottom: 58px;
  box-shadow: 0 20px 56px rgba(236, 72, 47, .2);
  display: none;
  height: min(560px, calc(100vh - 120px));
  overflow: hidden;
  position: absolute;
  right: 0;
  width: 360px;
}

.rg-site-chat--open .rg-site-chat__panel {
  display: flex;
  flex-direction: column;
}

.rg-site-chat__header {
  --rg-chat-close-offset: 12px;
  --rg-chat-close-size: 40px;
  align-items: center;
  background: #ec482f;
  color: #fff;
  display: flex;
  justify-content: space-between;
  min-height: 68px;
  padding: 12px calc(var(--rg-chat-close-offset) + var(--rg-chat-close-size) + 6px) 12px 18px;
  flex: 0 0 auto;
  position: relative;
}

.rg-site-chat__header > div { flex: 1 1 auto; min-width: 0; }
.rg-site-chat__brand-row { align-items: flex-end; display: flex; gap: 9px; min-width: 0; }
.rg-site-chat__brand-copy { min-width: 0; }
.rg-site-chat__brand-logo {
  display: block;
  fill: currentColor;
  flex: 0 0 auto;
  height: 30px;
  width: 32px;
}

.rg-site-chat__header strong,
.rg-site-chat__header span {
  display: block;
}
.rg-site-chat__header .rg-site-chat__subtitle[hidden] { display: none; }
.rg-site-chat--mode-ai .rg-site-chat__header strong { line-height: 1; }

.rg-site-chat__header strong {
  font-size: 20px;
  line-height: 1.1;
}

.rg-site-chat__header span {
  font-size: 12px;
  margin-top: 3px;
  opacity: .88;
}

.rg-site-chat__close {
  background: transparent;
  border: 0;
  color: #fff;
  cursor: pointer;
  font-size: 28px;
  height: var(--rg-chat-close-size);
  line-height: 36px;
  padding: 0;
  position: absolute;
  right: var(--rg-chat-close-offset);
  top: var(--rg-chat-close-offset);
  width: var(--rg-chat-close-size);
}

.rg-site-chat__menu-toggle {
  flex: 0 0 32px;
  width: 32px;
  height: 40px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font: inherit;
  font-size: 24px;
  padding: 0;
}

.rg-site-chat__menu-toggle:focus-visible { outline: 2px solid #fff; }
.rg-site-chat__menu {
  position: absolute;
  z-index: 2;
  top: calc(100% - 3px);
  right: 14px;
  padding: 5px;
  border: 1px solid #eaeaea;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(18, 23, 31, .16);
}
.rg-site-chat__menu button {
  border: 0;
  border-radius: 6px;
  background: #fff;
  color: #282c32;
  cursor: pointer;
  font: inherit;
  padding: 9px 11px;
}
.rg-site-chat__menu button:disabled { opacity: .55; cursor: default; }
.rg-site-chat--product-mini .rg-site-chat__menu-toggle,
.rg-site-chat--product-mini .rg-site-chat__menu { display: none; }
.rg-site-chat__selection-divider {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 15px 0 10px;
  color: #666;
  font-size: 12px;
}
.rg-site-chat__selection-divider::before,
.rg-site-chat__selection-divider::after {
  content: '';
  flex: 1 1 auto;
  border-top: 1px solid #eaeaea;
}

.rg-site-chat__messages {
  background: #fff;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 14px 14px 14px 18px;
}

.rg-site-chat__welcome,
.rg-site-chat__message {
  background: #fff;
  border-radius: 13px 13px 13px 3px;
  box-shadow: 0 1px 3px rgba(18, 23, 31, .08);
  color: #282c32;
  font-size: 14px;
  line-height: 1.42;
  margin: 0 0 10px;
  max-width: 86%;
  overflow-wrap: anywhere;
  padding: 10px 12px;
  white-space: pre-wrap;
}

.rg-site-chat__message {
  background: #e3f0fa;
  border-radius: 12px 12px 12px 3px;
  box-shadow: none;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  padding: 8px 8px 4px;
  width: fit-content;
}

.rg-site-chat__message-row {
  align-items: flex-start;
  display: flex;
  gap: 8px;
  margin: 0 0 6px;
  width: 100%;
}

.rg-site-chat__message-row--visitor {
  justify-content: flex-end;
}

.rg-site-chat__message-stack {
  align-items: flex-start;
  display: flex;
  flex-direction: column;
  max-width: 86%;
  min-width: 0;
}

.rg-site-chat__message-row--visitor .rg-site-chat__message-stack {
  align-items: flex-end;
}

.rg-site-chat__message-row .rg-site-chat__message {
  margin-bottom: 0;
  max-width: 100%;
}

.rg-site-chat__avatar {
  align-items: center;
  background: #ec482f;
  border: 2px solid #fff;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(18, 23, 31, .14);
  color: #fff;
  display: flex;
  flex: 0 0 32px;
  font-size: 12px;
  font-weight: 700;
  height: 32px;
  justify-content: center;
  overflow: hidden;
  position: relative;
  width: 32px;
}

.rg-site-chat__avatar img {
  height: 100%;
  left: 0;
  object-fit: cover;
  position: absolute;
  top: 0;
  width: 100%;
}
.rg-site-chat__avatar--ai {
  background: #fff;
  border: 1px solid currentColor;
  box-shadow: none;
  color: var(--theme, #ec482f);
}
.rg-site-chat__avatar-logo { display: block; fill: currentColor; height: 17px; width: 17px; }

.rg-site-chat__message--visitor {
  background: #fce8e3;
  border-radius: 12px 12px 3px 12px;
  margin-left: 0;
}

.rg-site-chat__time {
  align-self: flex-end;
  color: #858b94;
  display: block;
  font-size: 11px;
  line-height: 14px;
  min-height: 14px;
  margin-top: 0;
  padding: 0;
  text-align: right;
}

.rg-site-chat__status {
  color: #6f7680;
  font-size: 12px;
  min-height: 18px;
  padding: 4px 14px 0;
}

.rg-site-chat__status:empty {
  display: none;
}

.rg-site-chat__status--error {
  color: #ad1016;
}

.rg-site-chat__status--connecting {
  align-items: center;
  display: flex;
  gap: 7px;
}

.rg-site-chat__status--connecting::before {
  animation: rg-site-chat-spin .75s linear infinite;
  border: 2px solid rgba(236, 72, 47, .24);
  border-top-color: #ec482f;
  border-radius: 50%;
  content: '';
  flex: 0 0 13px;
  height: 13px;
}

@keyframes rg-site-chat-spin {
  to { transform: rotate(360deg); }
}

.rg-site-chat--loading .rg-site-chat__status {
  align-items: center;
  display: flex;
  flex: 1;
  justify-content: center;
  min-height: 180px;
  padding: 24px;
  text-align: center;
}

.rg-site-chat__form {
  background: #fff;
  border-top: 1px solid rgba(236, 72, 47, .24);
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 10px;
}

.rg-site-chat [hidden] {
  display: none !important;
}

.rg-site-chat__header,
.rg-site-chat__form,
.rg-site-chat__name-form,
.rg-site-chat__status {
  flex-shrink: 0;
}

.rg-site-chat__name-form {
  display: grid;
  gap: 8px;
  padding: 2px 0 4px;
}

.rg-site-chat--needs-name .rg-site-chat__form {
  flex: 1;
  justify-content: center;
  padding: 20px;
}

.rg-site-chat__name-continue {
  background: #ec482f;
  border: 0;
  border-radius: 9px;
  color: #fff;
  cursor: pointer;
  font: inherit;
  min-height: 44px;
  padding: 10px 16px;
}

.rg-site-chat__name-continue:disabled {
  cursor: default;
  opacity: .5;
}

.rg-site-chat__name-form label {
  color: #282c32;
  font-size: 14px;
  font-weight: 700;
}

.rg-site-chat__schedule-label {
  color: #62666b;
  font-size: 14px;
  font-weight: 700;
  margin-top: 3px;
}

.rg-site-chat__schedule-label::after { color: var(--theme, #ec482f); content: ' *'; }

.rg-site-chat__schedule-input { cursor: pointer; }
.rg-site-chat__name-form .rg-site-chat__schedule-input { background: #fff; }
.rg-site-chat__schedule-input:disabled { cursor: default; opacity: .55; }
.rg-site-chat__schedule-native {
  height: 1px !important;
  left: -10000px;
  opacity: 0;
  pointer-events: none;
  position: fixed;
  top: 0;
  width: 1px !important;
}

.rg-site-chat__datetime-picker { z-index: 720 !important; }

.rg-site-chat__schedule-fallback {
  background: #fff;
  border: 1px solid rgba(236, 72, 47, .28);
  border-radius: 14px;
  bottom: 112px;
  box-shadow: 0 14px 40px rgba(18, 23, 31, .2);
  box-sizing: border-box;
  color: #282c32;
  font-family: Arial, sans-serif;
  max-height: min(410px, calc(100vh - 140px));
  overflow: auto;
  padding: 12px;
  position: fixed;
  right: 38px;
  width: 332px;
  z-index: 730;
}

.rg-site-chat__schedule-fallback[hidden] { display: none !important; }
.rg-site-chat__schedule-calendar-header { align-items: center; display: grid; grid-template-columns: 38px 1fr 38px; margin-bottom: 8px; }
.rg-site-chat__schedule-calendar-header strong { font-size: 14px; text-align: center; }
.rg-site-chat__schedule-calendar-header button,
.rg-site-chat__schedule-day,
.rg-site-chat__schedule-time {
  background: #fff;
  border: 0;
  border-radius: 9px;
  color: #282c32;
  cursor: pointer;
  font: inherit;
}
.rg-site-chat__schedule-calendar-header button { font-size: 28px; height: 36px; line-height: 30px; }
.rg-site-chat__schedule-calendar-header button:hover,
.rg-site-chat__schedule-calendar-header button:focus-visible,
.rg-site-chat__schedule-day:hover,
.rg-site-chat__schedule-day:focus-visible,
.rg-site-chat__schedule-time:hover,
.rg-site-chat__schedule-time:focus-visible { background: rgba(236, 72, 47, .11); outline: 2px solid rgba(236, 72, 47, .3); }
.rg-site-chat__schedule-weekdays,
.rg-site-chat__schedule-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 3px; }
.rg-site-chat__schedule-weekdays { color: #858b94; font-size: 11px; margin-bottom: 3px; text-align: center; }
.rg-site-chat__schedule-day { height: 36px; font-size: 13px; }
.rg-site-chat__schedule-day--outside { color: #aeb3ba; }
.rg-site-chat__schedule-day--selected { background: var(--theme, #ec482f); color: #fff; }
.rg-site-chat__schedule-calendar-header button:disabled,
.rg-site-chat__schedule-day:disabled,
.rg-site-chat__schedule-time:disabled { cursor: default; opacity: .28; }
.rg-site-chat__schedule-times { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.rg-site-chat__schedule-time { border: 1px solid #d7dbe0; min-height: 38px; font-size: 13px; }

body.rg-site-chat-stage-open { overflow: hidden; }
.rg-site-chat-stage {
  background: #fff;
  border: 0;
  height: 100vh;
  inset: 0;
  position: fixed;
  width: 100vw;
  z-index: 650;
}
.rg-site-chat-stage[hidden] { display: none !important; }

.rg-site-chat__name-form input {
  border: 1px solid #d7dbe0;
  border-radius: 9px;
  font: inherit;
  font-size: 16px;
  min-height: 42px;
  min-width: 0;
  padding: 9px 12px;
  width: 100%;
}

.rg-site-chat__telegram-panel button,
.rg-site-chat__telegram-link,
.rg-site-chat__telegram-button {
  border: 1px solid rgba(236, 72, 47, .35);
  border-radius: 9px;
  background: #fff;
  color: #a92c1a;
  cursor: pointer;
  font: inherit;
  font-size: 14px;
  line-height: 1.4;
  min-height: 42px;
  padding: 9px 12px;
  text-align: center;
  white-space: normal;
}

.rg-site-chat__telegram-link {
  background: #ec482f;
  color: #fff;
  text-decoration: none;
}

.rg-site-chat__name-status {
  color: #ad1016;
  font-size: 12px;
  overflow-wrap: anywhere;
}

.rg-site-chat__name-status:empty {
  display: none;
}

.rg-site-chat__name-form :focus-visible,
.rg-site-chat__telegram-panel :focus-visible,
.rg-site-chat__telegram-button:focus-visible,
.rg-site-chat__manager-choice:focus-visible {
  outline: 3px solid rgba(236, 72, 47, .28);
  outline-offset: 2px;
}

.rg-site-chat__telegram-button {
  width: 100%;
}

.rg-site-chat__telegram-panel {
  align-items: stretch;
  background: #fff5f5;
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 12px;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 14px;
}

.rg-site-chat__telegram-panel > * {
  flex-shrink: 0;
  margin: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
}

.rg-site-chat__telegram-panel strong {
  font-size: 17px;
}

.rg-site-chat__telegram-panel p {
  font-size: 14px;
  line-height: 1.45;
}

.rg-site-chat__telegram-panel .rg-site-chat__telegram-back {
  align-self: flex-start;
  background: transparent;
  border: 0;
  padding-left: 0;
  text-align: left;
}

.rg-site-chat__telegram-qr {
  align-self: center;
  background: #fff;
  max-width: 100%;
  padding: 12px;
  width: 224px;
}

.rg-site-chat__telegram-qr svg {
  display: block;
  height: auto;
  width: 100%;
}

.rg-site-chat__telegram-button:disabled {
  cursor: wait;
  opacity: .58;
}

.rg-site-chat__telegram-hint {
  color: #5b626c;
  font-size: 13px;
  line-height: 1.4;
  margin: 0;
}

.rg-site-chat__input {
  min-width: 0;
}

.rg-site-chat__controls {
  align-items: flex-end;
  display: flex;
  gap: 6px;
  width: 100%;
}

.rg-site-chat__file-input {
  height: 1px;
  left: -10000px;
  overflow: hidden;
  position: absolute;
  width: 1px;
}

.rg-site-chat__attach,
.rg-site-chat__emoji,
.rg-site-chat__mic {
  align-items: center;
  background: #f1f3f5;
  border: 0;
  border-radius: 50%;
  color: var(--theme, #ec482f);
  cursor: pointer;
  display: flex;
  flex: 0 0 42px;
  font-size: 20px;
  height: 42px;
  justify-content: center;
  padding: 0;
  width: 42px;
}

.rg-site-chat__document-preview {
  align-items: center;
  background: #fff5f5;
  border: 1px solid rgba(236, 72, 47, .24);
  border-radius: 10px;
  color: #3f454d;
  display: flex;
  font-size: 12px;
  gap: 8px;
  justify-content: space-between;
  padding: 7px 9px;
  width: 100%;
}

.rg-site-chat__document-preview[hidden] {
  display: none;
}

.rg-site-chat__document-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rg-site-chat__document-remove {
  background: transparent;
  border: 0;
  color: #ad1016;
  cursor: pointer;
  flex: 0 0 24px;
  font-size: 20px;
  height: 24px;
  padding: 0;
}

.rg-site-chat__input {
  border: 1px solid #d7dbe0;
  border-radius: 21px;
  flex: 1;
  font: inherit;
  font-size: 14px;
  line-height: 20px;
  height: 42px;
  max-height: 140px;
  min-height: 42px;
  overflow-y: hidden;
  padding: 10px 13px;
  resize: none;
}

.rg-site-chat__input:focus {
  border-color: #ec482f;
  outline: none;
}

.rg-site-chat__send {
  align-items: center;
  background: #f1f3f5;
  border: 0;
  border-radius: 50%;
  color: var(--theme, #ec482f);
  cursor: pointer;
  display: inline-flex;
  flex: 0 0 42px;
  font-size: 0;
  font-weight: 700;
  height: 42px;
  justify-content: center;
  min-height: 42px;
  padding: 0;
  width: 42px;
}

.rg-site-chat__send-icon {
  fill: currentColor;
  height: 20px;
  transform: none;
  width: 20px;
}

.rg-site-chat__send:disabled,
.rg-site-chat__attach:disabled,
.rg-site-chat__mic:disabled,
.rg-site-chat__voice-cancel:disabled,
.rg-site-chat__document:disabled,
.rg-site-chat__document-remove:disabled,
.rg-site-chat__input:disabled {
  opacity: .58;
}

.rg-site-chat__document {
  align-items: flex-start;
  background: rgba(255, 255, 255, .78);
  border: 1px solid rgba(236, 72, 47, .3);
  border-radius: 10px;
  color: #282c32;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-width: 100%;
  padding: 8px 10px;
  text-align: left;
}

.rg-site-chat__document::before {
  color: #ec482f;
  content: 'Документ';
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}

.rg-site-chat__document strong {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rg-site-chat__document span {
  color: #858b94;
  font-size: 11px;
}

@media (max-width: 700px) {
  .rg-site-chat__input {
    font-size: 16px;
  }

  .rg-site-chat {
    bottom: 84px;
    right: 12px;
  }

  .rg-site-chat__toggle {
    height: 44px;
    min-width: 44px;
    width: 44px;
  }

  .rg-site-chat__panel {
    bottom: 54px;
    height: min(520px, calc(100vh - 166px));
    max-width: calc(100vw - 24px);
    width: 350px;
  }

  .rg-site-chat__schedule-fallback {
    bottom: 92px;
    max-height: calc(100vh - 112px);
    right: 12px;
    width: min(350px, calc(100vw - 24px));
  }

}

@media (prefers-reduced-motion: reduce) {
  .rg-site-chat * {
    scroll-behavior: auto !important;
  }
  .rg-site-chat__status--connecting::before { animation: none; }
}

/* Overlay the indicator while keeping the native scrollbar's layout footprint. */
.rg-site-chat__message-viewport {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-height: 0;
  position: relative;
}

.rg-site-chat__messages--scroll-ready {
  scrollbar-color: transparent transparent;
}

.rg-site-chat__messages--scroll-ready::-webkit-scrollbar,
.rg-site-chat__messages--scroll-ready::-webkit-scrollbar-track,
.rg-site-chat__messages--scroll-ready::-webkit-scrollbar-thumb,
.rg-site-chat__messages--scroll-ready::-webkit-scrollbar-button,
.rg-site-chat__messages--scroll-ready::-webkit-scrollbar-corner {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
}

.rg-site-chat__scroll {
  bottom: 6px;
  cursor: pointer;
  outline: none;
  position: absolute;
  right: 0;
  top: 6px;
  touch-action: none;
  user-select: none;
  width: 14px;
  z-index: 2;
}

.rg-site-chat__scroll[hidden],
.rg-site-chat__scroll-preview[hidden] {
  display: none !important;
}

.rg-site-chat__scroll::before,
.rg-site-chat__scroll-active {
  background: repeating-linear-gradient(to bottom, rgba(66, 65, 60, .23) 0 2px, transparent 2px 9px);
  bottom: 0;
  pointer-events: none;
  position: absolute;
  right: 4px;
  top: 0;
  width: 6px;
}

.rg-site-chat__scroll::before { content: ''; }

.rg-site-chat__scroll-active {
  background: repeating-linear-gradient(to bottom, #ec482f 0 2px, transparent 2px 9px);
  -webkit-mask-image: linear-gradient(to bottom, transparent calc(var(--rg-chat-scroll-center) - 56px), #000 calc(var(--rg-chat-scroll-center) - 12px), #000 calc(var(--rg-chat-scroll-center) + 12px), transparent calc(var(--rg-chat-scroll-center) + 56px));
  mask-image: linear-gradient(to bottom, transparent calc(var(--rg-chat-scroll-center) - 56px), #000 calc(var(--rg-chat-scroll-center) - 12px), #000 calc(var(--rg-chat-scroll-center) + 12px), transparent calc(var(--rg-chat-scroll-center) + 56px));
}

.rg-site-chat__scroll:focus-visible {
  border-radius: 3px;
  outline: 1px solid #ec482f;
}

.rg-site-chat__scroll-preview {
  background: #fff;
  border: 1px solid rgba(236, 72, 47, .22);
  border-radius: 10px;
  box-shadow: 0 4px 18px rgba(18, 23, 31, .14);
  color: #282c32;
  font-size: 12px;
  line-height: 1.4;
  max-height: calc(100% - 8px);
  max-width: calc(100% - 36px);
  overflow: hidden;
  overflow-wrap: anywhere;
  padding: 9px 11px;
  pointer-events: none;
  position: absolute;
  right: 22px;
  width: 280px;
  z-index: 3;
}

.rg-site-chat__scroll-preview-author {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}
.rg-site-chat__scroll-preview-author .rg-site-chat__avatar {
  flex-basis: 28px;
  width: 28px;
  height: 28px;
}
.rg-site-chat__scroll-preview-author strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.rg-site-chat__scroll-preview-text {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* The public composer shares the dashboard control geometry and icon palette. */
.rg-site-chat__emoji-picker { position: relative; flex: 0 0 42px; height: 42px; align-self: flex-end; }
.rg-site-chat__control-icon { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.rg-site-chat__emoji-eye { fill: currentColor; stroke: none; }
.rg-site-chat__emoji:focus-visible,
.rg-site-chat__mic:focus-visible,
.rg-site-chat__voice-cancel:focus-visible { outline: 3px solid rgba(236,72,47,.28); outline-offset: 2px; }
.rg-site-chat__emoji:disabled { opacity: .58; }
.rg-site-chat__emoji-panel { position: absolute; right: -48px; bottom: calc(100% + 8px); z-index: 25; display: grid; width: min(280px, calc(100vw - 48px)); max-height: min(250px, calc(100vh - 220px)); grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 3px; overflow-y: auto; overscroll-behavior: contain; padding: 8px; border: 1px solid rgba(255,255,255,.08); border-radius: 16px; background: #253342; box-shadow: 0 12px 28px rgba(20,30,42,.32); }
.rg-site-chat__emoji-option { display: inline-flex; width: 100%; min-width: 0; height: 36px; align-items: center; justify-content: center; padding: 0; border: 0; border-radius: 9px; background: transparent; cursor: pointer; font: inherit; font-size: 24px; line-height: 1; }
.rg-site-chat__emoji-option:hover,
.rg-site-chat__emoji-option:focus-visible { background: rgba(255,255,255,.13); outline: none; }
.rg-site-chat__voice-panel { align-items: center; display: flex; gap: 10px; min-height: 42px; color: #525c68; font-size: 12px; line-height: 1.35; }
.rg-site-chat__mode-choice { display: flex; gap: 8px; }
.rg-site-chat__mode-choice[hidden] { display: none; }
.rg-site-chat__manager-choice { width: 100%; min-height: 42px; padding: 9px 13px; border: 1px solid var(--theme, #ec482f); border-radius: 12px; background: #fff; color: var(--theme, #ec482f); cursor: pointer; font: inherit; font-size: 13px; font-weight: 700; }
.rg-site-chat__manager-choice:disabled { cursor: default; opacity: .58; }
.rg-site-chat__mode-choice .rg-site-chat__manager-choice { background: var(--theme, #ec482f); color: #fff; }
.rg-site-chat__voice-panel strong { color: inherit; font-size: 13px; white-space: nowrap; }
.rg-site-chat__voice-panel span { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }
.rg-site-chat__voice-panel .rg-site-chat__mic { width: auto; min-width: 0; height: 42px; flex: 0 0 auto; gap: 8px; padding: 0 13px; border-radius: 12px; background: var(--theme, #ec482f); color: #fff; }
.rg-site-chat__voice-note-panel { align-items: center; justify-content: space-between; display: flex; gap: 8px; min-height: 30px; color: #525c68; font-size: 12px; }
.rg-site-chat__voice-note-panel[hidden] { display: none; }
.rg-site-chat__voice-note-panel span { min-width: 0; overflow-wrap: anywhere; }
.rg-site-chat__voice-cancel { flex: 0 0 auto; padding: 6px 10px; border: 0; border-radius: 12px; background: #f1f3f5; color: var(--theme, #ec482f); cursor: pointer; font: inherit; }
.rg-site-chat__send--recording { box-shadow: 0 0 0 2px rgba(236,72,47,.3); }
.rg-site-chat__mic--active { background: var(--theme, #ec482f); color: #fff; box-shadow: 0 0 0 3px rgba(236,72,47,.2); }
.rg-site-chat__message--ai { background: #f1f3f5; border: 1px solid rgba(236,72,47,.14); }
.rg-site-chat__message-row--ai .rg-site-chat__avatar { font-size: 10px; }
.rg-site-chat__message-row--products .rg-site-chat__avatar { margin-top: 24px; }
.rg-site-chat__product-stack { max-width: calc(100% - 40px); width: calc(100% - 40px); }
.rg-site-chat__product-heading { color: #282c32; font-size: 13px; line-height: 18px; margin-bottom: 6px; }
.rg-site-chat__product-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; width: 100%; }
.rg-site-chat__product-card { min-width: 0; overflow: hidden; border: 1px solid rgba(236,72,47,.24); border-radius: 12px; background: #fff; color: #282c32; text-decoration: none; transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease; }
.rg-site-chat__product-card:hover { border-color: var(--theme, #ec482f); box-shadow: 0 4px 12px rgba(18,23,31,.12); transform: translateY(-1px); }
.rg-site-chat__product-card:focus-visible { border-color: var(--theme, #ec482f); box-shadow: 0 0 0 3px rgba(236,72,47,.2); outline: none; }
.rg-site-chat__product-media { align-items: center; background: #f1f3f5; display: flex; height: 96px; justify-content: center; overflow: hidden; width: 100%; }
.rg-site-chat__product-media img { height: 100%; object-fit: cover; width: 100%; }
.rg-site-chat__product-body { display: flex; flex-direction: column; gap: 5px; min-width: 0; padding: 8px; }
.rg-site-chat__product-name { display: -webkit-box; min-height: 34px; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2; color: #282c32; font-size: 12px; line-height: 17px; }
.rg-site-chat__product-price { color: #62666b; font-size: 11px; line-height: 15px; }
.rg-site-chat__handoff { width: min(94%, 330px); margin: 0 0 10px 40px; padding: 12px; border: 1px solid rgba(236,72,47,.3); border-radius: 13px; background: #fff5f5; color: #282c32; }
.rg-site-chat__handoff strong { display: block; margin-bottom: 7px; font-size: 14px; }
.rg-site-chat__handoff p { max-height: 150px; margin: 0 0 10px; overflow-y: auto; white-space: pre-wrap; overflow-wrap: anywhere; color: #525c68; font-size: 12px; line-height: 1.4; }
.rg-site-chat__handoff-actions { display: flex; flex-wrap: wrap; gap: 7px; }
.rg-site-chat__handoff-confirm,
.rg-site-chat__handoff-decline { min-height: 38px; padding: 8px 11px; border-radius: 9px; cursor: pointer; font: inherit; font-size: 12px; }
.rg-site-chat__handoff-confirm { border: 0; background: var(--theme, #ec482f); color: #fff; }
.rg-site-chat__handoff-decline { border: 1px solid rgba(236,72,47,.3); background: #fff; color: #a92c1a; }
.rg-site-chat__handoff--resolved { opacity: .78; }
.rg-site-chat__handoff--resolved p,
.rg-site-chat__handoff--resolved .rg-site-chat__handoff-actions { display: none; }
.rg-site-chat--mode-ai .rg-site-chat__message-row--human-chat,
.rg-site-chat--mode-human .rg-site-chat__message-row--ai-chat { display: none; }
.rg-site-chat__voice { display: block; max-width: 100%; width: 250px; height: 42px; }
.rg-site-chat__voice-title { display: block; font-size: 12px; }

.rg-site-chat__mini { display: none; }
.rg-site-chat--site-stage:not(.rg-site-chat--product-mini) .rg-site-chat__mini {
  display: block;
  padding: 8px 14px;
  border-bottom: 1px solid rgba(236,72,47,.14);
}
.rg-site-chat--site-stage:not(.rg-site-chat--product-mini) .rg-site-chat__mini-status { display: none; }
.rg-site-chat--product-mini .rg-site-chat__panel {
  bottom: 0;
  height: auto;
  min-height: 0;
  max-height: none;
  width: 240px;
}
.rg-site-chat--product-mini .rg-site-chat__toggle { display: none; }
.rg-site-chat--product-mini .rg-site-chat__header {
  --rg-chat-close-offset: 9px;
  --rg-chat-close-size: 36px;
  min-height: 62px;
  padding: 12px calc(var(--rg-chat-close-offset) + var(--rg-chat-close-size) + 3px) 10px 14px;
  position: relative;
}
.rg-site-chat--product-mini .rg-site-chat__brand-logo {
  height: 27px;
  width: 29px;
}
.rg-site-chat--product-mini .rg-site-chat__header strong {
  font-size: 16px;
  line-height: 18px;
}
.rg-site-chat--product-mini .rg-site-chat__subtitle {
  font-size: 11px;
  line-height: 14px;
  margin-top: 2px;
}
.rg-site-chat--product-mini .rg-site-chat__close {
  font-size: 24px;
  line-height: 34px;
}
.rg-site-chat--product-mini .rg-site-chat__message-viewport,
.rg-site-chat--product-mini .rg-site-chat__telegram-panel,
.rg-site-chat--product-mini .rg-site-chat__status,
.rg-site-chat--product-mini .rg-site-chat__form,
.rg-site-chat--product-mini .rg-site-chat__panel > audio {
  display: none !important;
}
.rg-site-chat--product-mini .rg-site-chat__mini {
  display: block;
  padding: 14px 16px 16px;
}
.rg-site-chat__mini-status {
  align-items: center;
  color: #404548;
  display: flex;
  font-size: 13px;
  gap: 8px;
  line-height: 18px;
  margin-bottom: 12px;
}
.rg-site-chat__mini-status > span:nth-child(2) {
  flex: 1 1 auto;
  min-width: 0;
}
.rg-site-chat__mini-dot {
  background: var(--theme, #ec482f);
  border-radius: 50%;
  flex: 0 0 8px;
  height: 8px;
  width: 8px;
}
.rg-site-chat__mini-stop {
  align-items: center;
  background: transparent;
  border: 1px solid rgba(236,72,47,.3);
  border-radius: 9px;
  color: var(--theme, #ec482f);
  cursor: pointer;
  display: inline-flex;
  flex: 0 0 30px;
  height: 30px;
  justify-content: center;
  padding: 0;
  width: 30px;
}
.rg-site-chat__mini-stop[hidden] { display: none; }
.rg-site-chat__mini-stop span {
  background: currentColor;
  border-radius: 2px;
  display: block;
  height: 10px;
  width: 10px;
}
.rg-site-chat__mini-expand {
  background: #1b1d1f;
  border: 0;
  border-radius: 12px;
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  min-height: 42px;
  width: 100%;
}
@media (max-width: 800px) {
  .rg-site-chat__attach, .rg-site-chat__emoji, .rg-site-chat__send { flex-basis: 40px; width: 40px; height: 40px; min-height: 40px; }
  .rg-site-chat__emoji-panel { right: -46px; }
  .rg-site-chat__emoji-picker { flex-basis: 40px; width: 40px; height: 40px; }
  .rg-site-chat__input { height: 40px; min-height: 40px; padding-top: 9px; padding-bottom: 9px; }
  .rg-site-chat__handoff { width: calc(100% - 34px); margin-left: 34px; }
  .rg-site-chat__product-stack { max-width: calc(100% - 36px); width: calc(100% - 36px); }
  .rg-site-chat__product-media { height: 88px; }
  .rg-site-chat--product-mini .rg-site-chat__panel { max-width: calc(100vw - 24px); width: 240px; }
}

@media (min-width: 1280px) {
  .page-footer > .footer__inner,
  .page-footer > .footer__bottom {
    max-width: var(--rg-shell-width);
    padding-inline: var(--rg-shell-gutter);
  }

  .page-footer .footer-copyright {
    padding-inline-end: 68px;
  }

  .rg-site-chat {
    right: calc((100% - var(--rg-shell-width)) / 2 + var(--rg-shell-gutter) + 6px);
  }
}
