/* ==========================================================================
   Cookie consent — a floating card at the bottom-left and a two-panel
   preferences dialog (dark brand panel + choices), matching the enquiry
   pop-up. Phones: the card spans the bottom, the dialog is a bottom sheet.
   ========================================================================== */

.eit-ck {
	--ck-ink: var(--eit-ink, #15181f);
	--ck-body: var(--eit-body, #3d4453);
	--ck-muted: #5b6172;
	--ck-line: #e3e6ef;
	--ck-accent: var(--eit-accent, #3b4fe8);
	--ck-grad: linear-gradient(135deg, #3b4fe8 0%, #7c3aed 100%);
	font-family: inherit;
}
.eit-ck[hidden],
.eit-ck [hidden] { display: none !important; }

/* The theme's button reset paints every [type=button] pink with white text on
   hover/focus/active; each state of our buttons is set explicitly below. */
.eit-ck button { font-family: inherit; text-transform: none; letter-spacing: 0; }

.eit-ck__icon {
	display: grid;
	place-items: center;
	flex: none;
	width: 46px;
	height: 46px;
	border-radius: 14px;
	background: var(--ck-grad);
	color: #fff;
	box-shadow: 0 10px 22px -8px rgba(59, 79, 232, .6);
}
.eit-ck__icon svg { width: 26px; height: 26px; }
.eit-ck__icon--lg { width: 60px; height: 60px; border-radius: 18px; background: rgba(255, 255, 255, .14); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .28); }
.eit-ck__icon--lg svg { width: 34px; height: 34px; }

/* ---------- Buttons ---------- */

.eit-ck__btn,
.eit-ck__btn:hover,
.eit-ck__btn:focus,
.eit-ck__btn:active {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 44px;
	padding: 10px 22px;
	border: 1.5px solid transparent;
	border-radius: 999px;
	font-size: 14.5px;
	font-weight: 600;
	line-height: 1.2;
	white-space: nowrap;
	cursor: pointer;
	-webkit-tap-highlight-color: transparent;
	transition: background-color .18s ease, border-color .18s ease, color .18s ease, box-shadow .18s ease, transform .18s ease;
}
.eit-ck__btn--solid,
.eit-ck__btn--solid:focus,
.eit-ck__btn--solid:active { background: var(--ck-accent); border-color: var(--ck-accent); color: #fff; box-shadow: 0 8px 18px -8px rgba(59, 79, 232, .75); }
.eit-ck__btn--solid:hover { background: var(--eit-accent-hover, #2f3fd1); border-color: var(--eit-accent-hover, #2f3fd1); color: #fff; transform: translateY(-1px); }
.eit-ck__btn--line,
.eit-ck__btn--line:focus,
.eit-ck__btn--line:active { background: #fff; border-color: #cfd5e6; color: var(--ck-ink); }
.eit-ck__btn--line:hover { background: #f3f5fc; border-color: var(--ck-accent); color: var(--ck-accent); }
.eit-ck__btn--text,
.eit-ck__btn--text:focus,
.eit-ck__btn--text:active { min-height: 44px; padding: 10px 12px; background: transparent; border-color: transparent; color: var(--ck-accent); text-decoration: underline; text-underline-offset: 4px; }
.eit-ck__btn--text:hover { background: transparent; color: var(--eit-accent-hover, #2f3fd1); }
.eit-ck__btn:focus-visible,
.eit-ck__x:focus-visible,
.eit-ck__switch input:focus-visible + .eit-ck__track,
.eit-ck summary:focus-visible { outline: 3px solid rgba(59, 79, 232, .45); outline-offset: 2px; }

/* ---------- Banner ---------- */

.eit-ck__bar {
	position: fixed;
	left: 20px;
	bottom: 20px;
	/* Under the enquiry pop-up (10000) so that one is never covered; above the page and header. */
	z-index: 9990;
	display: grid;
	gap: 14px 16px;
	grid-template-columns: auto 1fr;
	align-items: start;
	width: min(480px, calc(100vw - 40px));
	padding: 20px 22px 12px;
	border: 1px solid rgba(255, 255, 255, .7);
	border-radius: 24px;
	background: rgba(255, 255, 255, .94);
	-webkit-backdrop-filter: blur(18px) saturate(1.4);
	backdrop-filter: blur(18px) saturate(1.4);
	box-shadow: 0 30px 70px -18px rgba(15, 23, 60, .45), 0 0 0 1px rgba(20, 30, 80, .06);
	color: var(--ck-body);
	opacity: 0;
	transform: translateY(24px) scale(.98);
	transition: opacity .4s ease, transform .5s cubic-bezier(.2, .8, .2, 1);
}
.eit-ck__bar::before {
	content: "";
	position: absolute;
	top: 0;
	left: 28px;
	right: 28px;
	height: 3px;
	border-radius: 0 0 4px 4px;
	background: var(--ck-grad);
}
.eit-ck__bar.is-in { opacity: 1; transform: none; }

/* First visit: on screen from the first paint. The class is set in <head>
   (inc/analytics.php) only when no choice has been saved, and
   cookie-consent.js takes the bar over once it runs. */
html.eit-ck-ask #eit-ck { display: block; }
html.eit-ck-ask .eit-ck__bar { opacity: 1; transform: none; transition: none; }

.eit-ck__title { margin: 2px 0 6px; color: var(--ck-ink); font-size: 18px; font-weight: 700; line-height: 1.25; }
.eit-ck__text { margin: 0; font-size: 14px; line-height: 1.6; }
.eit-ck__text a,
.eit-ck__intro a { color: var(--ck-accent); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.eit-ck__actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.eit-ck__actions .eit-ck__btn--solid,
.eit-ck__actions .eit-ck__btn--line { flex: 1 1 130px; }
/* "Customise" sits centred under the two buttons; kept short so the card stays compact. */
.eit-ck__actions .eit-ck__btn--text { flex: 1 1 100%; min-height: 26px; padding: 0 12px; margin-top: -2px; }

/* ---------- Dialog ---------- */

html.eit-ck-locked { overflow: hidden; }

.eit-ck__modal {
	position: fixed;
	inset: 0;
	z-index: 10002;
	display: grid;
	place-items: center;
	padding: 20px;
}
.eit-ck__scrim {
	position: absolute;
	inset: 0;
	background: rgba(15, 23, 41, .35);
	-webkit-backdrop-filter: blur(10px);
	backdrop-filter: blur(10px);
	opacity: 0;
	transition: opacity .3s ease;
}
/* Desktop: the same light veil the open mega menu puts over the page. */
@media (min-width: 1025px) {
	.eit-ck__scrim { background: rgba(15, 23, 41, .12); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
}
.eit-ck__modal.is-open .eit-ck__scrim { opacity: 1; }

.eit-ck__dialog {
	position: relative;
	display: grid;
	grid-template-columns: minmax(0, 290px) minmax(0, 1fr);
	width: min(900px, 100%);
	max-height: calc(100dvh - 40px);
	overflow: hidden;
	border-radius: 28px;
	background: #fff;
	box-shadow: 0 40px 100px rgba(10, 14, 40, .38), 0 0 0 1px rgba(255, 255, 255, .5);
	opacity: 0;
	transform: translateY(18px) scale(.97);
	transition: opacity .35s ease, transform .45s cubic-bezier(.2, .8, .2, 1);
}
.eit-ck__modal.is-open .eit-ck__dialog { opacity: 1; transform: none; }

.eit-ck__x,
.eit-ck__x:hover,
.eit-ck__x:focus,
.eit-ck__x:active {
	position: absolute;
	top: 14px;
	right: 14px;
	z-index: 3;
	display: grid;
	place-items: center;
	width: 38px;
	height: 38px;
	padding: 0;
	border: 1px solid var(--ck-line);
	border-radius: 50%;
	background: #fff;
	color: var(--ck-ink);
	cursor: pointer;
}
.eit-ck__x:hover { background: #f1f3fa; }
.eit-ck__x svg { width: 16px; height: 16px; }

.eit-ck__side {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 18px;
	padding: 34px 28px;
	color: #fff;
	background:
		radial-gradient(120% 70% at 0% 0%, rgba(59, 79, 232, .75) 0%, transparent 60%),
		radial-gradient(90% 60% at 100% 100%, rgba(124, 58, 237, .6) 0%, transparent 60%),
		#0c1330;
	overflow: hidden;
}
.eit-ck__side-title { margin: 0; font-size: 22px; font-weight: 700; line-height: 1.25; }
.eit-ck__points { list-style: none; display: grid; gap: 12px; margin: auto 0 0; padding: 0; }
.eit-ck__points li { position: relative; padding-left: 28px; color: rgba(255, 255, 255, .85); font-size: 14px; line-height: 1.5; }
.eit-ck__points li::before {
	content: "";
	position: absolute;
	left: 0;
	top: 2px;
	width: 18px;
	height: 18px;
	border-radius: 50%;
	background: rgba(94, 234, 212, .22) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235eead4' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 12.5 4 4 8-9'/%3E%3C/svg%3E") center / 11px no-repeat;
}

.eit-ck__main { display: flex; flex-direction: column; min-width: 0; min-height: 0; max-height: calc(100dvh - 40px); }
.eit-ck__mtitle { margin: 0; padding: 30px 64px 0 32px; color: var(--ck-ink); font-size: 24px; font-weight: 700; line-height: 1.2; }
.eit-ck__intro { margin: 8px 0 0; padding: 0 32px; color: var(--ck-muted); font-size: 14px; line-height: 1.6; }
.eit-ck__cats { display: grid; gap: 12px; margin: 18px 0 0; padding: 4px 32px 18px; overflow-y: auto; overscroll-behavior: contain; }

.eit-ck__cat { padding: 16px 18px; border: 1px solid var(--ck-line); border-radius: 18px; background: #fafbff; }
.eit-ck__cat-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.eit-ck__cat-title { margin: 0 0 4px; color: var(--ck-ink); font-size: 16px; font-weight: 700; }
.eit-ck__cat-text { margin: 0; color: var(--ck-muted); font-size: 13.5px; line-height: 1.55; }
.eit-ck__always { flex: none; padding: 5px 12px; border-radius: 999px; background: rgba(34, 160, 107, .12); color: #14794f; font-size: 12px; font-weight: 700; white-space: nowrap; }

.eit-ck__switch { position: relative; flex: none; display: inline-block; width: 50px; height: 28px; margin-top: 2px; cursor: pointer; }
.eit-ck__switch input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; z-index: 1; }
.eit-ck__track { position: absolute; inset: 0; border-radius: 999px; background: #c9cfe0; transition: background-color .2s ease; }
.eit-ck__track::after {
	content: "";
	position: absolute;
	top: 3px;
	left: 3px;
	width: 22px;
	height: 22px;
	border-radius: 50%;
	background: #fff;
	box-shadow: 0 2px 6px rgba(15, 23, 60, .3);
	transition: transform .22s cubic-bezier(.2, .8, .2, 1);
}
.eit-ck__switch input:checked + .eit-ck__track { background: var(--ck-grad); }
.eit-ck__switch input:checked + .eit-ck__track::after { transform: translateX(22px); }
.eit-ck__switch input:disabled { cursor: not-allowed; }
.eit-ck__switch input:disabled + .eit-ck__track { opacity: .5; }

.eit-ck__details { margin-top: 10px; }
.eit-ck summary { display: inline-flex; align-items: center; gap: 6px; color: var(--ck-accent); font-size: 13px; font-weight: 600; cursor: pointer; list-style: none; border-radius: 6px; }
.eit-ck summary::-webkit-details-marker { display: none; }
.eit-ck summary::after { content: ""; width: 7px; height: 7px; border: solid currentColor; border-width: 0 2px 2px 0; transform: rotate(45deg) translateY(-2px); transition: transform .2s ease; }
.eit-ck details[open] > summary::after { transform: rotate(-135deg) translate(-2px, -1px); }
.eit-ck__list { list-style: none; display: grid; gap: 8px; margin: 10px 0 0; padding: 0; }
.eit-ck__list li { display: grid; gap: 2px; padding: 10px 12px; border-radius: 12px; background: #fff; border: 1px solid #e9ecf5; font-size: 12.5px; line-height: 1.45; }
.eit-ck__list strong { color: var(--ck-ink); font-size: 13px; word-break: break-word; }
.eit-ck__list span { color: var(--ck-accent); font-weight: 600; }
.eit-ck__list em { color: var(--ck-muted); font-style: normal; }

.eit-ck__foot {
	display: flex;
	flex-wrap: wrap;
	justify-content: flex-end;
	gap: 10px;
	margin-top: auto;
	padding: 16px 32px 22px;
	border-top: 1px solid var(--ck-line);
	background: #fff;
}

/* ---------- Small screens ---------- */

@media (max-width: 767px) {
	.eit-ck__modal { align-items: end; padding: 0; }
	.eit-ck__dialog {
		grid-template-columns: 1fr;
		width: 100%;
		max-height: 92dvh;
		border-radius: 26px 26px 0 0;
		transform: translateY(40px);
	}
	.eit-ck__side { display: none; }
	.eit-ck__main { max-height: 92dvh; }
	.eit-ck__mtitle { padding: 24px 60px 0 20px; font-size: 21px; }
	.eit-ck__intro { padding: 0 20px; }
	.eit-ck__cats { padding: 4px 20px 16px; }
	.eit-ck__foot { padding: 14px 20px calc(16px + env(safe-area-inset-bottom)); }
	.eit-ck__foot { gap: 8px; }
	.eit-ck__foot .eit-ck__btn { flex: 1 1 calc(50% - 4px); padding-inline: 10px; }
	.eit-ck__foot [data-ck-save] { flex-basis: 100%; order: 3; }
	.eit-ck__foot [data-ck-reject] { order: 1; }
	.eit-ck__foot [data-ck-accept] { order: 2; }
}
@media (max-width: 560px) {
	.eit-ck__bar { left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); width: auto; padding: 18px 16px 16px; gap: 12px 14px; border-radius: 22px; padding-bottom: 10px; }
	.eit-ck__icon { width: 40px; height: 40px; border-radius: 12px; }
	.eit-ck__icon svg { width: 22px; height: 22px; }
	.eit-ck__title { font-size: 16.5px; }
	.eit-ck__text { font-size: 13.5px; }
	.eit-ck__actions .eit-ck__btn--solid,
	.eit-ck__actions .eit-ck__btn--line { flex: 1 1 calc(50% - 5px); padding-inline: 10px; }
}

@media (prefers-reduced-motion: reduce) {
	.eit-ck__bar,
	.eit-ck__dialog,
	.eit-ck__scrim,
	.eit-ck__track,
	.eit-ck__track::after { transition: none; }
}
