/* Sidebar nav */
:root {
  --sidebar-w: 280px;
}

#sidebar-nav {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--sidebar-w);
  height: 100vh;
  height: 100dvh;
  z-index: 9999999999;
  display: flex;
  flex-direction: column;
  background: var(--sidebar-bg, #ffffff);
  box-shadow: 4px 0 24px rgba(0, 0, 0, .10);
  overflow: hidden;
  transform: translateX(-100%);
  transition: transform .3s ease;
}

#sidebar-nav.is-open {
  transform: translateX(0);
}

@media (prefers-reduced-motion: reduce) {
  #sidebar-nav {
    transition: none;
  }
}

/* Account for WP admin bar */
body.admin-bar #sidebar-nav {
  top: var(--wp-admin--admin-bar--height, 32px);
  height: calc(100vh - var(--wp-admin--admin-bar--height, 32px));
  height: calc(100dvh - var(--wp-admin--admin-bar--height, 32px));
}

body.admin-bar #sidebar-hamburger {
  top: calc(50% + var(--wp-admin--admin-bar--height, 32px) / 2);
}

/* Prevent horizontal scrollbar when sidebar is open */
html.sidebar-is-open,
body.sidebar-is-open {
  overflow-x: hidden;
}

/* Push mode: shift content only when sidebar is open */
body.sidebar-mode-push #wrapper {
  transition: margin-left .3s ease;
}

body.sidebar-is-open.sidebar-mode-push #wrapper {
  margin-left: var(--sidebar-w);
}

/* Overlay backdrop */
#sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .45);
  z-index: 9998;
}

#sidebar-backdrop.is-visible {
  display: block;
}

/* Menu trigger — always visible, all breakpoints */
#sidebar-hamburger {
  position: fixed;
  top: 50%;
  left: -38px;
  z-index: 10000;
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--color-secondary, #111);
  border: 1.5px solid rgba(0, 0, 0, .10);
  border-bottom-left-radius: 20px;
  border-bottom-right-radius: 20px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, .10);
  padding: 9px 18px 9px 14px;
  cursor: pointer;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: .82rem;
  font-weight: 600;
  letter-spacing: .03em;
  color: #fff;
  line-height: 1;
  transition: box-shadow .2s, transform .2s;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transform: rotate(270deg);
  transition: left .3s ease;
}

#sidebar-hamburger:hover {
  box-shadow: 0 4px 20px rgba(0, 0, 0, .14);
  left: -31px;
  transition: left .3s ease;
  border-bottom-left-radius: 20px;
  border-bottom-right-radius: 20px;
}

body.sidebar-is-open #sidebar-hamburger {
  left: calc(var(--sidebar-w) - 2rem);
}

body.sidebar-is-open #sidebar-hamburger:hover {
  left: calc(var(--sidebar-w) - 2rem);
  box-shadow: 0 2px 12px rgba(0, 0, 0, .10);
  transform: rotate(270deg);
}

#sidebar-hamburger:focus-visible {
  outline: 2px solid var(--color-primary, #0066cc);
  outline-offset: 2px;
}

.sidebar-trigger-open {
  display: flex;
  align-items: center;
  gap: 8px;
}

.sidebar-trigger-close {
  display: none;
  align-items: center;
  gap: 8px;
}

body.sidebar-is-open #sidebar-hamburger .sidebar-trigger-open {
  display: none;
}

body.sidebar-is-open #sidebar-hamburger .sidebar-trigger-close {
  display: flex;
}

