/*
 * LDN site shell — header, utility bar, drawer and footer (PRD-018 CP125).
 *
 * Colours come from `:root` tokens the plugin emits (`--ldn-primary`,
 * `--ldn-text`, `--ldn-shell-on-primary`). No hex values here: the same file
 * skins every content profile.
 *
 * Regions use `ldn-shell-*`. Menus inside them keep `ldn-nav-*`. Theme class
 * names are not used.
 */

.ldn-shell {
	background: var(--ldn-shell-surface);
	color: var(--ldn-text);
	font-family: var(--ldn-font-body, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif);
}

.ldn-shell a {
	color: inherit;
	text-decoration: none;
}

.ldn-shell-utility a:hover,
.ldn-shell-utility a:focus-visible {
	color: var(--ldn-text);
}

.ldn-shell-utility .ldn-shell-utility__list > li > a:hover,
.ldn-shell-utility .ldn-shell-utility__list > li > a:focus-visible {
	text-decoration: underline;
	text-underline-offset: 0.18em;
}

.ldn-shell-primary__list > li > a:hover,
.ldn-shell-primary__list > li > a:focus-visible,
.ldn-shell-primary__list > .ldn-nav-mega:hover > a,
.ldn-shell-primary__list > .ldn-nav-mega:focus-within > a,
.ldn-shell-primary__list > .ldn-nav-current > a,
.ldn-shell-drawer a:hover,
.ldn-shell-drawer a:focus-visible {
	color: var(--ldn-primary);
}

.ldn-shell-primary__list > li > a:hover,
.ldn-shell-primary__list > li > a:focus-visible,
.ldn-shell-primary__list > .ldn-nav-mega:hover > a,
.ldn-shell-primary__list > .ldn-nav-mega:focus-within > a,
.ldn-shell-primary__list > .ldn-nav-current > a {
	box-shadow: inset 0 -2px 0 var(--ldn-primary);
}

.ldn-shell-primary__list > .ldn-nav-current > a {
	font-weight: 600;
}

.ldn-shell-utility {
	position: relative;
	z-index: 30;
	border-bottom: 1px solid var(--ldn-shell-rule);
	min-height: 36px;
}

.ldn-shell-header {
	position: relative;
	z-index: 20;
	background: var(--ldn-shell-surface);
	border-bottom: 1px solid var(--ldn-shell-rule);
}

.ldn-shell-utility__nav,
.ldn-shell-header__inner,
.ldn-shell-footer__inner,
.ldn-shell-footer__legal {
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 1rem;
	box-sizing: border-box;
}

.ldn-shell-utility__list {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: flex-end;
	margin: 0;
	padding: 0;
	list-style: none;
	font-size: 13px;
	color: var(--ldn-secondary-text);
}

.ldn-shell-utility .ldn-shell-utility__list > li > a {
	display: flex;
	align-items: center;
	min-height: 37px;
	padding: 0 10px;
}

.ldn-shell-utility .ldn-nav-has-children {
	position: relative;
}

.ldn-shell-utility .ldn-nav-sub {
	display: none;
	position: absolute;
	right: 0;
	top: 100%;
	z-index: 35;
	min-width: 12rem;
	padding: 0.5rem;
	background: var(--ldn-shell-surface);
	border-top: 1px solid var(--ldn-shell-rule);
	border-radius: 0 0 12px 12px;
	box-shadow: 0 14px 32px -6px rgb(0 0 0 / 12%), 0 4px 10px -2px rgb(0 0 0 / 6%);
}

.ldn-shell-utility .ldn-nav-has-children:hover > .ldn-nav-sub,
.ldn-shell-utility .ldn-nav-has-children:focus-within > .ldn-nav-sub {
	display: block;
}

.ldn-shell-utility .ldn-nav-countries-2-col > .ldn-nav-sub {
	min-width: 20rem;
	max-width: min(24rem, calc(100vw - 2rem));
}

.ldn-shell-utility .ldn-nav-countries-2-col:hover > .ldn-nav-sub,
.ldn-shell-utility .ldn-nav-countries-2-col:focus-within > .ldn-nav-sub {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
}

.ldn-shell-utility .ldn-nav-countries-2-col > .ldn-nav-sub > li {
	min-width: 0;
}

.ldn-shell-utility .ldn-nav-sub a {
	display: flex;
	align-items: center;
	min-height: 40px;
	min-width: 0;
	padding: 0 0.625rem;
	border-radius: 6px;
}

.ldn-shell-utility .ldn-nav-country-current > a {
	color: var(--ldn-primary);
	font-weight: 600;
}

