/* ==========================================================================
   launch-polish.css — public-site polish layer (t_6457d21c)
   Load LAST so it only overrides. Defect ids refer to
   05-REPORTS/FRONTEND-DEFECTS.md. Public/ only: no reservation-component
   rules live here (that is booking-flow/booknow/calendar + their sheets).
   Everything is additive and reversible; nothing is deployed yet.
   ========================================================================== */

/* NARROW HOTFIX SLICE (t_88db5815): only the phone/tablet reservation
   defects verified live on 2026-11-16 (META-LAUNCH-READINESS LATEST.md):
   D1+D27 (consent banner covers the dock — blocker "cno"), F1 (no booking
   CTA in the 761-999px band), F6 (.totop icon sits on #sb-book — the
   "[object SVGAnimatedString]" blocker). F5 (desktop rail) and the
   non-reservation polish (D6-D27 typography/tap-target/gallery rules) are
   deliberately NOT in this slice; they stay on qa/reservation-polish-handoff.
   ========================================================================== */
/* --------------------------------------------------------------------------
   D1 (P0) + D27 — the cookie banner sits at z 70 over the booking dock at
   z 30 and covered the 81px bar by 80.875px, so on a first visit the mobile
   CTA could not be tapped at all. Lift the dock by the banner's own height
   while an unanswered banner is present, and grow the page's bottom padding
   to match so the last content is not swallowed.

   Two spellings, one behaviour. :has() is the structural truth; the second
   selector is the fallback for engines without it (Safari < 15.4,
   Chrome < 105) and reads html[data-vv-consent], which consent-banner.js
   maintains — "" means "asked, unanswered", "granted"/"denied" mean answered.
   The banner (and that script) only ship when marketing is enabled, so an
   attribute-only visitor on a marketing-off site matches nothing and the dock
   stays on the floor; both selectors are the same value, so where :has()
   exists nothing changes.
   -------------------------------------------------------------------------- */
body:has(#consent:not([hidden])) .stickybar.is-on,
html[data-vv-consent=""] .stickybar.is-on {
  transform: translateY(calc(-1 * var(--consent-lift, 0px)));
}
/* The dock is 87.8px tall at 390 and 72–96px in the tablet band (the price
   row wraps and its height follows the content), while its own reserved 76px
   left the last footer row 4–5px underneath it. Reserve the measured bar
   height plus a 12px gap, per band, instead of one fixed number — then add
   the lift on top. Measured clearance after: 12.2px at 390, 12–36px at
   768/900/999. */
@media (max-width: 560px) { body { --dock-reserve: 100px; } }
@media (min-width: 561px) and (max-width: 999px) { body { --dock-reserve: 108px; } }
@media (max-width: 999px) {
  body.has-sticky { padding-bottom: calc(var(--dock-reserve, 100px) + env(safe-area-inset-bottom)); }
  body:has(#consent:not([hidden])).has-sticky,
  html[data-vv-consent=""] body.has-sticky {
    padding-bottom: calc(var(--dock-reserve, 100px) + var(--consent-lift, 0px));
  }
}
@media (max-width: 560px) {
  body:has(#consent:not([hidden])),
  html[data-vv-consent=""] body { --consent-lift: 196px; }
}
@media (min-width: 561px) and (max-width: 999px) {
  body:has(#consent:not([hidden])),
  html[data-vv-consent=""] body { --consent-lift: 104px; }
}

/* --------------------------------------------------------------------------
   F1 (P0, from 05-REPORTS/VILLAS-RESERVATION-SCROLL.md §2) — 761–999px had
   no booking entry point at all: the card scrolls away and the bar is
   display:none above 760px, so for ~3,600px of travel there was nothing to
   tap. The bar's is-on/translate rules are unconditional; only its layout
   block sits inside the ≤760 query, so re-declare it for the tablet band.
   -------------------------------------------------------------------------- */
@media (min-width: 761px) and (max-width: 999px) {
  .stickybar {
    display: flex; position: fixed; inset: auto 0 0 0; z-index: 30;
    align-items: center; gap: .8rem; justify-content: flex-end;
    padding: .7rem max(1rem, calc((100vw - 900px) / 2));
    background: var(--card); border-top: 1px solid var(--line);
    box-shadow: 0 -6px 20px rgba(18, 47, 42, .08);
  }
  .sbprice { font-size: 1.05rem; flex: 1; font-variant-numeric: tabular-nums; font-weight: 700; }
}

/* --------------------------------------------------------------------------
   F6 (found while writing the regression) — the floating back-to-top button
   is fixed at right/bottom 14px with z-index 44, i.e. directly ON the dock
   (z 30). Measured overlap with #sb-book: 44 x 26.6 px, and the hit-test at
   the Reserve button's centre resolved to the `.totop` icon instead of the
   button. Move it above the dock wherever the dock exists.
   -------------------------------------------------------------------------- */
@media (max-width: 999px) {
  .totop { bottom: calc(100px + env(safe-area-inset-bottom)); }
  /* … and while an unanswered banner lifts the dock by its full height, the
     button has to travel with it or it lands back inside the banner (its
     centre hit-tests to the banner, so a tap does nothing). Same two
     spellings as the lift above. */
  body:has(#consent:not([hidden])) .totop,
  html[data-vv-consent=""] .totop {
    bottom: calc(100px + var(--consent-lift, 0px) + env(safe-area-inset-bottom));
  }
}
