/* ============================================================
   Section 17 — Sticky mobile "Call | Book Now" bar
   Fixed bottom, mobile-only (<=820px). Sits below the nav's mobile
   overlay (z-index 199/210) and above ordinary content.
   All selectors scoped under .sec-17-mobilebar.
   ============================================================ */

.sec-17-mobilebar {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 180;
  align-items: flex-start;
  height: calc(56px + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  border-top: 1px solid hsl(0 0% 100% / 0.12);
  transform: translateY(110%);
  transition: transform 400ms var(--ease-out);
  font-family: var(--font-body);
}

/* Dark bar, but not wrapped in .on-ink, so restore the on-dark focus-ring
   color the way base.css does for .on-ink sections. */
.sec-17-mobilebar :focus-visible { outline-color: var(--accent); }

@media (max-width: 820px) {
  .sec-17-mobilebar {
    display: flex;
  }
}

/* Slide up once the page has finished its load orchestration */
html.is-loaded .sec-17-mobilebar {
  transform: translateY(0);
}

/* Hidden while #booking is substantially in view, or while the nav's
   mobile overlay is open (state read via body.sec-01-nav-lock). */
html.is-loaded .sec-17-mobilebar.is-hidden {
  transform: translateY(110%);
}

html.reduced-motion .sec-17-mobilebar,
html.reduced-motion .sec-17-mobilebar.is-hidden {
  transition: none;
}

.sec-17-mobilebar__call,
.sec-17-mobilebar__book {
  flex: 1 1 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  height: 56px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  transition: filter 150ms var(--ease-out);
}

.sec-17-mobilebar__call:active,
.sec-17-mobilebar__book:active {
  filter: brightness(0.92);
}

/* Left half: dark ink-glass */
.sec-17-mobilebar__call {
  background: hsl(211 35% 8% / 0.82);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  color: var(--text-on-ink);
}

.sec-17-mobilebar__icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

/* Right half: solid accent */
.sec-17-mobilebar__book {
  background: var(--accent);
  color: var(--accent-on);
}

/* Lift the GoHighLevel chat bubble (99-chat-widget.html) above the mobile
   Call | Book Now bar. The widget renders in a shadow root, so
   17-mobilebar.js injects a rule there that reads this variable (custom
   properties inherit into shadow DOM). */
@media (max-width: 820px) {
  chat-widget {
    --pt-chat-bottom: calc(56px + env(safe-area-inset-bottom) + 0.85rem);
  }
}
