/* =============================================================================
   mobile-ux.css  —  GLOBAL mobile-first foundation (table-stakes)
   Managed by scripts/mobile-bot/. Loaded on every page (via mobile-safety.css
   @import). This layer delivers the universal touch/typography hygiene that
   applies to ALL pages; per-section RESTRUCTURING is done per template.
   Everything here is mobile-only (max-width:600px) so desktop is untouched.
   v1 — 2026-06-24
   ============================================================================= */

/* Kill the 300ms tap delay everywhere; respect reduced motion. */
a, button, [role="button"], input, select, textarea, summary, label[for] {
  touch-action: manipulation;
}
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}

@media (max-width: 600px) {
  /* --- Touch targets: block-level controls get a 44px minimum hit area --- */
  button, .btn, .cta, a.btn, a.button, a.cta,
  input[type="submit"], input[type="button"], [role="button"],
  .pdp-add, .add-to-cart, .service-cta, .book-btn, .wizard-nav button {
    min-height: 44px;
  }
  /* Comfortable padding for button-like links so the 44px isn't cramped */
  .btn, .cta, a.btn, a.button, a.cta { display: inline-flex; align-items: center; justify-content: center; }

  /* --- Forms: 16px inputs prevent iOS auto-zoom; 44px min height; room to type --- */
  input:not([type="checkbox"]):not([type="radio"]):not([type="range"]),
  select, textarea {
    font-size: 16px !important;
    min-height: 44px;
    padding: 0.6rem 0.75rem;
  }
  textarea { min-height: 96px; }
  label { line-height: 1.4; }

  /* --- Checkboxes / radios: bigger, easier to tap --- */
  input[type="checkbox"], input[type="radio"] { min-width: 22px; min-height: 22px; }

  /* --- Readable body text + comfortable measure --- */
  body { -webkit-text-size-adjust: 100%; }
  p, li { line-height: 1.6; }

  /* --- Nav links / menu items: full-row tap targets --- */
  nav a, .nav-links a, .menu a, .mobile-menu a, .drawer a { min-height: 44px; display: flex; align-items: center; }
  /* The footer's own touch sizing (TAP-TARGET1) lives in "THE site footer" below. */
}

/* =============================================================================
   THE site footer - FOOTER-TIDY1 (15 Nov 2026; Director: "also lets tidy up the footer").
   The markup is src/assets/footer.html, swept onto every page (FOOTER-ONE1); this section is its ONE stylesheet.
   - A brand and contact block, three link groups (Help, About us, Legal) and a bottom strip: the regulatory line
     word for word, then the copyright.
   - Every rule is scoped `.compliance-footer .hpf-*` (two classes), so no page's own footer{}, footer a{}, li{} or
     p{} rule can restyle it (FOOTER-CSS-LEAK). The footer element's colour, padding and size stay pinned inline.
   - The layout needs no screen-width rule, so it holds at any width: the brand block and the link groups share one
     wrapping row (side by side when both fit, the groups on their own row on tablets) and the groups are a grid of
     columns at least 124px wide - three on tablets and computers, two on phones down to 320px.
   - Colours are the brand tokens. The see-through creams are cream at 85% (links, 9.8:1 on dark teal), 78% (the
     regulatory line, kept as it was) and 62% (the copyright, 6.0:1); the group names are --terracotta-lt (7.2:1),
     never brick on dark.
   ============================================================================= */
.compliance-footer .hpf-wrap { max-width: 1100px; margin: 0 auto; }
.compliance-footer .hpf-top { display: flex; flex-wrap: wrap; gap: 40px 56px; padding-bottom: 36px;
  border-bottom: 1px solid rgba(245, 245, 242, 0.14); }
.compliance-footer .hpf-brand { flex: 1 1 360px; min-width: 0; }
.compliance-footer .hpf-nav { flex: 999 1 460px; min-width: 0; display: grid;
  grid-template-columns: repeat(auto-fit, minmax(124px, 1fr)); gap: 28px 24px; }
