.support-chat-root {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 90;
}

.sona-support-widget {
  position: relative;
}

.sona-support-launcher {
  min-width: 168px;
  height: 58px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 0;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--blue), var(--blue-deep));
  color: #fff;
  font-weight: 1000;
  box-shadow: 0 18px 38px rgba(34, 58, 94, 0.24);
}

.sona-support-launcher span {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
}

.sona-support-panel {
  position: absolute;
  right: 0;
  bottom: 72px;
  width: min(380px, calc(100vw - 28px));
  max-height: min(620px, calc(100vh - 120px));
  display: none;
  grid-template-rows: auto minmax(180px, 1fr) auto;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 28px 70px rgba(34, 58, 94, 0.22);
}

.sona-support-widget.is-open .sona-support-panel {
  display: grid;
  animation: supportPanelIn 0.24s ease both;
}

.sona-support-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 14px;
  padding: 16px;
  background: linear-gradient(135deg, #f8fbff, #eaf3fb);
}

.sona-support-head div {
  display: grid;
  gap: 4px;
}

.sona-support-head span,
.sona-support-message span,
.sona-support-empty {
  color: var(--muted);
}

.sona-support-close {
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--blue-deep);
  font-size: 1.4rem;
  font-weight: 900;
}

.sona-support-messages {
  display: grid;
  align-content: start;
  gap: 10px;
  overflow-y: auto;
  padding: 14px;
}

.sona-support-message {
  max-width: 88%;
  display: grid;
  gap: 5px;
  padding: 11px 12px;
  border-radius: 16px;
  background: #f4f8fd;
}

.sona-support-message p {
  margin: 0;
  line-height: 1.4;
}

.sona-support-message.is-admin {
  justify-self: end;
  background: #e7f1fb;
}

.sona-support-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  padding: 12px;
  border-top: 1px solid var(--line);
}

.sona-support-form textarea {
  min-height: 48px;
  max-height: 120px;
  resize: vertical;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  font: inherit;
}

.sona-support-form button {
  min-height: 48px;
  padding: 0 14px;
  border: 0;
  border-radius: 14px;
  background: var(--blue);
  color: #fff;
  font-weight: 900;
}

@keyframes supportPanelIn {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

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

  .sona-support-launcher {
    min-width: 58px;
    width: 58px;
  }

  .sona-support-launcher strong {
    display: none;
  }
}
