/**
 * Cookie consent + legal pages — EU-style full-width bottom bar.
 * Equal Accept/Reject prominence (ePrivacy). Secondary + quiet buttons (design-system §8).
 */

:root {
	--shturko-consent-navy: #123b64;
	--shturko-consent-body: #0d2d4c;
	--shturko-consent-muted: #2f4a63;
	--shturko-consent-paper: #fffdf8;
	--shturko-consent-cream: #fffaf3;
	--shturko-consent-line: rgba(18, 59, 100, 0.12);
	--shturko-consent-shadow: 0 -6px 24px rgba(31, 51, 67, 0.1);
}

/* —— Full-width bottom bar —— */
.shturko-consent {
	position: fixed;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 1000000;
	padding: 0;
	pointer-events: none;
}

.shturko-consent[hidden] {
	display: none !important;
}

.shturko-consent__panel {
	pointer-events: auto;
	width: 100%;
	max-width: none;
	margin: 0;
	background: var(--shturko-consent-paper);
	color: var(--shturko-consent-body);
	border: 0;
	border-top: 1px solid rgba(18, 59, 100, 0.16);
	border-radius: 0;
	box-shadow: var(--shturko-consent-shadow);
	padding: 14px 16px calc(14px + env(safe-area-inset-bottom, 0px));
}

.shturko-consent__inner {
	display: flex;
	flex-direction: column;
	gap: 12px;
	width: 100%;
	max-width: 1120px;
	margin: 0 auto;
}

.shturko-consent__copy {
	min-width: 0;
	flex: 1 1 auto;
}

.shturko-consent__title {
	margin: 0 0 4px;
	font-size: 0.9375rem;
	font-weight: 400;
	line-height: 1.35;
	color: var(--shturko-consent-navy);
	letter-spacing: 0;
}

.shturko-consent__body {
	margin: 0 0 8px;
	font-size: 0.8125rem;
	font-weight: 400;
	line-height: 1.45;
	color: var(--shturko-consent-muted);
}

.shturko-consent__links {
	margin: 0;
	font-size: 0.8125rem;
	display: flex;
	flex-wrap: wrap;
	gap: 6px 16px;
}

.shturko-consent__links a {
	color: var(--shturko-consent-navy);
	font-weight: 400;
	text-decoration: underline;
	text-underline-offset: 2px;
	opacity: 0.85;
}

.shturko-consent__links a:hover,
.shturko-consent__links a:focus-visible {
	opacity: 1;
	color: #d93f1b;
}

.shturko-consent__actions {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 8px;
	flex: 0 0 auto;
	align-self: stretch;
}

/* Shared light pill (design-system secondary — hover: lift + shadow only, keep navy text) */
.shturko-consent__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	white-space: nowrap;
}

.shturko-consent__btn--accept:focus-visible,
.shturko-consent__btn--reject:focus-visible,
.shturko-consent__btn--settings:focus-visible,
.shturko-consent__btn--save:focus-visible {
	outline-offset: 2px;
}

/* Quiet — text/ghost for secondary actions */
.shturko-consent__btn--settings,
.shturko-consent__btn--save,
.shturko-consent__panel button.shturko-consent__btn--settings,
.shturko-consent__panel button.shturko-consent__btn--save {
	grid-column: 1 / -1;
	text-underline-offset: 3px;
}

.shturko-consent__prefs {
	margin: 0;
	padding: 0;
	list-style: none;
	display: flex;
	flex-direction: column;
	gap: 8px;
	width: 100%;
	order: 2;
}

.shturko-consent__actions {
	order: 3;
}

.shturko-consent__prefs[hidden] {
	display: none !important;
}

.shturko-consent__pref {
	display: grid;
	grid-template-columns: 1fr auto;
	gap: 2px 12px;
	align-items: center;
	padding: 10px 12px;
	border-radius: 14px;
	background: var(--shturko-consent-cream);
	border: 1px solid var(--shturko-consent-line);
}

