/* ==========================================================================
   Yards Archive - frame chrome: logo, bottom nav, "Collections" submenu
   Active on body.yards-frame-page (full-screen views) and on
   body.yards-scroll-nav-page (home.php: same chrome, but pinned via
   position:fixed since that page scrolls instead of being a fixed frame).
   ========================================================================== */

:root {
	/* Shared inset used by logo, bottom nav, and the grid's own padding
	   (assets/grid.css), so all three stay aligned on the same edge. */
	--yards-frame-inset: clamp(1rem, 3vw, 2rem);
	--yards-border-color: #ddd;
}

/* --- Logo (top-left) ------------------------------------------------------- */

.yards-frame__logo {
	position: absolute;
	top: 0;
	left: 0;
	padding: var(--yards-frame-inset);
	z-index: 6;
	text-decoration: none;
	/* font-family: var( --yards-logo-font, serif ); set the distinct wordmark font here */
	font-family: var(--wp--preset--font-family--courier-prime, serif);
	font-weight: bold;
	font-size: clamp(1rem, 2.5vw, 1.4rem);
	letter-spacing: 0.03em;
}

/* --- Bottom nav (3 fixed items, space-between) ----------------------------- */

.yards-frame__bottom-nav {
	position: absolute;
	bottom: 0;
	left: 0;
	right: 0;
	z-index: 6;
	padding: 0.5rem var(--yards-frame-inset);
	box-sizing: border-box;
	background-color: white;
	border-top: 1px solid var(--yards-border-color);

	@media (max-width: 600px) {
		height: 44px;
		position: fixed;
	}
}

/*
 * On the scrolling list page, both pieces of chrome switch from absolute
 * (positioned within the full-screen .yards-frame container) to fixed
 * (pinned to the viewport regardless of scroll position). Same offsets,
 * just a different containing block.
 */
body.yards-scroll-nav-page .yards-frame__logo,
body.yards-scroll-nav-page .yards-frame__bottom-nav {
	position: fixed;
}

/* Keeps the last table rows from disappearing under the fixed bottom nav. */
body.yards-scroll-nav-page .yards-archive-list-page {
	padding-bottom: clamp(4rem, 10vh, 7rem);
}

.yards-frame__bottom-nav-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	justify-content: space-between;
	align-items: flex-end;
}

.yards-frame__bottom-nav-list > li {
	position: relative; /* anchors the submenu of "Collections" */
	margin: 0;
}

.yards-frame__bottom-nav-list a {
	text-decoration: none;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	font-size: 0.8rem;
}

/* --- "Collections" submenu -------------------------------------------------- */

/*
 * WordPress outputs the nested categories as <ul class="sub-menu"> inside
 * the "Collections" <li> (see the menu structure note in functions.php).
 * Hidden by default; toggled via nav.js (adds/removes .is-open + updates
 * aria-expanded on the parent link), with :focus-within as a no-JS/
 * keyboard-safe fallback.
 */
.yards-frame__bottom-nav-list .sub-menu {
	list-style: none;
	margin: 0;
	padding: 0.5rem 2rem;
	position: absolute;
	bottom: 50px;
	left: -50%;
	display: none;
	flex-direction: column;
	gap: 0.4rem;
	background-color: white;
	border: 1px solid var(--yards-border-color);
}

.yards-frame__bottom-nav-list li.is-open > .sub-menu,
.yards-frame__bottom-nav-list li:focus-within > .sub-menu {
	display: flex;
}

.yards-frame__bottom-nav-list .sub-menu a {
	font-size: 1rem;
	text-transform: none;
	letter-spacing: normal;
	white-space: nowrap;

	&:hover {
		font-weight: bold;
	}
}
