/**
 * H&H Cookies – consent banner in the design of the H&H theme. Mobile first.
 */

.hhmr-consent {
	--hhmr-cc-engine: var(--hhmr-color-engine, #1a1817);
	--hhmr-cc-orange: var(--hhmr-color-orange, #e35205);
	--hhmr-cc-orange-hi: var(--hhmr-color-orange-hi, #ff6a1a);
	--hhmr-cc-chrome: var(--hhmr-color-chrome-light, #c2c4c7);
	--hhmr-cc-display: var(--hhmr-font-display, "Barlow Condensed", "Arial Narrow", sans-serif);
	--hhmr-cc-body: var(--hhmr-font-body, "Barlow", system-ui, sans-serif);
	position: fixed;
	right: 0;
	bottom: 0;
	left: 0;
	z-index: 10050;
	padding: 12px;
	pointer-events: none;
}

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

.hhmr-consent__box {
	box-sizing: border-box;
	max-width: 560px;
	max-height: calc(100vh - 24px);
	max-height: calc(100svh - 24px);
	margin: 0 auto;
	padding: 22px 20px 18px;
	overflow-y: auto;
	overscroll-behavior: contain;
	background: var(--hhmr-cc-engine);
	border-top: 4px solid var(--hhmr-cc-orange);
	border-radius: 2px;
	box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.45);
	color: var(--hhmr-cc-chrome);
	font-family: var(--hhmr-cc-body);
	font-size: 0.9375rem;
	line-height: 1.55;
	pointer-events: auto;
}

.hhmr-consent__box *,
.hhmr-consent__box *::before,
.hhmr-consent__box *::after {
	box-sizing: border-box;
}

.hhmr-consent__title {
	margin: 0 0 10px;
	color: #fff;
	font-family: var(--hhmr-cc-display);
	font-size: 1.625rem;
	font-weight: 800;
	line-height: 1;
	letter-spacing: 0.01em;
	text-transform: uppercase;
}

.hhmr-consent__title:focus {
	outline: none;
}

.hhmr-consent__text {
	margin: 0;
}

/* Actions ------------------------------------------------------------------ */

.hhmr-consent__actions {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 10px;
	margin-top: 18px;
}

.hhmr-consent__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 48px;
	margin: 0;
	padding: 0 14px;
	background: #fff;
	border: 2px solid #fff;
	border-radius: 2px;
	color: #000;
	font-family: var(--hhmr-cc-display);
	font-size: 1.0625rem;
	font-weight: 700;
	line-height: 1.1;
	letter-spacing: 0.04em;
	text-align: center;
	text-transform: uppercase;
	cursor: pointer;
	transition: background-color 0.2s ease, border-color 0.2s ease;
}

.hhmr-consent__btn:hover {
	background: var(--hhmr-cc-orange);
	border-color: var(--hhmr-cc-orange);
}

.hhmr-consent__btn[hidden],
.hhmr-consent__link[hidden] {
	display: none;
}

.hhmr-consent__btn--wide {
	grid-column: 1 / -1;
}

.hhmr-consent__btn--save {
	grid-column: 1 / -1;
}

.hhmr-consent__link {
	grid-column: 1 / -1;
	justify-self: center;
	min-height: 44px;
	padding: 0 8px;
	background: none;
	border: 0;
	color: var(--hhmr-cc-chrome);
	font: inherit;
	font-weight: 600;
	text-decoration: underline;
	text-underline-offset: 4px;
	cursor: pointer;
}

.hhmr-consent__link:hover {
	color: var(--hhmr-cc-orange-hi);
}

.hhmr-consent button:focus-visible,
.hhmr-consent a:focus-visible,
.hhmr-consent__toggle:focus-visible {
	outline: 3px solid var(--hhmr-cc-orange-hi);
	outline-offset: 3px;
}

/* Details ------------------------------------------------------------------ */

.hhmr-consent__details {
	margin-top: 16px;
}

.hhmr-consent__cat {
	padding: 14px 0;
	border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.hhmr-consent__cat-head {
	display: flex;
	align-items: center;
	gap: 12px;
}

.hhmr-consent__cat-head label {
	color: #fff;
	font-family: var(--hhmr-cc-display);
	font-size: 1.1875rem;
	font-weight: 700;
	text-transform: uppercase;
	cursor: pointer;
}

.hhmr-consent__fixed {
	color: var(--hhmr-cc-chrome);
	font-family: var(--hhmr-cc-body);
	font-size: 0.8125rem;
	font-weight: 400;
	text-transform: none;
}

.hhmr-consent__toggle {
	position: relative;
	flex: 0 0 46px;
	width: 46px;
	height: 26px;
	margin: 0;
	appearance: none;
	background: #4a4746;
	border: 0;
	border-radius: 2px;
	cursor: pointer;
	transition: background-color 0.2s ease;
}

.hhmr-consent__toggle::before {
	content: "";
	position: absolute;
	top: 3px;
	left: 3px;
	width: 20px;
	height: 20px;
	background: #fff;
	border-radius: 2px;
	transition: transform 0.2s ease;
}

.hhmr-consent__toggle:checked {
	background: var(--hhmr-cc-orange);
}

.hhmr-consent__toggle:checked::before {
	transform: translateX(20px);
}

.hhmr-consent__toggle:disabled {
	opacity: 0.6;
	cursor: not-allowed;
}

.hhmr-consent__cat-text {
	margin: 8px 0 0;
	font-size: 0.875rem;
}

.hhmr-consent__services {
	margin: 8px 0 0;
	padding: 0;
	list-style: none;
	font-size: 0.8125rem;
}

.hhmr-consent__services li {
	display: flex;
	flex-direction: column;
	gap: 2px;
	margin: 8px 0 0;
	padding: 8px 10px;
	background: rgba(255, 255, 255, 0.05);
	border-radius: 2px;
}

.hhmr-consent__services strong {
	color: #fff;
}

.hhmr-consent__services a,
.hhmr-consent__legal a {
	color: var(--hhmr-cc-chrome);
	text-decoration: underline;
	text-underline-offset: 3px;
}

.hhmr-consent__services a:hover,
.hhmr-consent__legal a:hover {
	color: var(--hhmr-cc-orange-hi);
}

.hhmr-consent__id {
	margin: 12px 0 0;
	font-size: 0.8125rem;
}

.hhmr-consent__id code {
	color: #fff;
	font-size: 0.8125rem;
	overflow-wrap: anywhere;
}

.hhmr-consent__legal {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 4px 18px;
	margin: 10px 0 0;
	font-size: 0.8125rem;
}

/* ≥ 768px: compact box in the lower left corner. */
@media (min-width: 768px) {
	.hhmr-consent {
		right: auto;
		bottom: 24px;
		left: 24px;
		padding: 0;
	}

	.hhmr-consent__box {
		width: 440px;
		max-height: calc(100vh - 48px);
		padding: 26px 26px 20px;
		box-shadow: 0 18px 48px rgba(0, 0, 0, 0.5);
	}

	.hhmr-consent.is-expanded .hhmr-consent__box {
		width: 520px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.hhmr-consent * {
		transition: none !important;
	}
}

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