.support-chat-launch, .support-chat {
  --support-offset: max(1rem, env(safe-area-inset-right));
  --support-bottom: max(1rem, env(safe-area-inset-bottom));
  color-scheme: dark;
  font-family: inherit;
}

.support-chat-launch {
  position: fixed;
  z-index: 7;
  right: var(--support-offset);
  bottom: var(--support-bottom);
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  min-height: 2.875rem;
  padding: .55rem 1rem;
  border: 1px solid #dafa75;
  border-radius: 2rem;
  background: #dafa75;
  color: #191d14;
  box-shadow: 0 .2rem 1.4rem #0004;
  font-size: .88rem;
  font-weight: 750;
  cursor: pointer;
}

.support-chat-launch::before {
  width: .9rem;
  height: .7rem;
  border: 1.6px solid currentColor;
  border-radius: .4rem .4rem .4rem .1rem;
  content: "";
}

.support-chat {
  position: fixed;
  inset: auto var(--support-offset) var(--support-bottom) auto;
  width: min(24rem, calc(100% - var(--support-offset) - 1rem));
  height: min(31rem, calc(100vh - var(--support-bottom) - 1rem));
  height: min(31rem, calc(100dvh - var(--support-bottom) - 1rem));
  margin: 0;
  padding: 0;
  overflow: hidden;
  grid-template-rows: auto minmax(0, 1fr) auto;
  border: 1px solid #465449;
  border-radius: .95rem;
  background: #161c18;
  color: #eef1e9;
  box-shadow: 0 .9rem 3rem #0006;
}

.support-chat[open] { display: grid; }
.support-chat::backdrop { background: #080c0a52; }
.support-chat :focus-visible { outline-color: #dafa75; outline-offset: 2px; }

.support-chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .6rem 1rem;
  border-bottom: 1px solid #343f36;
}

.support-chat-header h2 { font-size: 1rem; font-weight: 750; }
.support-chat button { cursor: pointer; }
.support-chat-close {
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  border: 0;
  border-radius: .5rem;
  background: transparent;
  color: inherit;
  font-size: 1.45rem;
}

.support-chat-close:hover { background: #303a32; }
.support-chat-feed {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: .75rem;
  min-height: 0;
  padding: .9rem 1rem;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.support-chat-message {
  width: fit-content;
  max-width: 94%;
  padding: .62rem .75rem;
  border-radius: .62rem;
  background: #263229;
  font-size: .9rem;
  line-height: 1.5;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.support-chat-user { align-self: flex-end; background: #dafa75; color: #191d14; }
.support-chat-suggestions { display: flex; flex-wrap: wrap; gap: .35rem; }
.support-chat-suggestions[hidden] { display: none; }
.support-chat-suggestions button {
  min-height: 2.25rem;
  padding: .35rem .55rem;
  border: 1px solid #4a5a4b;
  border-radius: 1rem;
  background: transparent;
  color: #d9eead;
  font-size: .78rem;
  text-align: left;
}

.support-chat-suggestions button:hover { border-color: #dafa75; }
.support-chat-footer { padding: .7rem 1rem .8rem; border-top: 1px solid #343f36; }
.support-chat-status { margin-bottom: .45rem; color: #d1dbcf; font-size: .8rem; }
.support-chat-status:empty { display: none; }
.support-chat-form { display: flex; gap: .4rem; }
.support-chat-form input {
  flex: 1;
  min-width: 0;
  padding: .54rem .6rem;
  border: 1px solid #4a5a4b;
  border-radius: .45rem;
  background: #101612;
  color: inherit;
  font-size: 1rem;
}

.support-chat-form button {
  min-width: 3.5rem;
  min-height: 2.75rem;
  padding: .45rem .6rem;
  border: 0;
  border-radius: .45rem;
  background: #dafa75;
  color: #191d14;
  font-size: .82rem;
  font-weight: 750;
}

.support-chat-form button:disabled { opacity: .55; cursor: default; }
.support-chat-links { display: flex; flex-wrap: wrap; gap: .2rem .8rem; margin-top: .5rem; }
.support-chat-links a { display: inline-flex; align-items: center; min-height: 2rem; color: #d9eead; font-size: .8rem; text-underline-offset: .15em; }
.support-chat-note { color: #adb7ae; font-size: .72rem; line-height: 1.45; }
