/* Companion to hh-pro-shim.js — see that file for why this exists. */

/* Pure-CSS dropdown fallback, in case smartmenus ever fails to initialize:
   the widget stylesheet positions ul.sub-menu absolutely; it only lacks the
   JS that reveals it. */
.elementor-nav-menu--main .elementor-nav-menu li.menu-item-has-children:hover > ul.sub-menu,
.elementor-nav-menu--main .elementor-nav-menu li.menu-item-has-children:focus-within > ul.sub-menu {
  display: block;
}

/* The widget CSS fixes the dropdown at 156px while "Gallery & Tour" needs
   more, so the text ran past the sand background. Size the box to its
   content instead (the pro js used to do this). */
.elementor-nav-menu--main .elementor-nav-menu ul.sub-menu {
  width: -moz-max-content !important;
  width: max-content !important;
  min-width: 170px;
}
.elementor-nav-menu--main .elementor-nav-menu ul.sub-menu a.elementor-sub-item {
  width: auto;
  padding-right: 24px;
}

/* The page-load popup: the pro popup js used to size and center it; without
   it the card mounted at the image's natural size, taller than the screen
   and hanging off-center. Keep it a compact card, dead-center, scrolling
   inside itself if it ever outgrows the screen. */
.dialog-widget.elementor-popup-modal {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: rgba(0, 0, 0, .45) !important;
}
.dialog-widget.elementor-popup-modal .dialog-widget-content {
  position: relative !important;
  inset: auto !important;
  margin: 0 !important;
  width: min(780px, 94vw) !important;
  max-height: 90vh;
  overflow-y: auto;
  padding: 14px !important;
}
.dialog-widget.elementor-popup-modal .dialog-message {
  width: auto !important;
  padding: 0 !important;
}
.dialog-widget.elementor-popup-modal img {
  max-width: 100% !important;
  height: auto !important;
}
.dialog-widget.elementor-popup-modal .dialog-close-button {
  position: absolute !important;
  top: 10px !important;
  right: 10px !important;
  left: auto !important;
  z-index: 2;
}

/* Mobile menu opened by the shim's hamburger handler. Submenus render
   expanded inline — a static site has no per-item toggle JS, and showing
   the links beats hiding them. */
nav.elementor-nav-menu--dropdown.hh-open {
  display: block;
}
nav.elementor-nav-menu--dropdown.hh-open ul.sub-menu {
  display: block;
  position: static;
}
