/* "Questions" helper: the floating button and the chat box (public site and guest portal). */
.ask-fab {
  position: fixed; right: 18px; bottom: 18px; z-index: 70;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 17px 11px 13px; border: 2px solid rgba(255, 255, 255, .9); border-radius: 999px;
  background: var(--creek, #2a6b70); color: #fff;
  font: 700 1rem/1 var(--font-body, system-ui, sans-serif);
  box-shadow: 0 12px 30px -10px rgba(31, 58, 43, .65); cursor: pointer;
}
.ask-fab svg { width: 22px; height: 22px; flex: none; }
.ask-fab:hover { background: var(--forest, #1f3a2b); }
.ask-fab:focus-visible, .ask-chip:focus-visible, .ask-send:focus-visible, .ask-close:focus-visible { outline: 3px solid var(--sun, #e2a73a); outline-offset: 2px; }
.ask-fab[hidden], .ask-panel[hidden], .ask-chips[hidden] { display: none; }

.ask-panel {
  position: fixed; right: 18px; bottom: 18px; z-index: 80;
  width: min(390px, calc(100vw - 24px)); max-height: min(620px, calc(100vh - 36px));
  display: flex; flex-direction: column; overflow: hidden;
  background: var(--paper, #fffcf6); color: var(--ink, #1d231f);
  border: 1px solid var(--line, #e2d8c4); border-radius: 18px;
  box-shadow: 0 26px 60px -20px rgba(31, 58, 43, .55);
  font-family: var(--font-body, system-ui, sans-serif);
}
.ask-head { display: flex; align-items: flex-start; gap: 10px; padding: 14px 10px 12px 16px; background: var(--forest, #1f3a2b); color: #fff; }
.ask-head h2 { margin: 0; font: 800 1.2rem/1.2 var(--font-head, Georgia, serif); color: #fff; }
.ask-head p { margin: 3px 0 0; font-size: .92rem; line-height: 1.3; color: rgba(255, 255, 255, .82); }
.ask-close { margin-left: auto; flex: none; width: 40px; height: 40px; border: 0; border-radius: 50%; background: transparent; color: #fff; font-size: 1.7rem; line-height: 1; cursor: pointer; }
.ask-close:hover { background: rgba(255, 255, 255, .12); }

.ask-log { flex: 1 1 auto; min-height: 140px; overflow-y: auto; overscroll-behavior: contain; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.ask-msg { max-width: 88%; padding: 10px 13px; border-radius: 15px; font-size: 1rem; line-height: 1.42; white-space: pre-line; overflow-wrap: anywhere; }
.ask-bot { align-self: flex-start; background: var(--sand, #f6f0e4); border: 1px solid var(--line, #e2d8c4); border-bottom-left-radius: 5px; }
.ask-me { align-self: flex-end; background: var(--creek, #2a6b70); color: #fff; border-bottom-right-radius: 5px; }
.ask-msg a { color: inherit; font-weight: 700; }
.ask-typing { color: var(--muted, #58625b); letter-spacing: .2em; }

.ask-chips { display: flex; flex-wrap: wrap; gap: 7px; padding: 0 14px 12px; }
.ask-chip { border: 1px solid var(--line, #e2d8c4); background: #fff; color: var(--forest, #1f3a2b); border-radius: 999px; padding: 8px 12px; font: 600 .95rem/1.2 var(--font-body, system-ui, sans-serif); cursor: pointer; }
.ask-chip:hover { border-color: var(--creek, #2a6b70); background: var(--creek-tint, #e3efec); }

.ask-form { display: flex; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--line, #e2d8c4); background: #fff; }
.ask-form input { flex: 1; min-width: 0; padding: 11px 12px; border: 1px solid var(--line, #e2d8c4); border-radius: 12px; background: #fff; color: var(--ink, #1d231f); font: 400 1rem/1.3 var(--font-body, system-ui, sans-serif); }
.ask-form input:focus { outline: 2px solid var(--creek, #2a6b70); outline-offset: 0; border-color: var(--creek, #2a6b70); }
.ask-send { flex: none; border: 0; border-radius: 12px; padding: 0 16px; background: var(--forest, #1f3a2b); color: #fff; font: 700 1rem/1 var(--font-body, system-ui, sans-serif); cursor: pointer; }
.ask-send:disabled { opacity: .6; cursor: default; }
.ask-foot { margin: 0; padding: 0 14px 12px; background: #fff; font-size: .84rem; line-height: 1.35; color: var(--muted, #58625b); }
.ask-foot a { color: var(--forest, #1f3a2b); font-weight: 700; white-space: nowrap; }

/* Guest portal: leave room under the last card for the button. */
body.ask-ready.ask-pad { padding-bottom: 84px; }

@media (max-width: 760px) {
  .ask-fab { right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); }
  /* On the homepage, phones already have a bar at the bottom with Call, Text and Questions. */
  body.has-callbar .ask-fab { display: none; }
  .ask-panel { left: 8px; right: 8px; bottom: calc(8px + env(safe-area-inset-bottom)); width: auto; max-height: calc(100vh - 72px); max-height: calc(100dvh - 72px); }
  body.ask-open .callbar { display: none; }
}
@media (prefers-reduced-motion: no-preference) {
  .ask-panel { animation: ask-in .18s ease-out; }
  @keyframes ask-in { from { opacity: 0; transform: translateY(12px); } }
}
@media print { .ask-fab, .ask-panel { display: none !important; } }
