.cx-support-chat {
  --cx-support-edge: 18px;
  --cx-support-panel-width: min(390px, calc(100vw - 24px));
  bottom: var(--cx-support-edge);
  color: rgb(var(--cl-t-primary));
  font-family: inherit;
  position: fixed;
  right: var(--cx-support-edge);
  touch-action: none;
  z-index: 70;
}

.cx-support-chat,
.cx-support-chat * {
  box-sizing: border-box;
}

.cx-support-launcher {
  align-items: center;
  background:
    radial-gradient(circle at 25% 20%, rgba(255, 255, 255, 0.22), transparent 34%),
    linear-gradient(135deg, rgba(var(--cl-accent), 0.96), rgba(7, 7, 57, 0.96));
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.46), 0 0 36px rgba(var(--cl-accent), 0.42);
  color: rgb(var(--cl-t-accent));
  cursor: grab;
  display: inline-flex;
  height: 62px;
  justify-content: center;
  outline: none;
  position: relative;
  transition: box-shadow 180ms ease, transform 180ms ease;
  width: 62px;
}

.cx-support-launcher:hover,
.cx-support-launcher:focus-visible {
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.52), 0 0 48px rgba(var(--cl-accent), 0.62);
  transform: translateY(-2px);
}

.cx-support-launcher:active {
  cursor: grabbing;
}

.cx-support-launcher svg {
  height: 30px;
  width: 30px;
}

.cx-support-launcher i {
  font-size: 29px;
  line-height: 1;
}

.cx-support-unread {
  background: #ef4444;
  border: 2px solid rgb(var(--cl-background));
  border-radius: 999px;
  box-shadow: 0 0 20px rgba(239, 68, 68, 0.6);
  color: #fff;
  font-size: 11px;
  font-weight: 900;
  height: 20px;
  line-height: 16px;
  min-width: 20px;
  padding: 0 5px;
  position: absolute;
  right: -2px;
  text-align: center;
  top: -4px;
}

