.assistant-section {
  padding: clamp(20px, 4vw, 46px) 0 0;
  background: linear-gradient(#e9f6f0, #fff 390px);
}

.assistant-card {
  overflow: hidden;
  min-width: 0;
  border: 1px solid #cfe4db;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 16px 42px #163e3614;
}

.assistant-chat-heading {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 16px clamp(16px, 3vw, 30px);
  border-bottom: 1px solid #deece6;
}

.assistant-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 13px;
  background: #d8f0e8;
  color: #087566;
}

.assistant-icon svg { width: 26px; height: 26px; }
.assistant-chat-heading h1 { margin: 0; font-size: clamp(22px, 3vw, 32px); line-height: 1.15; }
.assistant-chat-heading p { margin: 2px 0 0; color: #506e64; font-size: 14px; }

.assistant-guides-link {
  color: #086d5f;
  font-size: 14px;
  font-weight: 700;
  text-underline-offset: 4px;
}

.assistant-messages {
  display: flex;
  flex-direction: column;
  gap: 14px;
  height: clamp(285px, calc(100vh - 428px), 640px);
  height: clamp(285px, calc(100svh - 428px), 640px);
  overflow-y: auto;
  overscroll-behavior-y: contain;
  scrollbar-gutter: stable;
  padding: clamp(14px, 3vw, 28px);
  background: #f6fbf8;
}

.support-page--apphelp .assistant-messages {
  height: clamp(245px, calc(100vh - 312px), 640px);
  height: clamp(245px, calc(100svh - 312px), 640px);
}

.assistant-messages:focus-visible { outline: 2px solid #078473; outline-offset: -2px; }

.assistant-message {
  align-self: flex-start;
  flex: 0 0 auto;
  max-width: min(88%, 68ch);
  padding: 12px 15px;
  border-radius: 4px 15px 15px;
  background: #e5f3ec;
  color: #24483f;
  font-size: 15px;
}

.assistant-message p { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.assistant-message-user { align-self: flex-end; border-radius: 15px 4px 15px 15px; background: #087667; color: #fff; }

.assistant-message-label {
  display: block;
  margin-bottom: 3px;
  font-size: 12px;
  font-weight: 750;
  opacity: .82;
}

.assistant-sources {
  margin: 10px 0 0;
  padding: 9px 0 0;
  border-top: 1px solid #c4e0d3;
  list-style: none;
}

.assistant-sources li + li { margin-top: 5px; }
.assistant-sources a { color: #086859; font-size: 14px; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }

.assistant-examples {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px clamp(14px, 3vw, 28px);
  border-top: 1px solid #deece6;
  background: #f6fbf8;
}

.assistant-card:has(.assistant-message-user) .assistant-examples { display: none; }

.assistant-examples button {
  padding: 6px 11px;
  border: 1px solid #bfded2;
  border-radius: 100px;
  background: #fff;
  color: #11695b;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.assistant-examples button:hover,
.assistant-examples button:focus-visible { border-color: #078473; background: #e2f4ec; }

.assistant-form { padding: 14px clamp(14px, 3vw, 28px) 12px; border-top: 1px solid #deece6; }
.assistant-label { display: block; margin-bottom: 6px; color: #345b50; font-size: 13px; font-weight: 750; }
.assistant-input-wrap { display: flex; align-items: end; gap: 9px; }

.assistant-input-wrap textarea {
  display: block;
  flex: 1;
  min-width: 0;
  min-height: 76px;
  max-height: 230px;
  padding: 11px 12px;
  border: 1px solid #abcfc1;
  border-radius: 10px;
  color: #173c37;
  background: #fff;
  font: inherit;
  font-size: 16px;
  line-height: 1.4;
  resize: vertical;
}

.assistant-input-wrap textarea:focus-visible { outline: 2px solid #078473; outline-offset: 1px; }

.assistant-send {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 46px;
  padding: 0 15px;
  border: 0;
  border-radius: 10px;
  background: #087667;
  color: #fff;
  font: inherit;
  font-size: 14px;
  font-weight: 750;
  cursor: pointer;
}

.assistant-send:hover { background: #065d52; }
.assistant-send:disabled { opacity: .6; cursor: wait; }
.assistant-send svg { width: 18px; height: 18px; }
.assistant-privacy { margin: 7px 0 0; color: #526f65; font-size: 12px; }
.assistant-feedback { margin: 0; color: #8d3b25; font-size: 13px; }
.assistant-feedback:not(:empty) { margin-top: 7px; }
.assistant-turnstile:not(:empty) { margin-top: 8px; }

@media (max-width: 600px) {
  .assistant-section > .container { padding-inline: 12px; }
  .assistant-card { border-radius: 15px; }
  .assistant-chat-heading { gap: 9px; padding: 12px; }
  .assistant-icon { width: 34px; height: 34px; border-radius: 10px; }
  .assistant-icon svg { width: 21px; height: 21px; }
  .assistant-chat-heading h1 { font-size: clamp(18px, 5vw, 24px); }
  .assistant-chat-heading p, .assistant-guides-link { font-size: 12px; }
  .assistant-messages,
  .support-page--apphelp .assistant-messages {
    height: clamp(254px, calc(100vh - 398px), 480px);
    height: clamp(254px, calc(100svh - 398px), 480px);
  }
  .assistant-message { max-width: 96%; }
  .assistant-examples { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .assistant-examples button { padding: 6px 9px; font-size: 12px; }
  .assistant-input-wrap textarea { min-height: 72px; }
  .assistant-send { min-width: 46px; padding: 0 10px; }
  .assistant-send span { display: none; }
}
