/* AB Navigation — base.css
   Tokens + layout pinned to Figma (fileKey jQvpFrijkbWz4ODQfZMZFc).
   Services root:    21421:65408 / 21632:3904
   Doctor services:  21380:1520 */

:root {
  --ab-white: #ffffff;
  --ab-brand: #0065f2;
  --ab-brand-deep: #005bda;
  --ab-bg-tint: #ecf4fe;
  --ab-bg-light-blue: #cce0fc;       /* Site Colours/Backgrounds/Light Blue + B-Tertiary */
  --ab-text-primary: #25292e;
  --ab-text-secondary: #3e4247;
  --ab-text-on-brand-title: #cce0fc;
  --ab-text-b-subdued: #99c1fa;      /* Site Colours/Text/B-Subdued (breadcrumb upstream) */
  --ab-border-button: #d4d5d6;       /* Site Colours/Buttons/Border */

  /* Continue bar states.
     Disabled = Figma Yellow-50 fill + W-Subdued text (node 21380:1520).
     Enabled  = InstantScripts brand orange (Yellow-600 #c27100 is the same
     accent used in the page title "Request one or more services"). */
  --ab-continue-disabled-bg: #fef4e6;  /* Colour Spectrum/Yellow-50 */
  --ab-continue-disabled-fg: #a9abad;
  --ab-continue-enabled-bg: #f28d00;   /* Colour Spectrum/Yellow-500 */
  --ab-continue-enabled-fg: #ffffff;
  --ab-accent-orange: #c27100;

  --ab-panel-width: 375px;
  --ab-content-width: 343px;

  --ab-card-radius: 20px;
  --ab-tab-pill-radius: 44px;
  --ab-continue-pill-radius: 8px;

  --ab-font-heading: 'Centra No2', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, system-ui, sans-serif;
  --ab-font-body: 'Centra No2', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, system-ui, sans-serif;
  --ab-font-tab: 'Circular Std', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, system-ui, sans-serif;

  /* Popup tokens (Figma 21740:24120). Head band uses Lightest Blue; body is
     white with an inset bottom shadow; chip uses Green-50/Green-800; CTA is
     the standard brand button. */
  --ab-popup-head-bg: #ecf4fe;              /* Site Colours/Backgrounds/Lightest Blue */
  --ab-popup-body-bg: #ffffff;
  --ab-popup-body-fg: #696c70;              /* Site Colours/Text/W-Tertiary (Body) */
  --ab-popup-chip-bg: #e6feec;              /* Colour Spectrum/Green-50; also reused as .ab-nav-promo background */
  --ab-popup-chip-fg: #00611c;              /* Colour Spectrum/Green-800 */
  --ab-popup-width: 327px;
  --ab-popup-radius: 23px;
  --ab-popup-backdrop: rgba(0, 0, 0, 0.5);

  /* Info box tokens (Figma 21570:61926). Light grey fill with body text in
     W-Secondary and green accent on safety phrases (Green-700). */
  --ab-info-box-bg: #efeff0;                /* Colour Spectrum/Grey-0; also reused as .ab-nav-more-stack background */
  --ab-info-box-accent: #00a930;            /* Colour Spectrum/Green-700 */

  --ab-shadow-panel: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  --ab-shadow-continue: 0 0 4px rgba(0, 0, 0, 0.05);
  --ab-shadow-popup-head: 0 -4px 4px rgba(0, 0, 0, 0.02);
  --ab-shadow-popup-body-inset: inset 0 -4px 4px rgba(0, 0, 0, 0.05);
  --ab-transition-panel: transform 320ms cubic-bezier(0.22, 0.61, 0.36, 1);
  --ab-transition-page: transform 320ms cubic-bezier(0.22, 0.61, 0.36, 1);
  --ab-transition-chrome: opacity 220ms ease, transform 220ms ease, background-color 220ms ease, color 220ms ease;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--ab-font-body);
  color: var(--ab-text-primary);
  background: #e5e7eb;
  min-height: 100vh;
}

/* -------- Open trigger (demo-only) -------- */
#ab-nav-trigger {
  position: fixed;
  top: 16px;
  right: 16px;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  background: var(--ab-brand);
  border-radius: 43px;
  cursor: pointer;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  z-index: 10;
  box-shadow: 0 4px 12px rgba(0, 101, 242, 0.25);
}
.ab-nav-trigger-bar {
  display: block;
  width: 16px;
  height: 2px;
  background: var(--ab-white);
  border-radius: 2px;
}

