/* GameManx navigation v2 (nav redesign Phase 1). Loaded only while the new navigation is on (preview or live). */

/* Dropdown dividers between groups (News ▾: our writing | platforms | video; Games ▾: My tracked games) */
#gp-main-nav .sub-menu li.gmx-nav-div { border-top: 1px solid var(--gmx-border) !important; margin-top: 6px; padding-top: 6px; }

/* ★ You: quiet outlined pill at the end of the bar (cyan = people and personal things) */
#gp-main-nav .menu > li.gmx-nav-you > a {
	display: inline-block; line-height: 1 !important; padding: 7px 12px 7px 10px !important; margin-top: -2px;
	color: var(--gmx-cyan) !important; border: 1px solid rgba(79, 196, 227, .45); border-radius: 999px;
	transition: background-color .15s, color .15s, border-color .15s;
}
#gp-main-nav .menu > li.gmx-nav-you > a::before { content: "★"; margin-right: 6px; font-size: 12px; }
#gp-main-nav .menu > li.gmx-nav-you > a::after { display: none !important; }
#gp-main-nav .menu > li.gmx-nav-you > a:hover, #gp-main-nav .menu > li.gmx-nav-you.current-menu-item > a {
	color: #111 !important; background: var(--gmx-cyan); border-color: var(--gmx-cyan);
}
/* The divider that set Gallery · Forums apart now sits before Community */
@media (min-width: 1083px) {
	#gp-main-nav .menu > li.gmx-nav-community.gmx-nav-group { margin-left: 6px !important; padding-left: 22px; position: relative; }
	#gp-main-nav .menu > li.gmx-nav-community.gmx-nav-group::before {
		content: ""; position: absolute; left: 0; top: 50%; transform: translateY(-50%); width: 1px; height: 22px; background: var(--gmx-border);
	}
}

/* ---------------------------------------------------------------- search suggestions */
form.gmx-sg-host { position: relative; }
.gmx-sg {
	position: absolute; z-index: 1000; top: calc(100% + 8px); right: 0; width: 360px; max-width: calc(100vw - 32px);
	max-height: 70vh; overflow-y: auto; padding: 6px;
	background: var(--gmx-surface); border: 1px solid var(--gmx-border); border-radius: var(--gmx-radius);
	box-shadow: 0 18px 40px rgba(0, 0, 0, .5); text-align: left;
}
.gmx-sg[hidden] { display: none !important; }
.gmx-sg-h {
	margin: 4px 8px 6px !important; font: 600 11px/1.2 var(--gmx-font-mono) !important; letter-spacing: .08em; text-transform: uppercase; color: var(--gmx-muted) !important;
}
.gmx-sg-h::before { content: "// "; color: var(--gmx-orange); }
.gmx-sg-opt {
	display: flex !important; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 7px;
	color: var(--gmx-text) !important; text-decoration: none !important; line-height: 1.3;
}
.gmx-sg-opt:hover, .gmx-sg-opt[aria-selected="true"] { background: var(--gmx-surface-2); }
.gmx-sg-opt[aria-selected="true"] { outline: 1px solid rgba(255, 122, 26, .5); }
.gmx-sg-game img, .gmx-sg-nocover { flex: 0 0 34px; width: 34px; height: 45px; object-fit: cover; border-radius: 4px; background: var(--gmx-surface-2); }
.gmx-sg-t { display: flex; flex-direction: column; min-width: 0; }
.gmx-sg-t strong { font: 600 14px/1.3 var(--gmx-font-body); color: #fff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gmx-sg-opt:hover .gmx-sg-t strong, .gmx-sg-opt[aria-selected="true"] .gmx-sg-t strong { color: var(--gmx-orange); }
.gmx-sg-t small { font-size: 12px; color: var(--gmx-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gmx-sg-t small b { color: var(--gmx-text); font-weight: 600; }
.gmx-sg-cut { color: #111; background: var(--gmx-orange); border-radius: 3px; padding: 0 4px; font-weight: 700; font-size: 11px; }
.gmx-sg-all { margin-top: 4px; border-top: 1px solid var(--gmx-border); border-radius: 0 0 7px 7px; padding: 10px 8px; font-size: 13px; color: var(--gmx-muted) !important; }
.gmx-sg-all b { color: var(--gmx-text); }
.gmx-sg-h + .gmx-sg-all, .gmx-sg > .gmx-sg-all:first-child { border-top: 0; margin-top: 0; }

/* 250px leaves ~35px after ★ You at 1240px+ (Releases and Deals are both top-level) */
@media (min-width: 1240px) {
	html body #gp-main-header form.searchform.gmx-search { width: 250px !important; }
}
/* 1083–1239px: the focused field grows left only as far as the end of the menu (★ You ends ~907px at 1083, the field's right edge is 1062) */
@media (min-width: 1083px) and (max-width: 1239px) {
	html body #gp-main-header form.searchform.gmx-search:focus-within { width: 150px !important; }
}
/* Narrow desktops: the pill is an icon until focused, so line the panel up with the expanded field */
@media (min-width: 1083px) and (max-width: 1239px) { #gp-main-header .gmx-sg { width: 340px; } }

/* Phone search sheet: the list sits under the field, full width, no floating panel */
.gmx-sheet-search.gmx-sg-host { flex-wrap: wrap; }
.gmx-sheet-search .gmx-sg {
	position: static; flex: 1 0 100%; width: auto; max-width: none; max-height: 60vh; margin-top: 4px;
	box-shadow: none; background: transparent; border: 0; padding: 0;
}
.gmx-sheet-search .gmx-sg-opt { padding: 9px 4px; }
.gmx-sheet-search .gmx-sg-game img, .gmx-sheet-search .gmx-sg-nocover { flex-basis: 40px; width: 40px; height: 53px; }

/* ---------------------------------------------------------------- search results: games first */
.gmx-sgames { margin: 0 0 28px; }
.gmx-sgames-h { font: 700 15px/1.2 var(--gmx-font-head) !important; text-transform: uppercase; letter-spacing: .06em; margin: 0 0 12px !important; color: #fff !important; }
.gmx-sgames-h::before { content: "// "; color: var(--gmx-orange); }
.gmx-sgames-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
.gmx-sgames-card {
	display: flex; gap: 12px; align-items: center; padding: 10px; border: 1px solid var(--gmx-border); border-radius: var(--gmx-radius);
	background: var(--gmx-surface); color: var(--gmx-text) !important; text-decoration: none !important; transition: border-color .15s;
}
.gmx-sgames-card:hover { border-color: var(--gmx-orange); }
.gmx-sgames-card img, .gmx-sgames-card .gmx-sg-nocover { flex: 0 0 60px; width: 60px; height: 80px; object-fit: cover; border-radius: 5px; background: var(--gmx-surface-2); }
.gmx-sgames-t { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.gmx-sgames-t strong { color: #fff; font-size: 15px; line-height: 1.3; }
.gmx-sgames-card:hover .gmx-sgames-t strong { color: var(--gmx-orange); }
.gmx-sgames-t small { color: var(--gmx-muted); font-size: 12px; }
.gmx-sgames-t small b { color: var(--gmx-text); }
