.consent-banner,
.consent-modal,
.consent-external-placeholder,
.consent-youtube {
	box-sizing: border-box;
	font-family: inherit;
}

.consent-banner *,
.consent-modal *,
.consent-external-placeholder *,
.consent-youtube * {
	box-sizing: border-box;
}

.consent-banner[hidden],
.consent-modal[hidden] {
	display: none !important;
}

.consent-banner {
	position: fixed;
	z-index: 9990;
	right: 1rem;
	bottom: 1rem;
	left: 1rem;
	padding: 1.25rem;
	color: #202124;
	background: #fff;
	border: 1px solid #d8d8d8;
	border-radius: 0.75rem;
	box-shadow: 0 0.5rem 2rem rgba(0, 0, 0, 0.18);
}

.consent-banner__content {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 2rem;
	max-width: 1200px;
	margin: 0 auto;
}

.consent-banner__text {
	flex: 1;
}

.consent-banner__title {
	display: block;
	margin-bottom: 0.4rem;
	font-size: 1.1rem;
}

.consent-banner__text p,
.consent-modal__header p {
	margin: 0;
	line-height: 1.5;
}

.consent-banner__actions,
.consent-modal__footer {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
}

.consent-button {
	min-height: 42px;
	padding: 0.65rem 1rem;
	border: 1px solid transparent;
	border-radius: 0.4rem;
	font: inherit;
	cursor: pointer;
}

.consent-button--primary {
	color: #fff;
	background: #222;
	border-color: #222;
}

.consent-button--secondary {
	color: #222;
	background: #fff;
	border-color: #aaa;
}

.consent-button:hover {
	opacity: 0.86;
}

.consent-button:focus-visible,
.consent-modal__close:focus-visible,
.consent-category input:focus-visible {
	outline: 3px solid currentColor;
	outline-offset: 3px;
}

.consent-modal {
	position: fixed;
	z-index: 10000;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 1rem;
}

.consent-modal__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.55);
}

.consent-modal__dialog {
	position: relative;
	width: min(680px, 100%);
	max-height: calc(100vh - 2rem);
	overflow: auto;
	color: #202124;
	background: #fff;
	border-radius: 0.75rem;
	box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.3);
}

.consent-modal__header {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 1rem;
	padding: 1.5rem;
	border-bottom: 1px solid #ddd;
}

.consent-modal__header h2 {
	margin: 0 0 0.5rem;
}

.consent-modal__close {
	width: 42px;
	height: 42px;
	flex: 0 0 42px;
	padding: 0;
	color: inherit;
	background: transparent;
	border: 0;
	font-size: 2rem;
	line-height: 1;
	cursor: pointer;
}

.consent-modal__body {
	padding: 1.5rem;
}

.consent-category {
	display: block;
	padding: 1rem 0;
	border-bottom: 1px solid #e5e5e5;
}

.consent-category:first-child {
	padding-top: 0;
}

.consent-category:last-child {
	padding-bottom: 0;
	border-bottom: 0;
}

.consent-category__control {
	display: flex;
	align-items: center;
	gap: 0.75rem;
}

.consent-category__control input {
	width: 1.25rem;
	height: 1.25rem;
	margin: 0;
}

.consent-category__name {
	font-weight: 700;
}

.consent-category__required {
	margin-left: auto;
	color: #666;
	font-size: 0.85rem;
}

.consent-category__description {
	display: block;
	margin-top: 0.5rem;
	padding-left: 2rem;
	color: #555;
	line-height: 1.5;
}

.consent-modal__footer {
	justify-content: flex-end;
	padding: 1.5rem;
	border-top: 1px solid #ddd;
}

.consent-modal-open {
	overflow: hidden;
}

.footer-consent-button {
	position: fixed;
	z-index: 9989;
	left: 1rem;
	bottom: 1rem;
	padding: 0.4rem 0.875rem;
	background: #fff;
	border: 1px solid #ccc;
	border-radius: 2rem;
	font: inherit;
	font-size: 0.78rem;
	cursor: pointer;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
	color: #555;
}

.footer-consent-button:hover {
	background: #f5f5f5;
}

body:has(#consent-banner:not([hidden])) .footer-consent-button {
	display: none;
}

@media (max-width: 760px) {
	.consent-banner__content {
		display: block;
	}

	.consent-banner__actions {
		margin-top: 1rem;
	}

	.consent-banner__actions .consent-button,
	.consent-modal__footer .consent-button {
		flex: 1 1 100%;
	}

	.consent-modal {
		align-items: flex-end;
		padding: 0;
	}

	.consent-modal__dialog {
		width: 100%;
		max-height: 90vh;
		border-radius: 0.75rem 0.75rem 0 0;
	}
}
