/* adamedia Weinlandhof Accessibility Fixes v0.1.11 */

.adw-skip-link {
  position: absolute;
  left: 1rem;
  top: 1rem;
  z-index: 999999;
  padding: .75rem 1rem;
  background: #fff;
  color: #111;
  border: 3px solid #111;
  border-radius: .25rem;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  transform: translateY(-180%);
  transition: transform .15s ease;
}

.adw-skip-link:focus,
.adw-skip-link:focus-visible {
  transform: translateY(0);
  outline: 3px solid #111;
  outline-offset: 3px;
}

:focus-visible {
  outline: 3px solid #111 !important;
  outline-offset: 3px !important;
}

#adw-main-content {
  scroll-margin-top: 160px;
}

/* Do not allow old disabled wrappers to intercept mouse events. */
.adw-a11y-disabled-for-keyboard {
  pointer-events: none !important;
}

@media (min-width: 1025px) {
  /* Old Hoteller off-canvas mobile menu: visually offscreen but keyboard-focusable. Keep it out on desktop. */
  .mobile_menu_wrapper,
  .mobile_menu_overlay,
  #mobile_menu_wrapper,
  #mobile_menu_overlay {
    display: none !important;
    visibility: hidden !important;
  }

  /* Elementor mobile menu widgets must not participate on desktop. */
  #elementor_header .elementor-element-2be1e4a,
  #elementor_sticky_header .elementor-element-87cbeb8,
  #elementor_sticky_header .elementor-element-2be1e4a {
    display: none !important;
    visibility: hidden !important;
  }

  /* Language switcher: never use Elementor's dropdown clone. */
  #elementor_header .elementor-element-4122857 .elementor-nav-menu--dropdown,
  #elementor_sticky_header .elementor-element-4122857 .elementor-nav-menu--dropdown {
    display: none !important;
    visibility: hidden !important;
  }

  #elementor_header .elementor-element-4122857 .elementor-nav-menu--main,
  #elementor_sticky_header .elementor-element-4122857 .elementor-nav-menu--main {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
  }

  #elementor_header .elementor-element-4122857 .elementor-nav-menu,
  #elementor_sticky_header .elementor-element-4122857 .elementor-nav-menu {
    display: flex !important;
    flex-direction: row !important;
    gap: .5rem;
    align-items: center;
  }

  /* Hoteller keyboard dropdowns: keep absolute popup behaviour, but make it focus-within friendly. */
  #elementor_header .elementor-widget-hoteller-navigation-menu .tg_navigation_wrapper,
  #elementor_sticky_header .elementor-widget-hoteller-navigation-menu .tg_navigation_wrapper,
  #elementor_header .elementor-widget-hoteller-navigation-menu .tg_navigation_wrapper .nav,
  #elementor_sticky_header .elementor-widget-hoteller-navigation-menu .tg_navigation_wrapper .nav {
    overflow: visible !important;
  }

  #elementor_header .elementor-widget-hoteller-navigation-menu .tg_navigation_wrapper li,
  #elementor_sticky_header .elementor-widget-hoteller-navigation-menu .tg_navigation_wrapper li {
    position: relative !important;
  }

  #elementor_header .elementor-widget-hoteller-navigation-menu .tg_navigation_wrapper li > .sub-menu,
  #elementor_sticky_header .elementor-widget-hoteller-navigation-menu .tg_navigation_wrapper li > .sub-menu {
    --adw-submenu-offset-y: 12px;
    --adw-submenu-offset-x: 4px;
    display: block !important;
    position: absolute !important;
    top: calc(100% + var(--adw-submenu-offset-y)) !important;
    left: 0 !important;
    z-index: 99999 !important;
    /* Let dropdowns size to content instead of forcing a wide panel.
       fit-content + compact max-width keeps the third level inside the viewport. */
    width: fit-content !important;
    min-width: 0 !important;
    max-width: min(22rem, calc(100vw - 2rem)) !important;
    box-sizing: border-box !important;
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
    white-space: normal !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
  }

  /* Nested submenus open to the right and slightly aligned. */
  #elementor_header .elementor-widget-hoteller-navigation-menu .tg_navigation_wrapper li > .sub-menu li > .sub-menu,
  #elementor_sticky_header .elementor-widget-hoteller-navigation-menu .tg_navigation_wrapper li > .sub-menu li > .sub-menu {
    top: 0 !important;
    left: calc(100% + var(--adw-submenu-offset-x)) !important;
  }


  /* Compact dropdown items: width follows content, long labels may wrap instead of widening the whole menu. */
  #elementor_header .elementor-widget-hoteller-navigation-menu .tg_navigation_wrapper li > .sub-menu a,
  #elementor_sticky_header .elementor-widget-hoteller-navigation-menu .tg_navigation_wrapper li > .sub-menu a {
    display: block !important;
    width: max-content !important;
    max-width: min(20rem, calc(100vw - 3rem)) !important;
    white-space: normal !important;
    overflow-wrap: normal !important;
    word-break: normal !important;
    box-sizing: border-box !important;
  }

  /* JS adds this class when a third-level menu would run out of the viewport. */
  #elementor_header .elementor-widget-hoteller-navigation-menu .tg_navigation_wrapper li > .sub-menu.adw-submenu-open-left,
  #elementor_sticky_header .elementor-widget-hoteller-navigation-menu .tg_navigation_wrapper li > .sub-menu.adw-submenu-open-left {
    left: auto !important;
    right: calc(100% + var(--adw-submenu-offset-x)) !important;
  }

  /* For a first-level dropdown near the right edge, align it to the parent item instead of overflowing. */
  #elementor_header .elementor-widget-hoteller-navigation-menu .tg_navigation_wrapper li > .sub-menu.adw-submenu-align-right,
  #elementor_sticky_header .elementor-widget-hoteller-navigation-menu .tg_navigation_wrapper li > .sub-menu.adw-submenu-align-right {
    left: auto !important;
    right: 0 !important;
  }

  #elementor_header .elementor-widget-hoteller-navigation-menu .tg_navigation_wrapper li:hover > .sub-menu,
  #elementor_header .elementor-widget-hoteller-navigation-menu .tg_navigation_wrapper li:focus-within > .sub-menu,
  #elementor_sticky_header .elementor-widget-hoteller-navigation-menu .tg_navigation_wrapper li:hover > .sub-menu,
  #elementor_sticky_header .elementor-widget-hoteller-navigation-menu .tg_navigation_wrapper li:focus-within > .sub-menu {
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: auto !important;
  }
}