/* -------- Panel shell (persistent chrome + sliding body) -------- */
#ab-nav-panel {
  position: fixed;
  top: 0;
  right: 0;
  width: var(--ab-panel-width);
  max-width: 100vw;
  height: 100vh;
  background: var(--ab-white);
  box-shadow: var(--ab-shadow-panel);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: translateX(100%);
  transition: var(--ab-transition-panel);
  z-index: 20;
}
#ab-nav-panel.ab-nav-panel--open {
  transform: translateX(0);
}

/* -------- Persistent header (does not slide) -------- */
.ab-nav-header {
  position: relative;
  background: var(--ab-brand);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 8px 8px 16px;
  flex-shrink: 0;
  z-index: 3;
}
.ab-nav-logo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 24px;
  opacity: 1;
  transform: translateX(0);
  transition: var(--ab-transition-chrome);
}
.ab-nav-logo-mark {
  width: 34px;
  height: 24px;
  display: block;
  flex-shrink: 0;
}
.ab-nav-logo-word {
  width: 109px;
  height: 16px;
  display: block;
  flex-shrink: 0;
}
.ab-nav-logo--hidden {
  opacity: 0;
  transform: translateX(-8px);
  pointer-events: none;
}

/* Breadcrumbs sit in the same header slot as the logo; only one is visible
   at a time (logo on root services, breadcrumbs on drilled-in sub-pages). */
.ab-nav-breadcrumbs {
  position: absolute;
  left: 16px;
  top: 50%;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--ab-font-body);
  font-size: 14px;
  line-height: 24px;
  color: var(--ab-white);
  white-space: nowrap;
  opacity: 0;
  transform: translateY(-50%) translateX(-8px);
  transform-origin: left center;
  transition: var(--ab-transition-chrome);
  pointer-events: none;
}
.ab-nav-breadcrumbs--visible {
  opacity: 1;
  transform: translateY(-50%) translateX(0);
  pointer-events: auto;
}
.ab-nav-breadcrumbs__root {
  color: var(--ab-white);
}
.ab-nav-breadcrumbs__sep {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--ab-text-b-subdued);
  width: 4px;
  height: 8px;
}
.ab-nav-breadcrumbs__parent {
  color: var(--ab-white);
  white-space: nowrap;
}
.ab-nav-breadcrumbs__current {
  color: var(--ab-text-b-subdued);
}
/* Parent slot + its trailing separator only appear on 3rd-level pages. Backend
   populates the slot's textContent; an empty slot collapses both itself and
   the following separator, so 2nd-level pages keep the short "Home > Current"
   trail. */
.ab-nav-breadcrumbs__parent:empty,
.ab-nav-breadcrumbs__parent:empty + .ab-nav-breadcrumbs__sep--parent {
  display: none;
}
/* Clickable crumbs (root + parent) — render as plain text buttons that look
   identical to the spans they replaced; `setBreadcrumbText` in events.js
   toggles the parent's `hidden` attr in lockstep with its textContent so the
   trailing separator stays in sync via the `:empty` rule above. */
.ab-nav-breadcrumbs__crumb {
  background: none;
  border: 0;
  padding: 0;
  margin: 0;
  color: inherit;
  font: inherit;
  line-height: inherit;
  cursor: pointer;
}
.ab-nav-breadcrumbs__crumb:hover {
  text-decoration: underline;
}
.ab-nav-breadcrumbs__crumb:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

#ab-nav-close {
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ab-white);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background-color 150ms ease;
  position: relative;
  z-index: 1;
}
#ab-nav-close:hover {
  background: var(--ab-brand-deep);
}
#ab-nav-close:focus-visible {
  outline: 2px solid var(--ab-white);
  outline-offset: -2px;
}

/* -------- Body viewport: holds pages side-by-side, slides horizontally -------- */
.ab-nav-body {
  flex: 1 1 auto;
  position: relative;
  display: block;
  overflow: hidden;
  min-height: 0;
}

/* Each page is absolutely positioned inside the body viewport so horizontal
   slide transitions compose cleanly without reflowing siblings. Active page
   sits at translateX(0); inactive pages park off-screen in the direction they
   came from / are heading to. */
