/* ============================================================
   Book Buddies App — shared page navigation shell
   Menu button + slide-out menu, centered Book Buddies logo,
   and the right-side Home / Globe / Cards buttons.
   Linked by landing.html, home.html, book_buddies/buddySelect2.html,
   book_buddies/iceGlobe.html so the nav stays identical everywhere.
   Positions are absolute within each page's frame element.
   ============================================================ */

/* Book Buddies logo — same size and place on every page */
.floating-logo {
  position: absolute;
  top: 8px;
  left: 50%;
  z-index: 5;
  width: 232px;
  height: 104px;
  object-fit: contain;
  transform: translateX(-50%);
  filter: drop-shadow(0 8px 12px rgba(0, 0, 0, 0.45));
  pointer-events: none;
}

/* ---------- Corner buttons ---------- */
.menu-button {
  position: absolute;
  top: 12px;
  z-index: 100;   /* above page content (buddySelect2 cards/controls reach z-62) */
  width: 46px;
  height: 46px;
  display: inline-grid;
  place-items: center;
  border: 1px solid rgba(222, 246, 255, 0.42);
  border-radius: 8px;
  background: rgba(13, 27, 57, 0.38);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.26);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  cursor: pointer;
  pointer-events: auto;
}

.menu-button.is-left {
  left: 16px;
  z-index: 220;   /* stays on top of the open panel */
}

.menu-button.is-right {
  right: 16px;
}

.menu-button.is-right-2 {
  top: 68px;
  right: 16px;
}

.menu-button.is-right-3 {
  top: 124px;
  right: 16px;
}

/* Hamburger icon */
.menu-icon,
.menu-icon::before,
.menu-icon::after {
  display: block;
  width: 20px;
  height: 2px;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.28);
  transition: transform 200ms ease, top 200ms ease, background 160ms ease;
}

.menu-icon {
  position: relative;
}

.menu-icon::before,
.menu-icon::after {
  content: "";
  position: absolute;
  left: 0;
}

.menu-icon::before {
  top: -7px;
}

.menu-icon::after {
  top: 7px;
}

/* Hamburger morphs to an X when the menu is open */
.menu-button.is-open .menu-icon {
  background: transparent;
}

.menu-button.is-open .menu-icon::before {
  top: 0;
  transform: rotate(45deg);
}

.menu-button.is-open .menu-icon::after {
  top: 0;
  transform: rotate(-45deg);
}

/* Icon glyphs (home, globe, cards) */
.home-icon {
  width: 22px;
  height: 22px;
  display: block;
  color: #fff;
  filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.28));
}

/* ---------- Slide-out menu ---------- */
.menu-backdrop {
  position: absolute;
  inset: 0;
  z-index: 200;   /* over content + right-side buttons when the menu opens */
  background: rgba(6, 12, 8, 0.28);
  opacity: 0;
  pointer-events: none;
  transition: opacity 220ms ease;
}

.menu-backdrop.is-open {
  opacity: 1;
  pointer-events: auto;
}

.menu-panel {
  position: absolute;
  top: 64px;
  left: 16px;
  z-index: 210;
  width: min(72%, 258px);
  padding: 8px;
  border-radius: 16px;
  border: 1px solid rgba(222, 246, 255, 0.42);
  background: rgba(13, 27, 57, 0.42);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transform-origin: top left;
  opacity: 0;
  transform: scale(0.92) translateY(-6px);
  pointer-events: none;
  transition: opacity 220ms ease, transform 220ms cubic-bezier(0.3, 0.9, 0.35, 1.15);
}

.menu-panel.is-open {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

.menu-panel a {
  display: block;
  padding: 12px 14px;
  border-radius: 10px;
  color: #fff7df;
  font-family: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
}

.menu-panel a + a {
  margin-top: 2px;
}

.menu-panel a:hover,
.menu-panel a:focus-visible {
  background: rgba(255, 255, 255, 0.14);
  outline: none;
}

/* Archive disclosure row — no persistent highlight box */
.menu-disclosure {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  margin-top: 2px;
  padding: 12px 14px;
  border: 0;
  border-radius: 10px;
  background: none;
  color: #fff7df;
  font-family: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.2;
  text-align: left;
  cursor: pointer;
}

.menu-disclosure:focus-visible {
  outline: none;
}

.disclosure-tri {
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
  color: #cfe0ff;
  transition: transform 220ms ease;
}

.menu-disclosure.is-open .disclosure-tri {
  transform: rotate(90deg);
}

/* Animated sublist (collapses to zero height) */
.menu-sub {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 240ms ease;
}

.menu-sub.is-open {
  grid-template-rows: 1fr;
}

.menu-sub-inner {
  overflow: hidden;
}

.menu-sub-inner a {
  display: block;
  padding: 10px 14px 10px 32px;
  border-radius: 10px;
  color: #e9e7dc;
  font-family: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
}

.menu-sub-inner a:hover,
.menu-sub-inner a:focus-visible {
  background: rgba(255, 255, 255, 0.12);
  outline: none;
}
