/*
 * The cookie consent bar.
 *
 * Colours and type come from the Elementor Kit's own global variables, so the bar follows the site
 * rather than carrying a second palette. The fallbacks are the same values the Kit holds, and they
 * only ever apply on a page Elementor did not render.
 *
 * The bar is printed on every page whatever the visitor answered; which of them see it is decided
 * by the data-cookie-consent attribute the head script writes onto the html element before the page
 * paints.
 */

.cookie-consent {
	display: none;
}

html[data-cookie-consent="unset"] .cookie-consent,
.cookie-consent.is-open {
	display: block;
}

.cookie-consent {
	position: fixed;
	right: 16px;
	bottom: 16px;
	left: 16px;
	z-index: 9990;
}

.cookie-consent__card {
	display: flex;
	align-items: center;
	gap: 22px;
	box-sizing: border-box;
	padding: 18px 24px;
	border-radius: 14px;
	background: #fff;
	box-shadow: 0 6px 28px rgba(15, 30, 44, 0.16);
}

/* The mark */

#cookie-consent .cookie-consent__badge {
	display: flex;
	flex: 0 0 auto;
	align-items: center;
	justify-content: center;
	width: 72px;
	height: 72px;
	border-radius: 50%;
	background: #fef5e0;
}

#cookie-consent .cookie-consent__icon {
	width: 40px;
	height: 40px;
	fill: var(--e-global-color-accent, #ffa60a);
}

/* The sentence */

#cookie-consent .cookie-consent__text {
	flex: 1 1 auto;
	max-width: 600px;
	margin: 0;
	color: var(--e-global-color-primary, #16212e);
	font-family: var(--e-global-typography-text-font-family, "Roboto"), sans-serif;
	font-size: 16px;
	font-weight: 400;
	line-height: 1.6;
}

#cookie-consent .cookie-consent__text strong {
	font-weight: 700;
}

/* The controls */

#cookie-consent .cookie-consent__actions {
	display: flex;
	flex: 0 0 auto;
	align-items: center;
	gap: 20px;
	margin-left: auto;
}

#cookie-consent .cookie-consent__link {
	margin-right: 43px;
	color: var(--e-global-color-primary, #16212e);
	font-family: var(--e-global-typography-text-font-family, "Roboto"), sans-serif;
	font-size: 15px;
	font-weight: 500;
	line-height: 1.4;
	text-decoration: underline;
	text-underline-offset: 3px;
}

#cookie-consent .cookie-consent__link:hover,
#cookie-consent .cookie-consent__link:focus {
	color: var(--e-global-color-accent, #ffa60a);
}

