/* Ask YRD */
.chatbot { position: relative; z-index: 40; }
.chatbot__launcher {
  position: fixed; right: var(--space-4); bottom: var(--space-4); z-index: 40;
  display: inline-flex; align-items: center; gap: var(--space-2); min-height: 52px;
  padding: 0 var(--space-4); border: 0; border-radius: 999px; background: var(--black);
  color: var(--white); box-shadow: 0 14px 38px rgba(17,17,19,.24);
  font: inherit; font-weight: 800; cursor: pointer;
}
.chatbot__launcher:hover { background: var(--red-dark); }
.chatbot__launcher-icon {
  display: inline-grid; place-items: center; width: 26px; height: 26px;
  border-radius: 999px; background: var(--red); color: var(--white); font-weight: 900;
}
.chatbot.is-open .chatbot__launcher { display: none; }
.chatbot__panel[hidden] {
  display: none !important;
}

.chatbot__panel {
  position: fixed; right: var(--space-4); bottom: var(--space-4); z-index: 45;
  width: min(390px, calc(100vw - 32px)); height: min(620px, calc(100dvh - 32px));
  display: flex; flex-direction: column; overflow: hidden; background: var(--white);
  border: 1px solid var(--border); border-radius: 20px; box-shadow: 0 28px 80px rgba(17,17,19,.24);
}
.chatbot__header, .chatbot__contact-heading {
  display: flex; align-items: center; justify-content: space-between; gap: var(--space-3);
}
.chatbot__header {
  padding: var(--space-3) var(--space-4); border-bottom: 1px solid var(--border); background: var(--surface);
}
.chatbot__header strong, .chatbot__contact-heading strong { display: block; font-size: 1rem; }
.chatbot__header span, .chatbot__contact-heading span { display: block; color: var(--muted); font-size: .78rem; }
.chatbot__close, .chatbot__contact-heading button {
  display: inline-grid; place-items: center; width: 44px; height: 44px; padding: 0;
  border: 0; border-radius: 999px; background: transparent; color: var(--black);
  font-size: 1.6rem; line-height: 1; cursor: pointer;
}
.chatbot__close:hover, .chatbot__contact-heading button:hover { background: var(--red-soft); color: var(--red-dark); }
.chatbot__messages {
  flex: 1; min-height: 0; overflow-y: auto; padding: var(--space-4);
  background: radial-gradient(circle at 100% 0%, rgba(235,34,39,.06), transparent 34%), var(--white);
}
.chat-message {
  max-width: 88%; width: fit-content; margin-bottom: var(--space-3); padding: 10px 12px;
  border-radius: 14px; font-size: .92rem; line-height: 1.45;
}
.chat-message--bot { background: var(--surface); border: 1px solid var(--border); border-bottom-left-radius: 4px; }
.chat-message--user { margin-left: auto; background: var(--red-dark); color: var(--white); border-bottom-right-radius: 4px; }
.chat-message--status { color: var(--muted); background: transparent; border: 1px dashed var(--border-strong); }
.chat-message__action {
  display: inline-flex; margin-top: var(--space-2); padding: 6px 9px; border: 1px solid var(--border);
  border-radius: 8px; background: var(--white); color: var(--red-dark);
  font: inherit; font-size: .82rem; font-weight: 800; cursor: pointer;
}
.chatbot__quick {
  display: flex; gap: 6px; overflow-x: auto; padding: 0 var(--space-3) var(--space-2); scrollbar-width: none;
}
.chatbot__quick::-webkit-scrollbar { display: none; }
.chatbot__quick button {
  flex: 0 0 auto; min-height: 36px; padding: 6px 10px; border: 1px solid var(--border);
  border-radius: 999px; background: var(--white); color: var(--black);
  font: inherit; font-size: .78rem; font-weight: 700; cursor: pointer;
}
.chatbot__quick button:hover { border-color: var(--red); color: var(--red-dark); }
.chatbot__ask {
  display: flex; gap: var(--space-2); padding: var(--space-2) var(--space-3); border-top: 1px solid var(--border);
}
.chatbot__ask input {
  min-width: 0; flex: 1; min-height: 46px; padding: 0 var(--space-3);
  border: 1px solid var(--border-strong); border-radius: 12px; background: var(--white);
  color: var(--text); font: inherit;
}
.chatbot__ask button {
  display: inline-grid; place-items: center; width: 46px; height: 46px; flex: 0 0 46px;
  border: 0; border-radius: 12px; background: var(--red-dark); color: var(--white);
  font-size: 1.2rem; cursor: pointer;
}
.chatbot__contact-prompt {
  display: flex; align-items: center; justify-content: center; gap: var(--space-2);
  padding: 2px var(--space-3) var(--space-2); color: var(--muted); font-size: .76rem;
}
.chatbot__contact-prompt button {
  padding: 0; border: 0; background: transparent; color: var(--red-dark);
  font: inherit; font-weight: 800; cursor: pointer;
}
.chatbot__contact { flex: 1; overflow-y: auto; padding: var(--space-4); }
.chatbot__contact-heading { margin-bottom: var(--space-4); }
.chatbot__contact label { display: block; margin-bottom: var(--space-3); }
.chatbot__contact label > span { display: block; margin-bottom: 4px; font-size: .78rem; font-weight: 800; }
.chatbot__contact input, .chatbot__contact textarea {
  width: 100%; padding: 11px 12px; border: 1px solid var(--border-strong);
  border-radius: 10px; background: var(--white); color: var(--text); font: inherit;
}
.chatbot__contact textarea { resize: vertical; }
.chatbot__contact-submit { width: 100%; }
.chatbot__honeypot {
  position: absolute !important; left: -9999px !important; width: 1px !important;
  height: 1px !important; opacity: 0 !important;
}
.chatbot__form-status { min-height: 1.4em; margin: var(--space-2) 0 0; color: var(--muted); font-size: .78rem; }
.chatbot__privacy {
  margin: 0; padding: var(--space-2) var(--space-3) var(--space-3);
  color: var(--muted); font-size: .68rem; line-height: 1.35; text-align: center;
}
body.chatbot-open .mobile-join-cta { opacity: 0; pointer-events: none; transform: translateY(120%); }
@media (max-width: 760px) {
  .chatbot__launcher { right: var(--space-3); bottom: calc(84px + env(safe-area-inset-bottom)); }
  .chatbot__panel {
    left: var(--space-2); right: var(--space-2); bottom: calc(var(--space-2) + env(safe-area-inset-bottom));
    width: auto; height: min(680px, calc(100dvh - 16px - env(safe-area-inset-bottom))); border-radius: 18px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .chatbot__launcher, .chatbot__panel { transition: none; }
}
