/* A quiet, accessible support drawer in the homepage's cream and green palette. */
html.is-support-open { overflow: hidden; }

.support-drawer {
  position: fixed;
  inset: 0 0 0 auto;
  width: min(460px, 100vw);
  max-width: 100%;
  height: 100vh;
  height: 100dvh;
  max-height: 100vh;
  max-height: 100dvh;
  min-height: 0;
  margin: 0 0 0 auto;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-left: 1px solid #dce7d6;
  border-radius: 24px 0 0 24px;
  background: #f7f9f1;
  color: var(--ink, #173f32);
  box-shadow: -12px 0 52px #183c2524;
  transform: translateX(100%);
  transition: transform 200ms ease;
}
.support-drawer[open] { display: grid; grid-template-rows: auto minmax(0, 1fr) auto auto; }
.support-drawer.is-visible { transform: translateX(0); }
.support-drawer::backdrop { background: #173b2b00; transition: background-color 200ms ease; }
.support-drawer.is-visible::backdrop { background: #173b2b59; }
.support-drawer *, .support-drawer *::before, .support-drawer *::after { box-sizing: border-box; }
.support-drawer button, .support-drawer textarea { font-family: inherit; }
.support-drawer button { cursor: pointer; }
.support-drawer button:focus-visible, .support-drawer a:focus-visible, .support-drawer textarea:focus-visible {
  outline: 3px solid #279c60;
  outline-offset: 2px;
}
.support-drawer button:disabled { cursor: default; opacity: .5; }

.support-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 22px; border-bottom: 1px solid #e1e9dc; background: #fffffc; }
.support-identity { display: flex; align-items: center; gap: 12px; min-width: 0; }
.support-avatar { display: grid; flex: none; place-items: center; width: 44px; height: 44px; border: 1px solid #d3e5cb; border-radius: 14px; background: #eaf5e3; color: #15834c; font-size: 21px; font-weight: 650; }
.support-identity > div { min-width: 0; }
.support-identity h2 { margin: 0; color: #173f32; font-size: 18px; font-weight: 650; line-height: 1.5; }
.support-identity p { margin: 3px 0 0; color: #738570; font-size: 12px; line-height: 1.6; }
.support-close { display: grid; flex: none; place-items: center; width: 36px; height: 36px; padding: 0 0 3px; border: 1px solid #dfe8d8; border-radius: 50%; background: #f3f7ed; color: #4b6b50; font-size: 27px; font-weight: 300; line-height: 1; transition: background 160ms ease; }
.support-close:hover { background: #e6efdd; }

.support-messages { display: flex; flex-direction: column; align-items: flex-start; gap: 22px; min-width: 0; min-height: 0; padding: 24px 22px; overflow-x: hidden; overflow-y: auto; overscroll-behavior-y: contain; scrollbar-width: thin; scrollbar-color: #b8cbb0 transparent; scroll-padding-block: 22px; }
.support-message { display: flex; flex: none; flex-direction: column; align-items: flex-start; width: fit-content; max-width: calc(100% - 24px); min-width: 0; }
.support-message.is-assistant { margin-right: auto; }
.support-message.is-human { margin-right: auto; }
.support-message.is-human .support-message-text { border-color: #d3e4e4; background: #f0f7f6; color: #285653; }
.support-message.is-human .support-message-label { color: #407d73; }
.support-message.is-system { align-self: center; max-width: 100%; align-items: center; text-align: center; }
.support-message.is-system .support-message-label { display: none; }
.support-message.is-system .support-message-text { padding: 7px 12px; border: 0; border-radius: 10px; background: #edf2e7; color: #73816b; font-size: 11px; }
.support-message-delivery { margin: 5px 2px 0; color: #6d806b; font-size: 10px; line-height: 1.5; }
.support-message-delivery.is-failed { color: #a66530; }
.support-message.is-user { align-items: flex-end; margin-left: auto; }
.support-message-label { margin-bottom: 6px; padding: 0 2px; color: #788b73; font-size: 11px; line-height: 1.5; }
.support-message-text { max-width: 100%; margin: 0; padding: 13px 15px; border: 1px solid #e0e8d9; border-radius: 16px 16px 16px 4px; background: #fffffc; color: #36543f; font-size: 14px; line-height: 1.85; overflow-wrap: anywhere; white-space: pre-wrap; }
.support-message.is-user .support-message-text { border-color: #13834d; border-radius: 16px 16px 4px 16px; background: #13834d; color: #fff; }
.support-message-actions { display: flex; flex-wrap: wrap; gap: 8px; max-width: 100%; margin-top: 10px; }
.support-action { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-width: 0; max-width: 100%; min-height: 36px; padding: 8px 12px; border: 1px solid #d6e5cc; border-radius: 10px; background: #edf6e8; color: #287047; font-size: 12px; font-weight: 500; line-height: 1.5; text-align: center; overflow-wrap: anywhere; transition: background 160ms ease; }
.support-action:hover { background: #e1efd8; }

.support-quick-questions { min-width: 0; padding: 15px 22px 17px; border-top: 1px solid #e1e9dc; background: #fbfcf7; }
.support-quick-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 9px; }
.support-quick-heading h3 { margin: 0; color: #617b61; font-size: 12px; font-weight: 600; line-height: 1.6; }
.support-more { flex: none; min-height: 30px; padding: 4px 2px; border: 0; border-radius: 5px; background: transparent; color: #25834d; font-size: 12px; line-height: 1.6; }
.support-more:hover { color: #096a37; text-decoration: underline; text-underline-offset: 3px; }
.support-topics { display: flex; flex-wrap: wrap; gap: 8px; max-height: 140px; max-height: min(140px, 22dvh); padding: 4px; margin: -4px; overflow-x: hidden; overflow-y: auto; overscroll-behavior-y: contain; scrollbar-width: thin; scrollbar-color: #bacdb0 transparent; }
.support-topic { display: flex; align-items: center; min-width: 0; max-width: 100%; min-height: 36px; padding: 8px 11px; border: 1px solid #dce7d4; border-radius: 10px; background: #fffef9; color: #567050; font-size: 12px; line-height: 1.55; text-align: left; overflow-wrap: anywhere; transition: background 160ms ease, border-color 160ms ease; }
.support-topic:hover, .support-topic[aria-pressed="true"] { border-color: #a8cca1; background: #edf6e6; color: #277047; }

.support-composer { min-width: 0; margin: 0; padding: 16px 22px max(16px, env(safe-area-inset-bottom)); border-top: 1px solid #dfe8d8; background: #fffffc; }
.support-composer-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 9px; }
.support-composer-heading .support-input-label { margin: 0; }
.support-handoff { display: inline-flex; align-items: center; justify-content: center; gap: 5px; flex: none; min-height: 32px; padding: 5px 10px; border: 1px solid #d8e6d1; border-radius: 10px; background: #eff6e9; color: #397550; font-size: 12px; line-height: 1.5; }
.support-handoff:hover:not(:disabled) { background: #e3f0da; }
.support-handoff svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.support-note.is-error { color: #a66530; }
.support-drawer[data-mode="failed"] .support-status { color: #a66530; }
.support-drawer[data-mode="human"] .support-avatar { background: #e8f4f1; color: #407d73; border-color: #cde2db; }
.support-drawer:not([data-mode="bot"]) .support-quick-questions { display: none; }
.support-drawer:not([data-mode="bot"])[open] { grid-template-rows: auto minmax(0, 1fr) auto; }
.support-input-label { display: block; margin-bottom: 8px; color: #59705c; font-size: 12px; line-height: 1.5; }
.support-input-row { display: flex; align-items: flex-end; gap: 10px; min-width: 0; }
#support-input { display: block; flex: 1; width: 100%; min-width: 0; height: 72px; min-height: 60px; max-height: 120px; margin: 0; padding: 11px 12px; resize: none; border: 1px solid #d7e4cf; border-radius: 12px; background: #fbfcf7; color: #244a34; font-size: 14px; line-height: 1.65; }
#support-input::placeholder { color: #8b9b83; opacity: 1; }
#support-input:focus { border-color: #7fba8b; background: #fff; }
.support-send { display: inline-flex; flex: none; align-items: center; justify-content: center; min-width: 62px; min-height: 42px; margin: 0; padding: 10px 14px; border: 1px solid #078743; border-radius: 11px; background: #078743; color: #fff; font-size: 14px; font-weight: 550; line-height: 1.5; transition: background 160ms ease; }
.support-send:hover:not(:disabled) { border-color: #066934; background: #066934; }
.support-status { min-height: 18px; margin: 7px 0 0; color: #558061; font-size: 11px; line-height: 1.6; overflow-wrap: anywhere; }
.support-composer-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-width: 0; margin-top: 4px; }
.support-note { min-width: 0; margin: 0; color: #87947d; font-size: 10px; line-height: 1.7; overflow-wrap: anywhere; }
.support-new-conversation { display: inline-flex; align-items: center; justify-content: center; flex: none; min-height: 30px; padding: 5px 11px; border: 1px solid #d6e5d0; border-radius: 10px; background: #f3f8ee; color: #397550; font-size: 11px; line-height: 1.5; white-space: nowrap; transition: background 160ms ease, border-color 160ms ease, color 160ms ease; }
.support-new-conversation:hover { border-color: #a8cca1; background: #e8f3e1; color: #216a41; }

@media (max-width: 760px) {
  .support-drawer { width: 100%; max-width: 100%; border: 0; border-radius: 0; }
  .support-header { padding: max(16px, env(safe-area-inset-top)) 18px 16px; }
  .support-messages { gap: 20px; padding: 21px 18px; }
  .support-message { max-width: calc(100% - 18px); }
  .support-message-text { font-size: 14px; }
  .support-quick-questions { padding: 12px 18px 14px; }
  .support-topics { max-height: min(120px, 20dvh); }
  .support-composer { padding: 13px 18px max(13px, env(safe-area-inset-bottom)); }
  #support-input { font-size: 16px; }
  .support-note { font-size: 10px; }
}

/* Keep the input and conversation usable in short windows and above a keyboard. */
@media (max-height: 600px) {
  .support-header { padding-top: max(12px, env(safe-area-inset-top)); padding-bottom: 12px; }
  .support-avatar { width: 38px; height: 38px; border-radius: 12px; font-size: 19px; }
  .support-identity h2 { font-size: 17px; }
  .support-identity p { font-size: 11px; }
  .support-messages { gap: 16px; padding-top: 16px; padding-bottom: 16px; }
  .support-quick-questions { padding-top: 9px; padding-bottom: 11px; }
  .support-topics { max-height: 76px; }
  .support-composer { padding-top: 11px; padding-bottom: max(11px, env(safe-area-inset-bottom)); }
  .support-input-label { margin-bottom: 6px; }
  #support-input { height: 60px; }
  .support-status { margin-top: 5px; }
  .support-note { margin-top: 2px; }
  .support-drawer:has(#support-input:focus) .support-quick-questions { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .support-drawer, .support-drawer::backdrop, .support-close, .support-action, .support-topic, .support-send { transition: none; }
}

/* Keep all paragraph copy legible and consistent across the landing page. */
p { color: #111 !important; }

/* The contact eyebrow stays intentionally light against its warm panel. */
.contact-section > .section-label { color: #7f9b7d !important; }
