/* Sticky call bar for phones and tablets (fleet conversion standard; behavior in js/site.js).
   Pinned to the bottom below 992px, where the header shows only the menu and phone icons.
   It slides up once the visitor scrolls past the page banner and hides while a form
   dialog is open. Hidden states use visibility as well as transform, so its links can't
   be tabbed to while it is off screen.
   Colors: navy #3c4856 (white text 9.3:1) carries the main action. The theme's steel
   blue #5f7fa3 fails AA with white text at this size (4.16:1), so it is only the focus ring. */
.sticky-cta { display: none; }

@media (max-width: 991.98px) {
  .sticky-cta {
    display: flex; gap: 10px; position: fixed; left: 0; right: 0; bottom: 0; z-index: 9000;
    padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
    background: rgba(255, 255, 255, .97); border-top: 1px solid #e1dcd2;
    box-shadow: 0 -2px 10px rgba(44, 53, 64, .06);
    transform: translateY(110%); visibility: hidden;
    transition: transform .35s cubic-bezier(.22,.61,.36,1), visibility 0s linear .35s;
  }
  .sticky-cta.on { transform: translateY(0); visibility: visible; transition: transform .35s cubic-bezier(.22,.61,.36,1), visibility 0s; }
  body.jm-open .sticky-cta { transform: translateY(110%); visibility: hidden; }

  .sticky-cta a {
    display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 14px;
    border-radius: 2px; font-family: 'Open Sans', Arial, sans-serif; font-size: 16px; font-weight: 600;
    letter-spacing: 0; text-transform: none; line-height: 1.2; text-decoration: none !important; text-align: center;
    transition: background-color .18s ease, color .18s ease, border-color .18s ease;
  }
  .sticky-cta a svg { width: 16px; height: 16px; flex: 0 0 auto; }
  .sticky-cta .sticky-cta-call { flex: 0 0 auto; padding: 0 20px; color: #3c4856; background: #fff; border: 1.5px solid #3c4856; }
  .sticky-cta .sticky-cta-main { flex: 1 1 auto; color: #fff; background: #3c4856; border: 1.5px solid #3c4856; }
  .sticky-cta .sticky-cta-call:active { background: #f0eee8; }
  .sticky-cta .sticky-cta-main:active { background: #2c3540; border-color: #2c3540; }
  .sticky-cta a:focus-visible { outline: 2px solid #5f7fa3; outline-offset: 3px; }

  /* Keep the corner buttons clear of the bar while it is up. Since 2026-12-01 the
     accessibility button sits bottom-left (css/refresh.css) and back-to-top keeps the right. */
  body.sticky-cta-up #back-to-top { bottom: calc(80px + env(safe-area-inset-bottom)); }
  body.sticky-cta-up:not(.jm-open) #a11yw { bottom: calc(80px + env(safe-area-inset-bottom)) !important; }
  /* The last lines of the footer must not end up under the bar */
  body.sticky-cta-up footer { padding-bottom: 76px; }
}

/* Tablets: a centered pair of buttons, not a full-width banner */
@media (min-width: 600px) and (max-width: 991.98px) {
  .sticky-cta { justify-content: center; }
  .sticky-cta .sticky-cta-main { flex: 0 1 360px; }
}
/* Phone held sideways: the bar gives back as much height as it can (buttons stay 44px) */
@media (max-width: 991.98px) and (max-height: 500px) {
  .sticky-cta { padding-top: 6px; padding-bottom: calc(6px + env(safe-area-inset-bottom)); }
  .sticky-cta a { min-height: 44px; }
  body.sticky-cta-up #a11yw { bottom: calc(64px + env(safe-area-inset-bottom)) !important; }
  body.sticky-cta-up #back-to-top { bottom: calc(64px + env(safe-area-inset-bottom)); }
}

@media (prefers-reduced-motion: reduce) {
  .sticky-cta, .sticky-cta.on { transition: none; }
}
