/**
 * OMP Default Child — force overrides for parent defaultthemeplugin head.less
 * Loads after pap-header-footer.css
 */

/* Kill default theme top padding reserved for absolute user nav */
body.pap-omp-default-child .pkp_structure_head .pkp_head_wrapper,
body.pap-omp-default-child.has_site_logo .pkp_structure_head .pkp_head_wrapper {
	padding-top: 0 !important;
	padding-bottom: 0 !important;
	min-height: 0 !important;
	height: auto !important;
}

body.pap-omp-default-child .pkp_structure_head {
	background-color: transparent !important;
	background-image: none !important;
	border-bottom: none !important;
	padding: 0 !important;
	min-height: 0 !important;
	height: auto !important;
}

body.pap-omp-default-child .pkp_structure_head .pkp_site_name_wrapper {
	height: auto !important;
	min-height: 64px !important;
	width: 100% !important;
	align-self: stretch !important;
}

/* Undo default absolute site title positioning */
body.pap-omp-default-child .pkp_structure_head .pkp_site_name {
	position: relative !important;
	left: auto !important;
	right: auto !important;
	top: auto !important;
	width: auto !important;
	float: none !important;
	margin: 0 !important;
	padding: 0 !important;
	overflow: visible !important;
	white-space: nowrap !important;
	font-size: inherit !important;
	background: transparent !important;
	min-width: max-content !important;
}

body.pap-omp-default-child .pkp_structure_head .pkp_site_name .is_text {
	line-height: 1.2 !important;
	color: #fff !important;
	white-space: nowrap !important;
}

body.pap-omp-default-child .pkp_structure_head .pap-header-left {
	flex-shrink: 0 !important;
	min-width: max-content !important;
	overflow: visible !important;
}

body.pap-omp-default-child .pkp_structure_head .pkp_site_name a.is_text {
	display: inline-block !important;
	white-space: nowrap !important;
}

/* Undo default absolute centered user nav at top of head wrapper */
body.pap-omp-default-child .pkp_structure_head .pkp_navigation_user_wrapper,
body.pap-omp-default-child .pkp_structure_head #navigationUserWrapper {
	position: relative !important;
	top: auto !important;
	left: auto !important;
	right: auto !important;
	transform: none !important;
	width: auto !important;
	max-width: none !important;
	margin: 0 !important;
	padding: 0 !important;
	border: none !important;
	text-align: right !important;
	display: flex !important;
	align-items: center !important;
	align-self: center !important;
	flex: 0 0 auto !important;
	z-index: 110 !important;
	overflow: visible !important;
}

body.pap-omp-default-child .pkp_structure_head .pkp_navigation_user,
body.pap-omp-default-child .pkp_structure_head .pkp_navigation_user.pkp_navigation_user {
	position: relative !important;
	margin: 0 !important;
	padding: 0 !important;
	border: none !important;
	text-align: right !important;
	display: flex !important;
	align-items: center !important;
	justify-content: flex-end !important;
	font-size: 13px !important;
}

body.pap-omp-default-child .pkp_structure_head .pkp_navigation_user > li {
	display: flex !important;
	align-items: center !important;
}

body.pap-omp-default-child .pkp_structure_head .pkp_navigation_user > li > a {
	display: inline-flex !important;
	align-items: center !important;
	line-height: 1.2 !important;
	padding-top: 7px !important;
	padding-bottom: 7px !important;
}

body.pap-omp-default-child .pkp_structure_head .pkp_site_name_inner {
	min-height: 64px !important;
	align-items: center !important;
}

@media (min-width: 992px) {
	body.pap-omp-default-child .pkp_structure_head .pkp_site_nav_toggle {
		display: none !important;
		width: 0 !important;
		padding: 0 !important;
		margin: 0 !important;
		overflow: hidden !important;
	}
}

/* ─── Shared shell: Login + Search same right boundary ─── */
body.pap-omp-default-child .pkp_structure_head {
	--pap-header-gutter: 24px;
	--pap-header-max: 1200px;
	--pap-header-rail: 160px;
}

