/* ==========================================================================
   PW Legal Pages — EG Assist legal template (Figma: Privacy Policy V2.0)
   Tokens map 1:1 to the Figma variables. Override any of them on a parent
   (e.g. the Elementor container) if the kit globals change.
   ========================================================================== */

:root {
	--pwl-font: "Red Hat Display", system-ui, sans-serif;
	--pwl-blue: #012f6b;          /* primitive-deep-blue-500 */
	--pwl-text: #121820;          /* eg-color-text-primary */
	--pwl-text-2: #60646a;        /* eg-color-text-secondary */
	--pwl-border: #d7dddd;        /* primitive-border */
	--pwl-mint: #83c5be;          /* assist-mint-500 */
	--pwl-mint-50: #f3f9f9;       /* assist-mint-50 */
	--pwl-sky: #eaf4fe;
	--pwl-sky-50: #f5fafe;
	--pwl-white: #fff;
	--pwl-radius-sm: 8px;
	--pwl-radius-md: 12px;
	--pwl-radius-lg: 20px;
	--pwl-radius-xl: 28px;
	--pwl-offset: 120px;          /* sticky header height, used for scrolling */
}

.pw-legal-sr-only {
	position: absolute !important;
	width: 1px; height: 1px;
	padding: 0; margin: -1px;
	overflow: hidden; clip: rect(0 0 0 0);
	white-space: nowrap; border: 0;
}

.pw-legal-highlights,
.pw-legal-nav,
.pw-legal-sections {
	font-family: var(--pwl-font);
	-webkit-font-smoothing: antialiased;
}

.pw-legal-highlights ul,
.pw-legal-highlights,
.pw-legal-nav__list,
.pw-legal-terms,
.pw-legal-checks,
.pw-legal-chips {
	list-style: none;
	margin: 0;
	padding: 0;
}

/* --------------------------------------------------------------------------
   Hero helpers (native Elementor widgets carry the base typography)
   -------------------------------------------------------------------------- */
.pw-legal-hero__title-sub {
	display: block;
	margin-top: 0.29em;           /* 22px @ 75px */
	font-size: 0.75em;            /* 56px @ 75px */
	text-transform: none;
	letter-spacing: 0;
}
.pw-legal-hero__title-sub:empty { display: none; }

/* --------------------------------------------------------------------------
   [pw_legal_highlights]
   -------------------------------------------------------------------------- */
.pw-legal-highlights {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr));
	gap: 20px;
}

.pw-legal-highlight {
	display: flex;
	align-items: center;
	gap: 24px;
	min-height: 145px;
	margin: 0;
	padding: 24px;
	background: var(--pwl-white);
	border: 1px solid var(--pwl-border);
	border-radius: 30px;
}

.pw-legal-highlight__icon {
	position: relative;
	flex: 0 0 95px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 95px;
	height: 95px;
	border-radius: 18px;
	background: var(--pwl-blue);
	color: var(--pwl-white);
}
.pw-legal-highlight__icon--mint {
	background: var(--pwl-mint);
	color: var(--pwl-blue);
}
.pw-legal-highlight__icon > svg,
.pw-legal-highlight__icon > img {
	width: 56px;
	height: 52px;
	fill: currentColor;
}
.pw-legal-highlight__icon > i {
	font-size: 48px;
	line-height: 1;
}

.pw-legal-highlight__badge {
	position: absolute;
	top: -10px;
	left: -10px;
	width: 26px;
	height: 33px;
	line-height: 0;
}
.pw-legal-highlight__badge svg { width: 100%; height: 100%; }

.pw-legal-highlight__texts {
	display: flex;
	flex-direction: column;
	gap: 14px;
	min-width: 0;
}
.pw-legal-highlight__title {
	font-size: 22px;
	font-weight: 700;
	line-height: 1.2;
	color: var(--pwl-text);
}
.pw-legal-highlight__text {
	font-size: 20px;
	line-height: 1.2;
	color: var(--pwl-text-2);
}

