/* Menu-specific refinements are included in style.css to keep the visual system consistent. */

/* Add-on fixes: menu search visibility + independently scrollable category list. */
#menuSections .menu-section[hidden],
#menuSections .menu-item[hidden] {
  display: none !important;
}
@media (min-width: 761px) {
  .menu-sidebar {
    position: sticky;
    top: 110px;
    max-height: calc(100vh - 130px);
    display: flex;
    flex-direction: column;
    min-height: 0;
  }
  #categoryNav {
    min-height: 0;
    max-height: calc(100vh - 215px);
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    padding-right: 5px;
  }
}
#categoryNav .category-pill.active {
  background: var(--wine);
  color: #fff;
  border-color: var(--wine);
}
#categoryNav .category-pill.active .bi {
  color: #fff;
}


/* Sidebar scroll refinement — desktop only; mobile category strip stays unchanged. */
@media (min-width: 761px) {
  .menu-content {
    align-items: start;
  }

  .menu-sidebar {
    position: sticky;
    top: 125px;
    align-self: start;
    height: auto;
    max-height: calc(100vh - 145px);
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }

  .menu-sidebar .sidebar-title {
    flex: 0 0 auto;
    margin-bottom: 12px;
  }

  #categoryNav {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-height: 0;
    max-height: calc(100vh - 220px);
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior-y: contain;
    scrollbar-width: thin;
    scrollbar-gutter: stable;
    padding: 3px 5px 3px 0;
  }

  #categoryNav .category-pill {
    flex: 0 0 auto;
    width: 100%;
  }
}

/* Keep mobile/tablet category navigation as the original horizontal strip. */
@media (max-width: 760px) {
  .menu-sidebar {
    max-height: none;
    overflow: visible;
    display: block;
  }

  #categoryNav {
    max-height: none;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-gutter: auto;
  }
}
