/* TTST v1.1.0. Works with ACTUAL Sonaar sr-e-menu HTML (sr-e-desktop / sr-e-menu-toggle / sr-e-mobile).
 * Enabled globally via Settings, per-widget via Elementor, or by Advanced CSS class.
 * No media-query breakpoint controls the hamburger behavior. */
:is(.elementor-widget-sr-e-menu.ttst-sonaar-always-hamburger, body.ttst-sonaar-hamburger-global .elementor-widget-sr-e-menu, .elementor-widget-sr-e-menu.ttst-sonaar-preview-enabled):not(.ttst-sonaar-preview-disabled) {
  position: relative;
  min-width: 0;
}
:is(.elementor-widget-sr-e-menu.ttst-sonaar-always-hamburger, body.ttst-sonaar-hamburger-global .elementor-widget-sr-e-menu, .elementor-widget-sr-e-menu.ttst-sonaar-preview-enabled):not(.ttst-sonaar-preview-disabled) > .elementor-widget-container {
  position: relative;
  overflow: visible !important;
}
/* Sonaar outputs BOTH navigation elements. Only hide the original desktop element. */
:is(.elementor-widget-sr-e-menu.ttst-sonaar-always-hamburger, body.ttst-sonaar-hamburger-global .elementor-widget-sr-e-menu, .elementor-widget-sr-e-menu.ttst-sonaar-preview-enabled):not(.ttst-sonaar-preview-disabled) nav.sr-e-desktop {
  display: none !important;
  visibility: hidden !important;
}
/* KEEP Sonaar's real trigger (not .elementor-menu-toggle). */
:is(.elementor-widget-sr-e-menu.ttst-sonaar-always-hamburger, body.ttst-sonaar-hamburger-global .elementor-widget-sr-e-menu, .elementor-widget-sr-e-menu.ttst-sonaar-preview-enabled):not(.ttst-sonaar-preview-disabled) .sr-e-menu-toggle {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  visibility: visible !important;
  opacity: 1 !important;
  pointer-events: auto !important;
  cursor: pointer;
  position: relative;
  z-index: 2;
}
:is(.elementor-widget-sr-e-menu.ttst-sonaar-always-hamburger, body.ttst-sonaar-hamburger-global .elementor-widget-sr-e-menu, .elementor-widget-sr-e-menu.ttst-sonaar-preview-enabled):not(.ttst-sonaar-preview-disabled) .sr-e-menu-toggle:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
}
/* Use original Sonaar MOBILE navigation DOM and links at ALL widths. Animated via visibility/opacity,
   instead of repurposing the horizontal menu or creating a new <nav>. */
:is(.elementor-widget-sr-e-menu.ttst-sonaar-always-hamburger, body.ttst-sonaar-hamburger-global .elementor-widget-sr-e-menu, .elementor-widget-sr-e-menu.ttst-sonaar-preview-enabled):not(.ttst-sonaar-preview-disabled) nav.sr-e-mobile {
  display: block !important;
  position: absolute !important;
  top: calc(100% + 8px) !important;
  right: 0 !important;
  left: auto !important;
  box-sizing: border-box;
  width: min(var(--ttst-sonaar-editor-panel-width, var(--ttst-sonaar-panel-width, 320px)), calc(100vw - 24px)) !important;
  max-width: calc(100vw - 24px) !important;
  max-height: min(75vh, 760px) !important;
  height: auto !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  z-index: 99990 !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
  transform: translateY(-8px) !important;
  transition: opacity .18s ease, transform .18s ease, visibility .18s ease !important;
  -webkit-overflow-scrolling: touch;
}
:is(.elementor-widget-sr-e-menu.ttst-sonaar-always-hamburger, body.ttst-sonaar-hamburger-global .elementor-widget-sr-e-menu, .elementor-widget-sr-e-menu.ttst-sonaar-preview-enabled):not(.ttst-sonaar-preview-disabled).ttst-sonaar-is-open nav.sr-e-mobile {
  visibility: visible !important;
  opacity: 1 !important;
  pointer-events: auto !important;
  transform: translateY(0) !important;
}
:is(.elementor-widget-sr-e-menu.ttst-sonaar-always-hamburger, body.ttst-sonaar-hamburger-global .elementor-widget-sr-e-menu, .elementor-widget-sr-e-menu.ttst-sonaar-preview-enabled):not(.ttst-sonaar-preview-disabled).ttst-sonaar-align-left nav.sr-e-mobile {
  left: 0 !important;
  right: auto !important;
}
/* Don’t let desktop Sonaar row styling force horizontal lists into the mobile panel. */
:is(.elementor-widget-sr-e-menu.ttst-sonaar-always-hamburger, body.ttst-sonaar-hamburger-global .elementor-widget-sr-e-menu, .elementor-widget-sr-e-menu.ttst-sonaar-preview-enabled):not(.ttst-sonaar-preview-disabled) nav.sr-e-mobile > ul {
  display: flex !important;
  flex-direction: column !important;
  flex-wrap: nowrap !important;
  width: 100% !important;
  height: auto !important;
  visibility: visible !important;
}
:is(.elementor-widget-sr-e-menu.ttst-sonaar-always-hamburger, body.ttst-sonaar-hamburger-global .elementor-widget-sr-e-menu, .elementor-widget-sr-e-menu.ttst-sonaar-preview-enabled):not(.ttst-sonaar-preview-disabled) nav.sr-e-mobile > ul > li {
  display: block !important;
  width: 100% !important;
  height: auto !important;
  visibility: visible !important;
}
:is(.elementor-widget-sr-e-menu.ttst-sonaar-always-hamburger, body.ttst-sonaar-hamburger-global .elementor-widget-sr-e-menu, .elementor-widget-sr-e-menu.ttst-sonaar-preview-enabled):not(.ttst-sonaar-preview-disabled) nav.sr-e-mobile > ul > li > a {
  white-space: normal;
}
@media (prefers-reduced-motion: reduce) {
  :is(.elementor-widget-sr-e-menu.ttst-sonaar-always-hamburger, body.ttst-sonaar-hamburger-global .elementor-widget-sr-e-menu, .elementor-widget-sr-e-menu.ttst-sonaar-preview-enabled):not(.ttst-sonaar-preview-disabled) nav.sr-e-mobile {
    transition: none !important;
    transform: none !important;
  }
}

/* Elementor editor: alignment changes need to override the last PHP-rendered class. */
:is(.elementor-widget-sr-e-menu.ttst-sonaar-always-hamburger, body.ttst-sonaar-hamburger-global .elementor-widget-sr-e-menu, .elementor-widget-sr-e-menu.ttst-sonaar-preview-enabled):not(.ttst-sonaar-preview-disabled).ttst-sonaar-preview-left nav.sr-e-mobile {
  left: 0 !important; right: auto !important;
}
:is(.elementor-widget-sr-e-menu.ttst-sonaar-always-hamburger, body.ttst-sonaar-hamburger-global .elementor-widget-sr-e-menu, .elementor-widget-sr-e-menu.ttst-sonaar-preview-enabled):not(.ttst-sonaar-preview-disabled).ttst-sonaar-preview-right nav.sr-e-mobile {
  left: auto !important; right: 0 !important;
}
