.ask-pharmacist-root {
  --ask-bg: #ffffff;
  --ask-soft: #f7f7f7;
  --ask-soft-2: #efefef;
  --ask-ink: #151515;
  --ask-green: #80ba27;
  --ask-line: rgba(21, 21, 21, 0.12);
  --ask-muted: rgba(21, 21, 21, 0.62);
  position: relative;
  z-index: 9990;
}

.ask-pharmacist-root .sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.ask-pharmacist-launcher {
  position: fixed;
  z-index: 9994;
  top: 45%;
  right: 0;
  transform: translateY(-50%);
  width: 4.6rem;
  min-height: 3.75rem;
  padding: 0.6rem 0.5rem;
  overflow: hidden;
  border: 0;
  border-radius: 1.375rem 0 0 1.375rem;
  background-color: #ffffff38;
  color: var(--ask-ink);
  box-shadow: 0 0.45rem 1.35rem rgba(0, 0, 0, 0.07);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.7rem;
  cursor: pointer;
  font: inherit;
  white-space: nowrap;
  transition:
    width 200ms ease,
    padding 200ms ease,
    background-color 180ms ease,
    box-shadow 180ms ease;
}

.ask-pharmacist-launcher::before {
  content: "‹";
  flex: 0 0 auto;
  color: var(--ask-green);
  font-size: 1.25rem;
  line-height: 1;
  font-weight: 800;
  margin-left: 0.05rem;
  margin-right: -0.22rem;
  transition:
    transform 180ms ease,
    opacity 180ms ease;
}

.ask-pharmacist-launcher:hover,
.ask-pharmacist-launcher:focus-visible {
  width: 15.75rem;
  padding-left: 0.7rem;
  padding-right: 1rem;
  background-color: rgba(255, 255, 255, 0.82);
  box-shadow: 0 0.7rem 2rem rgba(0, 0, 0, 0.11);
}

.ask-pharmacist-launcher:hover::before,
.ask-pharmacist-launcher:focus-visible::before {
  transform: translateX(-0.12rem);
}

.ask-pharmacist-launcher-rph {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.55rem;
  height: 2.55rem;
  border-radius: 999px;
  background: var(--ask-green);
  color: var(--ask-ink);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.06em;
}

.ask-pharmacist-launcher-title {
  flex: 0 0 auto;
  width: 8.75rem;
  opacity: 0;
  transform: translateX(0.45rem);
  text-align: left;
  text-transform: uppercase;
  font-size: 0.69rem;
  line-height: 1.18;
  font-weight: 750;
  letter-spacing: 0.07em;
  transition:
    opacity 140ms ease 35ms,
    transform 180ms ease;
}

.ask-pharmacist-launcher:hover .ask-pharmacist-launcher-title,
.ask-pharmacist-launcher:focus-visible .ask-pharmacist-launcher-title {
  opacity: 1;
  transform: translateX(0);
}


@keyframes ask-pharmacist-unread-pulse {
  0%,
  100% {
    box-shadow:
      0 0.45rem 1.35rem rgba(0, 0, 0, 0.07),
      0 0 0 0 rgba(128, 186, 39, 0);
  }

  50% {
    box-shadow:
      0 0.55rem 1.55rem rgba(0, 0, 0, 0.09),
      0 0 0 0.42rem rgba(128, 186, 39, 0.18);
  }
}

.ask-pharmacist-root.has-unread .ask-pharmacist-launcher {
  animation: ask-pharmacist-unread-pulse 2.2s ease-in-out infinite;
  background-color: rgba(128, 186, 39, 0.16);
  box-shadow:
    0 0.55rem 1.55rem rgba(0, 0, 0, 0.09),
    0 0 0 0.18rem rgba(128, 186, 39, 0.22);
}

.ask-pharmacist-root.has-unread .ask-pharmacist-launcher:hover,
.ask-pharmacist-root.has-unread .ask-pharmacist-launcher:focus-visible {
  animation-play-state: paused;
}

.ask-pharmacist-unread {
  position: absolute;
  z-index: 2;
  top: 0.18rem;
  right: 0.18rem;
  left: auto;
  min-width: 1.3rem;
  height: 1.3rem;
  padding: 0 0.3rem;
  border-radius: 999px;
  background: var(--ask-green);
  color: var(--ask-ink);
  border: 2px solid #fff;
  font-size: 0.67rem;
  line-height: 1.05rem;
  font-weight: 800;
  text-align: center;
}

.ask-pharmacist-backdrop {
  display: none !important;
  position: fixed;
  z-index: 9995;
  inset: 0;
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  pointer-events: none;
}