/* Both rows: identical grid shell (column 2 = Login / Search) */
body.pap-omp-default-child .pkp_structure_head .pkp_site_name_inner,
body.pap-omp-default-child .pkp_structure_head .pkp_navigation_primary_row {
	width: min(var(--pap-header-max), calc(100vw - (2 * var(--pap-header-gutter)))) !important;
	max-width: min(var(--pap-header-max), calc(100vw - (2 * var(--pap-header-gutter)))) !important;
	margin-left: auto !important;
	margin-right: auto !important;
	padding-left: var(--pap-header-gutter) !important;
	padding-right: var(--pap-header-gutter) !important;
	box-sizing: border-box !important;
	display: grid !important;
	grid-template-columns: minmax(0, 1fr) var(--pap-header-rail) !important;
	column-gap: 16px !important;
	align-items: center !important;
}

body.pap-omp-default-child .pkp_structure_head .pap-header-left {
	grid-column: 1 !important;
	display: flex !important;
	align-items: center !important;
	min-width: max-content !important;
	overflow: visible !important;
}

body.pap-omp-default-child .pkp_structure_head .pap-header-right {
	grid-column: 2 !important;
	justify-self: end !important;
}

body.pap-omp-default-child .pkp_structure_head .pkp_site_name,
body.pap-omp-default-child .pkp_structure_head .pkp_navigation_primary_wrapper {
	grid-column: 1 !important;
	min-width: 0 !important;
}

body.pap-omp-default-child .pkp_structure_head .pkp_site_name {
	justify-self: start !important;
}

body.pap-omp-default-child .pkp_structure_head .pkp_navigation_primary_wrapper {
	display: flex !important;
	justify-content: center !important;
	align-items: center !important;
	width: 100% !important;
	margin: 0 !important;
	padding: 0 !important;
	float: none !important;
}

body.pap-omp-default-child .pkp_structure_head .pkp_navigation_user_wrapper,
body.pap-omp-default-child .pkp_structure_head #navigationUserWrapper,
body.pap-omp-default-child .pkp_structure_head .pap-header-right,
body.pap-omp-default-child .pkp_structure_head .pkp_navigation_search_wrapper {
	grid-column: 2 !important;
	justify-self: end !important;
	align-self: center !important;
	width: auto !important;
	max-width: 100% !important;
	margin: 0 !important;
	padding: 0 !important;
	float: none !important;
}

body.pap-omp-default-child .pkp_structure_head .pap-header-right,
body.pap-omp-default-child .pkp_structure_head .pkp_navigation_user_wrapper,
body.pap-omp-default-child .pkp_structure_head #navigationUserWrapper {
	position: relative !important;
	z-index: 110 !important;
	overflow: visible !important;
}

body.pap-omp-default-child .pkp_structure_head .pkp_navigation_user,
body.pap-omp-default-child .pkp_structure_head .pkp_navigation_user.pkp_navigation_user {
	justify-content: flex-end !important;
	width: 100% !important;
	padding-right: 0 !important;
	margin-right: 0 !important;
}

body.pap-omp-default-child .pkp_structure_head .pkp_navigation_user > li:last-child > a {
	margin-right: 0 !important;
}

body.pap-omp-default-child .pkp_structure_head .pkp_navigation_primary {
	justify-content: center !important;
	width: 100% !important;
	margin: 0 !important;
}

body.pap-omp-default-child .pkp_structure_head .pkp_search_desktop {
	margin-right: 0 !important;
}

body.pap-omp-default-child .pkp_structure_head .pkp_site_nav_menu {
	display: block !important;
	justify-content: stretch !important;
	width: 100% !important;
}

@media (min-width: 769px) {
	body.pap-omp-default-child .pkp_structure_head .pkp_navigation_primary_row {
		display: grid !important;
		grid-template-columns: minmax(0, 1fr) var(--pap-header-rail) !important;
	}
}

/* User profile dropdown must stack above the primary nav row */
body.pap-omp-default-child .pkp_structure_head {
	overflow: visible !important;
}

