/* mobile.css: the phone and tablet layer, loaded after every other sheet.
   Owner rule 2026-11-29: every site is fully optimised for phones and tablets. A site overrides tokens
   (--tap, --fs-floor, --measure), not this file. Gate: tests_frontend/test_mobile_viewports.py.
   Applies on touch screens and on any viewport up to 1100 px, so a 1024 px tablet in either orientation
   and an iPad Pro in landscape get the same floor. No remote-resource functions in this file, so
   css() may inline it. */

:root {
  --tap: 44px;              /* touch target floor */
  --tap-gap: 8px;           /* room between two targets */
  --fs-floor: 1rem;         /* smallest text on a touch screen */
  --measure: 34em;          /* longest prose line: about 72 characters of running text (em, not ch: the "0" width differs by font) */
  --pad-x: 1.5rem;
  --edge: max(1.25rem, env(safe-area-inset-left, 0px), env(safe-area-inset-right, 0px));
}
@media (max-width: 768px) { :root { --pad-x: 1.15rem; } }
@media (max-width: 560px) { :root { --pad-x: 1.1rem; } }

/* ── Every width: prose measure, tap behaviour, safe areas ───────────────── */
/* a table ignores width: 1px and grows to its content, so the chart's screen-reader table pushed /admin 8 px past a 375 px phone */
table.sr-only, table.visually-hidden { display: block; }
:where(main, article, .legal-prose) :where(p, li, dd, blockquote) { max-inline-size: var(--measure); }
:where(main, article) :where(p, li, dd, blockquote).text-center,
.text-center :where(p, li) { margin-inline: auto; }
a, button, input, select, textarea, label, summary, [role="button"] { touch-action: manipulation; }
:root { -webkit-tap-highlight-color: color-mix(in srgb, var(--accent, currentColor) 18%, transparent); }

/* viewport-fit=cover lets the page run under the notch and home bar: keep content and fixed chrome out of them */
.container, .hero__inner, .hero__content {
  padding-left: max(var(--pad-x), env(safe-area-inset-left, 0px));
  padding-right: max(var(--pad-x), env(safe-area-inset-right, 0px));
}
.fr-wrap { width: min(1280px, calc(100% - 2 * var(--edge))); }
.nav__inner, .nav.is-solid .nav__inner, .footer__shell { max-width: min(1280px, calc(100% - 2 * var(--edge))); }
.nav { margin-top: env(safe-area-inset-top, 0px); } /* the inset only: a site that pins its bar at top 0 keeps it there */
.footer { padding-bottom: env(safe-area-inset-bottom, 0px); }
.wa-fab {
  right: max(clamp(16px, 4vw, 28px), env(safe-area-inset-right, 0px));
  bottom: max(clamp(16px, 4vw, 28px), env(safe-area-inset-bottom, 0px));
}
.tt-consent, #tt-consent {
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
  padding-bottom: max(16px, env(safe-area-inset-bottom, 0px));
}
.login-wrap {
  min-height: 100vh;
  min-height: 100dvh;
  padding-left: max(24px, env(safe-area-inset-left, 0px));
  padding-right: max(24px, env(safe-area-inset-right, 0px));
  padding-bottom: max(24px, env(safe-area-inset-bottom, 0px));
}
.admin, .main-wrap { min-height: 100vh; min-height: 100dvh; }

/* Short landscape phone: a 75 px bar is 19 % of 390 px, so the island shrinks */
@media (max-height: 500px) and (orientation: landscape) {
  :root { --nav-offset: 0.3rem; --nav-island-h: 2.75rem; }
  .hero { min-height: auto; }
  .nav__inner, .nav.is-solid .nav__inner { height: var(--nav-island-h); }
}

