/* Gamasax — hand-authored (NOT from the standard-lite build).
   Always-visible native <details> hamburger dropdown printing the shop tree.
   Uses the theme's own --std-* custom properties so it follows light/dark. */

/* Vertically center the navbar items. Stock uses align-items:start (tuned for the
   removed .std-navbar__links collapse widget); center suits our links/buttons/icons. */
.std-layout__navbar-nav {
	align-items: center;
}

/* Navbar link-pages (selectShowPageInNavbar = link): simple inline links, desktop
   only. Bypasses the stock .std-navbar__links collapse component. On mobile the
   hamburger dropdown lists them instead (matches the CTA buttons' 1159px cutoff). */
.gs-navbar-links {
	display: flex;
	align-items: center;
	gap: 0.25rem;
}
@media (max-width: 1159px) {
	.gs-navbar-links { display: none; }
}

.gs-menu {
	position: relative;
	display: inline-flex;
}

/* CTA buttons inside the hamburger dropdown */
.gs-menu__buttons {
	display: flex;
	flex-direction: column;
	gap: 0.4rem;
	margin-bottom: 0.5rem;
}
.gs-menu__buttons .std-button {
	width: 100%;
	justify-content: center;
}

/* Toggle (hamburger icon). Reuses .std-navbar__icon sizing; here we only strip
   the native <summary> disclosure marker. */
.gs-menu__toggle {
	list-style: none;
}
.gs-menu__toggle::-webkit-details-marker { display: none; }
.gs-menu__toggle::marker { content: ""; }

/* Toggle icon: hamburger when closed, X when open */
.gs-menu__toggle .std-icon-x { display: none; }
.gs-menu[open] > .gs-menu__toggle .std-icon-menu { display: none; }
.gs-menu[open] > .gs-menu__toggle .std-icon-x { display: inline-block; }

/* Dropdown panel */
.gs-menu__panel {
	position: absolute;
	top: calc(100% + 0.5rem);
	right: 0;      /* hamburger is the last item — open leftward, stay in viewport */
	left: auto;
	z-index: 100;
	width: min(320px, 92vw);
	max-height: min(70vh, 640px);
	overflow-y: auto;
	padding: 0.5rem;
	background: var(--std-bg-2);
	color: var(--std-fg-1);
	border: 1px solid var(--std-bg-3);
	border-radius: var(--am-border-radius, 8px);
	box-shadow: 0 12px 32px rgb(0 0 0 / 0.18);
}

/* Lists */
.gs-menu__list {
	list-style: none;
	margin: 0;
	padding: 0;
}
.gs-menu__list .gs-menu__list {
	padding-left: 0.75rem; /* indent each nested level */
}

/* Items (links and branch summaries share this) */
.gs-menu__item {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.5rem;
	padding: 0.4rem 0.5rem;
	border-radius: var(--am-border-radius, 6px);
	color: inherit;
	text-decoration: none;
	line-height: 1.3;
}
.gs-menu__item:hover { background: var(--std-bg-3); }
.gs-menu__item--active { font-weight: 600; }

/* Branch summary: click target for expand/collapse + link */
.gs-menu__item--branch {
	list-style: none;
	cursor: pointer;
}
.gs-menu__item--branch::-webkit-details-marker { display: none; }
.gs-menu__item--branch::marker { content: ""; }
.gs-menu__item--branch > span {
	flex: 1;
}

/* Chevron rotates when its branch is open */
.gs-menu__item--branch .std-icon-chevron-right {
	flex: none;
	transition: transform 0.15s ease;
}
.gs-menu details[open] > .gs-menu__item--branch .std-icon-chevron-right {
	transform: rotate(90deg);
}
