/**
 * Cookie consent banner and preference centre.
 * Markup from inc/cookie-consent.php, behaviour from js/cookie-consent.js.
 */

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

.lc-consent {
	position: fixed;
	inset: 0;
	z-index: 100000; /* above .modal (5), .site-header (4) - see the note in style.css */
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	background: rgba(15, 26, 34, .55);
	font-family: 'Poppins', sans-serif;
	overscroll-behavior: contain;
}

.lc-consent__banner[hidden],
.lc-consent__modal[hidden] { display: none; }

/* ---------------------------------------------------------------- banner -- */

.lc-consent__banner {
	width: 100%;
	max-width: 620px;
	padding: 30px 32px 26px;
	background: #fff;
	border: 1px solid #e3e8ee;
	box-shadow: 0 18px 50px rgba(12, 34, 51, .18);
}

.lc-consent__title {
	margin: 0 0 14px;
	font-size: 25px;
	font-weight: 700;
	line-height: 1.2;
	text-align: center;
	color: #2f3a42;
}

.lc-consent__text {
	margin: 0 0 22px;
	font-size: 15px;
	line-height: 1.55;
	color: #3f4d58;
}

.lc-consent__policy {
	display: inline-block;
	margin-top: 8px;
	font-weight: 700;
	color: #2f3a42;
	text-decoration: underline;
}

.lc-consent__policy:hover,
.lc-consent__policy:focus { color: var(--lc-blue); }

.lc-consent__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	justify-content: center;
}

/* --------------------------------------------------------------- buttons -- */

.lc-consent__btn {
	appearance: none;
	border: 0;
	padding: 13px 22px;
	background: #e9edf2;
	color: #2f3a42;
	font-family: inherit;
	font-size: 15px;
	font-weight: 700;
	line-height: 1;
	cursor: pointer;
	transition: background-color .15s ease, color .15s ease;
}

.lc-consent__btn:hover,
.lc-consent__btn:focus { background: #dbe2ea; }

.lc-consent__btn--primary {
	background: var(--lc-blue);
	color: #fff;
}

.lc-consent__btn--primary:hover,
.lc-consent__btn--primary:focus {
	background: var(--lc-blue-hover);
	color: #fff;
}

.lc-consent__btn:focus-visible {
	outline: 2px solid var(--lc-blue);
	outline-offset: 2px;
}

/* ----------------------------------------------------------------- modal -- */

.lc-consent__modal {
	display: flex;
	flex-direction: column;
	width: 100%;
	max-width: 860px;
	max-height: 88vh;
	background: #fff;
	border: 1px solid #e3e8ee;
	box-shadow: 0 18px 50px rgba(12, 34, 51, .18);
}

.lc-consent__head {
	display: grid;
	grid-template-columns: 40px 1fr 40px;
	align-items: center;
	padding: 14px 16px;
	border-bottom: 1px solid #e3e8ee;
}

.lc-consent__modal-title {
	margin: 0;
	font-size: 19px;
	font-weight: 700;
	text-align: center;
	color: #2f3a42;
}

.lc-consent__back {
	appearance: none;
	border: 0;
	background: none;
	font-size: 28px;
	line-height: 1;
	color: #2f3a42;
	cursor: pointer;
	padding: 0;
}

.lc-consent__burger {
	display: flex;
	flex-direction: column;
	gap: 5px;
	justify-self: end;
}

.lc-consent__burger span {
	display: block;
	width: 22px;
	height: 2px;
	background: #2f3a42;
}

/* Two columns: category list, then the description for the selected one. */
.lc-consent__body {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	gap: 0;
	overflow: hidden;
}

.lc-consent__tabs {
	padding: 12px 18px 18px;
	overflow-y: auto;
}

.lc-consent__tab {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 14px;
	padding: 15px 0;
	border-bottom: 1px solid #eef1f5;
	cursor: pointer;
}

.lc-consent__tab:last-child { border-bottom: 0; }

.lc-consent__cat {
	font-size: 16px;
	color: #3f4d58;
}

.lc-consent__tab.is-active .lc-consent__cat {
	font-weight: 700;
	color: #2f3a42;
}

.lc-consent__tab:focus-visible {
	outline: 2px solid var(--lc-blue);
	outline-offset: 2px;
}

/* ---- switch ---- */

.lc-consent__switch {
	position: relative;
	flex: 0 0 auto;
	width: 52px;
	height: 26px;
	cursor: pointer;
}

.lc-consent__switch.is-locked { cursor: not-allowed; }

.lc-consent__switch input {
	position: absolute;
	opacity: 0;
	width: 100%;
	height: 100%;
	margin: 0;
	cursor: inherit;
}

.lc-consent__slider {
	position: absolute;
	inset: 0;
	border-radius: 999px;
	background: #9aa6b2;
	transition: background-color .15s ease;
	pointer-events: none;
}

.lc-consent__slider::before {
	content: "";
	position: absolute;
	top: 3px;
	left: 3px;
	width: 20px;
	height: 20px;
	border-radius: 50%;
	background: #fff;
	transition: transform .15s ease, background-color .15s ease;
}

.lc-consent__switch input:checked ~ .lc-consent__slider::before {
	transform: translateX(26px);
	background: #7ad3a2;
}

.lc-consent__switch input:focus-visible ~ .lc-consent__slider {
	outline: 2px solid var(--lc-blue);
	outline-offset: 2px;
}

/* ---- description panel ---- */

.lc-consent__panels {
	padding: 18px 22px 22px;
	border-left: 1px solid #eef1f5;
	overflow-y: auto;
}

.lc-consent__panel[hidden] { display: none; }

.lc-consent__panel-title {
	margin: 0 0 12px;
	font-size: 17px;
	font-weight: 700;
	color: #2f3a42;
}

.lc-consent__panel p {
	margin: 0;
	font-size: 14.5px;
	line-height: 1.65;
	color: #3f4d58;
}

/* ---- footer ---- */

.lc-consent__foot {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	justify-content: flex-end;
	padding: 16px 20px;
	border-top: 1px solid #e3e8ee;
}

/* ------------------------------------------------------------ responsive -- */

@media screen and (max-width: 720px) {
	.lc-consent { padding: 12px; align-items: flex-end; }

	.lc-consent__banner { padding: 22px 20px 20px; }
	.lc-consent__title { font-size: 21px; }

	/* Stack: category list above its description, both scrollable. */
	.lc-consent__body { grid-template-columns: minmax(0, 1fr); }
	.lc-consent__panels { border-left: 0; border-top: 1px solid #eef1f5; }

	.lc-consent__actions,
	.lc-consent__foot { justify-content: stretch; }

	.lc-consent__actions .lc-consent__btn,
	.lc-consent__foot .lc-consent__btn { flex: 1 1 100%; }
}
