/* Cookie consent banner. Colors, spacing and type come from the theme presets; fallbacks keep it readable without them. */
.td-consent {
	position: fixed;
	inset-inline: 0;
	bottom: 0;
	z-index: 90;
	padding: var(--wp--preset--spacing--40, 0.75rem) var(--wp--preset--spacing--50, 1rem);
	color: var(--wp--preset--color--ink, #10211c);
	background: var(--wp--preset--color--paper, #f6f7f4);
	border-top: 0.125rem solid var(--wp--preset--color--teal, #0b6e6a);
	box-shadow: 0 -0.5rem 1.5rem rgb(16 33 28 / 14%);
}

.td-consent[hidden] {
	display: none;
}

.td-consent__inner {
	display: flex;
	flex-wrap: wrap;
	gap: var(--wp--preset--spacing--40, 0.75rem) var(--wp--preset--spacing--60, 1.5rem);
	align-items: center;
	justify-content: space-between;
	max-width: 75rem;
	margin-inline: auto;
}

.td-consent__copy {
	flex: 1 1 26rem;
	max-width: 46rem;
}

.td-consent__title {
	margin: 0 0 0.25rem;
	font-size: var(--wp--preset--font-size--sm, 0.9375rem);
	font-weight: 700;
}

.td-consent__text {
	margin: 0;
	font-size: var(--wp--preset--font-size--sm, 0.9375rem);
	line-height: 1.5;
}

.td-consent__text a {
	color: var(--wp--preset--color--teal-deep, #084f4c);
	text-decoration: underline;
}

.td-consent__actions {
	display: flex;
	flex: 0 0 auto;
	gap: var(--wp--preset--spacing--40, 0.75rem);
}

/* Accept and Decline share one style on purpose: refusing must be as easy as accepting. */
.td-consent__btn {
	min-width: 7rem;
	min-height: 2.75rem;
	padding: 0 1.25rem;
	font: inherit;
	font-size: var(--wp--preset--font-size--sm, 0.9375rem);
	font-weight: 600;
	color: var(--wp--preset--color--teal-deep, #084f4c);
	cursor: pointer;
	background: var(--wp--preset--color--white, #fff);
	border: 0.125rem solid var(--wp--preset--color--teal, #0b6e6a);
	border-radius: var(--wp--custom--radius, 2px);
}

.td-consent__btn:hover {
	color: var(--wp--preset--color--white, #fff);
	background: var(--wp--preset--color--teal, #0b6e6a);
}

@media (max-width: 40rem) {
	.td-consent__actions {
		flex: 1 1 100%;
	}

	.td-consent__btn {
		flex: 1 1 0;
	}
}

/* Keep the WhatsApp pill and the page end clear of the banner while it is open. */
.td-consent-open .td-whatsapp {
	transform: translateY(calc(-1 * var(--td-consent-h, 0px)));
}

.td-consent-open body {
	padding-bottom: var(--td-consent-h, 0);
}
