/* GEM - THE ROSTER NAVIGATION (roster_nav.html).  One stylesheet for every page that shows the roster menu: the roster, wanted characters, wanted plots, face claims and
   holds. It used to be copied into each of those templates; it now lives only here, and roster_nav.html loads it. Everything is scoped to .rnav.
   WIDE: the links sit in a centred row, wrapping if they must (as before).
   NARROW (when the menu's own width is under 820px - it follows the menu, not the screen): the row folds into a "Menu" bar showing the page you are on; pressing it
   slides the list open, animating its real height, and the arrow turns. Colours and fonts are your theme's own variables (the second value is a fallback). */
.rnav { container-type: inline-size; width: 100%; border-bottom: 2px solid var(--gold-border, #b9a26a); text-align: center; }
.rnav * { box-sizing: border-box; }
.rnav-toggle { display: none; }
.rnav-panel { display: block; }
.rnav-list { display: flex; flex-wrap: wrap; justify-content: center; margin: 0; padding: 0; list-style: none; }
.rnav-list li { margin: 0; padding: 0; }
.rnav .sidebar-link { display: block; padding: 10px 14px; background-color: var(--post-bg, #120d0f); color: var(--post-text, #e9d19c); border-right: 1px solid var(--gold-border, #b9a26a); border-left: 1px solid var(--gold-border, #b9a26a); font-family: var(--eaves-allsmall, inherit); font-size: 18px; letter-spacing: 2px; line-height: 1.3; text-decoration: none; }
.rnav .sidebar-link:hover { text-decoration: underline; text-underline-offset: .25em; text-decoration-thickness: 1px; }
.rnav .sidebar-link.active { background-color: var(--post-text, #e9d19c); color: var(--post-bg, #120d0f); font-weight: bold; }
.rnav .sidebar-link:focus-visible, .rnav-toggle:focus-visible { outline: 2px solid var(--gold-text, #e9d19c); outline-offset: -4px; }
.rnav .sidebar-link.active:focus-visible { outline-color: var(--post-bg, #120d0f); }

@container (max-width: 820px) {
	.rnav-toggle { display: flex; align-items: center; justify-content: center; gap: .7rem; width: 100%; min-height: 48px; margin: 0; padding: 10px 14px; border: 0; background-color: var(--post-bg, #120d0f); color: var(--post-text, #e9d19c); font-family: var(--eaves-allsmall, inherit); font-size: 18px; letter-spacing: 2px; line-height: 1.3; cursor: pointer; -webkit-tap-highlight-color: transparent; }
	.rnav-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
	.rnav-chevron { flex: none; transition: transform .38s cubic-bezier(.4, 0, .2, 1); }
	.rnav.is-open .rnav-chevron { transform: rotate(180deg); }

	/* closed: zero height, invisible, and out of the tab order; open: its natural height. The height is animated (0fr to 1fr) so the list slides rather than jumps. */
	.rnav-panel { display: grid; grid-template-rows: 0fr; visibility: hidden; opacity: 0; transition: grid-template-rows .38s cubic-bezier(.4, 0, .2, 1), opacity .24s ease, visibility 0s linear .38s; }
	.rnav.is-open .rnav-panel { grid-template-rows: 1fr; visibility: visible; opacity: 1; transition: grid-template-rows .38s cubic-bezier(.4, 0, .2, 1), opacity .3s ease .06s, visibility 0s linear 0s; }
	.rnav-inner { min-height: 0; overflow: hidden; }
	.rnav-list { display: block; }
	.rnav .sidebar-link { display: flex; align-items: center; justify-content: center; min-height: 48px; border-right: 0; border-left: 0; border-top: 1px solid var(--gold-border, #b9a26a); }
}

/* no JavaScript: the menu simply stays open, and the toggle that could not work is not shown */
@media (scripting: none) {
	.rnav-toggle { display: none !important; }
	.rnav-panel { grid-template-rows: 1fr !important; visibility: visible !important; opacity: 1 !important; }
}
/* anyone who has asked their device for less movement gets no animation */
@media (prefers-reduced-motion: reduce) {
	.rnav-panel, .rnav-chevron { transition: none !important; }
}
