/* A12 and A15. Load once with the site-specific frontend patch. */
.ssyd-sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* The legacy header title is suppressed server-side only on single posts.
 * Remove its now-empty layout container without hiding titles on pages. */
body.single-post .elementor-119 .elementor-element-7f65690,
body.archive .elementor-119 .elementor-element-7f65690 {
  display: none;
}

/* Keep a focused skip target below either observed sticky header. */
body.single-post #content,
body.archive #content,
body.page-id-1383 #content,
body.page-id-2531 #main {
  scroll-margin-top: 110px;
}

/* Homepage dialog must remain usable with a small viewport or keyboard. */
body.page-id-2531 #popup {
  /* The current new header is forced to z-index:9999 by its compatibility
   * code; the original popup was only 200 and could sit behind that header. */
  z-index: 10010;
  overflow-y: auto;
  overscroll-behavior: contain;
}
body.page-id-2531 #popup .popup {
  max-height: calc(100vh - 40px);
  max-height: calc(100dvh - 40px);
  overflow-y: auto;
}
body.page-id-2531 #popup .popup-close {
  min-width: 44px;
  min-height: 44px;
}
body.page-id-2531 #popup :focus-visible {
  outline: 3px solid #0f2847;
  outline-offset: 3px;
}

/* Applied only when the JS has found the exact Cookiebot widget and an
 * actually visible fixed .mobile-cta. Cookiebot itself remains interactive. */
html.ssyd-cta-clearance #CookiebotWidget {
  bottom: var(--ssyd-cookie-bottom, 10px) !important;
}

/* Avoid placing a persistent CTA over the form being edited or the dialog. */
html.ssyd-editing-form .mobile-cta,
html.ssyd-dialog-open .mobile-cta {
  visibility: hidden !important;
  pointer-events: none !important;
}

@media (max-width: 900px) {
  body.page-id-2861 .lp .mobile-cta {
    padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px));
  }
}

/* Separate A01/A12 candidate for the 21 new #nav/#navToggle pages.
 * Source inspection found a 768–900px breakpoint gap and two absolute
 * dropdown panels sharing top:100%. Browser acceptance is required.
 * Use together with frontend_new_nav_block.js, replacing the old handler.
 */
@media (max-width: 900px) {
  #nav .nav-inner {
    display: flex;
    flex-wrap: wrap;
    position: relative;
  }
  #nav {
    max-height: 95vh;
    max-height: 95dvh;
    overflow-y: auto;
    overscroll-behavior: contain;
  }
  #nav .logo {
    order: 1;
  }
  #nav #navToggle {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    order: 2;
    margin-left: auto;
    min-width: 44px;
    min-height: 44px;
  }
  #nav .nav-links,
  #nav .nav-right {
    display: none !important;
  }
  #nav .nav-links.mobile-open,
  #nav .nav-right.mobile-open {
    display: flex !important;
    position: static;
    inset: auto;
    flex-direction: column;
    flex-basis: 100%;
    width: 100%;
    gap: 8px;
    padding: 12px 0;
    background: transparent;
  }
  #nav .nav-links.mobile-open { order: 3; }
  #nav .nav-right.mobile-open { order: 4; padding-top: 0; }
  #nav .nav-links.mobile-open a {
    box-sizing: border-box;
    display: flex;
    align-items: center;
    min-height: 44px;
    width: 100%;
    padding: 10px 4px;
    color: #ffffff;
    font-size: 16px;
    border-bottom: 1px solid rgba(255,255,255,.15);
  }
  #nav .nav-right.mobile-open .nav-phone { display: inline-flex; }
  #nav .nav-right.mobile-open .nav-cta { text-align: center; margin-top: 0; }
  #nav a:focus-visible,
  #nav #navToggle:focus-visible {
    outline: 3px solid #f9d507;
    outline-offset: 3px;
  }
}
