/* =========================================================
   ONE NAV – BASE STRUCTURE CSS
   NO THEME / NO COLOR OPINION
   ========================================================= */

/* page safety */
html, body{
  max-width: 100%;
  overflow-x: hidden;
}

/* lock scroll when menu open */
html.mnav-lock,
body.mnav-lock{
  overflow: hidden;
}

/* ===== Container ===== */
.mnav{
  position: fixed;
  inset: 0;
  width: 100%;
  max-width: 100%;
  pointer-events: none;
  z-index: 9999;
}
.mnav.is-open{
  pointer-events: auto;
}

/* overlay */
.mnav__overlay{
  position: fixed;
  inset: 0;
  width: 100%;
  max-width: 100%;
  display: none;
}

/* drawer (fullscreen, left) */
.mnav__drawer{
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;

  width: 100vw;
  max-width: 100vw;

  transform: translateX(-100%);
  transition: transform .25s ease;

  display: flex;
  flex-direction: column;

  overflow: hidden;
  box-sizing: border-box;
}

.mnav.is-open .mnav__drawer{
  transform: translateX(0);
}

/* track */
.mnav__track{
  position: relative;
  flex: 1;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
}

/* panel */
.mnav__panel{
  position: absolute;
  inset: 0;

  width: 100%;
  max-width: 100%;

  transform: translateX(100%);
  transition: transform .25s ease;

  display: flex;
  flex-direction: column;

  pointer-events: none;

  overflow-x: hidden;
  overflow-y: hidden;
  box-sizing: border-box;
}

/* ===== Header ===== */
.mnav__header{
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  align-items: center;

  padding: 12px 12px;
  box-sizing: border-box;
}

.mnav__header-left,
.mnav__header-right{
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mnav__title{
  text-align: center;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .04em;

  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mnav__spacer{
  width: 44px;
  height: 44px;
}

.mnav__back,
.mnav__close-top{
  width: 44px;
  height: 44px;

  border: none;
  background: transparent;

  font-size: 26px;
  line-height: 1;

  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;

  -webkit-tap-highlight-color: transparent;
}

/* ===== List ===== */
.mnav__list{
  margin: 0;
  padding: 6px 0;
  list-style: none;

  flex: 1;
  min-height: 0;

  overflow-y: auto;
  overflow-x: hidden;

  -webkit-overflow-scrolling: touch;
  box-sizing: border-box;
}

.mnav__item{
  box-sizing: border-box;
}

/* ===== Link ===== */
.mnav__link{
  width: 100%;
  max-width: 100%;

  display: flex;
  align-items: center;
  justify-content: space-between;

  padding: 14px 14px;

  border: 0;
  background: transparent;

  text-align: left;
  font-size: 16px;
  cursor: pointer;

  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

.mnav__link--leaf{
  text-decoration: none;
}

/* left */
.mnav__left{
  display: flex;
  align-items: center;
  min-width: 0;
}

/* icon */
.mnav__icon{
  width: 20px;
  height: 20px;
  flex: 0 0 20px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  margin-right: 10px;
}

.mnav__icon svg{
  width: 20px;
  height: 20px;
  display: block;
}

/* label */
.mnav__label{
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* arrow */
.mnav__arrow{
  width: 22px;
  height: 22px;
  flex: 0 0 22px;

  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.mnav__arrow svg{
  width: 22px;
  height: 22px;
  display: block;
}

/* ===== Structural one-* classes ===== */
.one-no-icon .mnav__icon{ display:none; }
.one-leaf .mnav__arrow{ display:none; }

.one-lv-1 .mnav__label{ font-weight:800; }
.one-lv-2 .mnav__label{ font-weight:700; }
.one-lv-3 .mnav__label{ font-weight:600; }
.one-lv-4 .mnav__label{ font-weight:500; }

/* prevent accidental horizontal scroll */
.mnav__drawer,
.mnav__track,
.mnav__panel,
.mnav__list,
.mnav__link{
  overflow-x: hidden;
}