#cookie-consent .cookie-consent__button {
	box-sizing: border-box;
	min-width: 132px;
	height: 54px;
	padding: 0 22px;
	border: 1px solid var(--e-global-color-primary, #16212e);
	border-radius: 10px;
	background: #fff;
	color: var(--e-global-color-primary, #16212e);
	font-family: var(--e-global-typography-text-font-family, "Roboto"), sans-serif;
	font-size: 16px;
	font-weight: 600;
	line-height: 1;
	cursor: pointer;
	transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

#cookie-consent .cookie-consent__button--reject:hover,
#cookie-consent .cookie-consent__button--reject:focus {
	background: var(--e-global-color-surface, #f6f7f8);
}

#cookie-consent .cookie-consent__button--accept {
	min-width: 138px;
	border-color: var(--e-global-color-accent, #ffa60a);
	background: var(--e-global-color-accent, #ffa60a);
}

#cookie-consent .cookie-consent__button--accept:hover,
#cookie-consent .cookie-consent__button--accept:focus {
	border-color: #e89200;
	background: #e89200;
}

#cookie-consent .cookie-consent__button:focus-visible,
#cookie-consent .cookie-consent__link:focus-visible,
.cookie-consent-reopen.cookie-consent-reopen:focus-visible,
.cookie-consent-embed__button.cookie-consent-embed__button:focus-visible {
	outline: 2px solid var(--e-global-color-accent, #ffa60a);
	outline-offset: 2px;
}

/* The control that brings the bar back */

.cookie-consent-reopen.cookie-consent-reopen {
	padding: 0;
	border: 0;
	background: none;
	color: inherit;
	font: inherit;
	text-decoration: underline;
	text-underline-offset: 3px;
	cursor: pointer;
}

.cookie-consent-reopen.cookie-consent-reopen:hover,
.cookie-consent-reopen.cookie-consent-reopen:focus {
	color: var(--e-global-color-accent, #ffa60a);
}

/*
 * An embed that is waiting for consent.
 *
 * The iframe keeps its size so the page does not jump when the map arrives; until then it is out of
 * the way and the notice explains the space it is sitting in.
 */

.cookie-consent-embed {
	position: relative;
	min-height: 220px;
	border-radius: 14px;
	background: var(--e-global-color-surface, #f6f7f8);
	overflow: hidden;
}

.cookie-consent-embed iframe[data-consent-src] {
	visibility: hidden;
}

.cookie-consent-embed__notice {
	position: absolute;
	inset: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 16px;
	box-sizing: border-box;
	padding: 24px;
	text-align: center;
}

.cookie-consent-embed .cookie-consent-embed__text {
	max-width: 420px;
	margin: 0;
	color: var(--e-global-color-text, #5a6270);
	font-family: var(--e-global-typography-text-font-family, "Roboto"), sans-serif;
	font-size: 15px;
	line-height: 1.6;
}

.cookie-consent-embed__button.cookie-consent-embed__button {
	box-sizing: border-box;
	height: 48px;
	padding: 0 24px;
	border: 1px solid var(--e-global-color-accent, #ffa60a);
	border-radius: 10px;
	background: var(--e-global-color-accent, #ffa60a);
	color: var(--e-global-color-primary, #16212e);
	font-family: var(--e-global-typography-text-font-family, "Roboto"), sans-serif;
	font-size: 15px;
	font-weight: 600;
	cursor: pointer;
}

.cookie-consent-embed__button.cookie-consent-embed__button:hover,
.cookie-consent-embed__button.cookie-consent-embed__button:focus {
	border-color: #e89200;
	background: #e89200;
}

/*
 * Tablet: there is no longer room for the sentence and the three controls side by side, and what
 * gives way is the sentence - it squeezes into a four-line column while the buttons keep their
 * width. So the controls are sent to a row of their own instead, and the sentence gets the width
 * back.
 */

@media (max-width: 1024px) {
	#cookie-consent .cookie-consent__card {
		flex-wrap: wrap;
		row-gap: 16px;
	}

	#cookie-consent .cookie-consent__text {
		flex: 1 1 320px;
		max-width: none;
	}

	#cookie-consent .cookie-consent__actions {
		flex: 1 1 100%;
		justify-content: flex-end;
		margin-left: 0;
	}

	#cookie-consent .cookie-consent__link {
		margin-right: 24px;
	}
}

/* Phone: one thing under another, and the two answers share the width. */

@media (max-width: 767px) {
	.cookie-consent {
		right: 12px;
		bottom: 12px;
		left: 12px;
	}

	#cookie-consent .cookie-consent__card {
		gap: 14px;
		padding: 18px;
	}

	#cookie-consent .cookie-consent__badge {
		width: 52px;
		height: 52px;
	}

	#cookie-consent .cookie-consent__icon {
		width: 28px;
		height: 28px;
	}

	#cookie-consent .cookie-consent__text {
		flex: 1 1 200px;
		font-size: 15px;
	}

	#cookie-consent .cookie-consent__actions {
		flex-wrap: wrap;
		gap: 12px;
		width: 100%;
		margin-left: 0;
	}

	#cookie-consent .cookie-consent__link {
		flex: 1 1 100%;
		margin-right: 0;
	}

	#cookie-consent .cookie-consent__button {
		flex: 1 1 0;
		min-width: 0;
		height: 48px;
		padding: 0 12px;
	}

	#cookie-consent .cookie-consent__button--accept {
		min-width: 0;
	}

	.cookie-consent-embed {
		min-height: 260px;
	}
}

#cookie-consent:focus {
	outline: none;
}
