.customer-support-shell {
  position: fixed;
  right: clamp(14px, 2.8vw, 28px);
  bottom: 22px;
  z-index: 48;
  display: grid;
  justify-items: end;
  gap: 12px;
}

.support-launcher {
  border: 0;
  border-radius: 999px;
  padding: 12px 18px;
  background: linear-gradient(135deg, #295f6b, #8b5a4a);
  color: #fff;
  font: inherit;
  font-weight: 800;
  letter-spacing: 0.02em;
  box-shadow: 0 18px 34px rgba(31, 38, 44, 0.18);
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.support-launcher:hover {
  transform: translateY(-2px);
  box-shadow: 0 22px 40px rgba(31, 38, 44, 0.22);
}

.support-launcher:focus-visible,
.support-close:focus-visible,
.support-mode-button:focus-visible,
.support-quick-button:focus-visible,
.support-send:focus-visible,
.support-cta:focus-visible,
.support-secondary:focus-visible,
.support-copy-button:focus-visible {
  outline: 3px solid rgba(41, 95, 107, 0.2);
  outline-offset: 2px;
}

.support-widget {
  width: min(392px, calc(100vw - 24px));
  border-radius: 24px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(31, 38, 44, 0.1);
  box-shadow: 0 28px 56px rgba(31, 38, 44, 0.16);
  backdrop-filter: blur(18px);
}

.support-widget[hidden],
.support-panel[hidden] {
  display: none !important;
}

.support-header {
  padding: 18px 18px 12px;
  background:
    radial-gradient(240px circle at 0% 0%, rgba(208, 163, 95, 0.16), transparent 52%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 245, 240, 0.96));
  border-bottom: 1px solid rgba(31, 38, 44, 0.08);
}

.support-header-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.support-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(139, 90, 74, 0.1);
  color: #8b5a4a;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.support-title {
  margin: 10px 0 6px;
  color: #182126;
  font-size: 1.05rem;
  line-height: 1.25;
}

.support-subtitle {
  margin: 0;
  color: #56606a;
  font-size: 0.89rem;
  line-height: 1.6;
}

.support-close {
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 12px;
  background: rgba(31, 38, 44, 0.06);
  color: #1f262c;
  font: inherit;
  font-size: 1rem;
  cursor: pointer;
  transition: background-color 160ms ease, transform 160ms ease;
}

.support-close:hover {
  background: rgba(31, 38, 44, 0.1);
  transform: translateY(-1px);
}

.support-status-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.support-status,
.support-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 800;
}

.support-status::before,
.support-badge::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.support-status {
  background: rgba(41, 95, 107, 0.1);
  color: #295f6b;
}

.support-status::before {
  background: #295f6b;
}

.support-status.is-pending {
  background: rgba(208, 163, 95, 0.16);
  color: #8b5a4a;
}

.support-status.is-pending::before {
  background: #d0a35f;
}

.support-badge {
  background: rgba(31, 38, 44, 0.07);
  color: #4f5964;
}

.support-badge::before {
  background: #7b8792;
}

.support-mode-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 14px 18px 0;
}

.support-mode-button {
  border: 1px solid rgba(31, 38, 44, 0.1);
  border-radius: 14px;
  padding: 11px 12px;
  background: rgba(255, 255, 255, 0.74);
  color: #1f262c;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, background-color 160ms ease;
}

.support-mode-button:hover {
  transform: translateY(-1px);
  border-color: rgba(41, 95, 107, 0.18);
}

.support-mode-button.is-active {
  background: linear-gradient(135deg, rgba(41, 95, 107, 0.96), rgba(139, 90, 74, 0.92));
  border-color: transparent;
  color: #fff;
}

.support-body {
  padding: 14px 18px 18px;
}

.support-messages {
  max-height: 300px;
  overflow: auto;
  display: grid;
  gap: 10px;
  padding-right: 4px;
}

.support-message {
  max-width: 88%;
  padding: 11px 14px;
  border-radius: 16px;
  font-size: 0.92rem;
  line-height: 1.6;
  white-space: pre-wrap;
}

