/**
 * Consent banner.
 *
 * Classes
 * -------
 * .pdn-consent                  Root. Hidden with the hidden attribute until JS shows it.
 * .pdn-consent--bottom          Fixed to the bottom edge.
 * .pdn-consent--left            Side panel on the left. Bottom sheet below 640px.
 * .pdn-consent--right           Side panel on the right. Bottom sheet below 640px.
 * .pdn-consent--center          Modal dialog with overlay.
 * .pdn-consent--enter           Entrance animation.
 * .pdn-consent--hiding          Exit animation.
 * .pdn-consent__overlay         Dimmed backdrop. Visible only for the center position.
 * .pdn-consent__dialog          Panel that contains the text and buttons.
 * .pdn-consent__content         Message HTML.
 * .pdn-consent__actions         Button row.
 * .pdn-consent__btn             Shared button styles.
 * .pdn-consent__btn--accept     Accept button.
 * .pdn-consent__btn--more       Policy link.
 * .pdn-consent__sr              Visually hidden note for new-tab links.
 * html.pdn-consent-show         Set while the banner is open.
 * html.pdn-consent-lock         Scroll lock for the center position.
 *
 * Custom properties on .pdn-consent
 * ---------------------------------
 * --pdn-bg           Panel background.
 * --pdn-color        Text color.
 * --pdn-font-size    Text size, also used by the buttons.
 * --pdn-btn-bg       "More" button background.
 * --pdn-btn-color    Label color of both buttons.
 * --pdn-accept-bg    Accept button background.
 * --pdn-z            Stacking order. Default 1000000.
 *
 * Button background and label color use !important under #pdn-consent.
 * Theme rules for button and a:link often win otherwise. To override a
 * button color, target #pdn-consent and use !important as well.
 *
 * Copy templates/banner.php to yourtheme/pdn-consent/banner.php to replace the markup.
 * Do not rely on display:none being absent: the root starts with the hidden attribute.
 */

.pdn-consent {
	--pdn-bg: #1f2937;
	--pdn-color: #f9fafb;
	--pdn-font-size: 16px;
	--pdn-btn-bg: #4b5563;
	--pdn-btn-color: #ffffff;
	--pdn-accept-bg: #1d4ed8;
	--pdn-z: 1000000;
	position: fixed;
	z-index: var(--pdn-z);
	box-sizing: border-box;
	margin: 0;
	color: var(--pdn-color);
	font-family: inherit;
	font-size: var(--pdn-font-size);
	line-height: 1.5;
	display: none;
}

.pdn-consent[hidden] {
	display: none !important;
}

.pdn-consent *,
.pdn-consent *::before,
.pdn-consent *::after {
	box-sizing: border-box;
}

html.pdn-consent-show .pdn-consent--bottom {
	display: block;
	left: 0;
	right: 0;
	bottom: 0;
}

html.pdn-consent-show .pdn-consent--left,
html.pdn-consent-show .pdn-consent--right {
	display: flex;
	top: 0;
	bottom: 0;
	align-items: center;
	pointer-events: none;
}

html.pdn-consent-show .pdn-consent--left {
	left: 0;
}

html.pdn-consent-show .pdn-consent--right {
	right: 0;
}

html.pdn-consent-show .pdn-consent--center {
	display: flex;
	top: 0;
	right: 0;
	bottom: 0;
	left: 0;
	align-items: center;
	justify-content: center;
	padding: 16px;
}

html.pdn-consent-lock,
html.pdn-consent-lock body {
	overflow: hidden;
}

.pdn-consent__overlay {
	display: none;
}

html.pdn-consent-show .pdn-consent--center .pdn-consent__overlay {
	display: block;
	position: absolute;
	top: 0;
	right: 0;
	bottom: 0;
	left: 0;
	background: rgba(15, 23, 42, 0.62);
}

.pdn-consent__dialog {
	position: relative;
	min-width: 0;
	max-width: 100%;
	background: var(--pdn-bg);
	color: var(--pdn-color);
	pointer-events: auto;
}