.ask-pharmacist-drawer {
  position: fixed;
  z-index: 9996;
  top: calc(var(--nav-height, 80px) + 1rem);
  right: 1rem;
  bottom: 1rem;
  width: min(28rem, calc(100vw - 2rem));
  height: auto;
  background:
    linear-gradient(
      155deg,
      rgba(255, 255, 255, 0.95),
      rgba(247, 247, 247, 0.90)
    );
  color: var(--ask-ink);
  border: 1px solid rgba(21, 21, 21, 0.11);
  border-radius: 1.5rem;
  box-shadow:
    -0.4rem 1rem 3.5rem rgba(0, 0, 0, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(22px) saturate(118%);
  -webkit-backdrop-filter: blur(22px) saturate(118%);
  overflow: hidden;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto auto;
  transform: translateX(calc(100% + 2rem));
  transition: transform 220ms ease;
}

.ask-pharmacist-root.is-open .ask-pharmacist-drawer {
  transform: translateX(0);
}

.ask-pharmacist-root.is-open .ask-pharmacist-launcher {
  opacity: 0;
  pointer-events: none;
}

.ask-pharmacist-header {
  padding: 1.35rem 1.35rem 1.15rem;
  border-bottom: 1px solid var(--ask-line);
  background: rgba(255, 255, 255, 0.45);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
}

.ask-pharmacist-header h2 {
  margin: 0.32rem 0 0.25rem;
  font-size: 1.65rem;
  line-height: 1.08;
}

.ask-pharmacist-header p {
  margin: 0;
  color: var(--ask-muted);
  font-size: 0.88rem;
  line-height: 1.4;
}

.ask-pharmacist-eyebrow {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  text-transform: uppercase;
  font-size: 0.68rem;
  line-height: 1;
  letter-spacing: 0.1em;
  font-weight: 700;
  color: var(--ask-muted);
}

.ask-pharmacist-rph-mark {
  color: var(--ask-green);
  font-weight: 900;
}

.ask-pharmacist-close {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--ask-ink);
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 999px;
  cursor: pointer;
  font: inherit;
  font-size: 1.75rem;
  line-height: 1;
  display: grid;
  place-items: center;
}

.ask-pharmacist-close:hover,
.ask-pharmacist-close:focus-visible {
  background: var(--ask-soft-2);
}

.ask-pharmacist-messages {
  min-height: 0;
  overflow-y: auto;
  padding: 1.15rem 1.2rem 1.4rem;
  background:
    linear-gradient(
      180deg,
      rgba(239, 239, 239, 0.45),
      rgba(247, 247, 247, 0.30) 22%,
      rgba(255, 255, 255, 0.24)
    );
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.ask-pharmacist-history-more {
  align-self: center;
  appearance: none;
  border: 1px solid rgba(21, 21, 21, 0.13);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--ask-muted);
  padding: 0.48rem 0.78rem;
  cursor: pointer;
  font: inherit;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.025em;
}

.ask-pharmacist-history-more:hover,
.ask-pharmacist-history-more:focus-visible {
  border-color: rgba(128, 186, 39, 0.48);
  color: var(--ask-ink);
  background: rgba(128, 186, 39, 0.08);
}

.ask-pharmacist-history-more:disabled {
  cursor: wait;
  opacity: 0.55;
}

.ask-pharmacist-context-divider {
  align-self: stretch;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin: 0.18rem 0 0.02rem;
  color: var(--ask-muted);
  font-size: 0.65rem;
  line-height: 1.2;
  font-weight: 750;
  letter-spacing: 0.045em;
  text-transform: uppercase;
}

.ask-pharmacist-context-divider::before,
.ask-pharmacist-context-divider::after {
  content: "";
  flex: 1 1 auto;
  height: 1px;
  background: var(--ask-line);
}

.ask-pharmacist-context-chip {
  flex: 0 1 auto;
  max-width: 72%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ask-pharmacist-empty {
  margin: auto 0;
  padding: 1.15rem;
  border: 1px solid var(--ask-line);
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.76);
  color: var(--ask-muted);
  font-size: 0.88rem;
  line-height: 1.5;
}

