/* ==========================================================================
   Galleria De Rings: legal pages (Privacy Policy, Terms of Use,
   Jewellery Care), below the shared page banner.
   A sticky "On this page" list on the left (desktop), the text on the right
   in a comfortable reading width, and a "Questions?" card at the end.
   Highlighted [brackets] mark details still to be filled in.
   Navy #0B132A, white, warm off-white #F7F5F1. No gold, no ornaments.
   Markup: template-parts/legal/*.php. PHP: inc/legal-pages.php.
   ========================================================================== */

.legal {
	--legal-line: #e3e5ec;
	--legal-muted: #5c6070;

	color: var(--g-navy);
}

.legal__body {
	display: grid;
	grid-template-columns: 240px minmax(0, 1fr);
	gap: clamp(32px, 5vw, 80px);
	align-items: start;
	padding-block: clamp(48px, 6vw, 88px);
}

/* Without the contents list the text takes the full width */
.legal__aside[hidden] + .legal__article {
	grid-column: 1 / -1;
}

/* ---------- On this page ---------- */
.legal__aside {
	position: sticky;
	top: calc(var(--g-header-h, 134px) + 24px);
}

.legal-toc__title {
	margin: 0 0 14px;
	color: var(--legal-muted);
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.14em;
	text-transform: uppercase;
}

.legal-toc__list {
	margin: 0;
	padding: 0;
	border-left: 1px solid var(--legal-line);
	list-style: none;
	counter-reset: legal;
}

.legal-toc__list a {
	position: relative;
	display: block;
	margin-left: -1px;
	padding: 7px 0 7px 16px;
	border-left: 1.5px solid transparent;
	color: var(--legal-muted);
	font-size: 14px;
	line-height: 1.4;
	text-decoration: none;
	transition: color 0.2s ease, border-color 0.2s ease;
}

.legal-toc__list a:hover,
.legal-toc__list a:focus-visible,
.legal-toc__list a[aria-current="true"] {
	border-left-color: var(--g-navy);
	color: var(--g-navy);
}

.legal-toc__list a[aria-current="true"] {
	font-weight: 600;
}

/* ---------- Text ---------- */
.legal__article {
	max-width: 760px;
	min-width: 0;
}

.legal__updated {
	margin: 0 0 20px;
	color: var(--legal-muted);
	font-size: 13px;
	letter-spacing: 0.04em;
}

.legal__admin {
	margin: 0 0 28px;
	padding: 14px 16px;
	border: 1px dashed rgba(11, 19, 42, 0.25);
	border-radius: 10px;
	background: var(--g-cream);
	color: var(--legal-muted);
	font-size: 14px;
	line-height: 1.55;
}

.legal__content {
	color: var(--legal-muted);
	font-size: 16.5px;
	line-height: 1.75;
}

.legal__content > :first-child {
	margin-top: 0;
}

.legal__content .legal-lead {
	margin: 0 0 8px;
	color: var(--g-navy);
	font-size: 18px;
	line-height: 1.7;
}

.legal__content h2 {
	margin: 48px 0 14px;
	padding-top: 24px;
	border-top: 1px solid var(--legal-line);
	color: var(--g-navy);
	font-size: clamp(24px, 2.2vw, 30px);
	line-height: 1.2;
	scroll-margin-top: calc(var(--g-header-h, 134px) + 24px);
}

.legal__content h3 {
	margin: 26px 0 8px;
	color: var(--g-navy);
	font-family: var(--g-font-body);
	font-size: 17px;
	font-weight: 600;
	line-height: 1.4;
}

.legal__content p {
	margin: 0 0 1em;
}

.legal__content ul,
.legal__content ol {
	margin: 0 0 1.2em;
	padding-left: 1.3em;
}

.legal__content li {
	margin-bottom: 0.45em;
	padding-left: 0.2em;
}

.legal__content li::marker {
	color: var(--g-navy);
}

.legal__content strong {
	color: var(--g-navy);
	font-weight: 600;
}

.legal__content a {
	color: var(--g-navy);
	text-decoration: underline;
	text-decoration-color: rgba(11, 19, 42, 0.35);
	text-underline-offset: 3px;
}

.legal__content a:hover {
	text-decoration-color: currentColor;
}

/* Key points box */
.legal__content .legal-box {
	margin: 24px 0;
	padding: 20px 22px;
	border-radius: 14px;
	background: var(--g-cream);
}

.legal__content .legal-box p:last-child,
.legal__content .legal-box ul:last-child {
	margin-bottom: 0;
}

/* Contact block (address, officer …) */
.legal__content .legal-contact {
	margin: 16px 0 0;
	padding: 18px 20px;
	border: 1px solid var(--legal-line);
	border-radius: 12px;
	font-style: normal;
	line-height: 1.7;
}

/* Details still to fill in */
.legal-fill {
	padding: 0 4px;
	border-radius: 4px;
	background: rgba(11, 19, 42, 0.07);
	color: var(--g-navy);
	font-weight: 600;
	box-decoration-break: clone;
}

/* ---------- Questions? ---------- */
.legal-help {
	margin-top: 56px;
	padding: clamp(24px, 3vw, 36px);
	border-radius: 16px;
	background: radial-gradient(circle at 50% 0%, #1c2847 0%, #0b132a 75%);
	color: var(--g-white);
}

.legal-help__title {
	margin: 0;
	color: var(--g-white);
	font-size: clamp(24px, 2.2vw, 30px);
}

.legal-help__text {
	margin: 8px 0 0;
	color: rgba(255, 255, 255, 0.78);
	font-size: 15.5px;
}

.legal-help__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin-top: 20px;
}

.legal-help__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	min-height: 48px;
	padding: 0 24px;
	border: 1px solid rgba(255, 255, 255, 0.55);
	border-radius: 999px;
	color: var(--g-white);
	font-size: 13.5px;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-decoration: none;
	text-transform: uppercase;
	transition: background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

.legal-help__btn .icon {
	width: 18px;
	height: 18px;
}

.legal-help__btn:hover,
.legal-help__btn:focus-visible {
	border-color: var(--g-white);
	background: var(--g-white);
	color: var(--g-navy);
}

.legal-help__btn--solid {
	border-color: var(--g-white);
	background: var(--g-white);
	color: var(--g-navy);
}

.legal-help__btn--solid:hover,
.legal-help__btn--solid:focus-visible {
	background: transparent;
	color: var(--g-white);
}

.legal-help__btn:focus-visible {
	outline: 2px solid var(--g-white);
	outline-offset: 3px;
}

/* ---------- Tablet and phones ---------- */
@media (max-width: 900px) {
	.legal__body {
		grid-template-columns: minmax(0, 1fr);
		gap: 28px;
	}

	/* Contents list becomes a box above the text */
	.legal__aside {
		position: static;
		padding: 18px 20px;
		border-radius: 14px;
		background: var(--g-cream);
	}

	.legal-toc__list {
		border-left: 0;
		columns: 2;
		column-gap: 24px;
	}

	.legal-toc__list a {
		padding: 6px 0;
		border-left: 0;
	}
}

@media (max-width: 560px) {
	.legal-toc__list {
		columns: 1;
	}

	.legal__content {
		font-size: 16px;
	}

	.legal-help__actions .legal-help__btn {
		flex: 1 1 100%;
	}
}

@media (prefers-reduced-motion: reduce) {
	.legal-toc__list a,
	.legal-help__btn {
		transition: none;
	}
}
