/* =========================================
   SIDE MENU
========================================= */

#side-menu {
  position: fixed;

  inset: 0;

  z-index: 99999;

  pointer-events: none;
}

#side-menu.open {
  pointer-events: auto;
}


/* =========================================
   OVERLAY
========================================= */

.menu-overlay {
  position: absolute;

  inset: 0;

  background: rgba(0, 0, 0, 0.45);

  opacity: 0;

  transition: opacity 0.25s ease;
}

#side-menu.open .menu-overlay {
  opacity: 1;
}


/* =========================================
   PANEL
========================================= */

.menu-panel {
  position: absolute;
  top: 0;
  left: 0;
  width: 270px;
  max-width: 88vw;
  height: 100vh;
  background: #ffffff;
  color: #17202a;
  overflow-y: auto;
  scrollbar-width: none;
  transform: translateX(-100%);
  transition: transform 0.28s ease;
  box-shadow: 4px 0 18px rgba(0, 0, 0, 0.18);
}
.menu-panel::-webkit-scrollbar {
  display: none;
}

#side-menu.open .menu-panel {
  transform: translateX(0);
}


/* =========================================
   HEADER
========================================= */

.menu-header {
  height: 76px;

  display: flex;

  align-items: center;

  padding: 0 24px;

  border-bottom: 1px solid #e5e5e5;
}

.menu-title {
  flex: 1;

  font-size: 22px;

  font-weight: 700;
  color: #17202a;
}

.menu-close {
  border: 0;

  background: transparent;

  font-size: 38px;

  line-height: 1;

  cursor: pointer;

  color: #17202a;
}


/* =========================================
   SEARCH
========================================= */

.menu-search {
  display: flex;
  align-items: center;
  margin: 18px 16px;
  height: 54px;
  border: 1px solid #d4d4d4;
  border-radius: 6px;
  background: #ffffff;
  box-sizing: border-box;
}

.menu-search input {
  flex: 1;
  min-width: 0;
  height: 100%;
  border: 0;
  outline: none;
  padding: 0 16px;
  box-sizing: border-box;
  font-size: 18px;
  color: #666;
  background: transparent;
}

.menu-search input::placeholder {
  color: #666;
}

.menu-search button {
  width: 58px;
  height: 100%;
  flex: 0 0 58px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  border-left: 1px solid #ddd;
  background: transparent;
  font-size: 32px;
  line-height: 1;
  cursor: pointer;
  color: #666;
  box-sizing: border-box;
}


/* =========================================
   NAVIGATION
========================================= */

.menu-nav {
  padding: 4px 20px 40px;
}

.menu-nav > a,
.menu-group > button {
  width: 100%;
  min-height: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
  box-sizing: border-box;
  color: #000000;
  text-decoration: none;
  font-size: 14px;
  font-weight: 350;
  font-family: inherit;
  background: transparent;
  border: 0;
  cursor: pointer;
  text-align: left;
  webkit-font-smoothing: antialiased;
}

.menu-nav > a:hover,
.menu-group > button:hover {
  background: #f3f4f6;
}


/* =========================================
   ARROW
========================================= */

.menu-group > button span {
  font-size: 28px;

  font-weight: 350;

  transition: transform 0.2s ease;
}

.menu-group.expanded > button span {
  transform: rotate(90deg);
}


/* =========================================
   SUBMENU
========================================= */

.menu-group {
  position: relative;
}

.submenu {
  display: none;

  position: absolute;

  top: 0;
  left: 100%;

  width: 210px;

  max-height: calc(100vh - 20px);

  overflow-y: auto;
  scrollbar-width: none;
  overflow-x: hidden;

  padding: 5px 0;

  box-sizing: border-box;

  background: #ffffff;

  box-shadow: 4px 0 18px rgba(0, 0, 0, 0.12);

  z-index: 100000;

  overscroll-behavior: contain;
}

.submenu::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}

.menu-group.expanded .submenu {
  display: block;
}

.submenu a {
  display: flex;

  min-height: 28px;

  box-sizing: border-box;

  padding: 0 18px;

  align-items: center;

  color: #000000;
  
  text-decoration: none;

  font-size: 14px;

  font-weight: 350;
  font-family: inherit;
  -webkit-font-smoothing: antialiased;
}

.submenu a:hover {
  background: #f3f4f6;
}

/* =========================================
   DIVIDER
========================================= */

.menu-divider {
  height: 1px;

  margin: 16px 0;

  background: #dedede;
}


/* =========================================
   LOCK PAGE
========================================= */

body.menu-open {
  overflow: hidden;
}


/* =========================================
   MOBILE
========================================= */

@media (max-width: 600px) {

  .menu-panel {
    width: 270px;

    max-width: 90vw;
  }

  .menu-header {
    height: 68px;
  }

  .menu-search {
    margin: 16px;
  }

  .menu-nav {
    padding-left: 16px;

    padding-right: 16px;
  }

}

/* =========================================
   MENU SEARCH RESULTS
   ========================================= */

.menu-search-results {
  display: none;
  margin: 6px 10px 10px;
  padding: 0;
}

.menu-search-results-title {
  margin: 0 0 5px;
  padding: 0 3px;

  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;

  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.menu-search-result {
  display: flex;
  flex-direction: column;
  gap: 1px;

  width: 100%;
  margin: 0 0 2px;
  padding: 5px 9px;

  box-sizing: border-box;

  background: #ffffff;
  color: #111111 !important;

  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 3px;

  text-decoration: none !important;
  line-height: 1.2;
}

.menu-search-result:visited {
  color: #111111 !important;
}

.menu-search-result-label {
  display: block;
  color: #111111 !important;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
}

.menu-search-result-parent {
  display: block;
  color: #666666 !important;
  font-size: 10px;
  font-weight: 400;
  line-height: 1.15;
}

.menu-search-result:hover {
  background: #ffffff;
  color: var(--accent) !important;
}

.menu-search-result:hover .menu-search-result-label {
  color: var(--accent) !important;
}