/*
 * Legal pages (terms, privacy, cookies): hero, document switch, sticky
 * contents + help card, "At a glance" panel, the copy itself (Text Editor
 * "slo-legal-doc") and the cookie preferences panel.
 * Loaded by the slo-legal-* widgets and slo-cookie-preferences.
 */

/* ---------- Hero (container "slo-legal-hero slo-glow", Paper) ---------- */

.elementor-widget.slo-legal-hero__title .elementor-heading-title {
	font-size: clamp(48px, 6vw, 72px);
	line-height: 1;
	letter-spacing: -.045em;
	font-weight: 800;
}

.elementor-widget.slo-legal-hero__lede {
	font-size: clamp(17px, 1.35vw, 19px);
	line-height: 1.6;
	color: var(--muted);
}

.elementor-widget.slo-legal-hero__lede p {
	margin: 0;
}

/* "Last updated … · 6 min read" pills (Text Editor, class "slo-legal-meta": <p><span>…</span><span>…</span></p>). */
.elementor-widget.slo-legal-meta p {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 0;
}

.elementor-widget.slo-legal-meta span {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 8px 14px;
	border: 1px solid var(--line);
	border-radius: var(--r-pill);
	background: var(--surface);
	font-size: 14px;
	line-height: 1.3;
	font-weight: 600;
	color: var(--muted);
}

.elementor-widget.slo-legal-meta b {
	font-weight: 800;
	color: var(--ink);
}
/* ---------- Document switch (slo-legal-switch) ---------- */

.slo-legal-switch {
	display: inline-flex;
	flex-wrap: wrap;
	gap: 4px;
	padding: 6px;
	border: 1px solid var(--line);
	border-radius: var(--r-pill);
	background: var(--surface);
}

body .slo-legal-switch a {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	padding: 0 22px;
	border-radius: var(--r-pill);
	font-size: 15px;
	font-weight: 700;
	color: var(--muted);
	text-decoration: none;
	transition: background-color .25s ease, color .25s ease;
}

body .slo-legal-switch a:hover {
	background: var(--mint-tint);
	color: var(--forest);
}

body .slo-legal-switch a[aria-current="page"] {
	background: var(--forest);
	color: #FFFFFF;
}

/* ---------- Body: aside + article ---------- */

@media (min-width: 1025px) {
	.e-con.slo-legal-aside {
		flex: 0 0 clamp(240px, 28%, 340px);
	}

	.e-con.slo-legal-article {
		flex: 1 1 0;
		min-width: 0;
		max-width: 780px;
	}
}

/* Contents (slo-legal-toc). */
.slo-legal-toc__title {
	margin: 0 0 10px;
	padding-left: 14px;
	font-family: var(--font-mono);
	font-size: 12px;
	font-weight: 500;
	line-height: 1.3;
	letter-spacing: .14em;
	text-transform: uppercase;
	color: var(--soft);
}

.slo-legal-toc__list {
	display: grid;
	gap: 2px;
	margin: 0;
	padding: 0;
	list-style: none;
}

body .slo-legal-toc__list a {
	display: block;
	padding: 10px 14px;
	border-radius: 10px;
	font-size: 15px;
	line-height: 1.35;
	font-weight: 600;
	color: var(--muted);
	text-decoration: none;
	transition: background-color .2s ease, color .2s ease;
}

body .slo-legal-toc__list a:hover {
	background: var(--tint);
	color: var(--ink);
}

body .slo-legal-toc__list a[aria-current] {
	background: var(--mint-tint);
	color: var(--forest);
}