.compliance-footer .hpf-contact { margin: 0; font-style: normal; font-size: 15px; line-height: 1.6;
  color: rgba(245, 245, 242, 0.85); }
/* FOOTER-BRAND-DARK1 (16 Nov 2026; Director: "it should look at footer like image 3"): the email masthead's lockup. The
   bone mark sits straight on the dark ground - no tile, no padding box, nothing behind it - with the name beside it and the
   address under the name.
   BRAND-ONE-LOCKUP1 (16 Nov 2026; Director: "just remember how the H aligns with the Hyde Park get it right please"): the lockup is
   set to the INK of the letters, not their boxes, measured in the browser (never a remembered constant):
   - the mark's ink top sits on the cap top of the H, its ink bottom on the baseline of the address's first line. Both line
     heights leave a WHOLE-pixel half-leading (Chromium rounds a fractional one down, Safari keeps it: on the old 22.8px
     line the H sat 0.9px higher in Chrome than in Safari): the name's 23px line on Proxima Nova 19px bold's 21px (ascent 17
     + descent 4) puts the H's cap top 5.37px down (1 + 17 - the H's ink 12.64); the address's 20px line on 14px's 16px puts
     its first baseline 41px down (23 + the 3px gap + 2 + ascent 13): 35.64px. The mark's files are made at exactly 1x, 2x
     and 3x its 38px (gen_logo.ON_DARK_FOOTER, so no screen shrinks a bigger file and softens it); in each the ink runs from
     1px to 37px of the box (alpha), 36px, so a 4.18px top margin centres it on the 35.64px: top 0.19px above the cap top,
     bottom 0.18px below the baseline.
     The mark is this size at every width: on a phone the address breaks into two lines and its second line carries on under
     the H, below the mark (one mark size everywhere; never a mark centred on three lines).
   - the address's first letter stands under the H's left stem: the H's side bearing is 1.24px, the 2's 0.77px, so the
     address steps in 0.47px.
   Guard: mobile-bot/scan.py AUDIT_JS brandLockup (every screen, both engines, within 1px); planted:
   scripts/mobile-bot/test_brand_lockup.py. */
