/* ---------------------------------------------------------------------------
   Shared "Guides" nav dropdown (landing, tier list, guides shell).
   Built only from tokens shared by landing.css/guides.css and styles.css/
   tierlist.css (--panel, --panel-2, --line, --line-soft, --ink, --gold,
   --gold-soft), so it drops into either header unmodified. See nav-guides.js
   for the open/close behavior this styles.
   --------------------------------------------------------------------------- */

.nav-dd {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 2px;
}

/* Hidden until nav-guides.js runs; without JS "Guides" is a plain link. */
.nav-dd-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  padding: 0;
  border: none;
  background: none;
  color: inherit;
  cursor: pointer;
  border-radius: 5px;
}
.nav-dd-toggle:hover,
.nav-dd-toggle:focus-visible { color: var(--gold); }
.nav-dd-toggle:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
/* `display: inline-flex` above wins a specificity tie against the UA's
   `[hidden] { display: none }` rule (author stylesheet loads after the UA
   sheet), so re-assert it explicitly or the toggle would render even while
   `hidden`. Same reasoning for .nav-dd-menu below. */
.nav-dd-toggle[hidden] { display: none; }

.nav-dd-caret { transition: transform 140ms ease; }
.nav-dd-toggle[aria-expanded="true"] .nav-dd-caret { transform: rotate(180deg); }

.nav-dd-menu {
  position: absolute;
  top: calc(100% + 16px);
  left: 50%;
  transform: translateX(-50%);
  min-width: 230px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px;
  box-shadow: 0 18px 40px -18px rgba(0, 0, 0, 0.65);
  display: flex;
  flex-direction: column;
  gap: 1px;
  z-index: 60;
}
.nav-dd-menu[hidden] { display: none; }

.nav-dd-menu a {
  display: block;
  padding: 8px 12px;
  border-radius: 6px;
  color: var(--ink);
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}
.nav-dd-menu a:hover,
.nav-dd-menu a:focus-visible {
  color: var(--gold-soft);
  background: var(--panel-2);
}

.nav-dd-all {
  margin-top: 4px;
  padding-top: 9px !important;
  border-top: 1px solid var(--line-soft);
  color: var(--gold) !important;
}

@media (max-width: 480px) {
  .nav-dd-menu { left: 0; transform: none; min-width: 210px; }
}