.pdn-consent--bottom .pdn-consent__dialog {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 16px 24px;
	width: 100%;
	padding: 16px 24px calc(16px + env(safe-area-inset-bottom, 0px));
	box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.2);
}

.pdn-consent--left .pdn-consent__dialog,
.pdn-consent--right .pdn-consent__dialog {
	display: flex;
	flex-direction: column;
	align-items: stretch;
	gap: 16px;
	width: 22rem;
	max-width: calc(100vw - 32px);
	max-height: calc(100% - 32px);
	margin: 16px;
	padding: 20px;
	overflow: auto;
	border-radius: 12px;
	box-shadow: 0 16px 50px rgba(0, 0, 0, 0.28);
}

.pdn-consent--center .pdn-consent__dialog {
	display: flex;
	flex-direction: column;
	align-items: stretch;
	gap: 16px;
	width: 100%;
	max-width: 36rem;
	max-height: calc(100vh - 32px);
	padding: 24px;
	overflow: auto;
	border-radius: 12px;
	box-shadow: 0 16px 50px rgba(0, 0, 0, 0.28);
	z-index: 1;
}

.pdn-consent__content {
	flex: 1 1 16rem;
	min-width: 0;
	max-width: 100%;
	overflow-wrap: anywhere;
}

.pdn-consent--left .pdn-consent__content,
.pdn-consent--right .pdn-consent__content,
.pdn-consent--center .pdn-consent__content {
	flex: 0 1 auto;
}

.pdn-consent--bottom .pdn-consent__content,
.pdn-consent--left .pdn-consent__content,
.pdn-consent--right .pdn-consent__content {
	max-height: 40vh;
	overflow: auto;
}

.pdn-consent__content p,
.pdn-consent__content ul,
.pdn-consent__content ol,
.pdn-consent__content blockquote,
.pdn-consent__content h2,
.pdn-consent__content h3,
.pdn-consent__content h4 {
	margin: 0 0 0.5em;
}

.pdn-consent__content p:last-child,
.pdn-consent__content ul:last-child,
.pdn-consent__content ol:last-child,
.pdn-consent__content blockquote:last-child,
.pdn-consent__content h2:last-child,
.pdn-consent__content h3:last-child,
.pdn-consent__content h4:last-child {
	margin-bottom: 0;
}

.pdn-consent__content h2,
.pdn-consent__content h3,
.pdn-consent__content h4 {
	font-size: 1.05em;
	line-height: 1.3;
}

.pdn-consent__content ul,
.pdn-consent__content ol {
	padding-left: 1.2em;
}

.pdn-consent__content a {
	color: inherit;
	text-underline-offset: 0.15em;
}

.pdn-consent__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-left: auto;
}

.pdn-consent--left .pdn-consent__actions,
.pdn-consent--right .pdn-consent__actions,
.pdn-consent--center .pdn-consent__actions {
	margin-left: 0;
}

#pdn-consent .pdn-consent__btn,
#pdn-consent a.pdn-consent__btn:link,
#pdn-consent a.pdn-consent__btn:visited,
#pdn-consent a.pdn-consent__btn:hover,
#pdn-consent a.pdn-consent__btn:focus,
#pdn-consent a.pdn-consent__btn:active,
#pdn-consent button.pdn-consent__btn:hover,
#pdn-consent button.pdn-consent__btn:focus,
#pdn-consent button.pdn-consent__btn:active {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 44px;
	margin: 0;
	padding: 0.65em 1.15em;
	border: 0 !important;
	border-radius: 8px;
	background-color: var(--pdn-btn-bg) !important;
	background-image: none !important;
	color: var(--pdn-btn-color) !important;
	font-family: inherit;
	font-size: inherit;
	font-weight: 600;
	line-height: 1.2;
	text-align: center;
	text-decoration: none !important;
	text-shadow: none;
	cursor: pointer;
	appearance: none;
	-webkit-appearance: none;
}

#pdn-consent .pdn-consent__btn--accept,
#pdn-consent button.pdn-consent__btn--accept:hover,
#pdn-consent button.pdn-consent__btn--accept:focus,
#pdn-consent button.pdn-consent__btn--accept:active {
	background-color: var(--pdn-accept-bg) !important;
}

