.support-chat-widget {
  --scw-panel: #ffffff;
  --scw-ink: #1b252f;
  --scw-muted: #66727f;
  --scw-line: #d8e0e7;
  --scw-accent: #167a75;
  --scw-accent-dark: #0d5f5b;
  --scw-bot: #f6f8fa;
  --scw-user: #d9f0ed;
  color: var(--scw-ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

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

.support-chat-toggle {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 9998;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 58px;
  height: 58px;
  border: 0;
  border-radius: 50%;
  padding: 0;
  background: var(--scw-accent);
  color: #ffffff;
  box-shadow: 0 18px 42px rgba(27, 37, 47, 0.22);
  cursor: pointer;
  font: inherit;
  font-weight: 800;
}

.support-chat-toggle:hover {
  background: var(--scw-accent-dark);
}

.support-chat-toggle-icon {
  width: 25px;
  height: 25px;
}

.support-chat-window {
  position: fixed;
  right: 22px;
  bottom: 86px;
  z-index: 9999;
  width: min(390px, calc(100vw - 28px));
  height: min(620px, calc(100vh - 116px));
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  overflow: hidden;
  border: 1px solid var(--scw-line);
  border-radius: 8px;
  background: var(--scw-panel);
  box-shadow: 0 28px 80px rgba(27, 37, 47, 0.26);
}

.support-chat-window[hidden] {
  display: none;
}

.support-chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--scw-line);
}

.support-chat-title {
  margin: 0;
  font-size: 1rem;
  line-height: 1.2;
}

.support-chat-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 5px;
  color: var(--scw-muted);
  font-size: 0.82rem;
}

.support-chat-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #2fa66a;
}

.support-chat-close {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 0;
  border-radius: 8px;
  background: #eef3f5;
  color: var(--scw-ink);
  cursor: pointer;
  font: inherit;
  font-size: 1.25rem;
  line-height: 1;
}

.support-chat-actions {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 12px 14px;
  border-bottom: 1px solid var(--scw-line);
}

.support-chat-actions button {
  flex: 0 0 auto;
  min-height: 34px;
  border: 0;
  border-radius: 8px;
  padding: 0 12px;
  background: #eef6f5;
  color: var(--scw-accent-dark);
  cursor: pointer;
  font: inherit;
  font-size: 0.86rem;
  font-weight: 800;
}

.support-chat-messages {
  display: flex;
  flex-direction: column;
  gap: 11px;
  overflow-y: auto;
  padding: 16px 14px;
  background: #fbfcfd;
}

.support-chat-message {
  max-width: 88%;
  border-radius: 8px;
  padding: 11px 12px;
  box-shadow: 0 8px 22px rgba(27, 37, 47, 0.08);
  font-size: 0.92rem;
  line-height: 1.42;
}

.support-chat-message strong {
  display: block;
  margin-bottom: 7px;
}

.support-chat-message ol {
  margin: 8px 0 0;
  padding-left: 19px;
}

.support-chat-message li + li {
  margin-top: 5px;
}

.support-chat-message.bot {
  align-self: flex-start;
  border: 1px solid var(--scw-line);
  background: var(--scw-bot);
}

.support-chat-message.user {
  align-self: flex-end;
  border: 1px solid #b7ddda;
  background: var(--scw-user);
}

.support-chat-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  padding: 12px 14px 14px;
  border-top: 1px solid var(--scw-line);
  background: #ffffff;
}

.support-chat-input {
  min-width: 0;
  height: 42px;
  border: 1px solid var(--scw-line);
  border-radius: 8px;
  padding: 0 12px;
  color: var(--scw-ink);
  font: inherit;
  outline: none;
}

.support-chat-input:focus {
  border-color: var(--scw-accent);
  box-shadow: 0 0 0 4px rgba(22, 122, 117, 0.12);
}

.support-chat-send {
  min-width: 78px;
  height: 42px;
  border: 0;
  border-radius: 8px;
  background: var(--scw-accent);
  color: #ffffff;
  cursor: pointer;
  font: inherit;
  font-weight: 800;
}

.support-chat-send:hover {
  background: var(--scw-accent-dark);
}

@media (max-width: 520px) {
  .support-chat-toggle {
    right: 14px;
    bottom: 14px;
  }

  .support-chat-window {
    right: 10px;
    bottom: 76px;
    width: calc(100vw - 20px);
    height: min(640px, calc(100vh - 92px));
  }
}
