/* Agentic Rx Assistant. Change the two brand colours below to match the site. */
.arx-chat, .arx-bubble {
  --arx-brand: #0b4f6c;
  --arx-accent: #12a39a;
  --arx-bg: #ffffff;
  --arx-soft: #f2f6f8;
  --arx-text: #1d2b33;
  --arx-muted: #5d6f78;
  --arx-warn-bg: #fff6e5;
  --arx-warn-line: #f0b44c;
  font-family: inherit;
  box-sizing: border-box;
}
.arx-chat *, .arx-chat *::before, .arx-chat *::after { box-sizing: border-box; }
/* Neutralise the site theme's button styling inside the chat. */
.arx-chat button, .arx-bubble { font-family: inherit; text-transform: none; letter-spacing: normal; line-height: 1.2; min-height: 0; margin: 0; box-shadow: none; text-decoration: none; }
.arx-chat button:hover, .arx-chat button:focus { box-shadow: none; text-decoration: none; }

.arx-chat {
  display: flex; flex-direction: column;
  background: var(--arx-bg); color: var(--arx-text);
  border: 1px solid #dfe7eb; border-radius: 16px; overflow: hidden;
  box-shadow: 0 10px 30px rgba(11, 79, 108, .10);
  font-size: 15px; line-height: 1.5;
}
.arx-wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: clamp(8px, 2vw, 32px) clamp(0px, 2vw, 24px) clamp(24px, 4vw, 56px); box-sizing: border-box; }
.arx-intro { text-align: center; margin: 0 auto clamp(12px, 2vw, 28px); max-width: 760px; }
.arx-intro h1 { margin: 0 0 6px; font-size: clamp(26px, 2.2vw + 14px, 44px); line-height: 1.15; color: var(--arx-brand, #0b4f6c); }
.arx-intro p { margin: 0; font-size: clamp(14px, .4vw + 12px, 18px); color: #5d6f78; }
.arx-inline {
  width: 100%; max-width: 1080px; margin: 0 auto;
  /* Fills the screen below the site header, within sensible limits. */
  height: clamp(480px, calc(100vh - 250px), 920px);
  font-size: clamp(14.5px, .25vw + 13.5px, 17px);
}
@supports (height: 100dvh) { .arx-inline { height: clamp(480px, calc(100dvh - 250px), 920px); } }
.arx-inline .arx-log { padding: clamp(12px, 2vw, 28px); gap: 12px; }
.arx-inline .arx-form, .arx-inline .arx-chips, .arx-inline .arx-disclaimer, .arx-inline .arx-consent { padding-left: clamp(12px, 2vw, 28px); padding-right: clamp(12px, 2vw, 28px); }
.arx-inline .arx-consent { max-width: 760px; }
@media (min-width: 900px) { .arx-inline .arx-msg { max-width: 76%; } }
@media (min-width: 1600px) { .arx-wrap { max-width: 1320px; } .arx-inline { max-width: 1200px; } .arx-inline .arx-msg { max-width: 68%; } }

.arx-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px; background: var(--arx-brand); color: #fff;
}
.arx-title { font-weight: 600; font-size: 16px; display: flex; align-items: center; gap: 8px; }
.arx-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--arx-accent); box-shadow: 0 0 0 3px rgba(18,163,154,.3); }
.arx-chat .arx-close { background: none !important; border: 0 !important; color: #fff; font-size: 26px; line-height: 1; cursor: pointer; padding: 0 4px; }

.arx-disclaimer {
  background: var(--arx-warn-bg); border-bottom: 1px solid var(--arx-warn-line);
  padding: 10px 16px; font-size: 12.5px; color: #4a3b1b;
}

.arx-consent { flex: 1 1 auto; padding: 22px 20px; overflow-y: auto; }
.arx-consent p { margin: 0 0 10px; font-weight: 600; }
.arx-consent label { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; cursor: pointer; }
.arx-consent input { margin-top: 4px; flex: 0 0 auto; }
.arx-chat .arx-start {
  margin-top: 16px; background: var(--arx-accent) !important; color: #fff !important; border: 0 !important; border-radius: 999px !important;
  padding: 11px 24px !important; font-weight: 600; cursor: pointer; font-size: 15px !important;
}
.arx-start:disabled { opacity: .45; cursor: not-allowed; }

.arx-log { flex: 1 1 auto; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; background: var(--arx-soft); }
.arx-msg { max-width: 88%; padding: 10px 14px; border-radius: 14px; word-wrap: break-word; }
.arx-msg p { margin: 0 0 8px; } .arx-msg p:last-child { margin-bottom: 0; }
.arx-msg ul, .arx-msg ol { margin: 4px 0 8px 18px; padding: 0; }
.arx-msg li { margin: 2px 0; }
.arx-msg a { color: var(--arx-brand); text-decoration: underline; }
.arx-msg .arx-h { font-weight: 700; }
.arx-msg .arx-k { color: var(--arx-muted); font-size: 0.92em; }
.arx-assistant { align-self: flex-start; background: #fff; border: 1px solid #e3eaee; border-bottom-left-radius: 4px; }
.arx-user { align-self: flex-end; background: var(--arx-brand); color: #fff; border-bottom-right-radius: 4px; }
.arx-error { border-color: #e6a6a6; background: #fff3f3; }

.arx-typing { display: flex; gap: 5px; padding: 14px; }
.arx-typing span { width: 7px; height: 7px; border-radius: 50%; background: var(--arx-muted); animation: arx-b 1.2s infinite ease-in-out; }
.arx-typing span:nth-child(2) { animation-delay: .15s; } .arx-typing span:nth-child(3) { animation-delay: .3s; }
@keyframes arx-b { 0%, 80%, 100% { opacity: .3; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-4px); } }

.arx-chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px 12px 0; background: var(--arx-soft); }
.arx-chat .arx-chips button {
  border: 1px solid #cfdde3 !important; background: #fff !important; color: var(--arx-brand) !important; border-radius: 999px !important;
  padding: 6px 12px !important; font-size: 13px !important; font-weight: 500; cursor: pointer; white-space: nowrap;
}
.arx-chat .arx-chips button:hover { border-color: var(--arx-accent) !important; background: #f4fbfa !important; }

.arx-form { display: flex; gap: 8px; padding: 10px 12px; border-top: 1px solid #e3eaee; background: #fff; }
.arx-input {
  flex: 1; font-size: 16px !important; /* 16px stops iPhones zooming in on tap */ resize: none; border: 1px solid #cfdde3; border-radius: 12px; padding: 10px 12px;
  font: inherit; color: inherit; background: #fff; min-height: 42px; max-height: 140px;
}
.arx-input:focus { outline: 2px solid var(--arx-accent); outline-offset: 0; border-color: transparent; }
.arx-chat .arx-send { width: 46px; flex: 0 0 46px; padding: 0 !important; border: 0 !important; border-radius: 12px !important; background: var(--arx-accent) !important; color: #fff !important; font-size: 17px !important; cursor: pointer; }
.arx-send:disabled { opacity: .5; }

.arx-foot { padding: 6px 14px 10px; font-size: 11.5px; color: var(--arx-muted); text-align: center; background: #fff; }
.arx-foot a { color: var(--arx-brand); }

/* Floating mode */
.arx-bubble {
  position: fixed; right: 20px; bottom: 20px; z-index: 99998;
  display: flex; align-items: center; gap: 8px; border: 0; cursor: pointer;
  background: var(--arx-brand); color: #fff; border-radius: 999px; padding: 12px 18px;
  font-size: 15px; font-weight: 600; box-shadow: 0 8px 24px rgba(0,0,0,.2);
}
.arx-bubble.arx-hide { display: none; }
.arx-floating {
  position: fixed; right: 20px; bottom: 20px; z-index: 99999;
  width: 390px; height: 620px; max-height: calc(100vh - 40px); display: none;
}
.arx-floating.arx-open { display: flex; }
@media (max-width: 768px) {
  /* Phones and small tablets: fill the screen, leave room at the bottom for the site's WhatsApp button. */
  .arx-wrap { padding: 4px 0 84px; }
  .arx-intro { margin-bottom: 10px; padding: 0 8px; }
  .arx-intro p { display: none; }
  .arx-inline { height: calc(100vh - 260px); min-height: 420px; border-radius: 12px; }
  @supports (height: 100dvh) { .arx-inline { height: calc(100dvh - 260px); } }
  .arx-foot { padding-right: 70px; padding-left: 12px; text-align: left; } /* keep clear of the WhatsApp button */
  .arx-disclaimer { font-size: 11.5px; line-height: 1.4; padding-top: 8px; padding-bottom: 8px; }
  .arx-chips { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 6px; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
  .arx-chips::-webkit-scrollbar { display: none; }
  .arx-chips button { flex: 0 0 auto; }
  .arx-msg { max-width: 92%; }
  .arx-form { padding-bottom: max(10px, env(safe-area-inset-bottom)); }
}
@media (max-width: 520px) {
  .arx-floating { right: 0; bottom: 0; width: 100%; height: 100%; max-height: 100%; border-radius: 0; }
  .arx-bubble span { display: none; }
}
@media (max-height: 520px) and (orientation: landscape) {
  /* Phones turned sideways: hide the banner text to make room for the conversation. */
  .arx-inline { height: calc(100vh - 24px); min-height: 300px; }
  .arx-inline .arx-disclaimer { font-size: 11px; max-height: 3.2em; overflow: hidden; }
}
.arx-chat [hidden] { display: none !important; }
