/* Horizontal top bar nav */
.top-nav-sentinel {
	height: 1px;
	margin: 0;
	padding: 0;
	border: 0;
	overflow: hidden;
	visibility: hidden;
	pointer-events: none;
}

.top-nav {
	position: sticky;
	top: 0;
	z-index: 300;
	background: rgba(0, 0, 0, 0.35);
	border-bottom: 1px solid rgba(255, 255, 255, 0.08);
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
	transition: background-color 0.22s ease;
}

.top-nav.top-nav--docked {
	background: rgba(0, 0, 0, 0.72);
	backdrop-filter: blur(10px);
	-webkit-backdrop-filter: blur(10px);
}

body.pgd-no-sticky-nav .top-nav {
	position: static;
	top: auto;
	z-index: auto;
}

.top-nav__inner {
	width: max-content;
	max-width: 1200px;
	margin: 0 auto;
	padding: 0.75rem 1.25rem;
	display: flex;
	flex-wrap: nowrap;
	align-items: center;
	justify-content: center;
	gap: 0.5rem 0.65rem;
	min-height: 2.6rem;
	box-sizing: border-box;
}

.top-nav__group {
	display: flex;
	flex-wrap: nowrap;
	align-items: center;
	justify-content: center;
	gap: 0.35rem 0.5rem;
	flex-shrink: 0;
}

.top-nav__group--nowrap {
	flex-wrap: nowrap;
}

.top-nav__group--external::before {
	content: "";
	display: none;
}

@media (min-width: 900px) {
	.top-nav__group--external {
		padding-left: 1rem;
		margin-left: 0.5rem;
		border-left: 1px solid rgba(255, 255, 255, 0.12);
	}
}

.top-nav__link {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	padding: 0.45rem 0.7rem;
	color: #cccccc;
	text-decoration: none;
	font-size: 0.88rem;
	font-weight: 500;
	border-radius: 6px;
	background: rgba(255, 255, 255, 0.06);
	border: 1px solid transparent;
	border-bottom: 2px solid transparent;
	transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
	white-space: nowrap;
}

.top-nav__link i {
	font-size: 0.7em;
	opacity: 0.9;
}

.top-nav__link:hover {
	color: #f0f0f0;
	background: rgba(204, 82, 0, 0.2);
	border-color: rgba(204, 82, 0, 0.25);
}

.top-nav__link--active {
	color: #f0f0f0;
	background: rgba(204, 82, 0, 0.32);
	border-color: rgba(204, 82, 0, 0.4);
	border-bottom-color: #cc5200;
	box-shadow: 0 2px 8px rgba(204, 82, 0, 0.2);
}

.top-nav__link--accent:hover {
	background: rgba(204, 82, 0, 0.25);
}

.top-nav__link--external {
	color: #f0f0f0;
	background: rgba(220, 53, 69, 0.22);
	border-color: rgba(220, 53, 69, 0.35);
}

.top-nav__link--external:hover {
	background: rgba(220, 53, 69, 0.35);
	border-color: rgba(220, 53, 69, 0.5);
}

/* Server Info — Leaderboard / Maps under hover/focus */
.top-nav__drop {
	position: relative;
	display: inline-flex;
	align-items: stretch;
	flex-shrink: 0;
}


.top-nav__drop__trigger {
	gap: 0.3rem;
}

.top-nav__drop__caret {
	font-size: 0.75em;
	opacity: 0.85;
	transition: transform 0.2s ease;
}

.top-nav__drop:hover .top-nav__drop__caret,
.top-nav__drop:focus-within .top-nav__drop__caret {
	transform: translateY(1px);
}

/* On Leaderboard/Maps: parent not full “home” active — subtle open */
.top-nav__link--subroute {
	color: #e8e8e8;
	background: rgba(204, 82, 0, 0.16);
	border-color: rgba(204, 82, 0, 0.3);
	border-bottom-color: rgba(204, 82, 0, 0.6);
}

.top-nav__drop__panel {
	position: absolute;
	top: 100%;
	left: 0;
	width: 100%;
	box-sizing: border-box;
	padding: 0.35rem;
	border-radius: 8px;
	background: rgba(26, 26, 26, 0.98);
	border: 1px solid rgba(255, 255, 255, 0.1);
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
	display: flex;
	flex-direction: column;
	gap: 0.35rem;
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transform: translateY(-4px);
	transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s;
	z-index: 200;
}

.top-nav__drop:hover .top-nav__drop__panel,
.top-nav__drop:focus-within .top-nav__drop__panel {
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
	transform: translateY(0);
}

/* Same chip size as Server Info trigger (.top-nav__link); panel matches trigger width */
.top-nav__drop__item {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	box-sizing: border-box;
	white-space: nowrap;
	text-align: center;
}

.top-nav__drop__item--stacked {
	flex-direction: column;
	white-space: normal;
	line-height: 1.15;
	font-size: 0.78rem;
	font-weight: 500;
	padding-top: 0.45rem;
	padding-bottom: 0.45rem;
}

.top-nav__drop__item:hover {
	transform: none;
}

.top-nav__drop__item.top-nav__link--external:hover {
	color: #f0f0f0;
	background: rgba(220, 53, 69, 0.35);
	border-color: rgba(220, 53, 69, 0.5);
}

/* Home: nav width sync can undershoot on prod; need width for two ~350px widgets + gap + padding */
main.test-main:has(.home-widgets) {
	min-width: min(820px, 100%);
}

/* Main column: width synced to .top-nav__inner via inc/site-layout-end.php (ResizeObserver) */
.test-main {
	width: 1200px;
	max-width: 100%;
	margin: 0 auto;
	padding: 1.5rem 1.25rem 3rem;
	box-sizing: border-box;
}

.test-panel {
	background: #2a2a2a;
	border-radius: 10px;
	padding: 1.5rem 1.75rem;
	box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.test-panel h1 {
	color: #cc5200;
	font-size: 1.5rem;
	margin-bottom: 0.75rem;
}

.test-panel p {
	color: #cccccc;
	font-size: 0.95rem;
	line-height: 1.55;
	margin-bottom: 0.75rem;
}

.test-panel p:last-child {
	margin-bottom: 0;
}

.test-hint {
	color: #888;
	font-size: 0.85rem;
	margin-top: 1rem;
	padding-top: 1rem;
	border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.test-hint code {
	color: #cc9;
	font-size: 0.8rem;
}