.ask-pharmacist-empty-title {
  color: var(--ask-ink);
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.ask-pharmacist-message {
  max-width: 84%;
  display: grid;
  gap: 0.3rem;
}

.ask-pharmacist-message.is-prescriber {
  align-self: flex-end;
  justify-items: end;
}

.ask-pharmacist-message.is-pharmacy {
  align-self: flex-start;
  justify-items: start;
}

.ask-pharmacist-message-meta {
  padding: 0 0.2rem;
  color: var(--ask-muted);
  font-size: 0.67rem;
  line-height: 1.25;
}

.ask-pharmacist-message-bubble {
  padding: 0.78rem 0.88rem;
  border-radius: 1rem;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 0.91rem;
  line-height: 1.46;
}

.ask-pharmacist-message.is-prescriber .ask-pharmacist-message-bubble {
  background: var(--ask-ink);
  color: #fff;
  border-bottom-right-radius: 0.3rem;
}

.ask-pharmacist-message.is-pharmacy .ask-pharmacist-message-bubble {
  background: var(--ask-soft-2);
  color: var(--ask-ink);
  border-left: 3px solid var(--ask-green);
  border-bottom-left-radius: 0.3rem;
}

.ask-pharmacist-referral {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0.85rem 1.2rem 0;
  padding: 0.62rem 0.72rem;
  border: 1px solid rgba(128, 186, 39, 0.24);
  border-radius: 0.7rem;
  background: rgba(128, 186, 39, 0.07);
  color: var(--ask-ink);
  font-size: 0.76rem;
  line-height: 1.3;
  font-weight: 650;
}

.ask-pharmacist-referral[hidden] {
  display: none;
}

.ask-pharmacist-referral-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  min-width: 2rem;
  height: 1.35rem;
  padding: 0 0.4rem;
  border-radius: 999px;
  background: var(--ask-green);
  color: var(--ask-ink);
  font-size: 0.64rem;
  font-weight: 850;
  letter-spacing: 0.04em;
}


.ask-pharmacist-status {
  margin: 0 1.2rem;
  padding: 0.7rem 0.8rem;
  border-top: 1px solid var(--ask-line);
  color: var(--ask-muted);
  font-size: 0.78rem;
  line-height: 1.35;
}

.ask-pharmacist-status.is-error {
  color: #b84d00;
  font-weight: 600;
}

.ask-pharmacist-status.is-success {
  color: #4f7d10;
}

.ask-pharmacist-composer {
  padding: 1rem 1.2rem 1.15rem;
  border-top: 1px solid var(--ask-line);
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.ask-pharmacist-composer textarea {
  width: 100%;
  min-height: 5.5rem;
  max-height: 12rem;
  resize: vertical;
  box-sizing: border-box;
  border: 1px solid rgba(21, 21, 21, 0.2);
  border-radius: 0.9rem;
  background: var(--ask-soft);
  color: var(--ask-ink);
  padding: 0.8rem 0.85rem;
  font: inherit;
  font-size: 0.9rem;
  line-height: 1.45;
  outline: none;
}

.ask-pharmacist-composer textarea:focus {
  border-color: var(--ask-green);
  box-shadow: 0 0 0 3px rgba(128, 186, 39, 0.13);
}

.ask-pharmacist-composer-bottom {
  margin-top: 0.7rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
}

.ask-pharmacist-composer-note {
  color: var(--ask-muted);
  font-size: 0.69rem;
  line-height: 1.3;
}

.ask-pharmacist-send {
  appearance: none;
  border: 0;
  border-radius: 999px;
  background: var(--ask-green);
  color: var(--ask-ink);
  padding: 0.7rem 1.15rem;
  min-width: 5rem;
  cursor: pointer;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

.ask-pharmacist-send:hover,
.ask-pharmacist-send:focus-visible {
  filter: brightness(0.96);
}

.ask-pharmacist-send:disabled {
  cursor: wait;
  opacity: 0.58;
}

body.ask-pharmacist-lock {
  overflow: auto;
}

@media screen and (max-width: 767px) {
  .ask-pharmacist-launcher {
    top: auto;
    right: 0.75rem;
    bottom: 1rem;
    transform: none;
    max-width: calc(100vw - 1.5rem);
    padding: 0.65rem 0.85rem;
    border: 1px solid rgba(21, 21, 21, 0.14);
    border-radius: 999px;
  }

  .ask-pharmacist-launcher:hover,
  .ask-pharmacist-launcher:focus-visible {
    transform: translateY(-0.15rem);
  }

  .ask-pharmacist-launcher-rph {
    min-width: 2rem;
    height: 2rem;
  }

  .ask-pharmacist-launcher-title {
    max-width: none;
    font-size: 0.68rem;
  }

  .ask-pharmacist-unread {
    top: 0.18rem;
    right: 0.18rem;
    left: auto;
  }

  .ask-pharmacist-drawer {
    top: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    border: 0;
    border-radius: 0;
  }

  .ask-pharmacist-header {
    padding-top: calc(1.15rem + env(safe-area-inset-top));
  }

  .ask-pharmacist-composer {
    padding-bottom: calc(1rem + env(safe-area-inset-bottom));
  }
}

@media (prefers-reduced-motion: reduce) {
  .ask-pharmacist-root.has-unread .ask-pharmacist-launcher {
    animation: none;
    box-shadow:
      0 0.45rem 1.35rem rgba(0, 0, 0, 0.07),
      0 0 0 0.18rem rgba(128, 186, 39, 0.20);
  }

  .ask-pharmacist-drawer,
  .ask-pharmacist-launcher {
    transition: none;
  }
}
