/**
 * Intelliguard Legal Document widget styles.
 *
 * Ported from src/pages/PrivacyPolicy.tsx, TermsConditions.tsx and
 * PatentsTrademarks.tsx. Selectors are scoped under `ig-legal` and reuse the
 * base brand tokens declared in assets/css/widgets.css. The tokens are also
 * declared on the `.ig-legal` wrapper here (the base stylesheet only exposes
 * them on its own widget wrappers) — this mirrors the base tokens without
 * redefining `:root`.
 */

.ig-legal {
	--ig-navy: hsl(225 70% 17%);
	--ig-navy-light: hsl(225 50% 30%);
	--ig-gold: hsl(38 91% 55%);
	--ig-gold-light: hsl(38 91% 70%);
	--ig-teal: hsl(174 60% 42%);
	--ig-teal-light: hsl(174 50% 60%);
	--ig-background: var(--ig-surface, hsl(0 0% 100%));
	--ig-foreground: var(--ig-ink, hsl(225 70% 17%));
	--ig-muted-foreground: hsl(220 10% 46%);
	--ig-border: hsl(220 20% 90%);
	--ig-card: hsl(0 0% 100%);
	--ig-radius: 0.75rem;

	font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
	box-sizing: border-box;
}

.ig-legal * {
	box-sizing: border-box;
}

/* Narrow reading container — matches Tailwind max-w-4xl (56rem) + 2rem gutters. */
.ig-legal__container {
	width: 100%;
	max-width: 56rem;
	margin-left: auto;
	margin-right: auto;
	padding-left: 2rem;
	padding-right: 2rem;
}

/* =========================================================================
   Hero (navy diagonal gradient + soft radial accent)
   ========================================================================= */
.ig-legal__hero {
	position: relative;
	overflow: hidden;
	background: linear-gradient(
		135deg,
		var(--ig-navy) 0%,
		var(--ig-navy) 60%,
		hsl(225 70% 15%) 100%
	);
	color: #fff;
	padding-top: 5rem;
	padding-bottom: 5rem;
}

.ig-legal__hero-bg {
	position: absolute;
	inset: 0;
	opacity: 0.1;
	background: radial-gradient(circle at 30% 20%, var(--ig-gold) 0%, transparent 50%);
	pointer-events: none;
}

.ig-legal__hero-inner {
	position: relative;
	z-index: 1;
}

.ig-legal__eyebrow {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	font-size: 0.875rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.1em;
	color: var(--ig-gold);
	margin-bottom: 1rem;
}

.ig-legal__eyebrow svg,
.ig-legal__eyebrow i {
	width: 1rem;
	height: 1rem;
	font-size: 1rem;
	color: var(--ig-gold);
}

.ig-legal__title {
	font-size: clamp(2.25rem, 5vw, 3.75rem);
	font-weight: 700;
	line-height: 1.1;
	margin: 0 0 1rem;
	color: #fff;
}

.ig-legal__sub {
	font-size: 1.125rem;
	line-height: 1.6;
	color: rgba(255, 255, 255, 0.8);
	max-width: 42rem;
	margin: 0;
}

.ig-legal__updated {
	font-size: 0.875rem;
	color: rgba(255, 255, 255, 0.6);
	margin: 1rem 0 0;
}

@media (min-width: 768px) {
	.ig-legal__hero {
		padding-top: 7rem;
		padding-bottom: 7rem;
	}
}

/* =========================================================================
   Body — stack of section cards
   ========================================================================= */
.ig-legal__body {
	padding-top: 4rem;
	padding-bottom: 4rem;
	background: var(--ig-background);
}

@media (min-width: 768px) {
	.ig-legal__body {
		padding-top: 5rem;
		padding-bottom: 5rem;
	}
}

.ig-legal__stack {
	display: flex;
	flex-direction: column;
	gap: 2.5rem;
}

.ig-legal__card {
	background: var(--ig-card);
	border: 1px solid var(--ig-border);
	border-radius: 1rem;
	padding: 1.5rem;
	box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

@media (min-width: 768px) {
	.ig-legal__card {
		padding: 2rem;
	}
}

.ig-legal__card-title {
	font-size: 1.25rem;
	font-weight: 700;
	color: var(--ig-navy);
	margin: 0 0 1rem;
	line-height: 1.3;
}

@media (min-width: 768px) {
	.ig-legal__card-title {
		font-size: 1.5rem;
	}
}

/* =========================================================================
   Prose (WYSIWYG rich-text body)
   ========================================================================= */
.ig-legal__prose {
	color: var(--ig-muted-foreground);
	line-height: 1.7;
	font-size: 1rem;
}

.ig-legal__prose > *:first-child {
	margin-top: 0;
}

.ig-legal__prose > *:last-child {
	margin-bottom: 0;
}

.ig-legal__prose p {
	margin: 0 0 1rem;
}

.ig-legal__prose h3,
.ig-legal__prose h4 {
	font-size: 1rem;
	font-weight: 600;
	color: var(--ig-foreground);
	margin: 1.5rem 0 1rem;
	line-height: 1.4;
}

.ig-legal__prose ul,
.ig-legal__prose ol {
	margin: 0 0 1rem;
	padding-left: 1.5rem;
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
}

.ig-legal__prose ul {
	list-style: disc;
}

.ig-legal__prose ol {
	list-style: decimal;
}

.ig-legal__prose li {
	line-height: 1.6;
}

.ig-legal__prose a {
	color: var(--ig-teal);
	text-decoration: none;
}

.ig-legal__prose a:hover {
	text-decoration: underline;
}

.ig-legal__prose strong,
.ig-legal__prose b {
	color: var(--ig-foreground);
	font-weight: 600;
}