.ab-nav-page {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 32px 16px;
  display: flex;
  flex-direction: column;
  gap: 32px;
  align-items: stretch;
  transform: translateX(100%);
  transition: var(--ab-transition-page);
  pointer-events: none;
}
.ab-nav-page[hidden] {
  display: none;
}
.ab-nav-page--active {
  transform: translateX(0);
  pointer-events: auto;
}
/* Directional slide classes — Backend applies these during transitions */
.ab-nav-page--exiting-left {
  transform: translateX(-100%);
  pointer-events: none;
}
.ab-nav-page--entering-right {
  transform: translateX(100%);
  pointer-events: none;
}
.ab-nav-page--exiting-right {
  transform: translateX(100%);
  pointer-events: none;
}
.ab-nav-page--entering-left {
  transform: translateX(-100%);
  pointer-events: none;
}

/* -------- Tabs (Services root page) -------- */
.ab-nav-tabs {
  background: var(--ab-bg-tint);
  border-radius: var(--ab-tab-pill-radius);
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 52px;
  width: var(--ab-content-width);
  max-width: 100%;
  align-self: center;
  overflow: hidden;
  flex-shrink: 0;
}
.ab-nav-tab {
  flex: 1 0 0;
  min-width: 0;
  height: 44px;
  padding: 12px 24px;
  border: 0;
  background: transparent;
  color: var(--ab-text-secondary);
  font-family: var(--ab-font-tab);
  font-size: 16px;
  line-height: 24px;
  font-weight: 400;
  cursor: pointer;
  border-radius: var(--ab-tab-pill-radius);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  transition: background-color 180ms ease, color 180ms ease;
}
.ab-nav-tab--active {
  background: var(--ab-brand);
  color: var(--ab-white);
}
.ab-nav-tab:focus-visible {
  outline: 2px solid var(--ab-brand);
  outline-offset: 2px;
}

.ab-nav-tab-content {
  display: none;
}
.ab-nav-tab-content--active {
  display: block;
}

/* -------- Card stack (shared) -------- */
.ab-nav-cards {
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-self: center;
  width: var(--ab-content-width);
  max-width: 100%;
}
.ab-nav-card {
  display: flex;
  align-items: center;
  width: 100%;
  /* min-height matches --active state so the card does not reflow (grow taller)
     when its active class is toggled. Border-width is also kept identical
     across states (transparent 2px below; brand-coloured 2px in --active) to
     prevent a 2px content shift on selection. */
  min-height: 128px;
  padding: 16px 16px 16px 24px;
  background: var(--ab-bg-tint);
  border: 2px solid rgba(0, 0, 0, 0);
  border-radius: var(--ab-card-radius);
  cursor: pointer;
  text-align: left;
  font: inherit;
  color: inherit;
  gap: 8px;
  transition: background-color 180ms ease, border-color 180ms ease, box-shadow 180ms ease, color 180ms ease;
}
.ab-nav-card:focus-visible {
  outline: 2px solid var(--ab-brand);
  outline-offset: 2px;
}

/* Single-select active — Services root card fills brand blue. */
.ab-nav-card--active {
  background: var(--ab-brand);
  border-color: var(--ab-brand);
}
.ab-nav-card--active .ab-nav-card-title {
  color: var(--ab-text-on-brand-title);
}
.ab-nav-card--active .ab-nav-card-list li {
  color: var(--ab-white);
}
/* Stacked-variant desc text (e.g. doctor-consultation cards) flips to the
   light-on-brand title token when the card is active, matching the title's
   contrast against the brand-blue fill. */
.ab-nav-card--active .ab-nav-card-desc {
  color: var(--ab-text-on-brand-title);
}
.ab-nav-card--active .ab-nav-card-icon img,
.ab-nav-card--active .ab-nav-card-icon svg,
.ab-nav-card--active .ab-nav-card-list li img {
  filter: brightness(0) invert(1);
}

/* Multi-select active — Doctor Services page uses a tinted background + brand
   border ring so a ticked card reads distinctly from the single-select fill
   used on the root Services page. */
.ab-nav-card--active-multi {
  background: var(--ab-bg-light-blue);
  border-color: var(--ab-brand);
  box-shadow: inset 0 0 0 1px var(--ab-brand);
}
.ab-nav-card--active-multi .ab-nav-card-title {
  color: var(--ab-text-secondary);
}