.ldn-shell-utility .ldn-nav-sub a:hover,
.ldn-shell-utility .ldn-nav-sub a:focus-visible {
	color: var(--ldn-text);
	background: var(--ldn-shell-rule);
	text-decoration: none;
}

.ldn-shell-header__inner {
	position: relative;
	display: grid;
	grid-template-columns: auto minmax(0, 1fr);
	align-items: center;
	min-height: 84px;
	gap: 1.5rem;
}

.ldn-shell-brand,
.ldn-shell-brand a {
	display: flex;
	align-items: center;
}

.ldn-shell-brand img {
	width: 150px;
	height: 51px;
	object-fit: contain;
}

.ldn-shell-primary {
	position: static;
	align-self: stretch;
	display: flex;
	align-items: stretch;
	justify-content: flex-end;
	min-width: 0;
}

.ldn-shell-primary__list {
	display: flex;
	flex-wrap: wrap;
	align-items: stretch;
	justify-content: flex-end;
	gap: 0.125rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.ldn-shell-primary__list > li {
	display: flex;
	align-items: stretch;
}

.ldn-shell-primary__list > li > a {
	display: inline-flex;
	align-items: center;
	gap: 0.375rem;
	min-height: 44px;
	padding: 0 0.875rem;
	font-size: 0.9375rem;
	font-weight: 500;
	letter-spacing: 0;
	line-height: 1.25;
	color: var(--ldn-text);
}

.ldn-shell-primary__list > .ldn-nav-has-children > a::after {
	content: "";
	width: 0.36em;
	height: 0.36em;
	border-right: 1.5px solid currentColor;
	border-bottom: 1.5px solid currentColor;
	transform: translateY(-0.1em) rotate(45deg);
	opacity: 0.55;
}

.ldn-shell-primary__list > .ldn-nav-has-children:hover > a::after,
.ldn-shell-primary__list > .ldn-nav-has-children:focus-within > a::after {
	transform: translateY(0.12em) rotate(-135deg);
	opacity: 1;
}

.ldn-shell-drawer-toggle {
	display: none;
	min-width: 44px;
	min-height: 44px;
	margin-left: auto;
	padding: 0 0.875rem;
	border: 1px solid var(--ldn-shell-rule);
	border-radius: 8px;
	background: var(--ldn-shell-surface);
	color: var(--ldn-text);
	font: inherit;
	font-size: 0.875rem;
	font-weight: 600;
	cursor: pointer;
}

.ldn-shell-disclose {
	display: none;
	min-width: 44px;
	min-height: 44px;
	border: 0;
	background: transparent;
	color: inherit;
	cursor: pointer;
}

.ldn-shell-disclose::before {
	content: "+";
}

.ldn-nav-has-children.ldn-nav-open > .ldn-shell-disclose::before {
	content: "\2212";
}

.ldn-shell-drawer {
	display: none;
}

.ldn-shell-footer {
	background: var(--ldn-primary);
	color: var(--ldn-shell-on-primary);
}

.ldn-shell-footer a {
	color: var(--ldn-shell-on-primary);
	text-decoration: none;
}

.ldn-shell-footer a:hover,
.ldn-shell-footer a:focus-visible {
	text-decoration: underline;
	text-underline-offset: 0.18em;
}

.ldn-shell-footer__inner {
	display: grid;
	grid-template-columns: auto minmax(0, 1fr);
	gap: 2rem;
	padding: 2.5rem 1rem;
	align-items: start;
}

.ldn-shell-footer__brand .ldn-shell-brand,
.ldn-shell-footer__brand .ldn-shell-brand a {
	color: var(--ldn-shell-on-primary);
}

.ldn-shell-footer__columns {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 1.5rem;
}

.ldn-shell-footer__col {
	margin: 0;
	padding: 0;
	list-style: none;
}

.ldn-shell-footer__col a {
	display: flex;
	align-items: center;
	min-height: 44px;
	font-size: 15px;
}

.ldn-shell-footer__legal {
	padding-top: 1rem;
	padding-bottom: 1.75rem;
	border-top: 1px solid rgb(255 255 255 / 16%);
}

.ldn-shell-footer__copyright {
	margin: 0;
	font-size: 0.8125rem;
	color: var(--ldn-shell-on-primary);
	opacity: 0.82;
}

.ldn-nav-list,
.ldn-nav-sub {
	margin: 0;
	padding: 0;
	list-style: none;
}

.ldn-nav-item {
	min-width: 0;
}

.screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	border: 0;
}

/* Theme chrome is suppressed in PHP; this is the backstop for leftover widgets. */
body.ldn-shell-owned .site-header,
body.ldn-shell-owned .site-footer,
body.ldn-shell-owned #site-navigation,
body.ldn-shell-owned #mobile-header,
body.ldn-shell-owned .mobile-header-navigation,
body.ldn-shell-owned .main-navigation {
	display: none;
}