.shturko-consent__pref-label {
	font-weight: 400;
	font-size: 0.875rem;
	color: var(--shturko-consent-navy);
}

.shturko-consent__pref-help {
	grid-column: 1 / 2;
	font-size: 0.75rem;
	font-weight: 400;
	line-height: 1.4;
	color: var(--shturko-consent-muted);
}

.shturko-consent__pref input[type="checkbox"] {
	width: 20px;
	height: 20px;
	accent-color: var(--shturko-consent-navy);
}

.shturko-consent__pref-badge {
	font-size: 0.7rem;
	font-weight: 400;
	color: var(--shturko-consent-muted);
}

body.shturko-consent-open {
	padding-bottom: calc(168px + env(safe-area-inset-bottom, 0px));
}

body.shturko-consent-open .shturko-a11y-widget,
body.shturko-consent-open .shturko-fbw-widget {
	bottom: calc(158px + env(safe-area-inset-bottom, 0px));
}

/* —— Footer legal strip —— */
.shturko-footer-legal {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 4px 12px;
	margin: 8px 0 0;
	padding: 0;
	list-style: none;
	font-size: 0.8125rem;
	line-height: 1.4;
}

.shturko-footer-legal a,
.shturko-footer-legal button {
	color: var(--shturko-consent-muted);
	font-weight: 400;
	background: none;
	border: none;
	padding: 6px 2px;
	cursor: pointer;
	font-size:inherit;font-weight:inherit;line-height:inherit;
	text-decoration: none;
	min-height: 40px;
	display: inline-flex;
	align-items: center;
}

.shturko-footer-legal a:hover,
.shturko-footer-legal a:focus-visible,
.shturko-footer-legal button:hover,
.shturko-footer-legal button:focus-visible {
	color: #d93f1b;
	text-decoration: underline;
	text-underline-offset: 2px;
}

.shturko-footer-contact {
	margin: 4px 0 0;
	font-size: 0.8125rem;
	font-weight: 400;
}

.shturko-footer-contact a {
	color: var(--shturko-consent-navy);
	text-decoration: none;
}

.shturko-footer-contact a:hover {
	text-decoration: underline;
}

.shturko-footer-demo {
	margin: 6px 0 0;
	max-width: 28rem;
	font-size: 0.75rem;
	font-weight: 400;
	line-height: 1.45;
	color: var(--shturko-consent-muted);
}

/* —— Legal pages (privacy / cookies / terms) —— */
/* The header is fixed, so #main keeps the global `padding-top: var(--header-h)` clearance;
   only Kadence's #primary margin-top is dropped and the inner layers get a small gap. */
body.shturko-legal-page #primary.content-area {
	margin-top: 0 !important;
}
html body.shturko-legal-page:not(.home) #main.site-main {
	padding-top: var(--header-h, 82px) !important;
	padding-bottom: 1.75rem !important;
}
html body.shturko-legal-page:not(.home) .content-bg,
body.shturko-legal-page .content-bg,
body.shturko-legal-page article.entry,
body.shturko-legal-page .content-area .entry.content-bg {
	padding-top: 1.25rem !important;
	padding-bottom: 1.75rem !important;
}

body.shturko-legal-page .entry-content-wrap {
	padding-top: 0 !important;
	padding-bottom: 0 !important;
}

body.shturko-legal-page .site-main > .content-container {
	padding-top: 0 !important;
	padding-bottom: 1.25rem !important;
}

body.shturko-legal-page .entry-content,
body.shturko-legal-page .wp-block-post-content {
	max-width: 38rem;
	margin-left: auto;
	margin-right: auto;
	color: var(--shturko-consent-body);
	font-size: 0.9375rem;
	font-weight: 400;
	line-height: 1.65;
}

body.shturko-legal-page .entry-content > h1.wp-block-heading:first-child,
body.shturko-legal-page h1.wp-block-heading {
	font-size: clamp(1.35rem, 2.5vw, 1.65rem);
	font-weight: 400;
	line-height: 1.3;
	color: var(--shturko-consent-navy);
	margin: 0 0 0.85rem;
	letter-spacing: -0.01em;
}