.ab-nav-card-main {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  /* Figma column width (Services-root card, node 21421:65408): icon + title
     stack on the left in a 123px column; the .ab-nav-card-list bullets flex
     to fill the remaining space. The .ab-nav-card--stacked variant overrides
     this back to flex:1 so the description column on its right can hold 151px. */
  width: 123px;
  flex-shrink: 0;
}
.ab-nav-card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
}
.ab-nav-card-icon img {
  width: 32px;
  height: 32px;
  display: block;
}
.ab-nav-card-title {
  font-family: var(--ab-font-heading);
  font-weight: 700;
  font-size: 16px;
  line-height: 20px;
  color: var(--ab-text-secondary);
  display: flex;
  flex-direction: column;
}

.ab-nav-card-list {
  flex: 1 0 0;
  min-width: 0;
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 4px;
}
.ab-nav-card-list li {
  display: flex;
  align-items: center;
  gap: 4px;
  width: 100%;
  font-family: var(--ab-font-body);
  font-weight: 400;
  font-size: 14px;
  line-height: 21px;
  color: var(--ab-text-primary);
}
.ab-nav-card-list li img {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
  padding: 4px;
  box-sizing: content-box;
  display: block;
}

/* -------- Doctor Services sub-page -------- */
.ab-nav-subpage {
  display: flex;
  flex-direction: column;
  gap: 24px;
  align-items: stretch;
  width: 100%;
}
.ab-nav-subpage-title {
  margin: 0;
  align-self: center;
  width: var(--ab-content-width);
  max-width: 100%;
  font-family: var(--ab-font-heading);
  font-weight: 500;
  font-size: 20px;
  line-height: 30px;
  color: var(--ab-text-primary);
}
.ab-nav-accent {
  color: var(--ab-accent-orange);
}

/* Stacked card variant used on sub-pages: icon + title sit above-left, a
   description paragraph sits to the right (50/50 split per Figma 21380:1520). */
.ab-nav-card--stacked .ab-nav-card-main {
  width: auto;
  flex: 1 0 0;
  min-width: 0;
}
.ab-nav-card-desc {
  margin: 0;
  /* Figma column width (sub-page stacked variant, node 21380:1520): icon + title
     column flexes; description holds its 151px column to the right. */
  width: 151px;
  flex-shrink: 0;
  font-family: var(--ab-font-body);
  font-weight: 400;
  font-size: 14px;
  line-height: 21px;
  color: var(--ab-text-secondary);
}

/* -------- Reassurance info box (Figma 21570:61926) --------
   Conditional reassurance card on the medication-repeats page. Hidden by
   default; Backend removes [hidden] and adds .ab-nav-info-box--visible when
   the with-repeats card is selected. Light grey fill, body text with green
   accents on the safety phrases, and a small filled-blue info icon. */
.ab-nav-info-box {
  display: none;
  flex-direction: column;
  gap: 4px;
  width: 100%;
  padding: 16px;
  background: var(--ab-info-box-bg);
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 220ms ease, transform 220ms ease;
}
.ab-nav-info-box--visible {
  display: flex;
  opacity: 1;
  transform: translateY(0);
}
.ab-nav-info-box-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}
.ab-nav-info-box-title {
  margin: 0;
  font-family: var(--ab-font-heading);
  font-weight: 500;
  font-size: 16px;
  line-height: 24px;
  color: var(--ab-text-secondary);
  white-space: nowrap;
}
.ab-nav-info-box-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 31px;
  background: var(--ab-brand);
  flex-shrink: 0;
}
.ab-nav-info-box-body {
  margin: 0;
  width: 100%;
  font-family: var(--ab-font-body);
  font-weight: 400;
  font-size: 16px;
  line-height: 24px;
  color: var(--ab-text-secondary);
}
.ab-nav-info-box-accent {
  font-family: var(--ab-font-heading);
  font-weight: 500;
  color: var(--ab-info-box-accent);
}

/* -------- Dropdown / accordion (Figma 21400:4606) --------
   Used on the pathology-types page (21380:1518). Each dropdown is a
   collapsible row: a clickable header (lightest-blue pill, brand-blue icon
   + bold secondary-text label, brand-blue chevron) that toggles a body
   region beneath it. Backend toggles `.ab-nav-dropdown--open` on the wrapper
   and `aria-expanded` on the header button; the body's [hidden] attribute is
   removed when open. Card content inside the body is supplied by the next
   build — for now `.ab-nav-cards--stacked` renders empty as a placeholder. */