.support-message.is-assistant {
  justify-self: start;
  background: rgba(41, 95, 107, 0.1);
  color: #20323a;
}

.support-message.is-user {
  justify-self: end;
  background: linear-gradient(135deg, #295f6b, #8b5a4a);
  color: #fff;
}

.support-message.is-typing {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.support-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #295f6b;
  animation: support-pulse 1.2s ease-in-out infinite;
}

.support-dot:nth-child(2) {
  animation-delay: 0.18s;
}

.support-dot:nth-child(3) {
  animation-delay: 0.36s;
}

.support-quick-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0;
}

.support-quick-button {
  border: 1px solid rgba(31, 38, 44, 0.1);
  border-radius: 999px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.84);
  color: #20323a;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
}

.support-input-form {
  display: grid;
  gap: 10px;
}

.support-input {
  width: 100%;
  min-height: 84px;
  resize: vertical;
  border-radius: 16px;
  border: 1px solid rgba(31, 38, 44, 0.12);
  background: rgba(251, 248, 244, 0.92);
  padding: 12px 14px;
  color: #1f262c;
  font: inherit;
}

.support-input:focus,
.support-human-input:focus,
.support-human-textarea:focus {
  outline: none;
  border-color: rgba(41, 95, 107, 0.3);
  box-shadow: 0 0 0 3px rgba(41, 95, 107, 0.1);
}

.support-form-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.support-note {
  margin: 0;
  color: #6c737b;
  font-size: 0.78rem;
  line-height: 1.5;
}

.support-send,
.support-cta,
.support-secondary,
.support-copy-button {
  border: 0;
  border-radius: 14px;
  padding: 11px 14px;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  text-decoration: none;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.support-send,
.support-cta,
.support-copy-button {
  background: linear-gradient(135deg, #295f6b, #8b5a4a);
  color: #fff;
  box-shadow: 0 14px 24px rgba(41, 95, 107, 0.18);
}

.support-secondary {
  background: rgba(31, 38, 44, 0.06);
  color: #1f262c;
}

.support-send:hover,
.support-cta:hover,
.support-secondary:hover,
.support-copy-button:hover {
  transform: translateY(-1px);
}

.support-send[disabled] {
  opacity: 0.7;
  cursor: wait;
}

.support-human-stack {
  display: grid;
  gap: 12px;
}

.support-human-card,
.support-human-form {
  border: 1px solid rgba(31, 38, 44, 0.08);
  border-radius: 18px;
  padding: 14px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(248, 245, 240, 0.92));
}

.support-human-card h4,
.support-human-form h4 {
  margin: 0 0 6px;
  color: #182126;
  font-size: 0.96rem;
}

.support-human-card p,
.support-human-form p {
  margin: 0;
  color: #58616b;
  font-size: 0.88rem;
  line-height: 1.6;
}

.support-human-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.support-human-grid {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.support-human-field {
  display: grid;
  gap: 6px;
}

.support-human-field label {
  color: #34424b;
  font-size: 0.82rem;
  font-weight: 700;
}

.support-human-input,
.support-human-textarea {
  width: 100%;
  border-radius: 14px;
  border: 1px solid rgba(31, 38, 44, 0.12);
  background: rgba(251, 248, 244, 0.94);
  padding: 11px 12px;
  color: #1f262c;
  font: inherit;
}

.support-human-textarea {
  min-height: 86px;
  resize: vertical;
}

.support-copy-feedback {
  min-height: 1.3em;
  margin-top: 10px;
  color: #295f6b;
  font-size: 0.78rem;
}

@keyframes support-pulse {
  0%,
  80%,
  100% {
    opacity: 0.35;
    transform: translateY(0);
  }

  40% {
    opacity: 1;
    transform: translateY(-2px);
  }
}

@media (max-width: 720px) {
  .customer-support-shell {
    left: 12px;
    right: 12px;
    justify-items: stretch;
  }

  .support-launcher {
    justify-self: end;
  }

  .support-widget {
    width: 100%;
  }
}