.cx-support-panel {
  background: rgba(6, 10, 24, 0.94);
  backdrop-filter: blur(18px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  bottom: 78px;
  box-shadow: 0 24px 90px rgba(0, 0, 0, 0.58), inset 0 1px 0 rgba(255, 255, 255, 0.07);
  display: flex;
  flex-direction: column;
  max-height: min(650px, calc(100vh - 120px));
  overflow: hidden;
  position: absolute;
  right: 0;
  width: var(--cx-support-panel-width);
}

.cx-support-panel[hidden],
.cx-support-chat[hidden] {
  display: none;
}

.cx-support-header {
  align-items: center;
  background:
    radial-gradient(circle at 86% 8%, rgba(var(--cl-accent), 0.28), transparent 42%),
    rgba(255, 255, 255, 0.045);
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
  display: flex;
  justify-content: space-between;
  padding: 18px 18px 16px;
}

.cx-support-header > div {
  min-width: 0;
}

.cx-support-kicker {
  color: rgba(var(--cl-accent), 0.95);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  margin: 0 0 4px;
  text-transform: uppercase;
  overflow-wrap: anywhere;
}

.cx-support-header h2 {
  font-size: 21px;
  font-weight: 800;
  line-height: 1.1;
  margin: 0;
  overflow-wrap: anywhere;
}

.cx-support-close {
  align-items: center;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  color: rgb(var(--cl-t-primary));
  cursor: pointer;
  display: inline-flex;
  height: 38px;
  justify-content: center;
  width: 38px;
}

.cx-support-close svg {
  height: 20px;
  width: 20px;
}

.cx-support-body {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 12px;
  min-height: 0;
  padding: 14px;
}

.cx-support-status {
  background: rgba(var(--cl-accent), 0.13);
  border: 1px solid rgba(var(--cl-accent), 0.24);
  border-radius: 12px;
  color: rgb(var(--cl-t-primary));
  font-size: 13px;
  line-height: 1.35;
  min-width: 0;
  overflow-wrap: anywhere;
  padding: 10px 12px;
}

.cx-support-start {
  background:
    radial-gradient(circle at 86% 18%, rgba(var(--cl-accent), 0.18), transparent 42%),
    rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  display: grid;
  gap: 12px;
  min-width: 0;
  padding: 14px;
}

.cx-support-start[hidden] {
  display: none;
}

.cx-support-start p {
  color: rgba(var(--cl-t-primary), 0.74);
  font-size: 14px;
  line-height: 1.45;
  margin: 0;
}

.cx-support-start-button {
  align-items: center;
  background: rgb(var(--cl-accent));
  border: 0;
  border-radius: 12px;
  color: rgb(var(--cl-t-accent));
  cursor: pointer;
  display: inline-flex;
  font: inherit;
  font-weight: 900;
  gap: 8px;
  justify-content: center;
  min-height: 46px;
  padding: 0 14px;
}

.cx-support-start-button svg {
  height: 18px;
  width: 18px;
}

.cx-support-compose textarea {
  background: transparent;
  border: 0;
  color: rgb(var(--cl-t-primary));
  font: inherit;
  min-width: 0;
  outline: none;
  padding: 11px 4px 11px 12px;
}

.cx-support-input-shell:focus-within {
  border-color: rgba(var(--cl-accent), 0.68);
  box-shadow: 0 0 0 3px rgba(var(--cl-accent), 0.16);
}

.cx-support-known-customer {
  color: rgba(var(--cl-t-primary), 0.62);
  font-size: 13px;
  min-width: 0;
  overflow-wrap: anywhere;
}

.cx-support-messages {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 10px;
  min-height: 170px;
  overflow-y: auto;
  padding-right: 2px;
}

.cx-support-empty {
  align-items: center;
  border: 1px dashed rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  color: rgba(var(--cl-t-primary), 0.58);
  display: flex;
  flex: 1;
  font-size: 14px;
  justify-content: center;
  min-height: 130px;
  padding: 18px;
  text-align: center;
  overflow-wrap: anywhere;
}

.cx-support-message {
  border-radius: 14px;
  font-size: 14px;
  line-height: 1.4;
  max-width: 88%;
  min-width: 0;
  overflow-wrap: anywhere;
  padding: 10px 12px;
}

.cx-support-message strong {
  display: block;
  font-size: 12px;
  margin-bottom: 4px;
  opacity: 0.68;
}

.cx-support-message p {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
}

.cx-support-attachments {
  display: grid;
  gap: 8px;
  margin-top: 8px;
}

.cx-support-attachment {
  border-radius: 10px;
  color: inherit;
  display: block;
  font-size: 12px;
  font-weight: 800;
  max-width: 100%;
  overflow: hidden;
  text-decoration: none;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cx-support-attachment img {
  border-radius: 10px;
  display: block;
  max-height: 180px;
  max-width: 100%;
  object-fit: cover;
}

.cx-support-message.is-customer {
  align-self: flex-end;
  background: rgba(var(--cl-accent), 0.9);
  color: rgb(var(--cl-t-accent));
}

.cx-support-message.is-staff,
.cx-support-message.is-system {
  align-self: flex-start;
  background: rgba(255, 255, 255, 0.075);
  color: rgb(var(--cl-t-primary));
}

.cx-support-compose {
  border-top: 1px solid rgba(255, 255, 255, 0.09);
  display: block;
  min-width: 0;
  padding: 14px;
}

.cx-support-compose[hidden] {
  display: none;
}

.cx-support-compose textarea {
  max-height: 130px;
  min-height: 48px;
  resize: vertical;
}

.cx-support-input-shell {
  align-items: end;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 14px;
  display: grid;
  gap: 6px;
  grid-template-columns: minmax(0, 1fr) auto auto;
  min-width: 0;
  position: relative;
}

.cx-support-attach,
.cx-support-compose button {
  align-items: center;
  align-self: end;
  border-radius: 10px;
  cursor: pointer;
  display: inline-flex;
  height: 38px;
  justify-content: center;
  margin: 5px 0 5px 0;
  width: 38px;
}

.cx-support-attach {
  background: transparent;
  border: 0;
  color: rgba(var(--cl-t-primary), 0.78);
}

.cx-support-attach input {
  display: none;
}

.cx-support-attach svg {
  height: 19px;
  width: 19px;
}

.cx-support-attach:hover,
.cx-support-attach:focus-within {
  background: rgba(255, 255, 255, 0.08);
  color: rgb(var(--cl-t-primary));
}

.cx-support-attach:has(input:disabled) {
  cursor: not-allowed;
  opacity: 0.42;
}

.cx-support-attachment-note {
  align-items: center;
  align-self: end;
  background: rgb(12, 15, 32);
  border: 1px solid rgba(var(--cl-accent), 0.26);
  border-radius: 999px;
  color: rgba(var(--cl-t-primary), 0.84);
  display: inline-flex;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.2;
  left: 12px;
  max-width: calc(100% - 108px);
  min-height: 22px;
  min-width: 0;
  overflow: hidden;
  padding: 4px 8px;
  position: absolute;
  top: 0;
  transform: translateY(-50%);
  text-overflow: ellipsis;
  white-space: nowrap;
  z-index: 1;
}

.cx-support-attachment-note[hidden] {
  display: none;
}

.cx-support-compose button {
  background: rgb(var(--cl-accent));
  border: 0;
  color: rgb(var(--cl-t-accent));
  font: inherit;
  font-weight: 900;
  margin-right: 5px;
  padding: 0;
}

.cx-support-compose button[disabled] {
  cursor: progress;
  opacity: 0.65;
}

.cx-support-compose button svg {
  height: 17px;
  width: 17px;
}

@media (max-width: 560px) {
  .cx-support-chat {
    --cx-support-edge: 12px;
  }

  .cx-support-panel {
    bottom: 84px;
    left: 12px;
    max-height: calc(100vh - 98px);
    max-width: none;
    position: fixed;
    right: 12px;
    width: auto;
  }

  .cx-support-input-shell {
    grid-template-columns: minmax(0, 1fr) auto auto;
  }
}