.ab-nav-dropdowns {
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-self: center;
  width: var(--ab-content-width);
  max-width: 100%;
}
.ab-nav-dropdown {
  display: flex;
  flex-direction: column;
  width: 100%;
}
.ab-nav-dropdown__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 16px 16px 16px 24px;
  background: var(--ab-bg-tint);
  border: 2px solid rgba(0, 0, 0, 0);
  border-radius: var(--ab-card-radius);
  cursor: pointer;
  text-align: left;
  font: inherit;
  color: inherit;
  transition: background-color 180ms ease, border-color 180ms ease;
}
.ab-nav-dropdown__header:focus-visible {
  outline: 2px solid var(--ab-brand);
  outline-offset: 2px;
}
.ab-nav-dropdown__label {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
}
.ab-nav-dropdown__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 5px;
  flex-shrink: 0;
}
.ab-nav-dropdown__icon img {
  width: 32px;
  height: 32px;
  display: block;
}
.ab-nav-dropdown__title {
  font-family: var(--ab-font-heading);
  font-weight: 700;
  font-size: 16px;
  line-height: 20px;
  color: var(--ab-text-secondary);
  white-space: nowrap;
}
.ab-nav-dropdown__chevron {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  flex-shrink: 0;
  transition: transform 220ms ease;
}
.ab-nav-dropdown__chevron img {
  width: 12px;
  height: 12px;
  display: block;
}
.ab-nav-dropdown--open .ab-nav-dropdown__chevron {
  transform: rotate(180deg);
}
.ab-nav-dropdown__body {
  display: none;
  padding: 16px 0 0;
}
.ab-nav-dropdown--open .ab-nav-dropdown__body {
  display: block;
}

/* Open accordion (pathology-types, specialist-types) merges the header and its
   stacked cards into a single rounded panel: header keeps top corners, body
   cards collapse to a 4px-spaced stack, and the last card carries the bottom
   corners. Excludes the More-tab `--contained` variant which has its own look. */
.ab-nav-dropdown__body .ab-nav-cards {
  gap: 4px;
}
.ab-nav-dropdown--open:not(.ab-nav-dropdown--contained) > .ab-nav-dropdown__header {
  background: var(--ab-bg-light-blue);
  border-radius: 20px 20px 0 0;
}
.ab-nav-dropdown--open:not(.ab-nav-dropdown--contained) > .ab-nav-dropdown__body .ab-nav-cards > * {
  border-radius: 0;
}
.ab-nav-dropdown--open:not(.ab-nav-dropdown--contained) > .ab-nav-dropdown__body .ab-nav-cards > *:last-child {
  border-radius: 0 0 20px 20px;
}

/* -------- More tab (Figma 21390:3633) --------
   Promo card + a contained accordion stack. The accordion stack reuses the
   .ab-nav-dropdown* contract (so Backend's existing toggle handler works)
   but wraps each row in a single 8px-radius pill, separated by white hairlines
   instead of gaps. Card content inside the InstantScripts body is a NEW link-
   list pattern (.ab-nav-link-list); the other three accordions ship with empty
   bodies until future builds populate them. */
.ab-nav-more {
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-self: center;
  width: var(--ab-content-width);
  max-width: 100%;
}

/* Promo card — green-tinted (Green-50) capsule with a 160px image strip on
   top and a title + body paragraph beneath. Whole card is a link. */
.ab-nav-promo {
  display: flex;
  flex-direction: column;
  width: 100%;
  background: var(--ab-popup-chip-bg);
  border-radius: 16px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}
.ab-nav-promo:focus-visible {
  outline: 2px solid var(--ab-brand);
  outline-offset: 2px;
}
.ab-nav-promo__media {
  display: block;
  width: 100%;
  height: 160px;
  overflow: hidden;
}
.ab-nav-promo__media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center bottom;
}
.ab-nav-promo__body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 16px;
}
.ab-nav-promo__title {
  font-family: var(--ab-font-heading);
  font-weight: 500;
  font-size: 24px;
  line-height: 32px;
  color: var(--ab-text-secondary);
}
.ab-nav-promo__text {
  font-family: var(--ab-font-body);
  font-weight: 400;
  font-size: 16px;
  line-height: 24px;
  color: var(--ab-popup-body-fg);
}
.ab-nav-promo__strong {
  font-weight: 500;
  color: var(--ab-popup-body-fg);
}

/* Contained accordion stack — single rounded outer pill (8px), light grey
   shell, with each accordion header/body sharing white hairline borders so
   they read as a connected list rather than separate cards. */
