/* Floating employee chat. The module is independent from role workspaces. */

.chat-widget {
  position: fixed;
  right: max(var(--space-6), env(safe-area-inset-right));
  bottom: max(var(--space-6), env(safe-area-inset-bottom));
  z-index: 1500;

  font-size: 15px;
  color: var(--ink);
}

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

.chat-widget *,
.chat-widget *::before,
.chat-widget *::after {
  box-sizing: border-box;
}

.chat-widget svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
  stroke: none;
}

.chat-launcher {
  position: relative;
  width: var(--portal-fab-size);
  height: var(--portal-fab-size);
  display: grid;
  margin-left: auto;
  padding: 0;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 50%;
  background: var(--red);
  color: #fff;
  box-shadow: 0 16px 34px rgba(141, 11, 23, 0.28);
  cursor: pointer;
  transition: transform var(--motion-fast);
}

.chat-launcher:active { transform: scale(.94); }

.chat-launcher:focus-visible,
.chat-icon-button:focus-visible,
.chat-conversation-row:focus-visible,
.chat-person-row:focus-visible,
.chat-send-button:focus-visible,
.chat-attach-button:focus-visible,
.chat-message__attachment:focus-visible,
.chat-load-older:focus-visible,
.chat-load-conversations:focus-visible,
.chat-compose-switch button:focus-visible {
  outline: var(--focus-ring-width) solid var(--focus-ring);
  outline-offset: 2px;
}

.chat-widget--open .chat-launcher {
  visibility: hidden;
  pointer-events: none;
}

.chat-launcher__icon {
  display: grid;
  place-items: center;
}

.chat-launcher__icon svg {
  width: var(--portal-fab-icon-size);
  height: var(--portal-fab-icon-size);
}

.chat-launcher__badge {
  position: absolute;
  top: -3px;
  right: -3px;
  border: 2px solid var(--card-surface);
}

.chat-panel {
  position: absolute;
  right: 0;
  bottom: 0;

  width: min(760px, calc(100vw - 48px));

  height: min(640px, calc(100dvh - 48px));
  min-height: 440px;
  overflow: hidden;
  border: 1px solid var(--line-strong);

  border-radius: var(--chat-radius);
  background: var(--card-surface);

  box-shadow: 0 20px 65px rgba(16, 24, 39, .2);
}

body.theme-dark .chat-panel {
  box-shadow: 0 28px 74px rgba(0, 0, 0, 0.44);
}

.chat-panel__topbar {
  position: absolute;
  z-index: 20;

  height: 64px;
  display: flex;

  padding: 0 12px 0 18px;
  align-items: center;
  justify-content: space-between;

  border-bottom: 0;

  background: var(--card-surface);

  backdrop-filter: none;

  left: 0;

  top: 0;

  width: 260px;
}

.chat-panel__brand {
  min-width: 0;
  display: flex;
  align-items: center;

  gap: 0;
}

.chat-panel__controls {
  display: flex;
  align-items: center;
  gap: 4px;
}

.chat-preferences {
  /* Anchor to the sidebar header, not its rightmost 44 px button. */
  position: static;
}

.chat-preferences > summary {
  list-style: none;
}

.chat-preferences > summary::-webkit-details-marker {
  display: none;
}

.chat-preferences__menu {
  position: absolute;
  z-index: 12;
  top: calc(100% + 8px);
  left: 12px;
  right: auto;

  width: min(320px, calc(100vw - 72px));
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line-strong);
  border-radius: 15px;
  background: var(--card-surface);
  box-shadow: 0 18px 48px rgba(16, 24, 39, 0.2);
  max-height: min(552px, calc(100dvh - 136px));
  overflow-y: auto;
  overscroll-behavior: contain;
}

.chat-preferences__menu > strong {
  font-size: 13px;
  font-weight: 500;
}

.chat-preferences__menu label {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--ink);
  font-size: 13px;
  min-height: 40px;
  cursor: pointer;
}



.chat-preferences__menu small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.chat-panel__brand-icon {
  width: 40px;
  height: 40px;

  display: none;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 12px;
  background: var(--red-soft);
  color: var(--red);
}

.chat-panel__brand-icon svg {
  width: 20px;
  height: 20px;
}

.chat-panel__brand > div {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.chat-panel__brand strong,
.chat-new-panel__header strong {
  font-size: 15px;
  font-weight: 500;
}

.chat-connection {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: var(--type-caption);
  line-height: 1.25;
}

.chat-connection::before {
  width: 7px;
  height: 7px;
  content: "";
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--warning);
}

.chat-widget[data-connection="online"] .chat-connection::before {
  background: var(--success);
}

.chat-widget[data-connection="offline"] .chat-connection::before {
  background: var(--danger);
}

.chat-icon-button,
.chat-send-button {
  width: 40px;

  height: 40px;
  display: grid;
  flex: 0 0 auto;
  padding: 0;
  place-items: center;
  border: 1px solid transparent;

  border-radius: 10px;

  background: transparent;

  color: var(--chat-icon);
  cursor: pointer;
  transition: color var(--motion-fast), background var(--motion-fast), border-color var(--motion-fast);
  border-color: transparent;
}

.chat-icon-button:hover {
  border-color: var(--line);
  background: var(--surface-2);
  color: var(--ink);
}

.chat-icon-button--accent {
  border-color: transparent;

  background: transparent;

  color: var(--chat-icon);
}

.chat-panel__body {
  position: relative;

  height: 100%;
  min-width: 0;
  display: grid;

  grid-template-columns: 260px minmax(0, 1fr);
}