/* Stacked layout: the list would push the copy a long way down; two columns. */
@media (min-width: 641px) and (max-width: 1024px) {
	.slo-legal-toc__list {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

/* Help card (container "slo-legal-help", Forest). */
.elementor-widget.slo-legal-help__title .elementor-heading-title {
	font-size: 18px;
	line-height: 1.3;
	letter-spacing: -.01em;
	font-weight: 800;
	color: #FFFFFF;
}

.elementor-widget.slo-legal-help__text {
	font-size: 15px;
	line-height: 1.55;
	color: rgba(255, 255, 255, .74);
}

.elementor-widget.slo-legal-help__text p {
	margin: 0;
}

.elementor-widget.slo-legal-help__link .elementor-button {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	padding: 0;
	border: 0;
	background: none;
	font-family: var(--font-sans);
	font-size: 15px;
	font-weight: 800;
	letter-spacing: 0;
	text-transform: none;
	color: var(--saffron);
}

.elementor-widget.slo-legal-help__link .elementor-button:hover {
	background: none;
	color: var(--saffron-hover);
}

.elementor-widget.slo-legal-help__link .elementor-button-text::after {
	content: "";
	display: inline-block;
	width: 16px;
	height: 16px;
	margin-left: 8px;
	vertical-align: -3px;
	background: currentColor;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14M13 6l6 6-6 6'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14M13 6l6 6-6 6'/%3E%3C/svg%3E") center / contain no-repeat;
	transition: transform .25s var(--ease);
}

.elementor-widget.slo-legal-help__link .elementor-button:hover .elementor-button-text::after {
	transform: translateX(4px);
}

/* ---------- At a glance (Text Editor, class "slo-legal-glance": <h2> + <ul><li><b>…</b>…</li></ul>) ---------- */

.elementor-widget.slo-legal-glance {
	padding: clamp(24px, 2.4vw, 32px);
	border-radius: 24px;
	background: var(--mint-tint);
}

.elementor-widget.slo-legal-glance h2 {
	margin: 0 0 18px;
	font-family: var(--font-mono);
	font-size: 12.5px;
	font-weight: 500;
	line-height: 1.3;
	letter-spacing: .14em;
	text-transform: uppercase;
	color: var(--forest);
}

.elementor-widget.slo-legal-glance ul {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 12px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.elementor-widget.slo-legal-glance li {
	position: relative;
	padding: 16px 18px 16px 58px;
	border-radius: 16px;
	background: var(--surface);
	font-size: 15.5px;
	line-height: 1.5;
	color: var(--body);
}

/* Tick tile. */
.elementor-widget.slo-legal-glance li::before {
	content: "";
	position: absolute;
	top: 16px;
	left: 18px;
	width: 28px;
	height: 28px;
	border-radius: 8px;
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230E4D33' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 16px no-repeat, var(--mint);
}

.elementor-widget.slo-legal-glance li b {
	display: block;
	font-size: 16px;
	font-weight: 800;
	color: var(--ink);
}

/* One point: no half-empty second column. */
.elementor-widget.slo-legal-glance li:only-child {
	grid-column: 1 / -1;
}

/* ---------- The copy (Text Editor, class "slo-legal-doc") ---------- */

.elementor-widget.slo-legal-doc {
	font-size: 17px;
	line-height: 1.7;
	color: var(--body);
}

.elementor-widget.slo-legal-doc h2 {
	margin: clamp(40px, 4vw, 56px) 0 14px;
	font-size: clamp(26px, 2.3vw, 32px);
	line-height: 1.15;
	letter-spacing: -.03em;
	font-weight: 800;
	color: var(--ink);
	scroll-margin-top: calc(var(--slo-header-offset, 81px) + 24px);
}

.elementor-widget.slo-legal-doc h3 {
	margin: 24px 0 8px;
	font-size: 19px;
	line-height: 1.3;
	letter-spacing: -.01em;
	font-weight: 800;
	color: var(--ink);
}

.elementor-widget.slo-legal-doc p {
	margin: 0 0 14px;
}

/* Copy that opens with text rather than a heading: keep it clear of the glance panel. */
.elementor-widget.slo-legal-glance + .elementor-widget.slo-legal-doc > :first-child:not(h2) {
	margin-top: clamp(32px, 3vw, 40px);
}

.elementor-widget.slo-legal-doc strong {
	color: var(--ink);
}

body .slo-legal-doc a {
	font-weight: 700;
	color: var(--forest);
	text-decoration: underline;
	text-underline-offset: 3px;
}

/* Square saffron bullets. */
.elementor-widget.slo-legal-doc ul:not(.slo-legal-rights) {
	display: grid;
	gap: 8px;
	margin: 0 0 14px;
	padding: 0;
	list-style: none;
}

.elementor-widget.slo-legal-doc ul:not(.slo-legal-rights) li {
	position: relative;
	padding-left: 22px;
	line-height: 1.65;
}

.elementor-widget.slo-legal-doc ul:not(.slo-legal-rights) li::before {
	content: "";
	position: absolute;
	top: .62em;
	left: 2px;
	width: 8px;
	height: 8px;
	border-radius: 2px;
	background: var(--saffron);
}

/* Details still to be filled in (company number, address, emails). */
.slo-legal-doc .slo-fill {
	padding: 1px 8px;
	border: 1px dashed #D8B65A;
	border-radius: 6px;
	background: var(--accent-tint);
	font-size: .92em;
	font-weight: 700;
	color: var(--ink);
	-webkit-box-decoration-break: clone;
	box-decoration-break: clone;
}

/* Tables (<div class="slo-legal-table"><table>…). Scroll sideways on phones. */
.slo-legal-doc .slo-legal-table {
	margin: 8px 0 16px;
	overflow: auto;
	border: 1px solid var(--line);
	border-radius: 16px;
}

.slo-legal-doc .slo-legal-table table {
	width: 100%;
	min-width: 560px;
	margin: 0;
	border: 0;
	border-collapse: collapse;
}

/* The parent theme breaks words anywhere in cells ("Communi|cations"). */
.slo-legal-doc .slo-legal-table th,
.slo-legal-doc .slo-legal-table td {
	border: 0;
	text-align: left;
	vertical-align: top;
	word-break: normal;
	overflow-wrap: normal;
}

.slo-legal-doc .slo-legal-table th {
	padding: 14px 18px;
	background: var(--tint);
	font-family: var(--font-mono);
	font-size: 11.5px;
	font-weight: 500;
	line-height: 1.3;
	letter-spacing: .12em;
	text-transform: uppercase;
	color: var(--soft);
}

.slo-legal-doc .slo-legal-table td {
	padding: 16px 18px;
	border-top: 1px solid var(--line);
	font-size: 15.5px;
	line-height: 1.55;
	color: var(--body);
}

.slo-legal-doc .slo-legal-table td:first-child {
	font-weight: 800;
	color: var(--ink);
}

.slo-legal-doc .slo-legal-table code {
	padding: 0;
	background: none;
	font-family: var(--font-mono);
	font-size: 13.5px;
	font-weight: 500;
	color: var(--ink);
	white-space: nowrap;
}

/* Cookie type tags. */
.slo-legal-doc .slo-tag {
	display: inline-block;
	padding: 4px 10px;
	border-radius: var(--r-pill);
	background: var(--mint-tint);
	font-size: 12.5px;
	line-height: 1.3;
	font-weight: 800;
	color: var(--forest);
	white-space: nowrap;
}

.slo-legal-doc .slo-tag--functional,
.slo-legal-doc .slo-tag--performance {
	background: #E8F1FB;
	color: #1D4E7A;
}

.slo-legal-doc .slo-tag--analytics {
	background: var(--accent-tint);
	color: #7A5600;
}

.slo-legal-doc .slo-tag--marketing {
	background: #FBECE3;
	color: #8A3A12;
}

/* Rights cards (<ul class="slo-legal-rights"><li><b>…</b>…</li>). */
.elementor-widget.slo-legal-doc .slo-legal-rights {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 12px;
	margin: 8px 0 16px;
	padding: 0;
	list-style: none;
}

.elementor-widget.slo-legal-doc .slo-legal-rights li {
	padding: 18px 20px;
	border: 1px solid var(--line);
	border-radius: 16px;
	background: var(--surface);
	font-size: 15px;
	line-height: 1.5;
	color: var(--muted);
}

.elementor-widget.slo-legal-doc .slo-legal-rights b {
	display: block;
	margin-bottom: 4px;
	font-size: 17px;
	font-weight: 800;
	color: var(--ink);
}

.elementor-widget.slo-legal-doc .slo-legal-note {
	margin-top: 4px;
	font-size: 14px;
	line-height: 1.55;
	color: var(--soft);
}

/* ---------- Cookie preferences (slo-cookie-preferences) ---------- */

.slo-cookies {
	display: block;
	margin: 12px 0 16px;
	padding: clamp(20px, 2.4vw, 32px);
	border-radius: 24px;
	background: var(--paper);
	scroll-margin-top: calc(var(--slo-header-offset, 81px) + 24px);
}

.slo-cookies__row {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 24px;
	padding: 20px 22px;
	border-radius: 16px;
	background: var(--surface);
}

.slo-cookies__row + .slo-cookies__row {
	margin-top: 10px;
}

.slo-cookies .slo-cookies__title {
	margin: 0;
	font-size: 17px;
	line-height: 1.3;
	font-weight: 800;
	color: var(--ink);
}

.slo-cookies .slo-cookies__text {
	margin: 4px 0 0;
	font-size: 15px;
	line-height: 1.5;
	color: var(--muted);
}

.slo-cookies__switch {
	position: relative;
	display: inline-flex;
	flex-shrink: 0;
	align-items: center;
	gap: 10px;
	min-height: 44px;
	margin: 0;
	cursor: pointer;
}

.slo-cookies__switch input {
	position: absolute;
	right: 0;
	width: 52px;
	height: 30px;
	margin: 0;
	opacity: 0;
	cursor: pointer;
}

.slo-cookies__track {
	position: relative;
	width: 52px;
	height: 30px;
	border-radius: var(--r-pill);
	background: #D9D4C7;
	transition: background-color .25s ease;
}

.slo-cookies__track::after {
	content: "";
	position: absolute;
	top: 3px;
	left: 3px;
	width: 24px;
	height: 24px;
	border-radius: 50%;
	background: #FFFFFF;
	box-shadow: 0 2px 6px rgba(10, 31, 22, .25);
	transition: transform .3s var(--ease);
}

.slo-cookies__switch input:checked + .slo-cookies__track {
	background: var(--canopy);
}

.slo-cookies__switch input:checked + .slo-cookies__track::after {
	transform: translateX(22px);
}

.slo-cookies__switch input:disabled {
	cursor: not-allowed;
}

.slo-cookies__switch input:disabled + .slo-cookies__track {
	background: var(--forest);
	opacity: .6;
}

.slo-cookies__switch input:focus-visible + .slo-cookies__track {
	outline: 3px solid var(--ember);
	outline-offset: 3px;
}

.slo-cookies__always {
	font-family: var(--font-mono);
	font-size: 11px;
	font-weight: 500;
	letter-spacing: .1em;
	text-transform: uppercase;
	color: var(--soft);
}

.slo-cookies__actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px;
	margin-top: 20px;
}

.slo-cookies__btn {
	min-height: 48px;
	padding: 0 22px;
	border: 1px solid var(--line);
	border-radius: var(--r-pill);
	background: var(--surface);
	font: inherit;
	font-size: 15px;
	font-weight: 800;
	line-height: 1;
	color: var(--ink);
	cursor: pointer;
	transition: background-color .2s ease, border-color .2s ease;
}

.slo-cookies__btn:hover {
	border-color: var(--forest);
}

.slo-cookies__btn--save {
	border-color: var(--forest);
	background: var(--forest);
	color: #FFFFFF;
}

.slo-cookies__btn--save:hover {
	background: var(--ink);
}

.slo-cookies__btn--all {
	border-color: var(--saffron);
	background: var(--saffron);
}

.slo-cookies__btn--all:hover {
	border-color: var(--saffron-hover);
	background: var(--saffron-hover);
}

.slo-cookies .slo-cookies__status {
	margin: 14px 0 0;
	font-size: 15px;
	line-height: 1.5;
	font-weight: 700;
	color: var(--forest);
}

.slo-cookies__status:empty {
	display: none;
}

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

@media (max-width: 640px) {
	.elementor-widget.slo-legal-glance ul,
	.elementor-widget.slo-legal-doc .slo-legal-rights {
		grid-template-columns: minmax(0, 1fr);
	}

	.slo-cookies__row {
		flex-direction: column;
		gap: 14px;
	}

	body .slo-legal-switch a {
		padding: 0 14px;
		font-size: 14px;
	}
}

@media (prefers-reduced-motion: reduce) {
	body .slo-legal-switch a,
	body .slo-legal-toc__list a,
	.elementor-widget.slo-legal-help__link .elementor-button-text::after,
	.slo-cookies__track,
	.slo-cookies__track::after,
	.slo-cookies__btn {
		transition: none;
	}
}