@media (max-width: 992px) {
	.ldn-shell-header__inner {
		gap: 0.75rem;
	}

	.ldn-shell-brand img {
		width: 132px;
		height: 45px;
	}

	.ldn-shell-primary__list {
		gap: 0;
	}

	.ldn-shell-primary__list > li > a {
		padding: 0 0.5rem;
		gap: 0.25rem;
		font-size: 0.875rem;
	}
}

@media (max-width: 768px) {
	.ldn-shell-utility {
		display: none;
	}

	.ldn-shell-header__inner {
		position: static;
		min-height: 72px;
	}

	.ldn-shell-primary {
		align-self: center;
	}

	.ldn-shell-drawer-toggle {
		display: inline-flex;
		align-items: center;
		justify-content: center;
	}

	.ldn-shell-primary__list {
		display: none;
	}

	.ldn-shell-drawer {
		display: none;
		position: absolute;
		top: 100%;
		right: 0;
		left: 0;
		z-index: 30;
		background: var(--ldn-shell-surface);
		border-top: 1px solid var(--ldn-shell-rule);
		box-shadow: 0 14px 32px -6px rgb(0 0 0 / 14%), 0 4px 10px -2px rgb(0 0 0 / 6%);
		padding: 0.5rem 1rem 1.25rem;
		max-height: calc(100dvh - 72px);
		overflow-y: auto;
	}

	.ldn-shell--drawer-open .ldn-shell-drawer {
		display: block;
	}

	.ldn-shell-drawer__list > li {
		border-bottom: 1px solid var(--ldn-shell-rule);
	}

	.ldn-shell-drawer__list > li:last-child {
		border-bottom: 0;
	}

	.ldn-shell-drawer__list > li > a {
		display: flex;
		align-items: center;
		min-height: 44px;
		font-size: 0.9375rem;
		font-weight: 500;
	}

	.ldn-shell-drawer__list > .ldn-nav-current > a {
		color: var(--ldn-primary);
		font-weight: 600;
	}

	.ldn-shell-drawer .ldn-shell-disclose {
		min-height: 44px;
		font-size: 1.125rem;
		color: var(--ldn-secondary-text);
	}

	.ldn-shell-drawer .ldn-nav-has-children {
		display: grid;
		grid-template-columns: minmax(0, 1fr) auto;
		align-items: center;
	}

	.ldn-shell-drawer .ldn-nav-has-children > a {
		min-width: 0;
	}

	.ldn-shell-drawer .ldn-shell-disclose {
		display: inline-flex;
		align-items: center;
		justify-content: center;
	}

	.ldn-shell-drawer .ldn-nav-sub {
		display: none;
		grid-column: 1 / -1;
		padding: 0 0 0.5rem 0.875rem;
	}

	/* Country list stays one column in the drawer. Two columns are desktop-only. */
	.ldn-shell-drawer .ldn-nav-open > .ldn-nav-sub {
		display: block;
	}

	/* Short non-collapsed group headings (Tools) stay expanded inside their open parent. */
	.ldn-shell-drawer .ldn-nav-column-heading > .ldn-nav-column-title {
		display: block;
		padding: 0.5rem 0 0.2rem;
		font-size: 0.72rem;
		font-weight: 600;
		text-transform: uppercase;
		letter-spacing: 0.06em;
		color: var(--ldn-secondary-text);
	}

	.ldn-shell-drawer .ldn-nav-column-heading > .ldn-nav-sub {
		display: block;
		padding: 0;
	}

	.ldn-shell-drawer .ldn-nav-sub a {
		display: flex;
		align-items: center;
		min-height: 44px;
		font-size: 0.875rem;
	}

	.ldn-shell-drawer .ldn-nav-utility-start {
		margin-top: 0.5rem;
		padding-top: 0.5rem;
		border-top: 2px solid var(--ldn-shell-rule);
	}

	.ldn-shell-footer__inner {
		grid-template-columns: minmax(0, 1fr);
	}

	.ldn-shell-footer__columns {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 400px) {
	.ldn-shell-footer__columns {
		grid-template-columns: minmax(0, 1fr);
	}

	.ldn-shell-header__inner {
		min-height: 68px;
	}

	.ldn-shell-brand img {
		width: 132px;
		height: 45px;
	}
}

@media (prefers-reduced-motion: no-preference) {
	.ldn-shell a,
	.ldn-shell-primary__list > .ldn-nav-has-children > a::after {
		transition: color 160ms ease, box-shadow 160ms ease, transform 160ms ease, opacity 160ms ease, text-decoration-color 160ms ease;
	}
}
