:root {
	--napalmi-consent-navy: #112954;
	--napalmi-consent-blue: #3859d0;
	--napalmi-consent-blue-dark: #263f9f;
	--napalmi-consent-surface: #f9faff;
	--napalmi-consent-border: #cbd8f1;
	--napalmi-consent-muted: #42526e;
	--napalmi-consent-focus: #ffbf47;
}

.napalmi-consent-banner[hidden],
.napalmi-consent-overlay[hidden],
.napalmi-consent-settings-button[hidden],
.napalmi-consent-media-placeholder[hidden],
.napalmi-consent-media-frame[hidden] {
	display: none !important;
}

.napalmi-consent-banner,
.napalmi-consent-dialog,
.napalmi-consent-settings-button,
.napalmi-consent-media-placeholder {
	box-sizing: border-box;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	font-size: 16px;
	line-height: 1.5;
}

.napalmi-consent-banner {
	position: fixed;
	right: 20px;
	bottom: 20px;
	z-index: 2147483600;
	width: min(440px, calc(100vw - 40px));
	max-height: calc(100vh - 40px);
	overflow: auto;
	padding: 24px;
	color: var(--napalmi-consent-navy);
	background: var(--napalmi-consent-surface);
	border: 1px solid var(--napalmi-consent-border);
	border-radius: 14px;
	box-shadow: 0 16px 50px rgba(17, 41, 84, 0.24);
}

.napalmi-consent-banner h2,
.napalmi-consent-dialog h2,
.napalmi-consent-dialog h3 {
	margin: 0 0 10px;
	color: var(--napalmi-consent-navy);
	font-weight: 700;
	line-height: 1.25;
}

.napalmi-consent-banner h2,
.napalmi-consent-dialog h2 {
	font-size: 1.45rem;
}

.napalmi-consent-dialog h3 {
	font-size: 1.05rem;
}

.napalmi-consent-banner p,
.napalmi-consent-dialog p,
.napalmi-consent-media-placeholder p {
	margin: 0 0 12px;
}

.napalmi-consent-note,
.napalmi-consent-status {
	color: var(--napalmi-consent-muted);
	font-size: 0.9rem;
}

.napalmi-consent-actions,
.napalmi-consent-dialog-actions {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 10px;
	margin-top: 18px;
}

.napalmi-consent-actions .napalmi-consent-button-secondary,
.napalmi-consent-dialog-actions .napalmi-consent-button-secondary {
	grid-column: 1 / -1;
}

.napalmi-consent-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 46px;
	padding: 10px 14px;
	font: inherit;
	font-weight: 700;
	line-height: 1.25;
	text-align: center;
	text-decoration: none;
	cursor: pointer;
	border: 2px solid var(--napalmi-consent-blue);
	border-radius: 8px;
	transition: background-color 120ms ease, color 120ms ease, border-color 120ms ease;
}

.napalmi-consent-button-primary {
	color: #fff;
	background: var(--napalmi-consent-blue);
}

.napalmi-consent-button-primary:hover {
	background: var(--napalmi-consent-blue-dark);
	border-color: var(--napalmi-consent-blue-dark);
}

.napalmi-consent-button-secondary {
	color: var(--napalmi-consent-navy);
	background: #fff;
}

.napalmi-consent-button-secondary:hover {
	background: #eaf0ff;
}

.napalmi-consent-button:disabled {
	cursor: wait;
	opacity: 0.65;
}

.napalmi-consent-button:focus-visible,
.napalmi-consent-close:focus-visible,
.napalmi-consent-settings-button:focus-visible,
.napalmi-consent-switch input:focus-visible + span,
.napalmi-consent-dialog a:focus-visible {
	outline: 3px solid var(--napalmi-consent-focus);
	outline-offset: 3px;
}

.napalmi-consent-overlay {
	position: fixed;
	inset: 0;
	z-index: 2147483601;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	background: rgba(6, 18, 40, 0.68);
}

.napalmi-consent-dialog {
	position: relative;
	width: min(760px, 100%);
	max-height: calc(100vh - 40px);
	overflow: auto;
	padding: 30px;
	color: var(--napalmi-consent-navy);
	background: var(--napalmi-consent-surface);
	border-radius: 14px;
	box-shadow: 0 20px 70px rgba(0, 0, 0, 0.38);
}

.napalmi-consent-dialog-open {
	overflow: hidden;
}

.napalmi-consent-close {
	position: absolute;
	top: 12px;
	right: 12px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	padding: 0;
	color: var(--napalmi-consent-navy);
	font: inherit;
	font-size: 30px;
	line-height: 1;
	cursor: pointer;
	background: transparent;
	border: 0;
	border-radius: 8px;
}

.napalmi-consent-close:hover {
	background: #eaf0ff;
}

