/* ============================================================
   Listing mobile floating call-to-action (Book Now / Call Now /
   Visit Website). Sits above Voxel's bottom navigation and leaves
   room on the right for its chat button. Offsets come from
   src/Listing/js/mobile-cta/index.js; the tokens are fallbacks.
   ============================================================ */

.mob-lcta {
  display: none;
}

@media (max-width: 960px) {
  .mob-lcta {
    position: fixed;
    z-index: var(--mob-z-floating);
    left: var(--mob-space-md);
    right: var(--mob-lcta-right, var(--mob-mobile-chat-reserve));
    bottom: calc(var(--mob-mobile-nav-height) + var(--mob-space-sm) + env(safe-area-inset-bottom, 0px));
    display: flex;
    transition: opacity var(--mob-transition), transform var(--mob-transition);
  }

  /* Measured: --mob-lcta-bottom already includes the nav and the safe area. */
  .mob-lcta[data-mob-lcta-measured] {
    bottom: calc(var(--mob-lcta-bottom) + var(--mob-space-sm));
  }

  .mob-lcta--hidden {
    opacity: 0;
    transform: translateY(12px);
    pointer-events: none;
  }

  /* Never float over an open editor dialog. */
  body.mob-ldialog-lock-scroll .mob-lcta {
    display: none;
  }

  /* Keep the end of the page reachable above the button. */
  .mob__page-wrap:has(.mob-lcta) {
    padding-bottom: calc(var(--mob-floating-cta-height) + var(--mob-space-lg));
  }

  .mob-lcta__btn {
    display: inline-flex;
    flex: 1;
    align-items: center;
    justify-content: center;
    gap: var(--mob-space-sm);
    min-height: var(--mob-floating-cta-height);
    padding: 0 var(--mob-space-lg);
    border: none;
    border-radius: 999px;
    background: var(--mob-primary);
    box-shadow: var(--mob-shadow-lg);
    font-family: var(--mob-font-sans);
    font-size: var(--mob-text-base);
    font-weight: var(--mob-weight-bold);
    color: var(--mob-on-primary);
    text-decoration: none;
    cursor: pointer;
  }

  .mob-lcta__btn:hover,
  .mob-lcta__btn:focus-visible {
    background: var(--mob-primary-mid);
    color: var(--mob-on-primary);
  }

  .mob-lcta__btn svg {
    flex-shrink: 0;
    color: inherit;
  }

  .mob-lcta__btn .mob__phone-reveal-label {
    color: inherit;
  }
}
