/* Shared responsive Primary Menu drawer. The visual language is extracted from the established Data Center Map drawer. */
.bc-primary-drawer-backdrop,
.bc-primary-drawer { display: none; }

@media (max-width: 1279px) {
	.bc-primary-drawer--data-center-map,
	.bc-primary-drawer--directory,
	.bc-primary-drawer--site { display: flex; }
	.bc-primary-drawer-backdrop--data-center-map,
	.bc-primary-drawer-backdrop--directory,
	.bc-primary-drawer-backdrop--site { display: block; }
}

.bc-primary-drawer-backdrop {
	position: fixed;
	z-index: 99998;
	inset: 0;
	background: rgba(4, 8, 10, .58);
	opacity: 0;
	pointer-events: none;
	transition: opacity .18s ease;
}
.bc-primary-drawer-backdrop[hidden] { display: none !important; }
.bc-primary-drawer {
	position: fixed;
	z-index: 99999;
	top: 0;
	bottom: 0;
	left: 0;
	flex-direction: column;
	width: min(330px, 86vw);
	max-width: 100%;
	height: 100dvh;
	max-height: 100dvh;
	padding-top: env(safe-area-inset-top, 0px);
	overflow: hidden;
	overscroll-behavior: contain;
	color: #fff;
	background: #111719;
	box-shadow: 12px 0 34px rgba(0,0,0,.32);
	transform: translateX(-104%);
	visibility: hidden;
	transition: transform .2s ease, visibility 0s linear .2s;
}

/* The map owns a measured visual-viewport shell; keep its shared drawer inside that shell exactly as before. */
.bc-primary-drawer-backdrop--data-center-map { position: absolute; z-index: 79; }
.bc-primary-drawer--data-center-map {
	position: absolute;
	z-index: 80;
	height: 100%;
	max-height: 100%;
}

/* Keep the WordPress administration bar usable on ordinary responsive pages. */
body.admin-bar .bc-primary-drawer-backdrop:not(.bc-primary-drawer-backdrop--data-center-map) {
	top: var(--wp-admin--admin-bar--height, 46px);
}
body.admin-bar .bc-primary-drawer:not(.bc-primary-drawer--data-center-map) {
	top: var(--wp-admin--admin-bar--height, 46px);
	height: calc(100dvh - var(--wp-admin--admin-bar--height, 46px));
	max-height: calc(100dvh - var(--wp-admin--admin-bar--height, 46px));
}

body.bc-primary-drawer-open .bc-primary-drawer-backdrop { opacity: 1; pointer-events: auto; }
body.bc-primary-drawer-open .bc-primary-drawer[aria-hidden="false"] { transform: translateX(0); visibility: visible; transition-delay: 0s; }
.bc-primary-drawer__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: .8rem;
	min-height: 56px;
	padding: .5rem .65rem .5rem .9rem;
	border-bottom: 1px solid rgba(255,255,255,.12);
}
.bc-primary-drawer__brand {
	display: inline-flex;
	align-items: center;
	gap: .55rem;
	min-width: 0;
	color: #fff;
	font-weight: 850;
	text-decoration: none;
}
.bc-primary-drawer__brand:hover,
.bc-primary-drawer__brand:focus-visible { color: #fff; }
.bc-primary-drawer__brand .bc-brand-logo__icon { width: 26px; height: 26px; flex-basis: 26px; }
.bc-primary-drawer__close {
	display: grid;
	place-items: center;
	width: 40px;
	height: 40px;
	padding: 0;
	color: #fff;
	background: transparent;
	border: 1px solid rgba(255,255,255,.16);
	border-radius: 8px;
}
.bc-primary-drawer__close:hover,
.bc-primary-drawer__close:focus-visible { background: rgba(255,255,255,.09); }
.bc-primary-drawer__close .bc-icon { width: 19px; height: 19px; }
.bc-primary-drawer__links {
	display: grid;
	align-content: start;
	min-height: 0;
	padding: .6rem;
	overflow-y: auto;
	overscroll-behavior: contain;
}
.bc-primary-drawer__menu {
	display: grid;
	margin: 0;
	padding: 0;
	list-style: none;
}

.bc-primary-drawer__submenu {
	display: grid;
	margin: 0 0 .2rem 1.1rem;
	padding: 0 0 0 .45rem;
	list-style: none;
	border-left: 1px solid rgba(255,255,255,.13);
}
.bc-primary-drawer__submenu .bc-primary-drawer__item > a {
	min-height: 42px;
	padding-block: .5rem;
	color: #c7d0cb;
	font-size: .9rem;
}
.bc-primary-drawer__submenu .bc-primary-drawer__submenu {
	margin-left: .65rem;
}
.bc-primary-drawer__links a,
.bc-primary-drawer__search {
	display: flex;
	align-items: center;
	gap: .7rem;
	width: 100%;
	min-height: 48px;
	padding: .65rem .75rem;
	color: #e7ece9;
	text-align: left;
	text-decoration: none;
	background: transparent;
	border: 0;
	border-radius: 8px;
	font: inherit;
	cursor: pointer;
}
.bc-primary-drawer__links a:hover,
.bc-primary-drawer__links a:focus-visible,
.bc-primary-drawer__search:hover,
.bc-primary-drawer__search:focus-visible,
.bc-primary-drawer__item.current-menu-item > a,
.bc-primary-drawer__item.current-menu-ancestor > a { color: #fff; background: rgba(255,255,255,.09); }
.bc-primary-drawer__links .bc-icon { width: 19px; height: 19px; flex: 0 0 19px; color: var(--bc-accent); }
.bc-primary-drawer__links span { min-width: 0; overflow-wrap: anywhere; }
.bc-primary-drawer__about {
	margin-top: auto;
	padding: 1rem 1.1rem calc(1rem + env(safe-area-inset-bottom, 0px));
	border-top: 1px solid rgba(255,255,255,.12);
}
.bc-primary-drawer__about h2 { margin: 0 0 .45rem; color: #fff; font-size: .9rem; }
.bc-primary-drawer__about p { margin: 0; color: #b8c1bc; font-size: .76rem; line-height: 1.5; }

@media (max-height: 560px) {
	.bc-primary-drawer__about { display: none; }
}

@media (prefers-reduced-motion: reduce) {
	.bc-primary-drawer,
	.bc-primary-drawer-backdrop { transition: none; }
}