.napalmi-consent-category {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(160px, auto);
	gap: 20px;
	align-items: center;
	padding: 18px 0;
	border-top: 1px solid var(--napalmi-consent-border);
}

.napalmi-consent-category:first-of-type {
	margin-top: 20px;
}

.napalmi-consent-category p {
	margin-bottom: 0;
	color: var(--napalmi-consent-muted);
	font-size: 0.94rem;
}

.napalmi-consent-category code {
	padding: 1px 4px;
	font-size: 0.86em;
	background: #eaf0ff;
	border-radius: 4px;
}

.napalmi-consent-switch {
	display: inline-flex;
	align-items: center;
	gap: 9px;
	min-height: 44px;
	font-weight: 700;
	cursor: pointer;
}

.napalmi-consent-switch input {
	width: 22px;
	height: 22px;
	margin: 0;
	accent-color: var(--napalmi-consent-blue);
}

.napalmi-consent-switch input:disabled {
	cursor: not-allowed;
	opacity: 0.75;
}

.napalmi-consent-policy {
	margin-top: 18px !important;
}

.napalmi-consent-policy a {
	color: var(--napalmi-consent-blue-dark);
	font-weight: 700;
}

.napalmi-consent-settings-button {
	position: fixed;
	left: 16px;
	bottom: 16px;
	z-index: 2147483599;
	min-height: 42px;
	padding: 9px 14px;
	color: #fff;
	font: inherit;
	font-size: 0.92rem;
	font-weight: 700;
	cursor: pointer;
	background: var(--napalmi-consent-navy);
	border: 2px solid #fff;
	border-radius: 999px;
	box-shadow: 0 5px 20px rgba(17, 41, 84, 0.28);
}

.napalmi-consent-settings-button:hover {
	background: var(--napalmi-consent-blue-dark);
}

.napalmi-consent-media-placeholder {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	min-height: 220px;
	padding: 24px;
	color: var(--napalmi-consent-navy);
	text-align: center;
	background: #eef3ff;
	border: 1px solid var(--napalmi-consent-border);
	border-radius: 10px;
}

.napalmi-consent-media-placeholder .napalmi-consent-button {
	max-width: 280px;
}

.napalmi-consent-media-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 10px 14px;
	align-items: center;
	justify-content: center;
}

.napalmi-consent-media-actions a {
	color: var(--napalmi-consent-blue-dark);
	font-weight: 600;
}

.napalmi-consent-media-loaded-controls {
	display: none;
}

.napalmi-consent-media-placeholder[data-napalmi-youtube-placeholder="1"][data-napalmi-media-loaded="1"] {
	min-height: 0;
	padding: 8px 0;
	align-items: flex-end;
	background: transparent;
	border: 0;
}

.napalmi-consent-media-placeholder[data-napalmi-youtube-placeholder="1"][data-napalmi-media-loaded="1"] .napalmi-consent-media-intro {
	display: none;
}

.napalmi-consent-media-placeholder[data-napalmi-youtube-placeholder="1"][data-napalmi-media-loaded="1"] .napalmi-consent-media-loaded-controls {
	display: block;
}

.napalmi-consent-media-wrapper > .napalmi-consent-media-placeholder[data-napalmi-youtube-placeholder="1"][data-napalmi-media-loaded="1"] {
	position: relative;
	z-index: 2;
}

.wp-block-embed__wrapper.napalmi-consent-media-wrapper-blocked::before {
	display: none !important;
	padding-top: 0 !important;
}

.wp-block-embed__wrapper.napalmi-consent-media-wrapper-loaded > .napalmi-consent-media-placeholder[data-napalmi-youtube-placeholder="1"][data-napalmi-media-loaded="1"] {
	position: absolute;
	top: 8px;
	right: 8px;
	left: auto;
	z-index: 2;
	width: auto;
	margin: 0;
	padding: 0;
}

@media (max-width: 640px) {
	.napalmi-consent-banner {
		right: 10px;
		bottom: 10px;
		left: 10px;
		width: auto;
		max-height: calc(100vh - 20px);
		padding: 20px;
	}

	.napalmi-consent-actions,
	.napalmi-consent-dialog-actions,
	.napalmi-consent-category {
		grid-template-columns: 1fr;
	}

	.napalmi-consent-actions .napalmi-consent-button-secondary,
	.napalmi-consent-dialog-actions .napalmi-consent-button-secondary {
		grid-column: auto;
	}

	.napalmi-consent-overlay {
		align-items: stretch;
		padding: 8px;
	}

	.napalmi-consent-dialog {
		max-height: calc(100vh - 16px);
		padding: 24px 18px;
	}

	.napalmi-consent-switch {
		justify-content: flex-start;
	}
}

@media (prefers-reduced-motion: reduce) {
	.napalmi-consent-button {
		transition: none;
	}
}