/* Sidebar internals */
.sidebar-nav__logo {
  padding: 24px 20px;
  border-bottom: 1px solid rgba(0, 0, 0, .08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.sidebar-nav__logo img {
  max-height: 60px;
  width: auto;
  max-width: 200px;
}

.sidebar-nav__close {
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  line-height: 1;
}

.sidebar-nav__contact {
  padding: 14px 20px;
  border-bottom: 1px solid rgba(0, 0, 0, .06);
  flex-shrink: 0;
}

.sidebar-nav__menu {
  flex: 1;
  overflow-y: auto;
  padding: 8px 0;
  scrollbar-width: thin;
  overscroll-behavior: contain;
  overflow-x: hidden;
}

.sidebar-menu {
  list-style: none;
  margin: 0;
  padding: 0;
}

/* Override walker-injected mb-17 on <li>; keep relative for arrow, NO overflow:hidden so dropdown shows */
.sidebar-menu>li {
  border-bottom: 1px solid rgba(0, 0, 0, .05);
  margin-bottom: 0 !important;
  position: relative;
}

.sidebar-menu>li>a {
  display: block;
  /* Override walker-injected Tailwind padding (xl:pb-17 xl:pt-15 xl:pl-12 etc.) */
  padding: 12px 56px 12px 20px !important;
  text-align: left !important;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-weight: 600;
  font-size: .95rem;
  font-style: normal;
  text-decoration: none !important;
  color: inherit;
  transition: background .15s, color .15s;
}

/* Hide rustic hover-state SVG bar inside sidebar */
.sidebar-menu .hover-state {
  display: none !important;
}

/* Kill theme decorators — scope to inside <a> only, so icomoon ::before on arrow still renders */
.sidebar-menu a::after,
.sidebar-menu a::before,
.sidebar-menu a span::after,
.sidebar-menu a span::before {
  display: none !important;
  content: none !important;
}

/* Arrow: hidden on non-has-sub; shown & positioned on has-sub items */
#sidebar-nav .nav-item-arrows {
  display: none !important;
}

#sidebar-nav .has-sub>.nav-item-arrows {
  display: flex !important;
  align-items: center;
  justify-content: center;
  position: absolute !important;
  top: 0 !important;
  bottom: 0 !important;
  right: 0 !important;
  left: auto !important;
  width: 56px;
  margin: 0 !important;
  padding: 0 !important;
  cursor: pointer;
  font-size: 1rem;
  color: var(--color-primary, #0066cc);
  transition: transform .2s ease;
  transform: rotate(0deg);
  transform-origin: center;
}

#sidebar-nav .has-sub.is-open-child>.nav-item-arrows {
  transform: rotate(90deg);
}

/* Dropdown: override hidden / lg:block / absolute / opacity-0 from walker */
#sidebar-nav .dropdown-menu {
  display: none !important;
  position: static !important;
  opacity: 1 !important;
  pointer-events: auto !important;
  transform: none !important;
  min-width: 0 !important;
  box-shadow: none !important;
  border: none !important;
  background: rgba(0, 0, 0, .03);
  padding: 0 !important;
  margin: 0 !important;
}

#sidebar-nav .is-open-child>.dropdown-menu {
  display: block !important;
}

#sidebar-nav .dropdown-menu li {
  border-bottom: 1px solid rgba(0, 0, 0, .04);
  margin: 0 !important;
}

#sidebar-nav .dropdown-menu li a {
  display: block !important;
  padding: 9px 20px 9px 32px !important;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: .875rem !important;
  font-style: normal !important;
  font-weight: 500 !important;
  text-decoration: none !important;
  color: inherit !important;
  transition: background .15s;
}

#sidebar-nav .dropdown-menu li a:hover {
  background: rgba(0, 0, 0, .06) !important;
}

.sidebar-menu>li>a:hover,
.sidebar-menu>li.current-menu-item>a,
.sidebar-menu>li.current-menu-ancestor>a {
  background: rgba(0, 0, 0, .08);
}

.sidebar-menu>li>a:focus-visible,
#sidebar-nav .dropdown-menu li a:focus-visible {
  outline: 2px solid var(--color-primary, #0066cc);
  outline-offset: -2px;
}

.sidebar-nav__cta {
  padding: 16px 20px;
  border-top: 1px solid rgba(0, 0, 0, .08);
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex-shrink: 0;
}

.sidebar-nav__cta .wrap-book-now {
  margin: 0;
}


.sidebar-nav__cta .wrap-book-now a {
  width: 100%;
  max-width: 100%;
  min-width: auto;
  display: flex;
}

#sidebar-nav .menu-two-cols>.dropdown-menu {
  column-count: unset !important;
  -webkit-column-count: unset !important;
}