/* 4 cards: smaller type (Figma T&C) */
.pw-legal-highlights--compact .pw-legal-highlight__texts { gap: 12px; }
.pw-legal-highlights--compact .pw-legal-highlight__title { font-size: 18px; }
.pw-legal-highlights--compact .pw-legal-highlight__text { font-size: 16px; }
.pw-legal-highlights--compact .pw-legal-highlight { min-height: 146px; }

/* --------------------------------------------------------------------------
   Hero background image: soft fade into the page colour (Figma "Hero Background")
   -------------------------------------------------------------------------- */
.pw-legal-hero { position: relative; }
.pw-legal-hero::after {
	content: "";
	position: absolute;
	left: 0; right: 0; bottom: 0;
	height: 110px;
	background: linear-gradient(to bottom, rgba(250, 250, 250, 0), #fafafa);
	pointer-events: none;
	z-index: 0;
}
.pw-legal-hero > .e-con-inner,
.pw-legal-hero > .elementor-element { position: relative; z-index: 1; }

/* --------------------------------------------------------------------------
   [pw_legal_help]
   -------------------------------------------------------------------------- */
.pw-legal-help {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 24px;
	padding: 24px;
	font-family: var(--pwl-font);
	background: var(--pwl-sky-50);
	border: 1px solid var(--pwl-border);
	border-radius: var(--pwl-radius-xl);
}
.pw-legal-help__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 70px;
	height: 70px;
	border-radius: var(--pwl-radius-lg);
	background: var(--pwl-sky);
	color: var(--pwl-blue);
	font-size: 32px;
	line-height: 1;
}
.pw-legal-help__icon--mint { background: #e5f6f3; color: #168d86; }
.pw-legal-help__icon svg { width: 32px; height: 32px; fill: currentColor; }
.pw-legal-help__title {
	margin: 0;
	font-family: var(--pwl-font);
	font-size: 22px;
	font-weight: 700;
	line-height: 1.2;
	color: var(--pwl-blue);
}
.pw-legal-help__text,
.pw-legal-help__text p {
	margin: 0;
	font-size: 20px;
	line-height: 1.2;
	color: var(--pwl-text-2);
}
.pw-legal-help__links {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 24px;
	margin: 0;
	padding: 0;
	list-style: none;
}
.pw-legal-help__links li { margin: 0; }
.pw-legal-help a.pw-legal-help__contact {
	display: inline-flex;
	align-items: center;
	gap: 16px;
	color: var(--pwl-blue);
	font-size: 20px;
	font-weight: 700;
	line-height: 1.2;
	text-decoration: none;
}
.pw-legal-help__contact .pwl { flex: 0 0 34px; font-size: 34px; }
.pw-legal-help__contact span {
	text-decoration: underline;
	text-underline-offset: 3px;
	word-break: break-word;
}
.pw-legal-help a.pw-legal-help__doc {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	padding-bottom: 8px;
	border-bottom: 2px solid var(--pwl-blue);
	color: var(--pwl-blue);
	font-size: 20px;
	font-weight: 700;
	line-height: 1.2;
	text-decoration: none;
}
.pw-legal-help a.pw-legal-help__doc svg { width: 22px; height: 14px; transition: transform .2s; }
.pw-legal-help a:hover { color: #168d86; }
.pw-legal-help a.pw-legal-help__doc:hover { border-color: #168d86; }
.pw-legal-help a.pw-legal-help__doc:hover svg { transform: translateX(3px); }

/* --------------------------------------------------------------------------
   [pw_legal_nav]
   -------------------------------------------------------------------------- */
.pw-legal-nav {
	display: flex;
	flex-direction: column;
	gap: 30px;
}

.pw-legal-search {
	position: relative;
	display: flex;
	align-items: center;
	height: 62px;
	background: var(--pwl-white);
	border: 2px solid var(--pwl-border);
	border-radius: var(--pwl-radius-lg);
	transition: border-color .2s;
}
.pw-legal-search:focus-within { border-color: var(--pwl-blue); }
.pw-legal-search__icon {
	position: absolute;
	left: 17px;
	top: 50%;
	width: 28px;
	height: 28px;
	transform: translateY(-50%);
	color: var(--pwl-text-2);
	pointer-events: none;
	line-height: 0;
}
.pw-legal-search__input[type="search"] {
	width: 100%;
	height: 100%;
	margin: 0;
	padding: 0 16px 0 60px;
	border: 0 !important;
	border-radius: var(--pwl-radius-lg);
	background: transparent;
	box-shadow: none !important;
	outline: none;
	font-family: inherit;
	font-size: 18px;
	font-weight: 500;
	color: var(--pwl-text);
	-webkit-appearance: none;
	appearance: none;
}
.pw-legal-search__input::placeholder { color: var(--pwl-text-2); opacity: 1; }

.pw-legal-nav__toggle { display: none; }

.pw-legal-nav__list {
	display: flex;
	flex-direction: column;
	gap: 6px;
}
.pw-legal-nav__item[hidden] { display: none; }

.pw-legal-nav__link {
	display: flex;
	align-items: center;
	gap: 24px;
	min-height: 65px;
	padding: 9px 12px 9px 13px;
	border-left: 6px solid transparent;
	border-radius: var(--pwl-radius-md);
	color: var(--pwl-text);
	font-size: 18px;
	font-weight: 500;
	line-height: 1.2;
	text-decoration: none !important;
	transition: background-color .2s, color .2s, border-color .2s;
}
.pw-legal-nav__link:hover { background: var(--pwl-sky-50); color: var(--pwl-blue); }
.pw-legal-nav__link:focus-visible { outline: 2px solid var(--pwl-blue); outline-offset: 2px; }

.pw-legal-nav__num {
	flex: 0 0 46px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 46px;
	height: 46px;
	border-radius: var(--pwl-radius-sm);
	background: var(--pwl-sky);
	color: var(--pwl-text);
	font-size: 20px;
	font-weight: 700;
	font-variant-numeric: tabular-nums;
	transition: background-color .2s;
}

.pw-legal-nav__link.is-active {
	background: var(--pwl-sky);
	border-left-color: var(--pwl-blue);
	color: var(--pwl-blue);
	font-weight: 700;
}
.pw-legal-nav__link.is-active .pw-legal-nav__num { background: var(--pwl-white); }

.pw-legal-nav__empty {
	margin: 0;
	padding: 12px 19px;
	font-size: 18px;
	color: var(--pwl-text-2);
}

/* --------------------------------------------------------------------------
   [pw_legal_sections]
   -------------------------------------------------------------------------- */
.pw-legal-sections__scroller {
	display: flex;
	flex-direction: column;
	gap: 32px;
	padding: 48px 48px 48px 24px;
	outline: none;
}
.pw-legal-sections__scroller:focus-visible { box-shadow: inset 0 0 0 2px var(--pwl-blue); border-radius: var(--pwl-radius-xl); }

.pw-legal-sections__divider {
	width: 100%;
	height: 0;
	margin: 0;
	border: 0;
	border-top: 1px solid var(--pwl-border);
}

.pw-legal-section {
	display: flex;
	flex-direction: column;
	gap: 32px;
	scroll-margin-top: var(--pwl-offset);
}
.pw-legal-section[hidden] { display: none; }

.pw-legal-section__header {
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.pw-legal-section__title {
	margin: 0;
	font-family: var(--pwl-font);
	font-size: 36px;
	font-weight: 700;
	line-height: 1.2;
	letter-spacing: 0;
	text-transform: none;
	color: var(--pwl-blue);
	outline: none;
}

.pw-legal-section__intro,
.pw-legal-section__intro p {
	margin: 0;
	font-size: 20px;
	line-height: 1.2;
	color: var(--pwl-text-2);
}
.pw-legal-section__intro p + p { margin-top: 1.2em; }  /* Figma: one empty line between paragraphs */

.pw-legal-section__blocks {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 32px;
}
.pw-legal-section__blocks > * { max-width: 100%; }

.pw-legal-sections a:not(.pw-legal-nav__link) {
	color: var(--pwl-blue);
	text-decoration: underline;
	text-underline-offset: 2px;
}

/* Highlight box ("Your privacy rights") */
.pw-legal-section--highlight {
	gap: 24px;
	padding: 48px 24px;
	background: var(--pwl-mint-50);
	border: 1px solid var(--pwl-border);
	border-radius: var(--pwl-radius-xl);
}
.pw-legal-section--highlight .pw-legal-section__blocks { gap: 24px; }

/* Callout — variants: --info (sky) / --note (mint), --fit / --full */
.pw-legal-callout {
	display: inline-flex;
	align-items: center;
	gap: 12px;
	padding: 8px;
	background: var(--pwl-sky);
	border: 1px solid var(--pwl-border);
	border-radius: var(--pwl-radius-lg);
}
.pw-legal-callout--full {
	display: flex;
	width: 100%;
	padding: 16px;
}
.pw-legal-callout--note { background: #ebf8f4; }
.pw-legal-callout__icon {
	flex: 0 0 42px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 42px;
	height: 42px;
	border-radius: 13.5px;
	background: var(--pwl-white);
	color: var(--pwl-blue);
	font-size: 23px;
	line-height: 1;
}
.pw-legal-callout--note .pw-legal-callout__icon { background: var(--pwl-mint); }
.pw-legal-callout__icon svg { width: 23px; height: 23px; fill: currentColor; }
.pw-legal-callout__text { flex: 1 1 auto; min-width: 0; }
.pw-legal-callout__text,
.pw-legal-callout__text p {
	margin: 0;
	font-size: 20px;
	line-height: 1.2;
	color: var(--pwl-text-2);
}
.pw-legal-callout__text { padding-right: 8px; }
.pw-legal-callout__text p + p { margin-top: .6em; }

/* Paragraph block (same style as the section intro) */
.pw-legal-paragraph,
.pw-legal-paragraph p {
	margin: 0;
	font-size: 20px;
	line-height: 1.2;
	color: var(--pwl-text-2);
}
.pw-legal-paragraph p + p { margin-top: 1.2em; }

/* Term list (definitions, categories, steps) */
.pw-legal-terms {
	display: flex;
	flex-direction: column;
	gap: 24px;
}
.pw-legal-terms__item {
	margin: 0;
	font-size: 18px;
	line-height: 1.2;
	color: var(--pwl-text-2);
}
.pw-legal-terms__term {
	font-weight: 700;
	color: var(--pwl-blue);
}

/* Check list */
.pw-legal-checklist {
	display: flex;
	flex-direction: column;
	gap: 24px;
	width: 100%;
}
.pw-legal-checklist--indent { padding-left: 36px; }
.pw-legal-checklist__heading {
	margin: 0;
	font-family: var(--pwl-font);
	font-size: 20px;
	font-weight: 700;
	line-height: 1.2;
	color: var(--pwl-blue);
}
.pw-legal-checks {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 24px;
	width: 100%;
}
.pw-legal-checks--cols-2 {
	grid-template-columns: repeat(2, minmax(0, max-content));
	column-gap: 24px;
}
.pw-legal-checks--cols-2 .pw-legal-checks__item { min-width: 351px; max-width: 666px; }
.pw-legal-checks__item {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 0;
	font-size: 18px;
	line-height: 1.15;
	color: var(--pwl-text-2);
}
.pw-legal-checks__item > svg { flex: 0 0 17px; width: 17px; height: 20.7px; }
.pw-legal-checks__text strong { font-weight: 700; }

/* Contact line */
.pw-legal-contact {
	margin: 0;
	font-size: 20px;
	line-height: 1.35;
}
.pw-legal-contact__label { margin-right: 12px; font-weight: 800; color: var(--pwl-blue); }
.pw-legal-contact__details { color: var(--pwl-text-2); }

/* Chips (cookie categories) */
.pw-legal-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 16px 32px;
}
.pw-legal-chip {
	display: inline-flex;
	align-items: center;
	gap: 12px;
	margin: 0;
	padding: 8px 16px;
	background: var(--pwl-sky);
	border: 1px solid var(--pwl-border);
	border-radius: var(--pwl-radius-lg);
}
.pw-legal-chip__box {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 42px;
	height: 42px;
	border-radius: 13.5px;
	background: var(--pwl-white);
}
.pw-legal-chip__box svg { width: 21px; height: 25.6px; }
.pw-legal-chip__label {
	font-size: 20px;
	font-weight: 700;
	line-height: 1.2;
	color: var(--pwl-blue);
}

/* Rich text (legacy accordion content, closing notes) */
.pw-legal-richtext {
	font-size: 18px;
	line-height: 1.45;
	color: var(--pwl-text-2);
}
.pw-legal-richtext > :first-child { margin-top: 0; }
.pw-legal-richtext > :last-child { margin-bottom: 0; }
.pw-legal-richtext h2,
.pw-legal-richtext h3,
.pw-legal-richtext h4 {
	margin: 1.2em 0 .5em;
	font-family: var(--pwl-font);
	font-weight: 700;
	line-height: 1.2;
	color: var(--pwl-blue);
}
.pw-legal-richtext h3 { font-size: 24px; }
.pw-legal-richtext h4 { font-size: 20px; }
.pw-legal-richtext strong { color: var(--pwl-blue); }
.pw-legal-richtext ul,
.pw-legal-richtext ol { padding-left: 1.25em; }

.pw-legal-notes {
	padding-top: 32px;
	border-top: 1px solid var(--pwl-border);
}

/* Search matches */
mark.pw-legal-mark {
	padding: 0 .1em;
	border-radius: 3px;
	background: rgba(131, 197, 190, .45);
	color: inherit;
}

/* --------------------------------------------------------------------------
   Desktop layout: content card scrolls inside itself (Figma), its height is
   set by the sidebar. Needs the Elementor container class "pw-legal-content".
   -------------------------------------------------------------------------- */
@media (min-width: 1025px) {
	.pw-legal-content:has(.pw-legal-sections--panel) {
		position: relative;
		min-height: 640px;
	}
	.pw-legal-content:has(.pw-legal-sections--panel) > .elementor-element,
	.pw-legal-content:has(.pw-legal-sections--panel) > .e-con-inner > .elementor-element {
		position: absolute;
		inset: 0;
		width: 100%;
		max-width: none;
	}
	.pw-legal-content:has(.pw-legal-sections--panel) .elementor-widget-container,
	.pw-legal-content:has(.pw-legal-sections--panel) .elementor-shortcode {
		height: 100%;
	}
	.pw-legal-sections--panel { height: 100%; }
	.pw-legal-sections--panel .pw-legal-sections__scroller {
		height: 100%;
		overflow-y: auto;
		scroll-behavior: smooth;
	}

	/* Figma scrollbar: 16px pill, 12px from the edge, light grey */
	.pw-legal-sections--panel .pw-legal-sections__scroller::-webkit-scrollbar { width: 40px; }
	.pw-legal-sections--panel .pw-legal-sections__scroller::-webkit-scrollbar-track { margin: 40px 0; background: transparent; }
	.pw-legal-sections--panel .pw-legal-sections__scroller::-webkit-scrollbar-thumb {
		background: var(--pwl-border);
		background-clip: padding-box;
		border: 12px solid transparent;
		border-radius: 999px;
	}
	@supports (-moz-appearance: none) {
		.pw-legal-sections--panel .pw-legal-sections__scroller {
			scrollbar-width: auto;
			scrollbar-color: var(--pwl-border) transparent;
		}
	}

	/* "page" mode: sidebar follows the reader instead */
	.pw-legal-body:has(.pw-legal-sections--page) .pw-legal-sidebar {
		position: sticky;
		top: var(--pwl-offset);
		align-self: flex-start;
	}
}

@media (prefers-reduced-motion: reduce) {
	.pw-legal-sections__scroller { scroll-behavior: auto !important; }
	.pw-legal-nav__link, .pw-legal-search { transition: none; }
}

/* --------------------------------------------------------------------------
   Tablet / mobile
   -------------------------------------------------------------------------- */
@media (max-width: 1024px) {
	.pw-legal-nav { gap: 20px; }

	.pw-legal-nav.is-js .pw-legal-nav__toggle {
		display: flex;
		align-items: center;
		justify-content: space-between;
		width: 100%;
		min-height: 56px;
		margin: 0;
		padding: 12px 18px;
		background: var(--pwl-sky);
		border: 0;
		border-radius: var(--pwl-radius-md);
		color: var(--pwl-blue);
		font-family: inherit;
		font-size: 18px;
		font-weight: 700;
		line-height: 1.2;
		cursor: pointer;
	}
	.pw-legal-nav__toggle svg { transition: transform .2s; }
	.pw-legal-nav__toggle[aria-expanded="true"] svg { transform: rotate(180deg); }
	.pw-legal-nav__count { font-weight: 500; }
	.pw-legal-nav.is-js:not(.is-open) .pw-legal-nav__nav { display: none; }
	.pw-legal-nav.is-searching .pw-legal-nav__nav { display: block !important; }

	.pw-legal-sections__scroller { padding: 40px 24px; }
}

@media (max-width: 767px) {
	.pw-legal-highlight { gap: 16px; padding: 18px; min-height: 0; border-radius: 22px; }
	.pw-legal-highlight__icon { flex-basis: 72px; width: 72px; height: 72px; border-radius: 14px; }
	.pw-legal-highlight__icon > svg { width: 42px; height: 40px; }
	.pw-legal-highlight__title { font-size: 19px; }
	.pw-legal-highlight__text { font-size: 16px; }
	.pw-legal-highlight__texts { gap: 8px; }

	.pw-legal-nav__link { min-height: 56px; gap: 16px; font-size: 16px; }
	.pw-legal-nav__num { flex-basis: 40px; width: 40px; height: 40px; font-size: 17px; }

	.pw-legal-sections__scroller { gap: 24px; padding: 28px 18px; }
	.pw-legal-section { gap: 24px; }
	.pw-legal-section__header { gap: 12px; }
	.pw-legal-section__title { font-size: 26px; }
	.pw-legal-section__intro,
	.pw-legal-section__intro p,
	.pw-legal-callout__text,
	.pw-legal-callout__text p,
	.pw-legal-contact,
	.pw-legal-chip__label { font-size: 17px; }
	.pw-legal-terms,
	.pw-legal-checks { gap: 16px; }
	.pw-legal-terms__item,
	.pw-legal-checks__item,
	.pw-legal-richtext { font-size: 16px; }
	.pw-legal-checks__item { align-items: flex-start; }
	.pw-legal-checks__item > svg { margin-top: -2px; }
	.pw-legal-checks--cols-2 { grid-template-columns: minmax(0, 1fr); }
	.pw-legal-checks--cols-2 .pw-legal-checks__item { min-width: 0; }
	.pw-legal-callout { align-items: flex-start; }
	.pw-legal-chips { gap: 12px; }
	.pw-legal-chip { padding: 6px 12px 6px 6px; }
	.pw-legal-section--highlight { padding: 28px 18px; }
	.pw-legal-callout--full { padding: 12px; }
	.pw-legal-paragraph,
	.pw-legal-paragraph p,
	.pw-legal-help__text,
	.pw-legal-help__text p,
	.pw-legal-help a.pw-legal-help__contact,
	.pw-legal-help a.pw-legal-help__doc { font-size: 17px; }
	.pw-legal-checklist { gap: 16px; }
	.pw-legal-checklist--indent { padding-left: 0; }
	.pw-legal-checklist__heading { font-size: 18px; }
	.pw-legal-help { gap: 18px; padding: 20px; }
	.pw-legal-hero::after { height: 60px; }
}
