/* ==========================================================================
   Legal / info pages (1378–1383): one shared "document" layout. Built by server/build-legal.php.
   Scoped under .sx-legal (+ .sx-legal--terms / --privacy / --data / --cookies / --delivery / --returns).
   Sections: compact dark header · body grid (sticky TOC + related docs | document) · contact block.
   ========================================================================== */

.sx-legal {
	--lg-measure: 760px;
	--lg-hang: 62px;
	--lg-top: 40px;
}
.sx-legal .sx-lg-sec[id],
.sx-legal .sx-lg-part { scroll-margin-top: 24px; }

/* ---------------------------------------------------------------- header */
.sx-legal .sx-lg-hero {
	padding-top: clamp(44px, 5.5vw, 84px);
	padding-bottom: clamp(40px, 4.5vw, 64px);
	background: radial-gradient(120% 140% at 100% 0%, #262626 0%, var(--sx-dark) 55%);
}
.sx-legal .sx-lg-hero::after {
	content: '';
	position: absolute;
	left: 0;
	bottom: 0;
	width: clamp(120px, 22vw, 340px);
	height: 6px;
	background: var(--sx-red);
}
.sx-legal .sx-lg-hero .sx-eyebrow { margin-bottom: 4px; }
.sx-legal .sx-lg-title .elementor-heading-title {
	font-size: clamp(36px, 4.6vw, 66px);
	line-height: 1;
	max-width: 18ch;
	margin-top: 14px;
	text-wrap: balance;
}
.sx-legal .sx-lg-lead { margin-top: 20px; }
.sx-legal .sx-lg-hero .sx-btns { margin-top: 28px; }
.sx-legal .sx-lg-lead p { max-width: 620px; }
.sx-legal .sx-lg-meta {
	display: flex !important;
	flex-direction: row;
	flex-wrap: wrap;
	gap: 10px;
	margin-top: 30px;
}
.sx-legal .sx-lg-meta > .e-con, .sx-legal .sx-lg-meta > .elementor-widget { width: auto; --width: auto; }
.sx-legal .sx-lg-meta__item .elementor-heading-title {
	display: inline-flex;
	align-items: center;
	height: 32px;
	margin: 0;
	padding: 0 14px;
	border: 1px solid rgba(255, 255, 255, .2);
	font-size: 12px;
	font-weight: 700;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: rgba(255, 255, 255, .78);
}

/* ---------------------------------------------------------------- body grid */
.sx-legal .sx-lg-body { padding-top: clamp(48px, 6vw, 88px); }
.sx-legal .sx-lg-grid {
	display: grid !important;
	grid-template-columns: 300px minmax(0, var(--lg-measure));
	gap: clamp(40px, 6vw, 112px);
	align-items: start;
	justify-content: start;
}
.sx-legal .sx-lg-aside { position: sticky; top: var(--lg-top); align-self: start; }
.sx-legal .sx-lg-doc { display: flex; flex-direction: column; min-width: 0; }

/* ---------------------------------------------------------------- TOC + related docs (HTML widget) */
.sx-legal .sx-lg-toc { border-top: 3px solid var(--sx-ink); }
.sx-legal .sx-lg-toc summary {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 16px 0 12px;
	list-style: none;
	cursor: default;
	font-size: 12px;
	font-weight: 800;
	letter-spacing: .16em;
	text-transform: uppercase;
	color: var(--sx-ink);
}
.sx-legal .sx-lg-toc summary::-webkit-details-marker { display: none; }
.sx-legal .sx-lg-toc summary em { font-style: normal; font-weight: 700; color: var(--sx-ink-3); letter-spacing: .04em; }
.sx-legal .sx-lg-toc nav {
	max-height: calc(100vh - var(--lg-top) - 370px);
	position: relative;
	overflow-y: auto;
	scrollbar-width: thin;
	margin-right: -8px;
	padding-right: 8px;
}
.sx-legal .sx-lg-toc__list { list-style: none; margin: 0; padding: 0; counter-reset: none; }
.sx-legal .sx-lg-toc__list li { margin: 0; }
.sx-legal .sx-lg-toc__list li.is-part {
	margin: 14px 0 4px;
	font-size: 11px;
	font-weight: 800;
	letter-spacing: .16em;
	text-transform: uppercase;
	color: var(--sx-red);
}
.sx-legal .sx-lg-toc__list li.is-part:first-child { margin-top: 0; }
.sx-legal .sx-lg-toc__list a {
	position: relative;
	display: flex;
	gap: 10px;
	padding: 7px 0 7px 14px;
	font-size: 13.5px;
	line-height: 1.4;
	font-weight: 500;
	color: var(--sx-ink-2);
	transition: color .2s;
}
.sx-legal .sx-lg-toc__list a::before {
	content: '';
	position: absolute;
	left: 0;
	top: 8px;
	bottom: 8px;
	width: 2px;
	background: var(--sx-line);
	transition: background .2s;
}
.sx-legal .sx-lg-toc__list a b { flex: none; min-width: 2.1em; font-weight: 800; color: var(--sx-ink); font-variant-numeric: tabular-nums; }
.sx-legal .sx-lg-toc__list a:hover { color: var(--sx-ink); }
.sx-legal .sx-lg-toc__list a:hover::before { background: var(--sx-ink); }
.sx-legal .sx-lg-toc__list a.is-on { color: var(--sx-ink); font-weight: 700; }
.sx-legal .sx-lg-toc__list a.is-on::before { background: var(--sx-red); }
.sx-legal .sx-lg-toc__list a.is-on b { color: var(--sx-red); }

.sx-legal .sx-lg-docs { margin-top: 28px; padding-top: 18px; border-top: 1px solid var(--sx-line); }
.sx-legal .sx-lg-docs__title { margin: 0 0 8px; font-size: 11px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; color: var(--sx-ink-3); }
.sx-legal .sx-lg-docs ul { list-style: none; margin: 0; padding: 0; }
.sx-legal .sx-lg-docs li { margin: 0; }
.sx-legal .sx-lg-docs a { display: block; padding: 4px 0; font-size: 13px; font-weight: 600; color: var(--sx-ink-2); transition: color .2s; }
.sx-legal .sx-lg-docs a:hover { color: var(--sx-red); }
.sx-legal .sx-lg-docs a[aria-current] { color: var(--sx-ink); font-weight: 800; }
.sx-legal .sx-lg-docs a[aria-current]::before { content: '› '; color: var(--sx-red); }
.sx-legal .sx-lg-docs a.is-pdf::after { content: ' ↓'; color: var(--sx-red); }
.sx-legal .sx-lg-print {
	margin-top: 16px;
	padding: 0;
	border: 0;
	background: none;
	font: 800 12px 'Montserrat', sans-serif;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: var(--sx-ink);
	cursor: pointer;
	border-bottom: 2px solid currentColor;
	transition: color .2s;
}
.sx-legal .sx-lg-print:hover { color: var(--sx-red); }

/* ---------------------------------------------------------------- document type */
.sx-legal .sx-lg-sec { padding: 40px 0 44px; border-top: 1px solid var(--sx-line); }
.sx-legal .sx-lg-doc > .sx-lg-sec:first-child,
.sx-legal .sx-lg-part + .sx-lg-sec,
.sx-legal .sx-lg-intro + .sx-lg-sec { border-top: 0; padding-top: 8px; }
.sx-legal .sx-lg-intro + .sx-lg-sec { border-top: 1px solid var(--sx-line); padding-top: 40px; }

.sx-legal .sx-lg-sec > .elementor-widget:not(.sx-lg-h),
.sx-legal .sx-lg-sec > .e-con,
.sx-legal .sx-lg-h:not(:has(.sx-lg-num)),
.sx-legal .sx-lg-intro {
	margin-left: var(--lg-hang);
	--container-widget-width: auto;
	--width: auto;
	width: auto;
	max-width: calc(100% - var(--lg-hang));
	align-self: stretch;
}
.sx-legal .sx-lg-h .elementor-heading-title {
	display: flex;
	gap: 0;
	margin: 0 0 22px;
	font-size: clamp(21px, 1.8vw, 27px);
	line-height: 1.22;
	font-weight: 800;
	letter-spacing: -.015em;
	color: var(--sx-ink);
}
.sx-legal .sx-lg-num {
	flex: none;
	min-width: var(--lg-hang);
	color: var(--sx-red);
	font-weight: 900;
	font-variant-numeric: tabular-nums;
}
.sx-legal .sx-lg-source p { margin: -10px 0 22px; font-size: 13px; line-height: 1.5; color: var(--sx-ink-3); }
.sx-legal .sx-lg-source a { color: var(--sx-ink); font-weight: 700; border-bottom: 1px solid var(--sx-red); }

.sx-legal .sx-lg-text { font-size: 16px; line-height: 1.75; color: var(--sx-ink-2); }
.sx-legal .sx-lg-text p { margin: 0 0 14px; font-size: 16px; line-height: 1.75; color: var(--sx-ink-2); overflow-wrap: anywhere; }
.sx-legal .sx-lg-text p:last-child { margin-bottom: 0; }
.sx-legal .sx-lg-text strong { color: var(--sx-ink); font-weight: 700; }
.sx-legal .sx-lg-text a { color: var(--sx-ink); font-weight: 600; background: linear-gradient(var(--sx-red), var(--sx-red)) 0 100% / 100% 1px no-repeat; transition: color .2s; overflow-wrap: anywhere; }
.sx-legal .sx-lg-text a:hover { color: var(--sx-red); }

/* Numbered clauses: the number hangs in the margin, text lines up. */
.sx-legal .sx-lg-text p.sx-lg-clause { position: relative; }
.sx-legal .sx-lg-n {
	position: absolute;
	left: calc(var(--lg-hang) * -1);
	top: 0;
	font-weight: 800;
	color: var(--sx-ink);
	font-variant-numeric: tabular-nums;
}
/* Lettered points ("а) …", "(ii) …"): marker text hangs, indented under the clause text. */
.sx-legal .sx-lg-text ul.sx-lg-marks { list-style: none; margin: -4px 0 16px; padding: 0; }
.sx-legal .sx-lg-text ul.sx-lg-marks li { margin: 0 0 8px; padding-left: 1.8em; text-indent: -1.8em; line-height: 1.7; }
.sx-legal .sx-lg-text ul:not(.sx-lg-marks):not(.sx-lg-prices),
.sx-legal .sx-lg-text ol { margin: 0 0 16px; padding-left: 1.4em; }
.sx-legal .sx-lg-text ul:not(.sx-lg-marks):not(.sx-lg-prices) li,
.sx-legal .sx-lg-text ol li { margin: 0 0 8px; padding-left: .3em; }
.sx-legal .sx-lg-text ul:not(.sx-lg-marks):not(.sx-lg-prices) li::marker { color: var(--sx-red); }
.sx-legal .sx-lg-text ol li::marker { color: var(--sx-ink); font-weight: 800; }

.sx-legal .sx-lg-intro { padding-bottom: 36px; }
.sx-legal .sx-lg-intro p:first-child { font-size: 17px; }

/* Delivery prices: a small ruled list. */
.sx-legal .sx-lg-text ul.sx-lg-prices { list-style: none; margin: 4px 0 22px; padding: 0; border-top: 1px solid var(--sx-line); }
.sx-legal .sx-lg-text ul.sx-lg-prices li {
	position: relative;
	margin: 0;
	padding: 14px 0 14px 30px;
	border-bottom: 1px solid var(--sx-line);
	font-weight: 700;
	color: var(--sx-ink);
}
.sx-legal .sx-lg-text ul.sx-lg-prices li::before {
	content: '';
	position: absolute;
	left: 0;
	top: 50%;
	width: 14px;
	height: 10px;
	margin-top: -5px;
	background: var(--sx-red);
	clip-path: polygon(0 0, 45% 0, 100% 50%, 45% 100%, 0 100%, 55% 50%);
}

/* Tables (rights table in the privacy policy). */
.sx-legal .sx-lg-table { margin: 8px 0 20px; overflow-x: auto; }
.sx-legal .sx-lg-table table { width: 100%; border-collapse: collapse; margin: 0; font-size: 15px; }
.sx-legal .sx-lg-table th,
.sx-legal .sx-lg-table td { padding: 16px 18px; border: 0; border-bottom: 1px solid var(--sx-line); vertical-align: top; text-align: left; }
.sx-legal .sx-lg-table th { background: var(--sx-ink); color: #fff; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; }
.sx-legal .sx-lg-table th p, .sx-legal .sx-lg-table th strong { margin: 0; color: #fff; font-size: 11px; line-height: 1.4; font-weight: 800; }
.sx-legal .sx-lg-table td:first-child { width: 30%; background: var(--sx-soft); }
.sx-legal .sx-lg-table td p { font-size: 15px; line-height: 1.65; margin-bottom: 10px; }
.sx-legal .sx-lg-table td ul.sx-lg-marks { padding-left: 0; }

/* Part dividers (Политика за защита на личните данни: rights + declaration). */
.sx-legal .sx-lg-part { padding: 28px 0 26px; }
.sx-legal .sx-lg-doc > .sx-lg-part:first-child { padding-top: 0; }
.sx-legal .sx-lg-part:not(:first-child) { margin-top: 24px; border-top: 3px solid var(--sx-ink); }
.sx-legal .sx-lg-part__label .elementor-heading-title { margin: 0 0 8px; font-size: 12px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; color: var(--sx-red); }
.sx-legal .sx-lg-part__title .elementor-heading-title { margin: 0; font-size: clamp(26px, 2.6vw, 38px); line-height: 1.1; font-weight: 900; letter-spacing: -.025em; color: var(--sx-ink); }

/* Download card (Връщане на стоки). */
.sx-legal .sx-lg-file {
	display: flex !important;
	flex-direction: row;
	align-items: center;
	gap: 20px;
	padding: 22px 24px;
	background: var(--sx-soft);
	border-left: 4px solid var(--sx-red);
}
.sx-legal .sx-lg-file > .e-con, .sx-legal .sx-lg-file > .elementor-widget { width: auto; --width: auto; }
.sx-legal .sx-lg-file__badge .elementor-heading-title {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 52px;
	height: 64px;
	margin: 0;
	background: #fff;
	border: 1px solid var(--sx-line);
	font-size: 12px;
	font-weight: 900;
	letter-spacing: .08em;
	color: var(--sx-red);
	clip-path: polygon(0 0, 72% 0, 100% 22%, 100% 100%, 0 100%);
}
.sx-legal .sx-lg-file__badge, .sx-legal .sx-lg-file > .sx-btn { flex: none; }
.sx-legal .sx-lg-file__link { flex: 1 1 auto; min-width: 0; }
.sx-legal .sx-lg-file__link .elementor-heading-title { margin: 0; font-size: 16px; line-height: 1.4; font-weight: 700; }
.sx-legal .sx-lg-file__link .elementor-heading-title a { color: var(--sx-ink); }
.sx-legal .sx-lg-file__link .elementor-heading-title a:hover { color: var(--sx-red); }
.sx-legal .sx-lg-file .sx-btn .elementor-button { white-space: nowrap; }

/* ---------------------------------------------------------------- contact block */
.sx-legal .sx-lg-contact {
	display: flex !important;
	flex-direction: row;
	flex-wrap: wrap;
	align-items: flex-end;
	justify-content: space-between;
	gap: 24px 40px;
	margin-top: 24px;
	padding: clamp(28px, 3vw, 44px);
	background: var(--sx-dark);
	color: #fff;
	position: relative;
	overflow: hidden;
}
.sx-legal .sx-lg-contact::before {
	content: '';
	position: absolute;
	/* Elementor's .e-con::before sets inset-inline-start / inset-block-start: reset them, or the texture lands top-left. */
	inset: -20px -30px auto auto;
	inset-inline-start: auto;
	inset-block-start: -20px;
	width: 260px;
	height: 200px;
	-webkit-mask-image: linear-gradient(225deg, #000 30%, transparent 85%);
	mask-image: linear-gradient(225deg, #000 30%, transparent 85%);
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='88' height='72' viewBox='0 0 88 72'%3E%3Cpath d='M8 8h16l14 14-14 14H8l14-14z' fill='%23ffffff' fill-opacity='.06'/%3E%3Cpath d='M52 44h16l14 14-14 14H52l14-14z' fill='%23ffffff' fill-opacity='.045'/%3E%3C/svg%3E");
	pointer-events: none;
}
.sx-legal .sx-lg-contact > .e-con { width: auto; --width: auto; position: relative; }
.sx-legal .sx-lg-contact__text { flex: 1 1 360px; display: flex; flex-direction: column; }
.sx-legal .sx-lg-contact .sx-eyebrow .elementor-heading-title { color: rgba(255, 255, 255, .7); margin-bottom: 12px; }
.sx-legal .sx-lg-contact__title .elementor-heading-title { margin: 0 0 16px; font-size: clamp(22px, 2vw, 30px); line-height: 1.15; font-weight: 900; letter-spacing: -.02em; color: #fff; }
.sx-legal .sx-lg-contact__lines p { margin: 0 0 8px; font-size: 14.5px; line-height: 1.6; color: rgba(255, 255, 255, .72); }
.sx-legal .sx-lg-contact__lines p:last-child { margin-bottom: 0; }
.sx-legal .sx-lg-contact__lines strong { color: #fff; }
.sx-legal .sx-lg-contact__lines a { color: #fff; font-weight: 700; border-bottom: 1px solid rgba(255, 0, 0, .9); }
.sx-legal .sx-lg-contact__lines a:hover { color: var(--sx-red); }
.sx-legal .sx-lg-contact .sx-btn--dark .elementor-button { background: #fff; border-color: #fff; color: var(--sx-ink); }
.sx-legal .sx-lg-contact .sx-btn--dark .elementor-button:hover { background: var(--sx-red); border-color: var(--sx-red); color: #fff; }

/* ---------------------------------------------------------------- tablet: TOC moves on top, collapsible */
@media (max-width: 1024px) {
	.sx-legal .sx-lg-grid { grid-template-columns: minmax(0, 1fr); gap: 28px; max-width: var(--lg-measure); }
	.sx-legal .sx-lg-aside { position: static; }
	.sx-legal .sx-lg-toc { border: 1px solid var(--sx-line); border-top: 3px solid var(--sx-ink); background: #fff; }
	.sx-legal .sx-lg-toc summary { padding: 16px 18px; cursor: pointer; }
	.sx-legal .sx-lg-toc summary em::after {
		content: '';
		display: inline-block;
		width: 8px;
		height: 8px;
		margin-left: 12px;
		border-right: 2px solid var(--sx-ink);
		border-bottom: 2px solid var(--sx-ink);
		transform: translateY(-3px) rotate(45deg);
		transition: transform .25s var(--sx-ease);
	}
	.sx-legal .sx-lg-toc[open] summary em::after { transform: translateY(1px) rotate(-135deg); }
	.sx-legal .sx-lg-toc nav { max-height: none; min-height: 0; margin: 0; padding: 0 18px 14px; }
	.sx-legal .sx-lg-toc__list a { padding-top: 10px; padding-bottom: 10px; font-size: 14px; }
	.sx-legal .sx-lg-toc__list a::before { top: 10px; bottom: 10px; }
	.sx-legal .sx-lg-docs { display: none; }
}

/* ---------------------------------------------------------------- mobile */
@media (max-width: 767px) {
	.sx-legal { --lg-hang: 0px; --lg-top: 76px; }
	.sx-legal .sx-lg-n { position: static; margin-right: 4px; }
	.sx-legal .sx-lg-title .elementor-heading-title { font-size: clamp(32px, 9vw, 42px); }
	.sx-legal .sx-lg-meta { margin-top: 22px; }
	.sx-legal .sx-lg-hero .sx-btns { margin-top: 22px; }
	.sx-legal .sx-lg-meta__item .elementor-heading-title { height: 28px; padding: 0 10px; font-size: 11px; }
	.sx-legal .sx-lg-sec { padding: 30px 0 32px; }
	.sx-legal .sx-lg-h .elementor-heading-title { gap: 10px; font-size: 20px; margin-bottom: 16px; }
	.sx-legal .sx-lg-num { min-width: 0; }
	.sx-legal .sx-lg-text p { font-size: 15.5px; line-height: 1.7; }
	.sx-legal .sx-lg-table thead { display: none; }
	.sx-legal .sx-lg-table tr { display: block; border-bottom: 1px solid var(--sx-line); }
	.sx-legal .sx-lg-table td { display: block; width: auto !important; padding: 14px 0; border: 0; }
	.sx-legal .sx-lg-table td:first-child { padding: 12px 14px; }
	.sx-legal .sx-lg-file { flex-wrap: wrap; padding: 18px; }
	.sx-legal .sx-lg-file__link { flex: 1 1 60%; }
	.sx-legal .sx-lg-file > .sx-btn { flex: 1 1 100%; }
	.sx-legal .sx-lg-file .sx-btn .elementor-button { width: 100%; justify-content: center; }
	.sx-legal .sx-lg-contact { padding: 26px 22px; }
	.sx-legal .sx-lg-contact__btns, .sx-legal .sx-lg-contact > .e-con.sx-btns { flex: 1 1 100%; width: 100%; }
}

/* ---------------------------------------------------------------- print */
@media print {
	.sx-legal .sx-lg-hero { background: none !important; color: #000; padding: 0 0 16px; }
	.sx-legal .sx-lg-hero .elementor-heading-title, .sx-legal .sx-lg-hero p { color: #000 !important; }
	.sx-legal .sx-lg-aside, .sx-legal .sx-lg-contact .sx-btns, .sx-legal .sx-chevrons::before, .sx-legal .sx-lg-hero::after { display: none !important; }
	.sx-legal .sx-lg-grid { display: block !important; }
	.sx-legal .sx-lg-sec { break-inside: auto; padding: 16px 0; }
	.sx-legal .sx-lg-contact { background: none; color: #000; border-top: 2px solid #000; }
	.sx-legal .sx-lg-contact * { color: #000 !important; }
}
