/* Release Calendar: the header's Games / Hardware dropdowns (desktop list).
   Markup: includes/nav.php gcrc_nav_link(); behaviour: assets/js/nav.js.
   Same look as the Reviews / Hardware menus: square corners, accent top edge,
   no shadow, hover only for fine pointers. The panel is display:none until
   opened. */

nav.main li.gcrc-dd {
	position: relative;
	display: flex;
	align-items: center;
}
nav.main li.gcrc-dd > .gcrc-dd-btn {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	cursor: pointer;
	border-radius: 0;
	-webkit-user-select: none;
	user-select: none;
	-webkit-tap-highlight-color: transparent;
}
nav.main li.gcrc-dd > .gcrc-dd-btn .gcrc-dd-chev {
	flex: none;
	margin-top: -1px;
	transition: transform .2s ease;
}
nav.main li.gcrc-dd > .gcrc-dd-btn[aria-expanded="true"] {
	color: var( --wp--preset--color--accent-text ) !important;
}
nav.main li.gcrc-dd > .gcrc-dd-btn[aria-expanded="true"] .gcrc-dd-chev {
	transform: rotate( 180deg );
}
nav.main li.gcrc-dd > .gcrc-dd-btn:hover {
	background: none;
}

nav.main li.gcrc-dd .gcrc-dd-panel {
	display: none;
	position: absolute;
	top: 100%;
	left: 0;
	z-index: 60;
	width: 280px;
	max-width: calc( 100vw - 40px );
	padding: 4px 16px;
	background: var( --wp--preset--color--surface );
	border: 1px solid var( --wp--preset--color--line );
	border-top: 2px solid var( --wp--preset--color--accent );
	border-radius: 0;
	box-shadow: none;
	color: var( --wp--preset--color--text );
	text-align: left;
	cursor: default;
}
nav.main li.gcrc-dd.is-open .gcrc-dd-panel {
	display: block;
}
/* no JS: open on keyboard focus so the links stay reachable */
nav.main li.gcrc-dd:not( .gcrc-dd-ready ):focus-within .gcrc-dd-panel {
	display: block;
}
nav.main li.gcrc-dd .gcrc-dd-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: block;
}
nav.main li.gcrc-dd .gcrc-dd-list > li {
	display: block;
	margin: 0;
	padding: 0;
	border-bottom: 1px solid var( --wp--preset--color--line );
}
nav.main li.gcrc-dd .gcrc-dd-list > li:last-child {
	border-bottom: 0;
}
/* panel links: beat `nav.main a` (!important colour, uppercase, pill padding) */
nav.main li.gcrc-dd .gcrc-dd-panel a.gcrc-dd-a {
	display: grid;
	grid-template-columns: minmax( 0, 1fr ) auto;
	align-items: center;
	column-gap: 12px;
	min-height: 48px;
	padding: 10px 0;
	border-radius: 0;
	background: none;
	font: 600 13.5px/1.3 var( --wp--preset--font-family--sora );
	letter-spacing: -.005em;
	text-transform: none;
	text-decoration: none !important;
	color: var( --wp--preset--color--text ) !important;
	-webkit-tap-highlight-color: transparent;
}
nav.main li.gcrc-dd .gcrc-dd-t {
	grid-column: 1;
	min-width: 0;
}
nav.main li.gcrc-dd .gcrc-dd-m {
	grid-column: 1;
	margin-top: 3px;
	font: 400 10.5px/1.3 var( --wp--preset--font-family--ibm-plex-mono );
	letter-spacing: .03em;
	color: var( --wp--preset--color--muted );
}
nav.main li.gcrc-dd .gcrc-dd-go {
	grid-column: 2;
	grid-row: 1 / span 2;
	font: 600 12px/1 var( --wp--preset--font-family--ibm-plex-mono );
	color: var( --wp--preset--color--accent-text );
}
/* the current page keeps aria-current but no orange title */
nav.main li.gcrc-dd .gcrc-dd-panel a.gcrc-dd-a[aria-current] {
	color: var( --wp--preset--color--text ) !important;
}
nav.main li.gcrc-dd .gcrc-dd-panel a.gcrc-dd-a:focus-visible {
	outline: 2px solid var( --wp--preset--color--accent );
	outline-offset: 2px;
}
/* phone drawer: our rows keep the sibling's neutral colour */
:root:not( [data-theme="light"] ) .gc-mm a.gcrc-mm-arc[aria-current],
:root:not( [data-theme="light"] ) .gc-mm a.gc-mm-tile.gcrc-mm-tile[aria-current] {
	color: var( --wp--preset--color--text ) !important;
}

@media ( hover: hover ) and ( pointer: fine ) {
	nav.main li.gcrc-dd .gcrc-dd-panel a.gcrc-dd-a:hover .gcrc-dd-t,
	nav.main li.gcrc-dd .gcrc-dd-panel a.gcrc-dd-a[aria-current]:hover .gcrc-dd-t {
		color: var( --wp--preset--color--accent-text );
	}
	.gc-mm a.gcrc-mm-arc[aria-current]:hover {
		color: var( --wp--preset--color--accent-text ) !important;
	}
}
@media ( prefers-reduced-motion: reduce ) {
	nav.main li.gcrc-dd > .gcrc-dd-btn .gcrc-dd-chev {
		transition: none;
	}
}