body.shturko-legal-page .entry-content h2.wp-block-heading,
body.shturko-legal-page h2.wp-block-heading {
	font-size: 1.05rem;
	font-weight: 400;
	line-height: 1.35;
	color: var(--shturko-consent-navy);
	margin: 1.75rem 0 0.55rem;
	padding-top: 0.15rem;
}

body.shturko-legal-page .entry-content p,
body.shturko-legal-page .entry-content li {
	font-size: 0.9375rem;
	font-weight: 400;
	line-height: 1.65;
	color: var(--shturko-consent-body);
}

body.shturko-legal-page .entry-content p {
	margin: 0 0 0.85rem;
}

body.shturko-legal-page .entry-content ul {
	margin: 0 0 1rem;
	padding-left: 1.15rem;
}

body.shturko-legal-page .entry-content li {
	margin: 0 0 0.4rem;
}

body.shturko-legal-page .entry-content a {
	color: #d93f1b;
	font-weight: 400;
	text-decoration: underline;
	text-underline-offset: 2px;
}

body.shturko-legal-page .entry-content code {
	font-size: 0.85em;
	font-weight: 400;
	background: rgba(18, 59, 100, 0.06);
	padding: 0.1em 0.35em;
	border-radius: 4px;
}

.shturko-legal-demo {
	background: var(--shturko-consent-cream);
	border: 1px solid rgba(244, 166, 42, 0.45);
	border-radius: 12px;
	padding: 10px 14px;
	color: var(--shturko-consent-navy);
	font-size: 0.875rem;
	font-weight: 400;
	line-height: 1.45;
	margin: 0 0 1.25rem;
}

.shturko-legal-demo strong {
	font-weight: 400;
}

/* Desktop: text left, equal buttons right */
@media (min-width: 768px) {
	.shturko-consent__panel {
		padding: 16px 24px calc(16px + env(safe-area-inset-bottom, 0px));
	}

	.shturko-consent__inner {
		flex-direction: row;
		flex-wrap: wrap;
		align-items: center;
		gap: 16px 28px;
	}

	.shturko-consent__copy {
		flex: 1 1 22rem;
		min-width: min(100%, 22rem);
	}

	.shturko-consent__body {
		margin-bottom: 6px;
	}

	.shturko-consent__prefs {
		flex: 1 1 100%;
		order: 3;
	}

	.shturko-consent__actions {
		display: flex;
		flex-wrap: wrap;
		align-items: center;
		justify-content: flex-end;
		gap: 8px;
		flex: 0 1 auto;
		align-self: center;
		order: 2;
		max-width: 100%;
	}

	.shturko-consent__btn--settings,
	.shturko-consent__btn--save,
	.shturko-consent__panel button.shturko-consent__btn--settings,
	.shturko-consent__panel button.shturko-consent__btn--save {
		grid-column: auto;
		width: auto;
		text-decoration: none !important;
		padding-left: 12px;
		padding-right: 12px;
	}

	.shturko-consent__btn--save:not([hidden]),
	.shturko-consent__panel button.shturko-consent__btn--save:not([hidden]) {
		order: 4;
	}

	body.shturko-consent-open {
		padding-bottom: calc(120px + env(safe-area-inset-bottom, 0px));
	}

	body.shturko-consent-open .shturko-a11y-widget,
	body.shturko-consent-open .shturko-fbw-widget {
		bottom: calc(110px + env(safe-area-inset-bottom, 0px));
	}
}

@media (max-width: 480px) {
	body.shturko-consent-open {
		padding-bottom: calc(200px + env(safe-area-inset-bottom, 0px));
	}

	body.shturko-consent-open .shturko-a11y-widget,
	body.shturko-consent-open .shturko-fbw-widget {
		bottom: calc(190px + env(safe-area-inset-bottom, 0px));
	}
}