#pdn-consent .pdn-consent__btn:focus {
	outline: 2px solid transparent;
	outline-offset: 2px;
}

#pdn-consent .pdn-consent__btn:focus-visible {
	outline: 2px solid #ffffff !important;
	outline-offset: 2px;
	box-shadow: 0 0 0 4px #1d4ed8;
}

#pdn-consent .pdn-consent__btn:active {
	transform: translateY(1px);
}

.pdn-consent__sr {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

html.pdn-consent-show .pdn-consent--enter.pdn-consent--bottom .pdn-consent__dialog {
	animation: pdn-consent-in-up 0.35s ease backwards;
}

html.pdn-consent-show .pdn-consent--enter.pdn-consent--left .pdn-consent__dialog {
	animation: pdn-consent-in-left 0.35s ease backwards;
}

html.pdn-consent-show .pdn-consent--enter.pdn-consent--right .pdn-consent__dialog {
	animation: pdn-consent-in-right 0.35s ease backwards;
}

html.pdn-consent-show .pdn-consent--enter.pdn-consent--center .pdn-consent__dialog {
	animation: pdn-consent-in-center 0.35s ease backwards;
}

html.pdn-consent-show .pdn-consent--enter.pdn-consent--center .pdn-consent__overlay {
	animation: pdn-consent-fade 0.35s ease backwards;
}

html.pdn-consent-show .pdn-consent--hiding .pdn-consent__dialog,
html.pdn-consent-show .pdn-consent--hiding .pdn-consent__overlay {
	animation: pdn-consent-out 0.28s ease forwards;
}

@keyframes pdn-consent-in-up {
	from {
		opacity: 0;
		transform: translateY(16px);
	}

	to {
		opacity: 1;
		transform: none;
	}
}

@keyframes pdn-consent-in-left {
	from {
		opacity: 0;
		transform: translateX(-16px);
	}

	to {
		opacity: 1;
		transform: none;
	}
}

@keyframes pdn-consent-in-right {
	from {
		opacity: 0;
		transform: translateX(16px);
	}

	to {
		opacity: 1;
		transform: none;
	}
}

@keyframes pdn-consent-in-center {
	from {
		opacity: 0;
		transform: translateY(8px) scale(0.98);
	}

	to {
		opacity: 1;
		transform: none;
	}
}

@keyframes pdn-consent-fade {
	from {
		opacity: 0;
	}

	to {
		opacity: 1;
	}
}

@keyframes pdn-consent-out {
	from {
		opacity: 1;
	}

	to {
		opacity: 0;
	}
}

@media (max-width: 640px) {
	html.pdn-consent-show .pdn-consent--left,
	html.pdn-consent-show .pdn-consent--right {
		top: auto;
		right: 0;
		bottom: 0;
		left: 0;
		align-items: stretch;
	}

	.pdn-consent--left .pdn-consent__dialog,
	.pdn-consent--right .pdn-consent__dialog {
		width: auto;
		max-width: 100%;
		max-height: 80vh;
		margin: 0;
		border-radius: 12px 12px 0 0;
		padding-bottom: calc(20px + env(safe-area-inset-bottom, 0px));
	}

	.pdn-consent--bottom .pdn-consent__dialog,
	.pdn-consent--center .pdn-consent__dialog {
		align-items: stretch;
	}

	.pdn-consent__actions {
		width: 100%;
		margin-left: 0;
		flex-direction: column;
	}

	#pdn-consent .pdn-consent__btn {
		width: 100%;
	}
}

@media (prefers-reduced-motion: reduce) {
	html.pdn-consent-show .pdn-consent__dialog,
	html.pdn-consent-show .pdn-consent__overlay,
	.pdn-consent__btn {
		animation: none !important;
		transition: none;
	}

	#pdn-consent .pdn-consent__btn:active {
		transform: none;
	}
}

@media print {
	.pdn-consent {
		display: none !important;
	}
}

@media (forced-colors: active) {
	#pdn-consent .pdn-consent__dialog,
	#pdn-consent .pdn-consent__btn {
		border: 1px solid CanvasText !important;
	}
}
