/* Mobile bottom bar for spravatotreatmentcenters.com (2026-11-12, asked for by LocalIQ).
   Same idea as spravatonj.com's bottom nav: Call / Register / Offices / More, phones only.
   Markup is injected by bar.js so all pages share one copy. */
.stc-bar, .stc-sheet, .stc-sheet-backdrop { display: none; }

@media (max-width: 767px) {
  :root { --stc-bar-h: 62px; }
  body { padding-bottom: calc(var(--stc-bar-h) + env(safe-area-inset-bottom, 0px)); }

  .stc-bar {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 1040;
    height: calc(var(--stc-bar-h) + env(safe-area-inset-bottom, 0px));
    padding-bottom: env(safe-area-inset-bottom, 0px);
    background: #fff; border-top: 1px solid #e3ded8;
    box-shadow: 0 -4px 16px rgba(0, 0, 0, .08);
    font-family: "Be Vietnam", system-ui, sans-serif;
  }
  .stc-bar a, .stc-bar button {
    flex: 1 1 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
    margin: 0; padding: 0; border: 0; background: none; cursor: pointer;
    color: #333; font: inherit; font-size: 11.5px; font-weight: 500; letter-spacing: .02em;
    text-decoration: none; -webkit-tap-highlight-color: transparent;
  }
  .stc-bar a:hover, .stc-bar a:focus { color: #333; text-decoration: none; }
  .stc-bar svg { width: 20px; height: 20px; stroke-width: 1.7; }
  .stc-bar a[aria-current="page"] { color: #82786e; font-weight: 600; }
  /* Call is the one we want tapped: solid button, like the site's main CTAs */
  .stc-bar .stc-bar-call, .stc-bar .stc-bar-call:hover, .stc-bar .stc-bar-call:focus {
    flex: 1.25 1 0; margin: 8px 6px 8px 8px; border-radius: 8px;
    background: #333; color: #fff; font-weight: 600; font-size: 12.5px;
  }
  .stc-bar .stc-bar-call:active { background: #82786e; }

  .stc-sheet-backdrop {
    display: block; position: fixed; inset: 0; z-index: 1038; background: rgba(0, 0, 0, .35);
    opacity: 0; pointer-events: none; transition: opacity .2s;
  }
  .stc-sheet {
    display: block; position: fixed; left: 0; right: 0; bottom: 0; z-index: 1039;
    max-height: 80vh; overflow-y: auto;
    padding: 10px 22px calc(var(--stc-bar-h) + 18px + env(safe-area-inset-bottom, 0px));
    background: #fff; border-radius: 14px 14px 0 0;
    font-family: "Be Vietnam", system-ui, sans-serif;
    transform: translateY(105%); transition: transform .25s ease; visibility: hidden;
  }
  .stc-sheet a {
    display: block; padding: 13px 2px; border-bottom: 1px solid #eee;
    color: #232323; font-size: 16px; text-decoration: none;
  }
  .stc-sheet a:last-child { border-bottom: 0; }
  .stc-sheet .stc-sheet-crisis { color: #82786e; font-size: 14px; }
  .stc-sheet-grab { width: 40px; height: 4px; margin: 0 auto 8px; border-radius: 2px; background: #d8d2cb; }
  html.stc-sheet-open .stc-sheet { transform: none; visibility: visible; }
  html.stc-sheet-open .stc-sheet-backdrop { opacity: 1; pointer-events: auto; }

  /* Keep the WhatsApp "Chat with Dr. B" button clear of the bar */
  .floating-wpp { bottom: calc(var(--stc-bar-h) + 14px + env(safe-area-inset-bottom, 0px)) !important; }
}

@media (prefers-reduced-motion: reduce) {
  .stc-sheet, .stc-sheet-backdrop { transition: none; }
}