/* Right-side sidebar */
body.sidebar-side-right #sidebar-nav {
  left: auto;
  right: 0;
  box-shadow: -4px 0 24px rgba(0, 0, 0, .10);
  transform: translateX(100%);
}

body.sidebar-side-right #sidebar-nav.is-open {
  transform: translateX(0);
}

body.sidebar-side-right.sidebar-is-open.sidebar-mode-push #wrapper {
  margin-left: 0;
  margin-right: var(--sidebar-w);
}

body.sidebar-side-right #sidebar-hamburger {
  left: auto;
  right: -38px;
  transform: rotate(90deg);
}

body.sidebar-side-right.sidebar-is-open #sidebar-hamburger {
  left: auto;
  right: calc(var(--sidebar-w) - 2rem);
}

body.sidebar-side-right.sidebar-is-open #sidebar-hamburger:hover {
  right: calc(var(--sidebar-w) - 2rem);
  left: auto;
}

/* Both mode: hide fixed pill trigger, mobile toggler, and nav ul only */
body.menu-type-both #sidebar-hamburger {
  display: none !important;
}

/* Left-side: close tab sticks out from right edge of sidebar */
body.sidebar-side-left.menu-type-both.sidebar-is-open #sidebar-hamburger {
  display: flex !important;
  left: calc(var(--sidebar-w) - 2rem);
  right: auto;
}

/* Right-side: close tab sticks out from left edge of sidebar */
body.sidebar-side-right.menu-type-both.sidebar-is-open #sidebar-hamburger {
  display: flex !important;
  right: calc(var(--sidebar-w) - 2rem);
  left: auto;
}

/* No hover movement on close tab in both mode */
body.menu-type-both.sidebar-is-open #sidebar-hamburger:hover {
  left: auto;
  box-shadow: 0 2px 12px rgba(0, 0, 0, .10);
  transform: rotate(270deg);
}

body.sidebar-side-right.menu-type-both.sidebar-is-open #sidebar-hamburger:hover {
  right: calc(var(--sidebar-w) - 2rem);
  left: auto;
  transform: rotate(90deg);
}

body.menu-type-both .navbar-toggler {
  display: none !important;
}

body.menu-type-both .main-menu-ul.navbar-nav {
  display: none !important;
}

body.menu-type-both .sidebar-nav__logo {
  display: none !important;
}

/* On mobile/tablet in both mode: move contact below menu using flex order */
@media (max-width: 1023px) {
  body.menu-type-both .sidebar-nav__menu {
    order: 1;
  }
  body.menu-type-both .sidebar-nav__contact {
    order: 2;
    border-top: 1px solid rgba(0, 0, 0, .08);
    border-bottom: none;
  }
  body.menu-type-both .sidebar-nav__cta {
    order: 3;
  }
  /* Book Now wrapper uses hidden lg:block — force visible inside sidebar */
  body.menu-type-both .sidebar-nav__cta .wrap-book-now {
    display: block !important;
    margin: 0;
  }
  body.menu-type-both .sidebar-nav__cta .wrap-book-now a {
    width: 100%;
    display: block;
    text-align: center;
  }
}

/* Hide contact/CTA on desktop in both mode (header already shows them) */
@media (min-width: 1024px) {
  body.menu-type-both .sidebar-nav__contact,
  body.menu-type-both .sidebar-nav__cta {
    display: none !important;
  }
}

body.menu-type-both #main-menu {
  align-self: stretch !important;
  justify-content: center !important;
  align-items: flex-end !important;
}


.header-sidebar-trigger {
  display: none;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  font-size: 1.4rem;
  line-height: 1;
  color: inherit;
}

/* Mobile trigger: parent div.block.lg:hidden handles hiding on desktop */
body.menu-type-both .header-sidebar-trigger--mobile {
  display: flex;
  visibility: visible;
}

/* Desktop trigger: hidden on mobile, visible on lg+ */
body.menu-type-both .header-sidebar-trigger--desktop {
  display: none;
  visibility: visible;
}

@media (min-width: 992px) {
  body.menu-type-both .header-sidebar-trigger--desktop {
    display: flex !important;
  }
}