body.pap-omp-default-child .pkp_structure_head .pkp_head_wrapper {
	overflow: visible !important;
}

body.pap-omp-default-child .pkp_structure_head .pkp_site_name_wrapper {
	position: relative !important;
	z-index: 100 !important;
	overflow: visible !important;
}

body.pap-omp-default-child .pkp_structure_head .pkp_site_nav_menu {
	position: relative !important;
	z-index: 50 !important;
	overflow: visible !important;
}

body.pap-omp-default-child .pkp_structure_head #navigationUser,
body.pap-omp-default-child .pkp_structure_head .pkp_navigation_user {
	z-index: 120 !important;
	overflow: visible !important;
}

body.pap-omp-default-child .pkp_structure_head .pkp_navigation_user > li.profile,
body.pap-omp-default-child .pkp_structure_head .pkp_navigation_user > li.dropdown,
body.pap-omp-default-child .pkp_structure_head .pkp_navigation_user > li.has-submenu {
	position: relative !important;
	z-index: 130 !important;
}

body.pap-omp-default-child .pkp_structure_head .pkp_navigation_user li ul,
body.pap-omp-default-child .pkp_structure_head .pkp_navigation_user li .submenu,
body.pap-omp-default-child .pkp_structure_head #navigationUser .dropdown-menu,
body.pap-omp-default-child .pkp_structure_head .pkp_navigation_user .dropdown-menu {
	position: absolute !important;
	z-index: 4100 !important;
}

/* ─── Footer: whole block centered ─── */
.footer.pap-footer .pap-footer__main {
	display: flex !important;
	flex-direction: column !important;
	align-items: center !important;
	padding-left: clamp(16px, 3vw, 40px) !important;
	padding-right: clamp(16px, 3vw, 40px) !important;
}

.footer.pap-footer .pap-footer__container {
	display: block !important;
	width: min(1100px, calc(100vw - 80px)) !important;
	max-width: 1100px !important;
	padding: 0 !important;
	margin-left: auto !important;
	margin-right: auto !important;
	box-sizing: border-box !important;
}

.footer.pap-footer .pap-footer-grid {
	grid-template-columns: minmax(240px, 1.45fr) minmax(120px, 1fr) minmax(120px, 1fr) minmax(120px, 1fr) !important;
	column-gap: 40px !important;
	row-gap: 32px !important;
	width: 100% !important;
	max-width: 100% !important;
	margin-left: auto !important;
	margin-right: auto !important;
	justify-items: stretch !important;
}

.footer.pap-footer .pap-footer__copyright {
	display: flex !important;
	justify-content: center !important;
	width: 100% !important;
}

.footer.pap-footer .pap-footer__copyright p {
	width: min(1100px, calc(100vw - 80px)) !important;
	max-width: 1100px !important;
	margin-left: auto !important;
	margin-right: auto !important;
	text-align: center !important;
}

.footer.pap-footer .pap-footer-col:not(.pap-footer-col--brand) {
	display: flex !important;
	flex-direction: column !important;
	align-items: flex-start !important;
	text-align: left !important;
	width: 100% !important;
}

.footer.pap-footer .pap-footer-col:not(.pap-footer-col--brand) h4 {
	text-align: left !important;
	width: 100% !important;
}

.footer.pap-footer .pap-footer-col:not(.pap-footer-col--brand) ul {
	align-items: flex-start !important;
	width: 100% !important;
}

.footer.pap-footer .pap-footer-col:not(.pap-footer-col--brand) ul li {
	text-align: left !important;
	width: 100% !important;
}

.footer.pap-footer .pap-footer-col--brand {
	padding-right: 0 !important;
}

@media (max-width: 992px) {
	.footer.pap-footer .pap-footer-grid {
		grid-template-columns: 1fr 1fr !important;
		column-gap: 36px !important;
	}

	.footer.pap-footer .pap-footer-col--brand {
		grid-column: 1 / -1 !important;
		padding-right: 0 !important;
	}
}