.ab-nav-more-stack {
  display: flex;
  flex-direction: column;
  width: 100%;
  background: var(--ab-info-box-bg);
  border-radius: 8px;
  overflow: hidden;
}
.ab-nav-dropdown--contained + .ab-nav-dropdown--contained {
  border-top: 1px solid var(--ab-white);
}

/* More-variant header + body share the Lightest Blue fill; only the padding
   differs (header is a 56px-min row, body adds bottom padding under the
   link list). */
.ab-nav-dropdown__header--more,
.ab-nav-dropdown__body--more {
  background: var(--ab-bg-tint);
}
.ab-nav-dropdown__header--more {
  padding: 8px 16px;
  border: 0;
  border-radius: 0;
  min-height: 56px;
}
.ab-nav-dropdown__header--more:focus-visible {
  outline: 2px solid var(--ab-brand);
  outline-offset: -2px;
}
.ab-nav-dropdown__label--logo {
  gap: 0;
}
.ab-nav-dropdown__label--icon {
  gap: 12px;
}

/* Logo label (InstantScripts + Pharmacy Health Hub headers). Mark + word sit
   side-by-side; the PHH header stacks a sub-line below them. */
.ab-nav-dropdown__logo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.ab-nav-dropdown__logo--stacked {
  flex-direction: column;
  align-items: flex-start;
  gap: 0;
}
.ab-nav-dropdown__logo-row {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.ab-nav-dropdown__logo-mark {
  width: 30px;
  height: 21px;
  display: block;
  flex-shrink: 0;
}
.ab-nav-dropdown__logo-word {
  width: 96px;
  height: 14px;
  display: block;
  flex-shrink: 0;
}
.ab-nav-dropdown__logo-sub {
  margin-left: 38px;       /* aligns the sub-line under the wordmark */
  font-family: var(--ab-font-body);
  font-weight: 400;
  font-size: 10px;
  line-height: 14px;
  color: var(--ab-brand);
  white-space: nowrap;
}

/* Smaller icon + 18px title on the icon-led headers (Help, Work with us).
   Both children always render together inside .ab-nav-dropdown__label--icon,
   so style them via descendant selectors instead of paired modifier classes. */
.ab-nav-dropdown__label--icon .ab-nav-dropdown__icon {
  padding: 4px;
}
.ab-nav-dropdown__label--icon .ab-nav-dropdown__icon img {
  width: 24px;
  height: 24px;
}
.ab-nav-dropdown__label--icon .ab-nav-dropdown__title {
  font-family: var(--ab-font-tab);
  font-weight: 400;
  font-size: 18px;
  line-height: 24px;
  color: var(--ab-text-secondary);
}

/* Circular chevron — 40px Lightest-Blue disc with a brand-blue caret.
   Source SVG points right; default 90deg rotation makes it point down
   (collapsed = ▼); -90deg on open makes it point up (open = ▲). */
.ab-nav-dropdown__chevron--circle {
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: 31px;
  background: var(--ab-bg-tint);
  flex-shrink: 0;
  transform: rotate(90deg);
}
.ab-nav-dropdown--open .ab-nav-dropdown__chevron--circle {
  transform: rotate(-90deg);
}

/* Body padding for the More-variant (background is set above alongside the
   header so the two visually link with no gap or border between them). */
.ab-nav-dropdown__body--more {
  padding: 4px 16px 20px;
}

/* Link-list (NEW content pattern, used inside the InstantScripts accordion
   body). Plain stacked rows with subdued body colour and 12px gap between
   items, matching Figma 21390:3633. */
.ab-nav-link-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.ab-nav-link-list__item {
  display: block;
  font-family: var(--ab-font-body);
  font-weight: 400;
  font-size: 16px;
  line-height: 24px;
  color: var(--ab-popup-body-fg);
  text-decoration: none;
}
.ab-nav-link-list__item:hover {
  color: var(--ab-text-secondary);
}
.ab-nav-link-list__item:focus-visible {
  outline: 2px solid var(--ab-brand);
  outline-offset: 2px;
  border-radius: 2px;
}

/* -------- Conditions tab — letter tiles (Figma 21380:1521) --------
   2-column grid of 26 tiles A-Z. Each tile is a single click target (whole
   <button>); the letter sits in a fixed-height header block above 5 example
   condition rows. Tiles are pure navigation — clicking one slides in the next
   page (wired by Backend via [data-tile-id]) and does NOT enable the continue
   bar. Lightest-blue fill, 20px radius, 16px column gap between tiles. */
.ab-nav-conditions {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  align-self: center;
  width: var(--ab-content-width);
  max-width: 100%;
}
.ab-nav-condition-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 24px 16px;
  width: 100%;
  background: var(--ab-bg-tint);
  border: 0;
  border-radius: var(--ab-card-radius);
  cursor: pointer;
  text-align: center;
  font: inherit;
  color: inherit;
  transition: background-color 180ms ease;
}
.ab-nav-condition-tile:hover {
  background: var(--ab-bg-light-blue);
}
.ab-nav-condition-tile:focus-visible {
  outline: 2px solid var(--ab-brand);
  outline-offset: 2px;
}
.ab-nav-condition-tile__letter {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 48px;
  font-family: var(--ab-font-heading);
  font-weight: 700;
  font-size: 16px;
  line-height: 24px;
  color: var(--ab-text-secondary);
}
.ab-nav-condition-tile__list {
  list-style: none;
  margin: 0;
  padding: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.ab-nav-condition-tile__item {
  font-family: var(--ab-font-body);
  font-weight: 400;
  font-size: 14px;
  line-height: 21px;
  color: var(--ab-popup-body-fg);
  text-align: center;
}

/* -------- Persistent continue bar (does not slide) -------- */
#ab-nav-continue {
  position: relative;
  flex-shrink: 0;
  width: 100%;
  padding: 12px 16px;
  background: var(--ab-white);
  border-top: 1px solid var(--ab-border-button);
  box-shadow: var(--ab-shadow-continue);
  display: flex;
  align-items: center;
  gap: 16px;
  z-index: 2;
  transform: translateY(0);
  opacity: 1;
  transition: transform 260ms cubic-bezier(0.22, 0.61, 0.36, 1), opacity 220ms ease;
}
/* Services-page-only hide-when-no-selection state. The bar slides off the
   bottom of the panel and fades out; pointer-events disabled so the disabled
   pill underneath doesn't accept stray taps mid-animation. JS toggles this
   class only on the services page (other pages keep the persistent yellow
   disabled state when nothing is selected). */
