/* Sage, the website assistant. Loaded only when features.chat is true. Uses the site's own color variables. */
.sage-launcher {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 40;
  padding: 12px 18px;
  border: 1px solid var(--blue);
  border-radius: 999px;
  background: var(--navy-light);
  color: var(--ink);
  font: 600 15px/1 var(--sans);
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.45);
}
.sage-launcher:hover,
.sage-launcher:focus-visible {
  background: var(--panel);
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
}
.sage-panel {
  position: fixed;
  right: 20px;
  bottom: 76px;
  z-index: 41;
  display: flex;
  flex-direction: column;
  width: min(440px, calc(100vw - 24px));
  /* A set height, so the conversation area fills the panel instead of shrinking to its minimum. */
  height: min(640px, calc(100vh - 100px));
  max-height: min(700px, calc(100vh - 100px));
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--navy);
  color: var(--ink);
  font: 15px/1.45 var(--sans);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6);
  overflow: hidden;
}
.sage-panel[hidden] {
  display: none;
}
.sage-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  background: var(--navy-light);
}
.sage-title strong {
  font: 600 16px/1.2 var(--display);
}
.sage-title span {
  margin-left: 8px;
  color: var(--muted);
  font-size: 13px;
}
.sage-close,
.sage-talk {
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: transparent;
  color: var(--ink);
  font: 13px/1 var(--sans);
  cursor: pointer;
}
.sage-close:hover,
.sage-close:focus-visible,
.sage-talk:hover,
.sage-talk:focus-visible {
  border-color: var(--cyan);
  outline: 2px solid var(--cyan);
  outline-offset: 1px;
}
.sage-talk {
  margin: 0 14px 10px;
  align-self: flex-start;
}
.sage-talk[hidden] {
  display: none;
}
.sage-log {
  /* Takes only the space the other parts leave, so the contact form is never squeezed by a long conversation. */
  flex: 1 1 0;
  min-height: 72px;
  padding: 12px 14px;
  overflow-y: auto;
}
.sage-message {
  margin: 0 0 12px;
}
.sage-message p {
  margin: 2px 0 0;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.sage-you p {
  border-color: var(--blue);
  background: var(--navy-light);
}
.sage-who {
  color: var(--muted);
  font: 12px/1 var(--mono);
}
.sage-extras {
  margin: 0 0 12px;
}
.sage-links {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 13px;
}
.sage-links a {
  color: var(--blue);
}
.sage-bubbles {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.sage-bubble,
.sage-later {
  padding: 6px 10px;
  border: 1px solid var(--blue);
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  font: 13px/1.3 var(--sans);
  text-align: left;
  cursor: pointer;
}
.sage-bubble:hover,
.sage-bubble:focus-visible,
.sage-later:hover,
.sage-later:focus-visible {
  background: var(--navy-light);
  border-color: var(--cyan);
  outline: 2px solid var(--cyan);
  outline-offset: 1px;
}
.sage-later {
  border-color: var(--line);
}
.sage-lead-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.sage-gate {
  padding: 0 14px 12px;
}
.sage-gate[hidden] {
  display: none;
}
.sage-gate p {
  margin: 0 0 10px;
  color: var(--muted);
}
.sage-challenge {
  margin-top: 10px;
}
.sage-status {
  min-height: 18px;
  margin: 0;
  padding: 0 14px 6px;
  color: var(--cyan);
  font-size: 13px;
}
.sage-composer {
  display: flex;
  gap: 8px;
  padding: 0 14px 10px;
}
.sage-composer[hidden] {
  display: none;
}
.sage-input,
.sage-field input,
.sage-field textarea {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--navy-light);
  color: var(--ink);
  font: 15px/1.4 var(--sans);
  resize: none;
}
.sage-input:focus-visible,
.sage-field input:focus-visible,
.sage-field textarea:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 1px;
}
.sage-send {
  flex: 0 0 auto;
  align-self: flex-end;
}
.sage-lead {
  display: grid;
  flex: 0 1 auto;
  gap: 8px;
  min-height: 190px;
  padding: 10px 14px;
  border-top: 1px solid var(--line);
  overflow-y: auto;
}
.sage-lead-intro {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}
.sage-field span,
.sage-consent span {
  display: block;
  margin-bottom: 3px;
  font-size: 13px;
}
.sage-consent {
  display: flex;
  gap: 8px;
  align-items: flex-start;
}
.sage-consent span {
  margin: 0;
}
.sage-trap {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}
.sage-notice {
  margin: 0;
  padding: 8px 14px 10px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}
.sage-notice a {
  color: var(--blue);
}
@media (max-width: 480px) {
  .sage-panel {
    right: 12px;
    bottom: 70px;
  }
  .sage-launcher {
    right: 12px;
    bottom: 12px;
  }
}
@media print {
  .sage-launcher,
  .sage-panel {
    display: none;
  }
}
