/*
 * The cookie banner. Fixed to the bottom corner, so it never pushes the page
 * about or hides the header.
 *
 * Stacking: above the sticky header (40) and the mobile menu (60), below the
 * enquiry modal (100), the skip link (1000) and the photo lightbox (10000).
 *
 * District Four's own palette: #1D1D1D, white, and Gilroy as the rest of the
 * site sets it.
 */
.d4-cookie-banner {
	position: fixed;
	left: 16px;
	bottom: calc(16px + env(safe-area-inset-bottom, 0px));
	z-index: 90;
	box-sizing: border-box;
	width: calc(100% - 32px);
	max-width: 440px;
	padding: 18px 20px;
	background: #1D1D1D;
	color: #FFFFFF;
	border-radius: 4px;
	box-shadow: 0 12px 40px rgba(29, 29, 29, 0.28);
	font-family: 'Gilroy', sans-serif;
	font-weight: 400;
	animation: d4-consent-in 300ms ease-out both;
}

.d4-cookie-banner[hidden] {
	display: none;
}

.d4-cookie-banner__text {
	margin: 0 0 14px;
	font-size: 15px;
	line-height: 1.5;
	color: #FFFFFF;
}

.d4-cookie-banner__text a {
	color: #FFFFFF;
	font-weight: 600;
	text-decoration: underline;
	text-underline-offset: 3px;
	white-space: nowrap;
}

.d4-cookie-banner__btns {
	display: flex;
	gap: 10px;
}

/* Accept and Reject are deliberately identical: saying no is as easy as yes. */
.d4-cookie-banner__btn {
	flex: 1 1 0;
	min-height: 44px;
	margin: 0;
	padding: 10px 16px;
	border: 1px solid #FFFFFF;
	border-radius: 0;
	background: #FFFFFF;
	color: #1D1D1D;
	font-family: 'Gilroy', sans-serif;
	font-size: 15px;
	font-weight: 600;
	line-height: 1.2;
	cursor: pointer;
	-webkit-appearance: none;
	appearance: none;
	transition: background-color 150ms ease, color 150ms ease;
}

.d4-cookie-banner__btn:hover {
	background: #C7C8C1;
	border-color: #C7C8C1;
}

.d4-cookie-banner__btn:focus-visible,
.d4-cookie-banner__text a:focus-visible {
	outline: 2px solid #FFFFFF;
	outline-offset: 3px;
}

/* "Cookie settings" in the footer's legal row, dressed like the links beside it. */
.d4-cookie-link {
	display: inline;
	margin: 0;
	padding: 0;
	border: 0;
	background: none;
	color: inherit;
	font: inherit;
	letter-spacing: inherit;
	text-transform: inherit;
	cursor: pointer;
	-webkit-appearance: none;
	appearance: none;
}

.d4-cookie-link:hover {
	text-decoration: underline;
}

.d4-cookie-link:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 2px;
}

@media (max-width: 600px) {
	.d4-cookie-banner {
		left: 10px;
		width: calc(100% - 20px);
		max-width: none;
		bottom: calc(10px + env(safe-area-inset-bottom, 0px));
		padding: 14px 16px;
	}

	.d4-cookie-banner__text {
		font-size: 14px;
		margin-bottom: 12px;
	}
}

@keyframes d4-consent-in {
	from { opacity: 0; transform: translateY(12px); }
	to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
	.d4-cookie-banner {
		animation: none;
	}
}
