/* Pre-launch accessibility fixes. They keep the WordPress look and only add reach, focus and overflow safety. */

/* Nothing may make the page scroll sideways: large text sizes, or the hidden desktop dropdowns that end 6px past the window. Long words wrap. */
html { overflow-x: clip; }
body { overflow-wrap: break-word; }

/* Desktop header stays at the top while scrolling (mobile and tablet already use the fixed mobile header).
   z-index sits below the booking popups (1042+). Jump links and keyboard focus stop below the header. */
@media (min-width: 1025px) {
  #masthead { position: sticky; top: 0; z-index: 1000; }
  html { scroll-padding-top: 130px; }
}
/* Between 1025px and about 1150px the desktop menu wraps to two rows and the header is 180px tall. */
@media (min-width: 1025px) and (max-width: 1159px) {
  html { scroll-padding-top: 190px; }
}

/* Visible keyboard focus where the theme removed it. */
.elementor-tab-title:focus-visible,
.eael-modal-popup-link:focus-visible,
a.mobmenu-right-bt:focus-visible::after {
  outline: 3px solid #0f75bb !important;
  outline-offset: 2px;
}

/* Mobile tap targets: an invisible 44px-tall hit area around small links, without moving anything. */
@media (max-width: 767px) {
  .elementor-icon-list-items a,
  .custom-footer a,
  .read-button a,
  .elementor-heading-title > a {
    position: relative;
  }
  .elementor-icon-list-items a::after,
  .custom-footer a::after,
  .read-button a::after,
  .elementor-heading-title > a::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    height: max(100%, 44px);
    transform: translateY(-50%);
  }
}

/* Mobile menu open and close buttons: 44x44 hit area (the open button itself is 0x0). */
a.mobmenu-right-bt { position: relative; }
a.mobmenu-right-bt::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 44px;
  height: 44px;
  transform: translate(-50%, -50%);
}

/* Payment logo tiles: the whole rounded tile opens the provider page, not just the small logo. */
.elementor-widget-wrap:has(> .elementor-widget-image img[src*="ccd-payment-logo"]) { position: relative; }
.elementor-widget-image:has(img[src*="ccd-payment-logo"]),
.elementor-widget-image:has(img[src*="ccd-payment-logo"]) > .elementor-widget-container { position: static; }
.elementor-widget-image a:has(> img[src*="ccd-payment-logo"])::after { content: ""; position: absolute; inset: 0; }

/* Text contrast (approved): the same hues, darkened just enough to meet WCAG AA. */
a[style*="#1b92d0" i] { color: #0f75bb !important; }
.single-post .elementor-widget-text-editor a { color: #0f75bb; }
.wpb-posts-nav strong { color: #767676; }
.elementor-1010 .elementor-element.elementor-element-0ac1e74 .elementor-button { background-color: #427d99; }
.elementor-1010 .elementor-element.elementor-element-e84dbca .elementor-button { background-color: #9b6d2f; }
.elementor-1010 .elementor-element.elementor-element-2c32c19 { color: #b58038; }
.elementor-1010 .elementor-element.elementor-element-6a4bead .elementor-heading-title { color: #3e59ff; }

/* Payment logo rows: centred, so the first row (5 logos after the empty tile was removed) balances the second. */
.elementor-container:has(> .elementor-column img[src*="ccd-payment-logo"]) { justify-content: center; }

/* Desktop dropdown closed with Escape stays closed until the pointer or focus leaves it. */
.main-navigation li.ccd-closed > ul { opacity: 0 !important; visibility: hidden !important; }
