.ref3-chatbot {
  position: fixed;
  right: 24px;
  /* Keep the launcher above the site's fixed Manual button (bottom: 15px). */
  bottom: 88px;
  z-index: 1080;
  font-family: inherit;
}

.ref3-chatbot[hidden] { display: none !important; }

.ref3-chatbot-launcher {
  display: flex;
  align-items: center;
  gap: 9px;
  border: 0;
  border-radius: 999px;
  padding: 13px 18px;
  color: #fff;
  background: #2367d1;
  box-shadow: 0 5px 20px rgba(24, 48, 91, .25);
  font-weight: 700;
  cursor: pointer;
}

.ref3-chatbot-panel {
  position: absolute;
  right: 0;
  bottom: 68px;
  display: flex;
  flex-direction: column;
  width: min(380px, calc(100vw - 32px));
  height: auto;
  max-height: min(580px, calc(100vh - 120px));
  min-height: 0;
  padding: 0;
  gap: 0;
  overflow: hidden;
  border: 1px solid #e0e6ef;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 12px 40px rgba(24, 48, 91, .22);
}

.ref3-chatbot-panel[aria-hidden="true"] { display: none; }
.ref3-chatbot-header { display: flex; flex: 0 0 auto; justify-content: space-between; align-items: center; margin: 0; padding: 16px; color: #fff; background: #2367d1; }
.ref3-chatbot-header div { display: flex; flex-direction: column; gap: 3px; }
.ref3-chatbot-header span { font-size: 12px; opacity: .9; }
.ref3-chatbot-close { border: 0; color: #fff; background: transparent; font-size: 26px; line-height: 1; cursor: pointer; }
.ref3-chatbot-body { flex: 0 1 auto; min-height: 0; max-height: min(440px, calc(100vh - 240px)); overflow-y: auto; padding: 14px; background: #f6f8fc; }
.ref3-chatbot-message { max-width: 88%; margin: 0 0 10px; padding: 10px 12px; border-radius: 12px; background: #fff; color: #283445; white-space: pre-wrap; overflow-wrap: anywhere; box-shadow: 0 1px 3px rgba(0, 0, 0, .06); }
.ref3-chatbot-message-user { margin-left: auto; background: #dce9ff; }
.ref3-chatbot-options { display: flex; flex-direction: column; align-items: flex-start; gap: 7px; margin: 0 0 14px 4px; }
.ref3-chatbot-option { border: 1px solid #2367d1; border-radius: 999px; padding: 8px 13px; color: #2059b2; background: #fff; text-align: left; cursor: pointer; }
.ref3-chatbot-option:hover, .ref3-chatbot-option:focus-visible { color: #fff; background: #2367d1; }
.ref3-chatbot-footer { display: flex; flex: 0 0 auto; justify-content: space-between; align-items: center; gap: 8px; margin: 0; padding: 8px 12px; border-top: 1px solid #e5e9f0; font-size: 12px; }
.ref3-chatbot-footer a { color: #40536d; }
.ref3-chatbot-home { border: 0; padding: 4px 0; color: #2367d1; background: none; cursor: pointer; }
.ref3-chatbot-status { padding: 8px 4px; color: #59677a; font-size: 13px; }

@media (max-width: 575px) {
  .ref3-chatbot { right: 12px; bottom: 82px; }
  .ref3-chatbot-launcher { padding: 12px 15px; }
  .ref3-chatbot-panel {
    position: fixed;
    right: 8px;
    bottom: calc(82px + 48px + 12px);
    width: calc(100vw - 16px);
    max-height: min(72vh, 600px);
  }
  .ref3-chatbot-body { max-height: min(440px, calc(72vh - 120px)); }
}

@media (prefers-reduced-motion: reduce) {
  .ref3-chatbot *, .ref3-chatbot *::before, .ref3-chatbot *::after { scroll-behavior: auto !important; transition: none !important; }
}
