/**
 * Npy lateral menu (menu_administrable) — styles
 * ------------------------------------------------------------------
 * Companion stylesheet for menu_administrable.js.
 *
 * Drawer side is controlled by a modifier class added by the JS:
 *   - default            -> slides in from the LEFT
 *   - .npy-side-right     -> slides in from the RIGHT
 *
 * On desktop (>=601px) the second level opens to the right of the first
 * level (two columns). On mobile it is a fullscreen accordion.
 */

:root {
  --npy-darkblue: #171754;
  --npy-gold: #f2ab30;
}

/* Floating burger (only created when no [data-npy-menu-toggle] exists) */
.npy-menu-burger {
  position: fixed;
  top: 18px;
  left: 18px;
  z-index: 99998;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 10px;
  background: var(--npy-darkblue);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  box-shadow: 0px 12px 18px -6px rgba(0, 0, 0, 0.3);
}
.npy-menu-burger.npy-side-right {
  left: auto;
  right: 18px;
}
.npy-menu-burger span {
  display: block;
  width: 22px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
}

/* Backdrop */
.npy-menu-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(23, 23, 84, 0.55);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease;
  z-index: 99999;
}
.npy-menu-backdrop.is-open {
  opacity: 1;
  visibility: visible;
}

/* Panel */
.npy-menu-panel {
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  height: 100dvh;
  width: 480px;
  max-width: 100%;
  background: linear-gradient(45deg, #151540, #171754d9);
  color: #fff;
  display: flex;
  flex-direction: column;
  transform: translateX(-100%);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 100000;
  font-family: "Rajdhani", "Work Sans", sans-serif;
  box-shadow: 0 0 40px rgba(0, 0, 0, 0.4);
}
.npy-menu-panel.npy-side-right {
  left: auto;
  right: 0;
  transform: translateX(100%);
}
.npy-menu-panel.is-open,
.npy-menu-panel.npy-side-right.is-open {
  transform: translateX(0);
}

/* Header */
.npy-menu-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 26px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  flex: 0 0 auto;
}
.npy-menu-head h2 {
  margin: 0!important;
  padding:0!important;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: #fff;
  text-shadow: none;
}
.npy-menu-close {
    background: var(--gold);
    border: 0;
    color: #fff;
    font-size: 30px;
    line-height: 1;
    cursor: pointer;
    border-radius: 500px;
    width: 30px;
    height: 30px;
    transition: all 0.3s ease;
}
.npy-menu-close:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: scale(1.1);
}

/* List */
.npy-menu-scroll {
  flex: 1 1 auto;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  position: relative;
}
.npy-menu-list {
  list-style: none;
  margin: 0;
  padding: 8px 0 40px;
}
.npy-menu-item {
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.npy-menu-row {
  display: flex;
  align-items: stretch;
}
.npy-menu-link {
  flex: 1 1 auto;
  display: block;
  padding: 16px 26px;
  color: #fff;
  text-decoration: none;
  font-size: 19px;
  font-weight: 800;
  letter-spacing: 0.3px;
}
.npy-menu-link:hover {
  color: var(--npy-gold);
}
.npy-menu-toggle {
  flex: 0 0 auto;
  width: 60px;
  border: 0;
  background: transparent;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.npy-menu-toggle svg {
  width: 16px;
  height: 16px;
  transition: transform 0.3s ease;
}

/* Submenu (mobile-first: accordion below, height-animated via grid) */
.npy-submenu {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.35s ease;
}
.npy-menu-item.is-expanded > .npy-submenu {
  grid-template-rows: 1fr;
}
.npy-menu-item.is-expanded > .npy-menu-row .npy-menu-toggle svg {
  transform: rotate(180deg);
  color: var(--npy-gold);
}
.npy-submenu-inner {
  min-height: 0;
  overflow: hidden;
  list-style: none;
  margin: 0;
  padding: 0;
}
.npy-submenu-inner .npy-menu-link {
  font-size: 34px;
  font-weight: 800;
  padding: 13px 26px 13px 40px;
  color: rgba(255, 255, 255, 0.85);
}

@media screen and (max-width: 601px) {
  .npy-submenu-inner .npy-menu-link {
    font-size: 18px;
  font-weight: 400;
  }
}


.npy-submenu-inner .npy-menu-link:hover {
  color: var(--npy-gold);
}
.npy-submenu-inner .npy-menu-item {
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.npy-submenu-inner .npy-menu-item:last-child {
  border-bottom: 0;
}

.npy-menu-loading,
.npy-menu-error {
  padding: 24px 26px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 16px;
}

html.npy-menu-locked,
body.npy-menu-locked {
  overflow: hidden;
}

/* Mobile: fullscreen */
@media (max-width: 600px) {
  .npy-menu-panel {
    width: 100%;
  }
  .npy-menu-link {
    font-size: 20px;
  }
}

/* Desktop: second level opens to the RIGHT of the first level */
@media (min-width: 601px) {
  .npy-menu-panel {
    width:100vw;
  }
  .npy-menu-scroll {
    display: flex;
    overflow: hidden;
  }
  .npy-menu-list {
    flex: 0 0 340px;
    height: 100%;
    overflow-y: auto;
    border-right: 1px solid rgba(255, 255, 255, 0.12);
  }
  .npy-submenu {
    position: absolute;
    top: 0;
    left: 340px;
    right: 0;
    height: 100%;
    display: block;
    grid-template-rows: none;
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    transform: translateX(12px);
    transition: opacity 0.25s ease, transform 0.25s ease;
  }
  .npy-menu-item.is-expanded > .npy-submenu {
    opacity: 1;
    visibility: visible;
    transform: none;
  }
  .npy-submenu-inner {
    padding: 14px 0;
  }
  .npy-submenu-inner .npy-menu-link {
    padding: 20px 30px;
  }
  .npy-menu-toggle svg {
    transform: rotate(-90deg);
  }
  .npy-menu-item.is-expanded > .npy-menu-row .npy-menu-toggle svg {
    transform: rotate(-90deg);
    color: var(--npy-gold);
  }
  .npy-menu-item.is-expanded > .npy-menu-row .npy-menu-link {
    color: var(--npy-gold);
  }
}