#ab-nav-continue.ab-nav-continue--hidden {
  transform: translateY(100%);
  opacity: 0;
  pointer-events: none;
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
}

/* Back button — only shown on sub-pages. */
.ab-nav-back {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  background: var(--ab-bg-light-blue);
  color: var(--ab-brand);
  border-radius: 31px;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  transition: background-color 180ms ease;
}
.ab-nav-back--visible {
  display: inline-flex;
}
.ab-nav-back:hover {
  background: #b9d4fb;
}
.ab-nav-back:focus-visible {
  outline: 2px solid var(--ab-brand);
  outline-offset: 2px;
}

/* The inner pill flips colour based on enabled/disabled state. */
.ab-nav-continue-pill {
  flex: 1 0 0;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  padding: 14px 24px;
  border: 0;
  border-radius: var(--ab-continue-pill-radius);
  background: var(--ab-continue-enabled-bg);
  color: var(--ab-continue-enabled-fg);
  font: inherit;
  cursor: pointer;
  transition: background-color 200ms ease, color 200ms ease;
}
.ab-nav-continue-pill:focus-visible {
  outline: 2px solid var(--ab-brand);
  outline-offset: 2px;
}
#ab-nav-continue.ab-nav-continue--disabled .ab-nav-continue-pill {
  background: var(--ab-continue-disabled-bg);
  color: var(--ab-continue-disabled-fg);
  cursor: default;
}

/* Wrapper that pairs the static "Price:" label with the dynamic price value
   as siblings on a single 4px-gap inline-flex axis (Figma node 21396:31785).
   Keeps spacing predictable regardless of the pill's space-between layout. */
.ab-nav-continue-price-group {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* Static "Price:" prefix before the dynamic price value. Matches the price
   typography so the two read as a single phrase ("Price: $19"). The dynamic
   .ab-nav-continue-price stays just the value — keeps the aria-live region
   focused on the changing portion. */
.ab-nav-continue-price-label {
  display: inline-flex;
  align-items: center;
  font-family: var(--ab-font-heading);
  font-weight: 500;
  font-size: 16px;
  line-height: 24px;
  white-space: nowrap;
  color: inherit;
}
.ab-nav-continue-price {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--ab-font-heading);
  font-weight: 500;
  font-size: 16px;
  line-height: 24px;
  white-space: nowrap;
  color: inherit;
}
.ab-nav-continue-cta {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--ab-font-heading);
  font-weight: 500;
  font-size: 16px;
  line-height: 24px;
  color: inherit;
  white-space: nowrap;
  cursor: pointer;
}
#ab-nav-continue.ab-nav-continue--disabled .ab-nav-continue-cta {
  cursor: default;
}
.ab-nav-continue-cta__arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  box-sizing: content-box;
  width: 22px;
  height: 22px;
}