.chat-sidebar {
  min-width: 0;
  overflow: hidden;
  border-right: 1px solid var(--line);

  background: var(--card-surface);
  display: flex;
  flex-direction: column;

  padding-top: 64px;
}

.chat-sidebar__toolbar {
  height: 58px;
  display: flex;

  padding: 4px 12px 10px;
  align-items: center;

  gap: 4px;

  border-bottom: 0;
  flex: 0 0 auto;
}

.chat-search {
  min-width: 0;
  min-height: 40px;
  display: flex;
  flex: 1 1 auto;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  border: 1px solid var(--line);

  border-radius: 10px;

  background: var(--surface-2);
  color: var(--muted);
  transition: border-color var(--motion-fast), box-shadow var(--motion-fast), background var(--motion-fast);

  border-color: transparent;
}

.chat-search:focus-within {
  border-color: var(--focus-border);
}

.chat-search__icon {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
}

.chat-search__icon svg {
  width: 18px;
  height: 18px;
}

.chat-search input,
.chat-group-title input {
  width: 100%;
  min-width: 0;
  height: 38px;
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
}

.chat-search input:focus,
.chat-search input:focus-visible {
  outline: 0;
  box-shadow: none;
  background: transparent;
}

.chat-search:has(input:focus-visible) {
  outline: var(--focus-ring-width) solid var(--focus-ring);
  outline-offset: 2px;
}

.chat-search input::placeholder,
.chat-group-title input::placeholder,
.chat-composer textarea::placeholder {
  color: var(--muted);
  opacity: 0.85;
}

.chat-conversation-list,
.chat-people-list {
  height: auto;
  overflow: auto;
  overscroll-behavior: contain;
  min-height: 0;
  flex: 1 1 auto;
}

.chat-conversation-row,
.chat-person-row {
  position: relative;
  width: 100%;
  min-width: 0;

  min-height: 74px;
  display: flex;

  padding: 10px 12px;
  align-items: center;
  gap: 10px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  transition: background var(--motion-fast), box-shadow var(--motion-fast);
}

.chat-conversation-row:hover,
.chat-person-row:hover {
  background: var(--surface-2);
}

.chat-person-row--self {
  cursor: default;
  background: var(--surface-2);
}

.chat-person-row--self:hover {
  background: var(--surface-2);
}

.chat-conversation-row.is-active {
  background: var(--blue-soft);
  box-shadow: none;
}

.chat-conversation-row.has-mention::after {
  position: absolute;
  top: 12px;
  right: 10px;
  width: 7px;
  height: 7px;
  content: "";
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 0 3px var(--red-soft);
}

.chat-avatar {
  width: 42px;
  height: 42px;
  display: inline-grid;
  flex: 0 0 auto;
  overflow: hidden;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: var(--chat-avatar-bg);
  color: #fff;
  font-size: 12px;
  font-weight: 500;
}

.chat-avatar img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.chat-avatar--group {
  background: var(--chat-avatar-bg);
  color: #fff;
}

.chat-avatar--group svg {
  width: 21px;
  height: 21px;
}

.chat-conversation-row__content {
  min-width: 0;
  display: grid;
  flex: 1 1 auto;
  gap: 6px;
}