/* ── Touch screens and tablets ───────────────────────────────────────────── */
@media (pointer: coarse), (max-width: 1100px) {

  /* tap targets: 44 px both ways, 8 px apart */
  .nav__brand, .nav__link, .nav__toggle, .theme-toggle, .nav__lang a,
  .footer__nav a, .footer__legal a, .footer__social a, .link-arrow,
  .btn, .btn-ghost, .btn-danger, .fr-btn, .copy-card__btn, .tt-consent-settings,
  .blog-chips a, .blog-pager a, .blog-crumbs a, .blog-feed a, .gallery-item,
  .nav-item, .pill-link, .lang-fold summary, .skip-link:focus, details > summary, .fr-more a {
    min-height: var(--tap);
    min-width: var(--tap);
  }
  .nav__brand, .nav__link, .footer__nav a, .footer__legal a, .link-arrow, .blog-chips a, .blog-pager a,
  .blog-crumbs a, .blog-feed a, .tt-consent-settings, .copy-card__btn, .fr-more a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
  .nav__brand { justify-content: flex-start; }
  details > summary { display: flex; align-items: center; }
  .footer__nav { gap: var(--tap-gap) 0.75rem; }
  .footer__legal { display: flex; flex-wrap: wrap; align-items: center; gap: var(--tap-gap) 0.75rem; }
  .footer__social { gap: var(--tap-gap); }
  .nav__links { gap: var(--tap-gap); }
  .copy-card__actions { gap: var(--tap-gap); }
  .blog-chips { gap: var(--tap-gap); }
  /* a link that stands alone on its line ("Forgot your password?", "Back to website") */
  :where(main, .login-wrap) :where(p.text-center, li, div, h2, h3, h4) > a:only-child:not([class*="btn"]) {
    display: inline-flex; align-items: center; min-height: var(--tap);
  }

  /* text floor: 16 px, labels included; caps labels trade tracking for size. Only classes that are below
     1rem on a build are pinned: a class that is larger on a breakpoint (the phone menu links) keeps its size. */
  .eyebrow, .fr-eyebrow, .fr-index, .hero__badge, .btn, .btn--sm, .btn-sm, .fr-btn, .nav__wordmark,
  .footer__nav a, .footer__legal, .footer__social, .fr-closing__addr, .fr-list__desc, .fr-list__meta,
  .fr-grid figcaption, .card p, .card__price span, .value-item p, .info-item p, .bento__cell p, .blog-card p,
  .blog-meta, .blog-crumbs, .blog-chips a, .blog-pager span, .blog-feed, .quote__author, .testimonial__author,
  .legal-block__label, .legal-block__content, .account-contact__label, .account-badge, .gallery-item__caption,
  .form-label, .field label, .body-sm, .muted, .text-soft, small, figcaption, label, legend,
  .contact-panel__eyebrow, .contact-panel__lead, .copy-card__label, .copy-card__btn, .copy-card__status,
  .tt-consent-settings, .skip-link, .contactBtn, .acard__chip, .acard__meta, .stat-card__delta {
    font-size: var(--fs-floor);
  }
  .eyebrow, .fr-eyebrow, .contact-panel__eyebrow, .legal-block__label, .copy-card__label { letter-spacing: 0.06em; }
  /* booking-days.css loads after this sheet and sets .85rem on the list: the children carry the floor themselves */
  .day-legend *, .day-legend { font-size: var(--fs-floor); }

  /* the banner is built by script with inline styles on some builds: the floor beats them */
  #tt-consent, #tt-consent * { font-size: var(--fs-floor) !important; }
  #tt-consent a { display: inline-flex !important; align-items: center; min-height: var(--tap); margin-inline-start: 0.35em; }
  .tt-consent, #tt-consent { max-height: 55dvh; overflow-y: auto; overscroll-behavior: contain; }
  #tt-consent button, #tt-consent label { min-height: var(--tap) !important; }

  /* forms: 16 px stops the iOS focus zoom, 44 px is a thumb */
  input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]), select, textarea,
  .form-input, .form-select, .form-textarea, .field input, .field select, .field textarea {
    font-size: var(--fs-floor);
    min-height: var(--tap);
  }
  input[type="checkbox"], input[type="radio"] { inline-size: 1.4rem; block-size: 1.4rem; }
  label:has(> input[type="checkbox"]), label:has(> input[type="radio"]) {
    display: inline-flex; align-items: center; gap: 0.6rem; min-height: var(--tap);
  }
  .form-group, .field { margin-bottom: 1rem; }

  /* a hover-only reveal has no tap: show the content */
  .gallery-item__caption { opacity: 1; }
}

/* Touch without a hover state: hover transforms stay off, so a tap never leaves a card lifted */
@media (hover: none) {
  .bento__cell:hover, .card:hover, .gallery-item:hover { transform: none; }
  .gallery-item .gallery-item__caption { opacity: 1; }
}

@media (min-width: 769px) and ((max-width: 1100px) or (pointer: coarse)) { .nav__link { font-size: var(--fs-floor); } }

/* Large phones and tablets: use the width, do not stretch the phone layout */
@media (min-width: 700px) and (max-width: 1100px) {
  .gallery-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .footer__nav { justify-content: flex-start; }
}
@media (min-width: 700px) and (max-width: 1100px) and (min-height: 900px) {
  .hero { min-height: 60dvh; }
}

/* Agent pulse badge (design pack, after this layer was cut): the pill itself is the 44 px target and the count
   reads at the 16 px floor on a touch screen; the ::after hit area stays for mouse layouts. */
@media (pointer: coarse), (max-width: 1100px) {
  .apulse__btn { height: var(--tap); min-width: var(--tap); font-size: var(--fs-floor); }
}
