/**
 * Look To The Gut Core — legal consent gate.
 * Loaded independently of the main frontend stylesheet so the gate
 * still works correctly on Blank Canvas pages. Uses the plugin's
 * design tokens where available, with brand-matched fallbacks so it
 * still looks right if those tokens aren't loaded on this page.
 */

.ltg-consent-gate {
	position: fixed;
	inset: 0;
	z-index: 999999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	background: rgba( 20, 18, 16, 0.72 );
}

.ltg-consent-gate[hidden] {
	display: none;
}

body.ltg-consent-locked {
	overflow: hidden;
}

.ltg-consent-gate__panel {
	width: min( 560px, 100%);
	max-height: 90vh;
	display: flex;
	flex-direction: column;
	background: var( --ltg-color-surface, #ffffff );
	border-radius: var( --ltg-card-radius, 12px );
	padding: 28px;
	box-shadow: 0 20px 60px rgba( 0, 0, 0, 0.3 );
	font-family: var( --ltg-font-body, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif );
}

.ltg-consent-gate__heading {
	font-family: var( --ltg-font-heading, inherit );
	font-size: 1.4rem;
	margin: 0 0 14px;
	color: var( --ltg-color-text, #2b2620 );
}

.ltg-consent-gate__scroll {
	overflow-y: auto;
	border: 1px solid var( --ltg-color-border, #e4ddd2 );
	border-radius: 8px;
	padding: 16px 18px;
	margin-bottom: 16px;
	flex: 1 1 auto;
	min-height: 120px;
	max-height: 40vh;
	font-size: 0.92rem;
	line-height: 1.6;
	color: var( --ltg-color-text, #2b2620 );
	background: var( --ltg-color-bg, #faf7f2 );
}

.ltg-consent-gate__scroll p:first-child {
	margin-top: 0;
}

.ltg-consent-gate__scroll p:last-child {
	margin-bottom: 0;
}

.ltg-consent-gate__form {
	display: flex;
	flex-direction: column;
	gap: 14px;
}

.ltg-consent-gate__field {
	display: flex;
	flex-direction: column;
	gap: 6px;
	font-size: 0.9rem;
	color: var( --ltg-color-text, #2b2620 );
}

.ltg-consent-gate__field input[type='text'] {
	padding: 0.75em 1em;
	border: 1px solid rgba( 0, 0, 0, 0.15 );
	border-radius: var( --ltg-button-radius, 8px );
	font-size: 1rem;
}

.ltg-consent-gate__checkbox {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	font-size: 0.85rem;
	line-height: 1.5;
	color: var( --ltg-color-text-muted, #6b6255 );
}

.ltg-consent-gate__checkbox input[type='checkbox'] {
	margin-top: 3px;
	flex-shrink: 0;
	width: 18px;
	height: 18px;
}

.ltg-consent-gate__checkbox a {
	color: var( --ltg-color-accent-dark, #4f6b57 );
	text-decoration: underline;
}

.ltg-consent-gate__hint {
	margin: 0;
	font-size: 0.8rem;
	color: var( --ltg-color-text-muted, #6b6255 );
	font-style: italic;
}

.ltg-consent-gate__error {
	margin: 0;
	font-size: 0.85rem;
	color: #b3261e;
}

.ltg-consent-gate__form button[type='submit'] {
	appearance: none;
	border: none;
	cursor: pointer;
	padding: 0.9em 1.4em;
	border-radius: var( --ltg-button-radius, 999px );
	background: var( --ltg-color-accent-dark, #4f6b57 );
	color: #fff;
	font-size: 1rem;
	font-weight: 600;
}

.ltg-consent-gate__form button[type='submit']:disabled {
	opacity: 0.45;
	cursor: not-allowed;
}

@media ( max-width: 600px ) {
	.ltg-consent-gate__panel {
		padding: 20px;
		max-height: 94vh;
	}
}