.chat-conversation-row__heading,
.chat-conversation-row__preview {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.chat-conversation-row__heading strong,
.chat-person-row__text strong {
  min-width: 0;
  overflow: hidden;

  font-size: 15px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-conversation-row__heading time {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 12px;
}

.chat-conversation-row__preview > span {
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-unread {
  flex: 0 0 auto;
}

.chat-list-empty {
  min-height: 170px;
  display: flex;
  padding: 24px 20px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--muted);
  text-align: center;
}

.chat-list-empty strong {
  font-weight: 500;
  color: var(--ink);
  font-size: 13px;
}

.chat-list-empty span {
  max-width: 250px;
  font-size: 11px;
  line-height: 1.45;
}

.chat-list-empty .c-button {
  margin-top: 6px;
}

.chat-conversation {
  min-width: 0;
  min-height: 0;

  background: var(--chat-wall);
}

.chat-conversation__empty {
  width: 100%;
  height: 100%;
  display: flex;
  padding: 30px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 9px;
  color: var(--muted);
  text-align: center;
}

.chat-conversation__empty strong {
  font-weight: 500;
  margin-top: 7px;
  color: var(--ink);
  font-size: 15px;
}

.chat-conversation__empty > span:last-child {
  max-width: 310px;
  font-size: 12px;
  line-height: 1.55;
}

.chat-empty-illustration {
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: var(--surface-2);
  color: var(--muted);
}

.chat-empty-illustration svg {
  width: 34px;
  height: 34px;
}

.chat-conversation__content {
  height: 100%;
  min-height: 0;
  display: grid;

  grid-template-rows: 64px auto auto minmax(0, 1fr) auto;
  position: relative;
}

.chat-conversation__header {
  position: relative;
  z-index: 10;
  min-width: 0;
  display: flex;

  padding: 8px 48px 8px 12px;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid var(--line);

  background: var(--card-surface);
}

.chat-inline-search { grid-row: 2; display: flex; align-items: center; gap: 2px; min-width: 0; padding: 4px 8px; border-bottom: 1px solid var(--line); background: var(--card-surface); }
.chat-inline-search__field { display: flex; flex: 1; align-items: center; min-width: 0; height: 36px; padding: 0 10px; gap: 7px; border-radius: 20px; background: var(--surface-2); color: var(--muted); }
.chat-inline-search__icon { display: flex; flex: 0 0 auto; }
.chat-inline-search__icon svg { width: 18px; height: 18px; }
.chat-inline-search__field input { width: 100%; min-width: 0; min-height: 0; height: 36px; max-height: 36px; padding: 0; border: 0; border-radius: 0; box-shadow: none; background: transparent; color: var(--ink); font: inherit; font-size: 16px; }
.chat-inline-search__field input::placeholder { color: var(--muted); opacity: 1; }
.chat-inline-search__field input::-webkit-search-cancel-button { display: none; }
.chat-inline-search__navigation { display: flex; align-items: center; flex: 0 0 auto; gap: 0; }
.chat-inline-search__count { min-width: 28px; padding: 0 2px; color: var(--muted); font-size: 12px; font-weight: 400; text-align: center; white-space: nowrap; }
.chat-inline-search > button, .chat-inline-search__navigation > button { flex: 0 0 40px; }
.chat-inline-search .chat-icon-button:disabled { opacity: .35; cursor: default; }
.chat-message.is-search-match .chat-message__bubble { box-shadow: 0 0 0 2px var(--chat-accent); }

.chat-conversation__avatar {
  width: 40px;
  height: 40px;
}

.chat-conversation__identity {
  min-width: 0;
  flex: 1 1 auto;
  display: grid;
  gap: 3px;
}

.chat-conversation__identity strong {
  overflow: hidden;
  font-size: 15px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-conversation__identity span {
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-conversation-actions {
  position: relative;
  flex: 0 0 auto;
}

.chat-conversation-actions > summary {
  list-style: none;
}

.chat-conversation-actions > summary::-webkit-details-marker {
  display: none;
}

.chat-conversation-actions__menu {
  overscroll-behavior: contain;
  position: absolute;
  z-index: 8;
  top: calc(100% + 8px);
  right: 0;
  width: min(320px, calc(100vw - 32px));
  max-height: min(520px, calc(100vh - 170px));
  overflow: auto;
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  background: var(--card-surface);
  box-shadow: 0 18px 48px rgba(16, 24, 39, 0.2);
}

.chat-dialog.chat-dialog--group { width: min(440px, calc(100vw - 24px)); }
.chat-group-profile { display: grid; justify-items: center; gap: 6px; padding: 8px 0 20px; border-bottom: 1px solid var(--line); }
.chat-group-profile .chat-avatar { width: 64px; height: 64px; margin-bottom: 6px; }
.chat-group-profile .chat-avatar svg { width: 28px; height: 28px; }
.chat-group-profile strong { max-width: 100%; overflow-wrap: anywhere; font-size: 16px; font-weight: 500; text-align: center; }
.chat-group-profile > span:last-child { font-size: 13px; color: var(--muted); }
.chat-section-title { margin: 4px 0 0; color: var(--muted); font-size: 12px; font-weight: 400; }
.chat-conversation-members { display: grid; gap: 0; }
.chat-conversation-member { min-width: 0; display: flex; align-items: center; gap: 12px; min-height: 64px; padding: 8px 0; }
.chat-conversation-member + .chat-conversation-member { border-top: 1px solid var(--line); }
.chat-conversation-member .chat-person-row__text { flex: 1; }
.chat-conversation-member .chat-person-row__text strong { white-space: normal; overflow-wrap: anywhere; font-size: 14px; }
.chat-conversation-member__remove { flex: 0 0 auto; width: auto !important; padding: 8px !important; font-size: 12px !important; }
.chat-group-form { display: grid; gap: 20px; }
.chat-group-form > label { flex-direction: column; align-items: stretch; gap: 8px; color: var(--muted); font-size: 13px; }
.chat-member-picker { max-height: min(360px, 45dvh); min-height: 100px; overflow-y: auto; }
.chat-member-picker .chat-person-row { padding: 10px 0; }
.chat-member-picker .chat-person-row__text strong { font-size: 14px; }
.chat-member-picker__empty { padding: 20px 8px; color: var(--muted); text-align: center; font-size: 14px; }
.chat-dialog-footer { display: flex; justify-content: flex-end; align-items: center; gap: 8px; padding-top: 12px; border-top: 1px solid var(--line); }
.chat-dialog-footer > button { width: auto; padding: 10px 18px; font-size: 14px; }
.chat-primary-button { border: 0; border-radius: 10px; background: var(--chat-action); color: #fff; font: inherit; font-weight: 400; cursor: pointer; }
.chat-primary-button:disabled { opacity: .45; cursor: default; }

.chat-conversation-actions__button {
  width: 100%;
  min-height: 40px;
  padding: 8px 12px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 14px;
  font-weight: 400;
  text-align: left;
  cursor: pointer;
}

.chat-conversation-actions__button:hover {
  background: var(--surface-2);
}

.chat-conversation-actions__button.is-danger {
  color: var(--danger);
}

.chat-mobile-back {
  display: none;
}

.chat-message-scroller {
  min-height: 0;
  overflow: auto;
  padding: 12px 16px 18px;
  overscroll-behavior: contain;

  background: var(--chat-wall);

  background-size: auto;
  grid-row: 4;
  overflow-anchor: none;
}

.chat-load-older {
  display: block;
  margin: 0 auto 14px;
  padding: 7px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--card-surface);
  color: var(--blue);
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}

.chat-load-conversations {
  width: calc(100% - 24px);
  min-height: 36px;
  display: block;
  margin: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--card-surface);
  color: var(--blue);
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}

.chat-load-conversations:disabled {
  opacity: 0.55;
  cursor: wait;
}

.chat-message-list {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 6px;
}

.chat-date-separator {
  align-self: center;
  margin: 8px 0;
  padding: 5px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel-strong);
  color: var(--muted);
  font-size: 12px;
}

.chat-unread-separator {
  display: flex;
  align-items: center;
  gap: 12px;
  align-self: stretch;
  margin: 10px 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
  line-height: 20px;
  white-space: nowrap;
}

.chat-unread-separator::before,
.chat-unread-separator::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

.chat-message {
  max-width: min(82%, 430px);
  display: flex;
  align-items: flex-end;
  gap: 7px;
}

.chat-message--own {
  align-self: flex-end;
}

.chat-message:not(.chat-message--own) {
  align-self: flex-start;
}

.chat-message .chat-avatar,
.chat-message__avatar-spacer {
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  font-size: 12px;
}

.chat-message__bubble {
  min-width: 70px;

  padding: 10px 12px 7px;

  border: 0;

  border-radius: var(--chat-radius) var(--chat-radius) var(--chat-radius) 5px;
  background: var(--card-surface);

  box-shadow: 0 1px 1px rgba(0, 0, 0, .07);
  position: relative;
}

@media (hover: none) and (pointer: coarse) {
  .chat-message__bubble {
    -webkit-touch-callout: none;
  }
}

.chat-message--own .chat-message__bubble {
  border-color: transparent;
  border-radius: 15px 15px 5px;

  background: var(--chat-outgoing);

  color: var(--chat-outgoing-ink);
}

.chat-message.is-pending .chat-message__bubble {
  opacity: 0.76;
}

.chat-message.is-failed .chat-message__bubble {
  border-color: rgba(210, 58, 58, 0.38);
}

.chat-message.is-highlighted .chat-message__bubble {
  animation: chat-message-highlight 1.4s ease;
}

.chat-message.is-mention .chat-message__bubble {
  border-color: rgba(227, 5, 18, 0.34);
  box-shadow: 0 8px 22px rgba(141, 11, 23, 0.1);
}

.chat-message__reply-preview {
  width: 100%;
  display: grid;
  gap: 2px;
  margin: 0 0 7px;
  padding: 5px 7px;
  border: 0;
  border-left: 2px solid currentColor;
  border-radius: 5px;
  background: rgba(83, 113, 154, 0.1);
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.chat-message__reply-preview strong,
.chat-message__reply-preview span {
  overflow: hidden;
  font-size: 12px;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-message__reply-preview span {
  opacity: 0.76;
}

.chat-message__author {
  display: block;
  margin-bottom: 3px;
  color: var(--blue);

  font-size: 13px;
  font-weight: 500;
}

.chat-message__bubble p {
  margin: 0;
  overflow-wrap: anywhere;

  font-size: var(--chat-message-size);

  line-height: 1.45;
  white-space: pre-wrap;
}

.chat-message__bubble p.chat-message__deleted {
  opacity: 0.68;
  font-style: italic;
}

.chat-message__attachment {
  width: 100%;
  min-width: 0;
  display: flex;
  margin-top: 7px;
  padding: 7px;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(102, 126, 161, 0.22);
  border-radius: 10px;
  background: rgba(102, 126, 161, 0.1);
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.chat-message__attachments {
  display: grid;
  gap: var(--space-2);
}

.chat-message__attachments--album {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.chat-message__attachments--album .chat-message__attachment {
  min-width: 0;
}

.chat-system-event {
  justify-self: center;
  max-width: min(90%, 560px);
  padding: var(--space-2) var(--space-4);
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
  text-align: center;
}

.chat-message__attachment > span:first-child {
  width: 30px;
  height: 30px;
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.52);
}

.chat-message__attachment svg {
  width: 17px;
  height: 17px;
}

.chat-message__attachment > span:last-child {
  min-width: 0;
  display: grid;
  gap: 1px;
}

.chat-message__attachment strong,
.chat-message__attachment small {
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-message__attachment small {
  opacity: 0.7;
}

.chat-message__attachment:disabled {
  opacity: 0.55;
  cursor: wait;
}

.chat-message__meta {
  display: flex;
  margin-top: 4px;
  align-items: center;
  justify-content: flex-end;
  color: var(--muted);

  font-size: 11px;
  line-height: 1.2;
  gap: 3px;
  flex-wrap: wrap;
  min-height: 18px;
}

.chat-message--own .chat-message__meta {
  color: var(--chat-outgoing-meta);
}

.chat-message__meta button {
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-decoration: underline;
  cursor: pointer;
}

.chat-message__actions {
  display: flex;

  margin-top: 0;
  justify-content: flex-end;
  gap: 8px;
  position: absolute;
  top: -8px;
  right: -14px;
  z-index: 1;
}

.chat-message__actions button {
  padding: 0;

  border: 1px solid var(--line);

  background: var(--card-surface);

  color: var(--muted);
  font: inherit;
  font-size: 12px;
  opacity: 0.7;
  cursor: pointer;
  min-width: 40px;
  min-height: 40px;
  border-radius: 50%;
}

.chat-message__actions button:hover {
  opacity: 1;
  text-decoration: underline;
}

.chat-read-receipts__content {
  width: min(440px, calc(100vw - 32px));
}

.chat-read-receipts__list {
  display: grid;
  gap: var(--space-2);
}

.chat-read-receipt {
  display: grid;
  min-width: 0;
  padding: var(--space-2);
  align-items: center;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: var(--space-3);
  border-bottom: 1px solid var(--line);
}

.chat-read-receipt:last-child {
  border-bottom: 0;
}

.chat-read-receipt__status {
  color: var(--muted);
  font-weight: 500;
  letter-spacing: -0.18em;
}

.chat-read-receipt__status.is-read {
  color: var(--success);
}

.chat-message__reactions {
  display: flex;
  flex-wrap: wrap;
  margin-top: 6px;
  gap: 4px;
}

.chat-message__reactions button {
  min-width: 34px;
  height: 25px;
  display: inline-flex;
  padding: 2px 7px;
  align-items: center;
  justify-content: center;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel-strong);
  color: var(--ink);
  font: inherit;
  cursor: pointer;
}

.chat-message--own .chat-message__reactions button {
  border-color: var(--line);

  background: var(--card-surface);

  color: var(--chat-outgoing-ink);
}

.chat-message__reactions button.is-active {
  border-color: var(--red);
  background: var(--red-soft);
  color: var(--red);
}

.chat-message--own .chat-message__reactions button.is-active {
  border-color: rgba(255, 255, 255, 0.72);
  background: rgba(255, 255, 255, 0.92);
  color: var(--red);
}

.chat-message__reactions span {
  font-size: 14px;
  line-height: 1;
}

.chat-message__reactions strong {
  font-size: 12px;
  line-height: 1;
}

.chat-message__reactions button:disabled {
  opacity: 0.62;
  cursor: wait;
}

.chat-reaction-picker {
  position: absolute;
  z-index: 35;

  display: grid;
  padding: 6px;

  gap: 0;
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  background: var(--card-surface);
  box-shadow: 0 16px 42px rgba(16, 24, 39, 0.24);

  grid-template-columns: repeat(7, 40px);
  max-height: min(620px, calc(100dvh - 90px));
  overflow-y: auto;

  width: min(322px, calc(100vw - 24px));
}

.chat-reaction-picker button[data-chat-picker-reaction] {
  width: 42px;
  height: 42px;
  display: grid;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 11px;
  background: transparent;
  font-size: 23px;
  line-height: 1;
  cursor: pointer;
  transition: background var(--motion-fast), transform var(--motion-fast);
}

.chat-reaction-picker button:hover {
  background: var(--surface-2);
  transform: translateY(-2px);
}

.chat-reaction-picker button:focus-visible {
  outline: var(--focus-ring-width) solid var(--focus-ring);
  outline-offset: 2px;
  background: var(--surface-2);
  transform: translateY(-2px);
}

.chat-reaction-picker button.is-active {
  background: var(--red-soft);
}

.chat-composer {
  min-height: 68px;
  display: flex;
  flex-wrap: wrap;

  padding: 10px 12px;
  align-items: flex-end;

  gap: 4px;
  border-top: 1px solid var(--line);

  background: var(--card-surface);
  grid-row: 5;
  position: relative;
}

.chat-composer-context {
  min-width: 0;
  display: flex;
  flex: 1 0 100%;
  align-items: center;
  gap: 8px;
  padding: 6px 8px 6px 10px;
  border-left: 3px solid var(--blue);
  border-radius: 7px;
  background: var(--surface-2);
}

.chat-composer-context > div {
  min-width: 0;
  display: grid;
  flex: 1 1 auto;
  gap: 1px;
}

.chat-composer-context strong,
.chat-composer-context span {
  overflow: hidden;
  font-size: 12px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-composer-context span {
  color: var(--muted);
}

.chat-composer-context button {
  width: 28px;
  height: 28px;
  display: grid;
  flex: 0 0 auto;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.chat-composer-context button:hover {
  background: var(--card-surface);
  color: var(--ink);
}

.chat-composer-context svg {
  width: 15px;
  height: 15px;
}

.chat-attachment-draft {
  min-width: 0;
  display: flex;
  flex: 1 0 100%;
  padding: 8px 9px;
  align-items: center;
  gap: 9px;
  border: 1px solid rgba(25, 87, 173, 0.3);
  border-radius: 11px;
  background: rgba(25, 87, 173, 0.08);
}

.chat-attachment-draft.is-failed {
  border-color: rgba(210, 58, 58, 0.42);
  background: rgba(210, 58, 58, 0.08);
}

.chat-attachment-draft__icon {
  width: 34px;
  height: 34px;
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 9px;
  background: var(--card-surface);
  color: var(--blue);
}

.chat-attachment-draft__icon svg {
  width: 18px;
  height: 18px;
}

.chat-attachment-draft > div {
  min-width: 0;
  display: grid;
  flex: 1 1 auto;
  gap: 2px;
}

.chat-attachment-draft strong,
.chat-attachment-draft span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-attachment-draft strong {
  font-size: 12px;
}

.chat-attachment-draft > div span {
  color: var(--muted);
  font-size: 12px;
}

.chat-attachment-draft.is-failed > div span {
  color: var(--danger, #b3261e);
}

.chat-attachment-draft > button {
  width: 30px;
  height: 30px;
  display: grid;
  flex: 0 0 auto;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.chat-attachment-draft > button:hover {
  background: var(--card-surface);
  color: var(--ink);
}

.chat-attachment-draft > button:disabled {
  opacity: 0.5;
  cursor: wait;
}

.chat-attachment-draft > button svg {
  width: 15px;
  height: 15px;
}

.chat-composer textarea {
  width: auto;
  min-width: 0;
  min-height: 40px;
  max-height: 120px;
  flex: 1 1 0;
  resize: none;
  padding: 7px 13px;
  overflow-y: auto;
  border: 1px solid var(--line);

  border-radius: 22px;
  outline: 0;
  background: var(--card-surface);
  color: var(--ink);
  font: inherit;
  line-height: 1.4;
  font-size: max(16px, var(--chat-message-size));
  transition: height var(--chat-motion);
}

.chat-attach-button {
  width: 40px;
  height: 40px;
  display: grid;
  flex: 0 0 auto;
  padding: 0;
  place-items: center;

  border: 0;

  border-radius: 50%;

  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.chat-attach-button:hover {
  border-color: var(--line-strong);
  color: var(--ink);
}

.chat-attach-button:disabled {
  opacity: 0.5;
  cursor: wait;
}

.chat-attach-button svg {
  width: 19px;
  height: 19px;
}

.chat-composer textarea:focus,
.chat-composer textarea:focus-visible,
.chat-group-title input:focus,
.chat-group-title input:focus-visible {
  border-color: var(--focus-border);
  outline: 0;
  background: var(--card-surface);
}

.chat-composer textarea:focus-visible,
.chat-group-title input:focus-visible {
  outline: var(--focus-ring-width) solid var(--focus-ring);
  outline-offset: 2px;
}

.chat-send-button {
  width: 40px;
  height: 40px;

  border-color: transparent;

  border-radius: 50%;

  background: var(--chat-accent);

  color: #fff;
}

.chat-send-button:hover {
  background: var(--blue-2);
}

.chat-send-button svg {
  width: 20px;
  height: 20px;
}

@keyframes chat-message-highlight {
  0%,
  100% {
    filter: none;
  }
  35% {
    filter: drop-shadow(0 0 8px rgba(25, 87, 173, 0.5));
  }
}

.chat-new-panel {
  position: absolute;
  z-index: 30;
  inset: 0;
  min-width: 0;
  display: grid;
  grid-template-rows: auto auto auto auto minmax(0, 1fr) auto;
  background: var(--card-surface);
}

.chat-new-panel__header {
  min-height: 64px;
  padding-top: max(10px, env(safe-area-inset-top));
  display: flex;
  padding: 10px 16px;
  align-items: center;
  gap: 16px;
  border-bottom: 1px solid var(--line);
}

.chat-new-panel__header #chatNewBack { width: auto; padding: 0 6px; color: var(--chat-accent); font: inherit; font-size: 14px; }

.chat-new-panel__header > div {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.chat-new-panel__header span {
  color: var(--muted);
  font-size: 12px;
}

.chat-compose-switch {
  display: grid;
  margin: 14px 16px 0;
  padding: 3px;
  grid-template-columns: 1fr 1fr;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-2);
}

.chat-compose-switch button {
  min-height: 36px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
}

.chat-compose-switch button[aria-selected="true"] {
  background: var(--card-surface);
  color: var(--ink);
  box-shadow: var(--shadow-soft);
}

.chat-group-title {
  display: grid;
  margin: 12px 16px 0;
  gap: 5px;
}

.chat-group-title > span {
  color: var(--muted);
  font-size: 12px;
}

.chat-group-title input {
  height: 42px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card-surface);
}

.chat-search--people {
  margin: 12px 16px;
  flex: 0 0 auto;
}

.chat-people-list {
  height: auto;
  min-height: 0;
  border-top: 1px solid var(--line);
}

.chat-person-row {
  min-height: 64px;
  padding-right: 16px;
  padding-left: 16px;
}

.chat-person-row__text {
  min-width: 0;
  display: grid;
  flex: 1 1 auto;
  gap: 4px;
}

.chat-person-row__text span {
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-person-row--selectable {
  cursor: pointer;
}



.chat-new-panel__footer {
  min-height: 66px;
  display: flex;
  padding: 10px 16px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid var(--line);
  background: var(--panel-strong);
}

.chat-new-panel__footer > span {
  color: var(--muted);
  font-size: 12px;
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  clip-path: inset(50%) !important;
  white-space: nowrap !important;
}


body.theme-dark .chat-widget {
  --card-surface: #1c2938;
  --card-subtle: #1c2938;
  --surface-2: #182530;
  --ink: #f4f7fa;
  --muted: #9cafbf;
  --line: #293b4c;
  --line-strong: #354b5f;
}
body.theme-dark .chat-message:not(.chat-message--own) .chat-message__bubble { background: #1f2e3b; }
body.theme-dark .chat-conversation-row.is-active { background: #3b6da8; border-color: transparent; color: #fff; }
body.theme-dark .chat-conversation-row.is-active .chat-conversation-row__preview > span,
body.theme-dark .chat-conversation-row.is-active time { color: #d6e4f1; }
.chat-panel__brand strong { font-size: 18px; font-weight: 500; letter-spacing: -.3px; }
.chat-attachment-draft { flex-wrap: wrap; }
.chat-attachment-previews { display: flex; flex: 1 0 100%; gap: 8px; max-height: 160px; overflow: auto; }
.chat-attachment-preview { position: relative; display: grid; flex: 0 0 140px; min-width: 0; padding: 8px; border-radius: 10px; background: var(--card-surface); }
.chat-attachment-preview:has(audio) { flex-basis: 270px; }
.chat-attachment-preview img { width: 100%; height: 80px; object-fit: cover; border-radius: 6px; }
.chat-attachment-preview audio { width: 100%; height: 40px; }
.chat-attachment-preview > span { font-size: 12px; padding-right: 28px; overflow: hidden; text-overflow: ellipsis; }
.chat-attachment-preview button { position: absolute; display: grid; place-items: center; width: 40px; height: 40px; right: 0; bottom: 0; background: var(--card-surface); text-align: center; }
.chat-list-checks { display: inline-flex; vertical-align: middle; margin-right: 4px; color: var(--chat-accent); }
.chat-list-checks svg { width: 18px; height: 13px; }
.chat-conversation-row.is-muted .chat-unread { background: var(--muted); color: var(--card-surface); }
.chat-conversation-row:not(.is-muted) .chat-unread { background: var(--chat-action); color: #fff; }
.chat-conversation-row__heading strong svg { display: inline-block; width: 14px; height: 14px; margin-left: 4px; color: var(--muted); vertical-align: middle; }
.chat-object-cards { clear: both; display: grid; gap: 6px; margin-top: 8px; }
.chat-object-card { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px; justify-items: start; width: 100%; min-height: 64px; padding: 10px; border: 1px solid var(--line); background: var(--card-surface); color: var(--ink); text-align: left; }
.chat-object-card small { grid-column: 1; font-size: 11px; white-space: normal; overflow-wrap: anywhere; }
.chat-object-card > span:last-child { grid-row: 1 / 3; grid-column: 2; align-self: center; }
.chat-read-receipt__status svg { width: 20px; height: 16px; }
.chat-message__checks svg { width: 19px; height: 14px; display: block; }
.chat-message__meta .chat-message__pending-icon { width: 13px; height: 13px; margin-right: var(--space-1); align-self: center; }
.chat-message--own .chat-message__checks { color: var(--chat-outgoing-meta); }
.chat-message__bubble::after { content: ""; display: block; clear: both; }
.chat-message__bubble p { display: inline; }
.chat-message__meta { float: right; display: inline-flex; margin: 5px 0 -2px 10px; white-space: nowrap; }
.chat-message__reactions { clear: both; }
.chat-message__attachments { clear: both; }

.chat-widget--expanded .chat-panel { position: fixed; inset: 24px; width: auto; height: auto; }
.chat-widget--expanded .chat-panel__body { grid-template-columns: 300px minmax(0, 1fr); }
.chat-widget--expanded .chat-panel__topbar { width: 300px; }
.chat-widget--expanded .chat-preferences__menu { max-height: calc(100dvh - 136px); }
.chat-header-tools { display: flex; flex: 0 0 auto; }
.chat-header-tools button:nth-child(2) { display: none; }
#chatClose { position: absolute; z-index: 25; right: 8px; top: 10px; }
.chat-sidebar-saved { display: flex; align-items: center; gap: 12px; min-height: 64px; width: 100%; padding: 10px 12px; border: 0; border-bottom: 1px solid var(--line); background: var(--card-surface); color: var(--ink); text-align: left; cursor: pointer; font: inherit; font-weight: 500; }
.chat-sidebar-saved .chat-avatar { width: 42px; height: 42px; }
.chat-avatar--saved { background: var(--chat-action); color: #fff; }
.chat-conversation-row__preview > span.is-draft { color: var(--danger); }
.chat-pin-strip { grid-row: 3; min-width: 0; height: 40px; overflow: hidden; padding: 8px 16px; border: 0; border-bottom: 1px solid var(--line); background: var(--card-surface); color: var(--chat-accent); text-align: left; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; font: inherit; font-size: 13px; }
.chat-message-menu-action { grid-column: 1 / -1; width: 100%; min-height: 40px; padding: 8px 12px; font-size: 15px; text-align: left; color: var(--ink); }
.chat-message__checks { margin-left: 3px; color: var(--chat-accent); font-size: 13px; }
.chat-message__actions svg { width: 18px; height: 18px; }
.chat-message audio { max-width: 100%; width: 270px; min-height: 40px; }
.chat-latest { position: absolute; display: grid; place-items: center; right: 18px; bottom: 92px; z-index: 5; width: 40px; height: 40px; border: 1px solid var(--line); border-radius: 50%; background: var(--card-surface); color: var(--chat-accent); box-shadow: var(--shadow); cursor: pointer; }
.chat-mentions { flex: 1 0 100%; max-height: 220px; overflow-y: auto; border-bottom: 1px solid var(--line); }
.chat-mentions button { min-height: 40px; }
.chat-draft-conflict { flex: 1 0 100%; min-height: 40px; padding: 8px; border: 1px solid var(--warning); border-radius: 10px; background: var(--card-surface); color: var(--ink); cursor: pointer; }
.chat-record.is-recording { color: var(--danger); background: var(--danger-soft); animation: chat-record-pulse 1s ease-in-out infinite alternate; }
.chat-preferences__menu select { min-width: 0; max-width: 160px; min-height: 36px; margin-left: auto; border: 1px solid var(--line); border-radius: 8px; background: var(--card-surface); color: var(--ink); font: inherit; }
.chat-emoji-setting { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); border-radius: 0; font-size: 13px; }
.chat-emoji-setting__value { flex: 0 0 auto; color: var(--muted); }
.chat-dialog.chat-dialog--emoji { position: absolute; z-index: 30; inset: 72px auto auto 12px; width: min(340px, calc(100% - 24px)); max-height: calc(100% - 84px); margin: 0; }
.chat-dialog.chat-dialog--emoji[open] { display: flex; flex-direction: column; }
.chat-dialog.chat-dialog--emoji > header { flex: 0 0 auto; min-height: 56px; padding: 8px 12px; }
.chat-dialog.chat-dialog--emoji > header h2 { font-size: 14px; }
.chat-dialog.chat-dialog--emoji .chat-dialog__body { min-height: 0; max-height: none; padding: 12px; }
.chat-emoji-preview { margin: 4px 0 10px; color: var(--ink); text-align: center; font-size: 15px; font-weight: 500; overflow-wrap: anywhere; }
.chat-emoji-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(40px, 1fr)); gap: 4px; }
.chat-emoji-choice { width: 100%; min-width: 0; height: 40px; padding: 0; border: 1px solid transparent; border-radius: 10px; background: transparent; color: var(--ink); font: inherit; font-size: 24px; text-align: center; cursor: pointer; }
.chat-emoji-choice[aria-pressed="true"] { border-color: var(--chat-accent); background: var(--surface-2); }
.chat-emoji-choice:hover { background: var(--surface-2); }
.chat-emoji-choice:disabled { opacity: .5; cursor: default; }
.chat-emoji-choice:focus-visible { outline: var(--focus-ring-width) solid var(--focus-ring); outline-offset: 1px; }
.chat-emoji-clear { color: var(--muted); text-align: center; }
.chat-emoji-error { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.4; }
.chat-dialog { width: min(640px, calc(100vw - 24px)); max-height: calc(100dvh - 48px); margin: auto; padding: 0; overflow: hidden; border: 1px solid var(--line); border-radius: var(--chat-radius); background: var(--card-surface); color: var(--ink); box-shadow: var(--shadow); }
.chat-dialog::backdrop { background: rgba(0, 0, 0, .36); }
.chat-dialog > header { position: static; min-height: 64px; display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.chat-dialog > header h2 { flex: 1; min-width: 0; margin: 0; font-size: 16px; font-weight: 500; line-height: 1.4; }
.chat-dialog > header button { width: auto; min-height: 40px; color: var(--chat-accent); }
.chat-dialog__body { display: grid; gap: 12px; padding: 16px; max-height: calc(100dvh - 145px); overflow: auto; overscroll-behavior: contain; }
.chat-dialog__body input:not([type="checkbox"]), .chat-dialog__body select { width: 100%; min-width: 0; min-height: 40px; padding: 7px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--card-surface); color: var(--ink); font: inherit; font-size: 16px; }
.chat-dialog__body label { display: flex; min-width: 0; gap: 10px; align-items: center; min-height: 40px; }
.chat-dialog__body pre { padding: 12px; margin: 0; border-radius: 10px; background: var(--surface-2); font: inherit; white-space: pre-wrap; overflow-wrap: anywhere; }
.chat-dialog__body button { min-height: 40px; }
.chat-search-results { display: grid; gap: 4px; min-width: 0; }
.chat-search-results button { display: grid; gap: 6px; min-width: 0; border-bottom: 1px solid var(--line); }
.chat-search-results strong { font-size: 12px; color: var(--chat-accent); }
.chat-search-results span { white-space: pre-wrap; overflow-wrap: anywhere; }
@media (hover: hover) {
  .chat-message__actions { opacity: 0; transition: opacity var(--chat-motion); }
  .chat-message:hover .chat-message__actions, .chat-message:focus-within .chat-message__actions { opacity: 1; }
}
@keyframes chat-enter { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes chat-record-pulse { to { box-shadow: 0 0 0 5px var(--danger-soft); } }
@media (prefers-reduced-motion: no-preference) {
  .chat-panel:not([hidden]), .chat-reaction-picker:not([hidden]), .chat-dialog[open], .chat-composer-context:not([hidden]), .chat-attachment-draft:not([hidden]) { animation: chat-enter var(--chat-motion) both; }
  .chat-message.is-new { animation: chat-enter var(--chat-motion) both; }
}

@media (max-width: 700px) {
  .chat-widget {
    right: max(16px, env(safe-area-inset-right));
    bottom: max(16px, env(safe-area-inset-bottom));
  }

  .chat-widget--open {
    inset: 0;
  }

  .chat-panel,
  .chat-widget--expanded .chat-panel {
    position: fixed;
    width: 100%;
    height: var(--chat-viewport-height, 100dvh);
    min-height: 0;
    inset: 0;
    border: 0;
    border-radius: 0;
  }

  .chat-panel__topbar, .chat-widget--expanded .chat-panel__topbar {
    width: 100%;
    padding-right: 56px;
    height: calc(64px + env(safe-area-inset-top));
    padding-top: env(safe-area-inset-top);
  }

  .chat-preferences__menu,
  .chat-widget--expanded .chat-preferences__menu {
    right: 12px;
    width: auto;
    max-height: calc(var(--chat-viewport-height, 100dvh) - 88px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
  }

  .chat-panel__body {
    height: 100%;
    display: block;
  }

  .chat-sidebar {
    width: 100%;
    height: 100%;
    border-right: 0;
  }

  .chat-conversation {
    width: 100%;
    height: 100%;
    display: none;
  }

  .chat-widget--conversation-open .chat-panel__topbar { display: none; }

  .chat-widget--conversation-open .chat-sidebar {
    display: none;
  }

  .chat-widget--conversation-open .chat-conversation {
    display: block;
  }

  .chat-mobile-back {
    display: grid;
    margin-left: -7px;
  }

  body.theme-dark .chat-sidebar { background: #000; }
  body.theme-dark .chat-panel__topbar { background: #000; }
  .chat-conversation__header { gap: 4px; padding: 8px 48px 8px 8px; }


  .chat-conversation__content {
    padding-bottom: env(safe-area-inset-bottom);
  }

  .chat-conversation__empty {
    display: none;
  }

  .chat-new-panel {
    position: absolute;
  }

  .chat-message {
    max-width: 88%;
  }
}

@media (max-width: 420px) {
  .chat-panel__topbar {
    padding-right: 56px;
    padding-left: 14px;
  }

  .chat-message-scroller {
    padding-right: 11px;
    padding-left: 11px;
  }

  .chat-composer {
    padding-right: 9px;
    padding-left: 9px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .chat-widget *, .chat-widget *::before, .chat-widget *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