/* -------- Speak-to-a-doctor popup (Figma 21740:24120) --------
   Overlays the panel body with a centred modal. Backdrop blocks interaction
   with the cards/continue bar beneath. The modal itself is three stacked
   sections: light-blue head band, white body (text + green price chip) with
   an inset bottom shadow, and white footer with a single brand CTA. */
.ab-nav-popup {
  position: absolute;
  inset: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 200ms ease;
}
.ab-nav-popup--visible {
  opacity: 1;
  pointer-events: auto;
}

.ab-nav-popup-backdrop {
  position: absolute;
  inset: 0;
  background: var(--ab-popup-backdrop);
}

.ab-nav-popup-modal {
  position: relative;
  width: var(--ab-popup-width);
  max-width: 100%;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  border-radius: var(--ab-popup-radius);
  overflow: hidden;
  background: var(--ab-popup-body-bg);
  transform: scale(0.96);
  transition: transform 200ms cubic-bezier(0.22, 0.61, 0.36, 1);
}
.ab-nav-popup--visible .ab-nav-popup-modal {
  transform: scale(1);
}

.ab-nav-popup-head {
  background: var(--ab-popup-head-bg);
  padding: 24px 24px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  filter: drop-shadow(var(--ab-shadow-popup-head));
}
.ab-nav-popup-title {
  margin: 0;
  width: 100%;
  font-family: var(--ab-font-heading);
  font-weight: 500;
  font-size: 20px;
  line-height: 30px;
  color: var(--ab-text-primary);
  text-align: center;
}

.ab-nav-popup-body {
  position: relative;
  background: var(--ab-popup-body-bg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 24px;
  box-shadow: var(--ab-shadow-popup-body-inset);
}
.ab-nav-popup-text {
  margin: 0;
  width: 100%;
  font-family: var(--ab-font-body);
  font-weight: 400;
  font-size: 16px;
  line-height: 24px;
  color: var(--ab-popup-body-fg);
}
.ab-nav-popup-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 8px;
  background: var(--ab-popup-chip-bg);
  color: var(--ab-popup-chip-fg);
  font-family: var(--ab-font-body);
  font-weight: 400;
  font-size: 16px;
  line-height: 24px;
  white-space: nowrap;
}

.ab-nav-popup-footer {
  background: var(--ab-popup-body-bg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}
.ab-nav-popup-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  height: 48px;
  padding: 13px 24px;
  border: 0;
  border-radius: 8px;
  background: var(--ab-brand);
  color: var(--ab-white);
  font-family: var(--ab-font-body);
  font-weight: 400;
  font-size: 16px;
  line-height: 24px;
  cursor: pointer;
  transition: background-color 180ms ease;
}
.ab-nav-popup-cta:hover {
  background: var(--ab-brand-deep);
}
.ab-nav-popup-cta:focus-visible {
  outline: 2px solid var(--ab-brand);
  outline-offset: 2px;
}

/* Reduced-motion: kill every animated transition declared above. The list
   below mirrors the `transition:` declarations elsewhere in this file (panel
   slide, page slide, header chrome fade, info-box fade, popup fade + modal
   scale, dropdown chevron rotate, etc.). The chevron's --circle modifier
   inherits suppression via the base .ab-nav-dropdown__chevron class but is
   listed explicitly for defensive coverage. */
@media (prefers-reduced-motion: reduce) {
  #ab-nav-panel,
  .ab-nav-page,
  .ab-nav-logo,
  .ab-nav-breadcrumbs,
  #ab-nav-continue,
  .ab-nav-continue-pill,
  #ab-nav-close,
  .ab-nav-tab,
  .ab-nav-card,
  .ab-nav-back,
  .ab-nav-info-box,
  .ab-nav-popup,
  .ab-nav-popup-modal,
  .ab-nav-popup-cta,
  .ab-nav-dropdown__header,
  .ab-nav-dropdown__chevron,
  .ab-nav-dropdown__chevron--circle,
  .ab-nav-condition-tile {
    transition: none;
    animation: none;
  }
}
