/**
 * LUCRATIEF presentation for WPConsent's Shadow DOM preferences panel.
 *
 * WPConsent exposes stable CSS shadow parts for external styling. Keeping these
 * rules separate from rich-text.css prevents modal styles from leaking into
 * article content or other tables.
 */

#wpconsent-container::part(wpconsent-preferences-modal) {
	background-color: hsl(238deg 23% 7% / 78%);
	backdrop-filter: blur(10px);
}

#wpconsent-container::part(wpconsent-preferences-content) {
	box-sizing: border-box;
	width: min(900px, calc(100% - 32px));
	max-width: none;
	padding: 0 clamp(1rem, 3vw, 2rem) clamp(1rem, 3vw, 2rem);
	border: 1px solid hsl(0deg 0% 100% / 12%);
	border-radius: var(--site-radius-small, 1.25rem);
	box-shadow: 0 1.5rem 5rem hsl(238deg 25% 5% / 52%);
}

#wpconsent-container::part(wpconsent-preferences-header) {
	padding-block-start: clamp(1.25rem, 3vw, 2rem);
}

#wpconsent-container::part(wpconsent-preferences-title) {
	font-size: clamp(1.25rem, 2vw, 1.6rem);
	font-weight: 700;
	letter-spacing: -0.02em;
}

#wpconsent-container::part(wpconsent-preferences-close) {
	border-radius: 50%;
	transition: background-color 160ms ease, color 160ms ease;
}

#wpconsent-container::part(wpconsent-preferences-close):hover {
	background-color: hsl(0deg 0% 100% / 10%);
}

#wpconsent-container::part(wpconsent-preferences-description) {
	max-width: 46rem;
}

#wpconsent-container::part(wpconsent-preferences-accordion) {
	border-block-start: 1px solid hsl(0deg 0% 100% / 12%);
}

#wpconsent-container::part(wpconsent-accordion-item) {
	border-color: hsl(0deg 0% 100% / 12%);
}

#wpconsent-container::part(wpconsent-accordion-header) {
	padding-block: clamp(1rem, 2vw, 1.35rem);
}

#wpconsent-container::part(wpconsent-accordion-toggle) {
	border-radius: 0.35rem;
}

#wpconsent-container::part(wpconsent-accordion-toggle):focus-visible,
#wpconsent-container::part(wpconsent-preferences-close):focus-visible,
#wpconsent-container::part(wpconsent-preferences-accept-button):focus-visible,
#wpconsent-container::part(wpconsent-preferences-cancel-button):focus-visible,
#wpconsent-container::part(wpconsent-preferences-save-button):focus-visible {
	outline: 2px solid var(--primary, #0d42ff);
	outline-offset: 3px;
}

#wpconsent-container::part(wpconsent-accordion-content) {
	overflow-x: auto;
	overscroll-behavior-inline: contain;
	scrollbar-gutter: stable;
}

#wpconsent-container::part(wpconsent-cookies-list) {
	min-width: 680px;
	margin-block: 0.25rem 1.25rem;
	border: 1px solid hsl(0deg 0% 100% / 12%);
	border-radius: calc(var(--site-radius-small, 1.25rem) * 0.7);
	overflow: hidden;
	background: hsl(0deg 0% 100% / 2%);
}

#wpconsent-container::part(wpconsent-cookies-list-header),
#wpconsent-container::part(wpconsent-cookies-list-item) {
	grid-template-columns: minmax(9rem, 22%) minmax(20rem, 1fr) minmax(8rem, 18%);
	gap: clamp(0.75rem, 2vw, 1.25rem);
	padding: clamp(0.85rem, 1.8vw, 1.1rem);
	line-height: 1.45;
	overflow-wrap: anywhere;
	word-break: normal;
}

#wpconsent-container::part(wpconsent-cookies-list-header) {
	background: color-mix(in srgb, var(--primary, #0d42ff) 15%, transparent);
	border-block-end-color: hsl(0deg 0% 100% / 14%);
	font-weight: 700;
}

#wpconsent-container::part(wpconsent-cookies-list-item) {
	border-block-end-color: hsl(0deg 0% 100% / 9%);
	transition: background-color 160ms ease;
}

#wpconsent-container::part(wpconsent-cookies-list-item):hover {
	background-color: hsl(0deg 0% 100% / 4%);
}

#wpconsent-container::part(wpconsent-preferences-actions) {
	margin-block-start: 1.25rem;
	padding-block-start: 1.25rem;
	border-block-start: 1px solid hsl(0deg 0% 100% / 12%);
}

#wpconsent-container::part(wpconsent-preferences-buttons) {
	gap: 0.75rem;
}

#wpconsent-container::part(wpconsent-preferences-accept-button),
#wpconsent-container::part(wpconsent-preferences-cancel-button),
#wpconsent-container::part(wpconsent-preferences-save-button) {
	min-height: 2.75rem;
	padding-inline: 1.1rem;
	border-radius: 999px;
	font-weight: 650;
	transition: filter 160ms ease, transform 160ms ease;
}

#wpconsent-container::part(wpconsent-preferences-accept-button):hover,
#wpconsent-container::part(wpconsent-preferences-cancel-button):hover,
#wpconsent-container::part(wpconsent-preferences-save-button):hover {
	filter: brightness(1.12);
	transform: translateY(-1px);
}

@media (max-width: 47.9375rem) {
	#wpconsent-container::part(wpconsent-preferences-modal) {
		align-items: flex-end;
	}

	#wpconsent-container::part(wpconsent-preferences-content) {
		width: 100%;
		max-height: calc(100dvh - 1rem);
		border-radius: var(--site-radius-small, 1.25rem) var(--site-radius-small, 1.25rem) 0 0;
	}

	#wpconsent-container::part(wpconsent-cookies-list) {
		min-width: 620px;
	}

	#wpconsent-container::part(wpconsent-preferences-buttons) {
		flex-wrap: wrap;
	}
}

@media (prefers-reduced-motion: reduce) {
	#wpconsent-container::part(wpconsent-preferences-close),
	#wpconsent-container::part(wpconsent-cookies-list-item),
	#wpconsent-container::part(wpconsent-preferences-accept-button),
	#wpconsent-container::part(wpconsent-preferences-cancel-button),
	#wpconsent-container::part(wpconsent-preferences-save-button) {
		transition: none;
	}
}