.compliance-footer .hpf-lockup { display: flex; align-items: flex-start; gap: 14px; margin: 0 0 18px; }
.compliance-footer .hpf-logo { flex: none; display: block; width: 38px; height: 38px; margin-top: 4.18px; }
.compliance-footer .hpf-id { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.compliance-footer .hpf-name { font-size: 19px; font-weight: 700; line-height: 23px; letter-spacing: -0.005em;
  color: var(--cream, #F5F5F2); }
.compliance-footer .hpf-addr { font-size: 14px; line-height: 20px; color: rgba(245, 245, 242, 0.78); text-wrap: balance;
  padding-left: 0.47px; }
/* Without text-wrap: balance (iOS before 17.5) a phone's greedy wrap left '1DT' alone on the second line; 15em breaks the
   address after 'Woodhouse,' so the postcode stays whole (design review footer-brand-dark-20261116, P3). */
@supports not (text-wrap: balance) {
  @media (max-width: 440px) { .compliance-footer .hpf-addr { max-width: 15em; } }
}
.compliance-footer .hpf-line { display: block; }
.compliance-footer .hpf-contact a { color: var(--cream, #F5F5F2); text-decoration: underline;
  text-decoration-color: rgba(245, 245, 242, 0.45); text-underline-offset: 3px; }
.compliance-footer .hpf-signin { display: inline-flex; align-items: center; justify-content: center; min-height: 44px;
  margin-top: 20px; padding: 0 24px; border: 1px solid rgba(245, 245, 242, 0.3); border-radius: 10px;
  background: var(--teal, #0f5257); color: var(--cream, #F5F5F2); font-size: 15px; font-weight: 600; line-height: 1;
  text-decoration: none; transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease; }
.compliance-footer .hpf-head { margin: 0 0 12px; font-size: 14px; font-weight: 700; line-height: 1.3;
  letter-spacing: 0.01em; color: var(--terracotta-lt, #e9a986); }
.compliance-footer .hpf-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.compliance-footer .hpf-list li { margin: 0; padding: 0; line-height: 1.35; }
.compliance-footer .hpf-list a { font-size: 15px; color: rgba(245, 245, 242, 0.85); text-decoration: none;
  text-underline-offset: 3px; transition: color 0.15s ease; }
/* HOVER-GATE1 (FOOTER-HOVER1, 15 Nov 2026): a phone fakes :hover on the first tap and leaves it there, so Sign in stayed
   cream after a tap (the phone gate G5 failed release 74 on it). Every footer hover sits behind a real mouse; a touch screen
   gets the same look only while the finger is down (:active) - Sign in also presses in (scale .98, never under reduced
   motion), the links only brighten. Desktop is unchanged. */
@media (hover: hover) and (pointer: fine) {
  .compliance-footer .hpf-contact a:hover { text-decoration-color: currentColor; }
  .compliance-footer .hpf-signin:hover { background: var(--cream, #F5F5F2); border-color: var(--cream, #F5F5F2);
    color: var(--dark-teal, #0A2E36); }
  .compliance-footer .hpf-list a:hover { color: var(--cream, #F5F5F2); text-decoration: underline; }
}
@media not all and (hover: hover) and (pointer: fine) {
  .compliance-footer .hpf-contact a:active { text-decoration-color: currentColor; }
  .compliance-footer .hpf-signin:active { background: var(--cream, #F5F5F2); border-color: var(--cream, #F5F5F2);
    color: var(--dark-teal, #0A2E36); }
  .compliance-footer .hpf-list a:active { color: var(--cream, #F5F5F2); text-decoration: underline; }
  @media (prefers-reduced-motion: no-preference) { .compliance-footer .hpf-signin:active { transform: scale(0.98); } }
}
.compliance-footer .hpf-bottom { padding-top: 24px; }
.compliance-footer .hpf-reg { margin: 0 0 8px; font-size: 13px; line-height: 1.7; color: rgba(250, 247, 242, 0.78); }
.compliance-footer .hpf-reg a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.compliance-footer .hpf-copy { margin: 0; font-size: 13px; line-height: 1.6; color: rgba(245, 245, 242, 0.62); }
/* The site's teal focus ring cannot be seen on dark teal; the footer's is the light brick tone. */
.compliance-footer a:focus-visible { outline: 2px solid var(--terracotta-lt, #e9a986); outline-offset: 3px; border-radius: 4px; }
.compliance-footer ::selection { background: rgba(233, 169, 134, 0.4); color: #fff; }

/* TAP-TARGET1 (11 Oct 2026; tablets too since 12 Nov, winners audit P9): on phones, tablets and any touch screen every
   footer link is a 44px-tall target - 8,921 of the site's 19,261 under-44px phone targets were once the footer's links.
   Width covers tablets of any pointer; pointer:coarse covers larger touch screens. The 44px rows are their own spacing,
   so the list gap closes. Sign in is 44px tall everywhere. The link inside the regulatory sentence stays a reading link. */
@media (max-width: 1024px), (pointer: coarse) {
  .compliance-footer .hpf-list { gap: 0; }
  .compliance-footer .hpf-list a { display: flex; align-items: center; min-height: 44px; }
  .compliance-footer .hpf-contact a { display: inline-flex; align-items: center; min-height: 44px; }
  .compliance-footer .hpf-lockup { margin-bottom: 22px; }  /* + the 44px Tel row's own air: the brand stands apart from the rows
     (14 -> 22px, design review footer-brand-ink-20261116 P3: the taller phone lockup needs the wider break) */
  .compliance-footer .hpf-head { margin-bottom: 4px; }
}
/* The floating WhatsApp and Call buttons sit over the page's last lines, and so does the prescriptions tab (RX-WINDOW1,
   mega-nav.css: fixed bottom-left, 52px tall, calc(16px + the safe-area inset) up). On a phone (upright or sideways) the
   strip ends with room under it. From 761px wide the strip's last line ends 80px above the page end plus the same inset -
   the footer's own 32px bottom padding (footer.html) + 48px here = the tab's 16 + 52 + a 12px gap - so the GPhC / ICO line
   and the copyright are never under the tab when a visitor scrolls to the end (design review of release 76, D1;
   test_footer_tab_clear.py). From 761px to 1279px wide the buttons also overlap the text column's right edge, so the
   strip's lines stop short of them; wider than that the column ends before the buttons begin. The 761px-up rule comes
   first so a phone held sideways (up to 1000px wide, 500px tall) keeps its 64px from the rule after it. */
@media (min-width: 761px) {
  .compliance-footer .hpf-bottom { padding-bottom: calc(48px + env(safe-area-inset-bottom, 0px)); }
}
@media (max-width: 760px), (max-width: 1000px) and (max-height: 500px) {
  .compliance-footer .hpf-bottom { padding-bottom: 64px; }
}
@media (min-width: 761px) and (max-width: 1279px) {
  .compliance-footer .hpf-bottom { padding-right: 72px; }
}

/* Visible keyboard focus for accessibility (all viewports). */
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible,
textarea:focus-visible, [role="button"]:focus-visible, summary:focus-visible {
  outline: 2px solid var(--teal, #0f5257);
  outline-offset: 2px;
}

/* Tasteful tap highlight rather than the default blue flash. */
a, button, [role="button"], .btn, .cta { -webkit-tap-highlight-color: rgba(15, 82, 87, 0.12); }

/* =============================================================================
   THE phone buy bar (MOBILE-UX1 M3; moved here once from mobile-revamp.css, which only 23 pages link).
   mobile-revamp.js adds it. On a product or treatment page it stands in for the page's own main button (STICKY-PROXY1).
   ============================================================================= */
.m-sticky-cta { display: none; }
/* STICKY-SIDEWAYS1 (10 Nov 2026, queue row 135 (b); ACTION-REACH1): a phone held sideways is 844-932px wide but only
   390-430px tall, so it got the desktop layout with no bar, and a product's main button ended 623px down a 390px screen
   (the every-screen proof). The bar now also shows on a short screen up to 1000px wide and 500px tall - phones on their
   side, never an iPad (768px+ tall) or a desktop. It is the same bar: it mirrors the page's own button, waits for a swipe
   and stands aside when the real button is near. scripts/gen_mega_nav.py moves the floating buttons for it the same way. */
/* BAR-DOCK1 (13 Nov 2026, the Director on his iPhone, /nhs/contraception-service/: "By integrated look it just looks a bit odd
   with the book a consultation bar at the bottom. Double check it with design studio pro"). The bar was a full-width
   translucent bone slab with its own square Call button, cutting straight across the page's rounded cards (and breaking the
   brick emergency-contraception block), with the floating WhatsApp circle stacked above its square. It is now a DOCK: a
   white card inset 12px from the edges, with the cards' own 20px radius and a soft shadow, holding ONE row - the page's
   main button, then the floating WhatsApp and Call circles folded in as two quiet circles (mobile-revamp.js writes them
   from the page's own floating links; scripts/gen_mega_nav.py steps the floating stack aside while the dock shows). Words,
   the main button's tap, the price beside "Add to basket", the reveal rules and the 46px button (BUY-CALM1) are unchanged.
   Hidden, it is also visibility:hidden once it has slid away, so its shadow never shows and its links leave the Tab order.
   On a wide short screen (a phone on its side, STICKY-SIDEWAYS1) and on an iPad mini held upright it keeps a phone's
   width at the bottom-right, where the floating circles live, instead of spanning the screen. */
@media (max-width: 760px), (max-width: 1000px) and (max-height: 500px) {
  .m-sticky-cta {
    display: flex; align-items: center; position: fixed; z-index: 90; box-sizing: border-box;
    left: 12px; right: 12px; bottom: max(12px, env(safe-area-inset-bottom, 0px));
    gap: 8px; padding: 8px;
    background: var(--surface, #fff); border: 1px solid rgba(10, 46, 54, 0.07); border-radius: var(--r-card, 20px);
    box-shadow: 0 14px 34px rgba(10, 46, 54, 0.20), 0 2px 6px rgba(10, 46, 54, 0.08);
    /* Hidden until the visitor swipes (mobile-revamp.js adds .m-visible), never pinned from the top (Director, 26 Jun). */
    transform: translateY(calc(100% + 24px + env(safe-area-inset-bottom, 0px))); visibility: hidden;
    transition: transform .3s cubic-bezier(.22, 1, .36, 1), visibility 0s linear .3s; will-change: transform;
  }
  .m-sticky-cta.m-visible { transform: translateY(0); visibility: visible; transition: transform .3s cubic-bezier(.22, 1, .36, 1), visibility 0s; }
  .m-sticky-cta .m-cta-main {
    flex: 1 1 auto; min-width: 0; display: flex; align-items: center; justify-content: center; text-align: center;
    min-height: 46px; padding: 5px 14px; box-sizing: border-box; border-radius: var(--r-ctl, 12px); text-decoration: none;
    font-weight: 700; font-size: 15px; line-height: 1.15; background: var(--teal, #0f5257); color: var(--cream, #F5F5F2);
    border: 0; font-family: inherit; cursor: pointer;   /* PDP-BUY-FIRST1: on a product page this is a real <button> */
  }
  .m-sticky-cta .m-cta-main:active { transform: scale(0.98); }
  /* The two contact circles: one shape for every contact button (the floating ones are circles too), quiet so the main
     button stays the one strong action; coloured icons, a hairline ring, a tinted press. 46px = the button's height. */
  .m-sticky-cta .m-cta-wa, .m-sticky-cta .m-cta-call {
    flex: 0 0 46px; width: 46px; height: 46px; min-height: 46px; box-sizing: border-box; padding: 0;
    display: flex; align-items: center; justify-content: center; border-radius: 50%; text-decoration: none;
    background: var(--surface, #fff); transition: background-color .15s ease;
  }
  .m-sticky-cta .m-cta-wa { color: #128C4B; border: 1.5px solid rgba(18, 140, 75, 0.35); }
  .m-sticky-cta .m-cta-call { color: var(--teal, #0f5257); border: 1.5px solid rgba(15, 82, 87, 0.35); }
  .m-sticky-cta .m-cta-wa svg, .m-sticky-cta .m-cta-call svg { width: 22px; height: 22px; flex: none; }
  .m-sticky-cta .m-cta-wa:active { background: rgba(18, 140, 75, 0.10); }
  .m-sticky-cta .m-cta-call:active { background: var(--tint, #e7f1ef); }
  /* the room the dock needs at the very end of the page, only on a page that has one (html.hpp-bar is set by
     mobile-revamp.js when it adds the bar): 12px below + the 64px dock + 8px clear */
  html.hpp-bar body { padding-bottom: calc(84px + env(safe-area-inset-bottom, 0px)); }
  /* and a control reached with the keyboard is scrolled clear of the dock, never left under it */
  html.hpp-bar { scroll-padding-bottom: calc(84px + env(safe-area-inset-bottom, 0px)); }
}
/* Narrow phones (320-359px): the label keeps its words and may take two lines inside the same 46px button. */
@media (max-width: 359px) {
  .m-sticky-cta .m-cta-main { font-size: 14px; padding: 4px 10px; }
}
/* Wider than a phone held upright: a phone's width, at the bottom-right (where the floating circles rest). */
@media (min-width: 561px) and (max-width: 760px), (min-width: 561px) and (max-width: 1000px) and (max-height: 500px) {
  .m-sticky-cta { left: auto; width: 440px; }
}
@media (prefers-reduced-motion: reduce) {
  .m-sticky-cta, .m-sticky-cta.m-visible { transition: none; }
  .m-sticky-cta .m-cta-main:active { transform: none; }
}
