/*!
 * ICC Privacy Suite — consent banner styles
 *
 * Everything is scoped under `#iccp-root`, `.iccp-consent-manager`, or the
 * `.iccp-placeholder` / `.iccp-blocked-iframe` helpers that live inside page
 * content. No resets, no `!important` bombs: the selectors are specific enough
 * to win on an Elementor site without fighting the theme.
 */

/* ------------------------------------------------------------------ *
 * Design tokens (light palette is the default)
 * ------------------------------------------------------------------ */

#iccp-root,
.iccp-consent-manager {
	--iccp-bg: #ffffff;
	--iccp-text: #1e1e1e;
	--iccp-muted: #5b5b5b;
	--iccp-link: #0a58ca;
	--iccp-border: rgba(0, 0, 0, 0.14);
	--iccp-shadow: 0 8px 30px rgba(0, 0, 0, 0.18);
	--iccp-accept-bg: #1e1e1e;
	--iccp-accept-text: #ffffff;
	--iccp-reject-bg: #e5e5e5;
	--iccp-reject-text: #1e1e1e;
	--iccp-prefs-bg: transparent;
	--iccp-prefs-text: #1e1e1e;
	--iccp-prefs-border: #1e1e1e;
	--iccp-toggle-on: #0a58ca;
	--iccp-toggle-off: #b9b9b9;
	--iccp-radius: 8px;
	--iccp-btn-radius: 6px;
	--iccp-font-size: 15px;
	--iccp-font-family: inherit;
	--iccp-surface-2: rgba(0, 0, 0, 0.04);
}

#iccp-root.iccp-theme-dark,
#iccp-root .iccp-theme-dark,
.iccp-consent-manager.iccp-theme-dark {
	--iccp-bg: #1c1c1e;
	--iccp-text: #f2f2f2;
	--iccp-muted: #b5b5b5;
	--iccp-link: #7ab8ff;
	--iccp-border: rgba(255, 255, 255, 0.18);
	--iccp-shadow: 0 8px 30px rgba(0, 0, 0, 0.55);
	--iccp-accept-bg: #ffffff;
	--iccp-accept-text: #1c1c1e;
	--iccp-reject-bg: #3a3a3d;
	--iccp-reject-text: #f2f2f2;
	--iccp-prefs-bg: transparent;
	--iccp-prefs-text: #f2f2f2;
	--iccp-prefs-border: #6e6e73;
	--iccp-toggle-on: #4c9aff;
	--iccp-toggle-off: #58585c;
	--iccp-surface-2: rgba(255, 255, 255, 0.07);
}

/* ------------------------------------------------------------------ *
 * Root container
 * ------------------------------------------------------------------ */

#iccp-root {
	font-family: var(--iccp-font-family);
	font-size: var(--iccp-font-size);
	line-height: 1.5;
}

/* ------------------------------------------------------------------ *
 * Overlay
 * ------------------------------------------------------------------ */

#iccp-root .iccp-overlay {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.55);
	z-index: 999998;
}

/* ------------------------------------------------------------------ *
 * Banner shell
 * ------------------------------------------------------------------ */

#iccp-root .iccp-banner {
	position: fixed;
	z-index: 999999;
	box-sizing: border-box;
	max-height: calc(100vh - 24px);
	overflow-y: auto;
	background: var(--iccp-bg);
	color: var(--iccp-text);
	font-family: var(--iccp-font-family);
	font-size: var(--iccp-font-size);
	line-height: 1.5;
	text-align: left;
	border-radius: var(--iccp-radius);
	box-shadow: var(--iccp-shadow);
	border: 1px solid var(--iccp-border);
}

#iccp-root .iccp-banner * {
	box-sizing: border-box;
}

#iccp-root .iccp-banner-inner {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 16px 24px;
	padding: 18px 22px;
}

#iccp-root .iccp-logo {
	display: block;
	max-width: 140px;
	max-height: 48px;
	width: auto;
	height: auto;
	flex: 0 0 auto;
	margin: 0;
}

#iccp-root .iccp-content {
	flex: 1 1 320px;
	min-width: 0;
}

#iccp-root .iccp-title {
	margin: 0 0 6px;
	padding: 0;
	font-size: 1.13em;
	line-height: 1.3;
	font-weight: 700;
	color: var(--iccp-text);
	font-family: inherit;
	letter-spacing: normal;
	text-transform: none;
}

#iccp-root .iccp-message {
	margin: 0;
	color: var(--iccp-text);
}

#iccp-root .iccp-message p {
	margin: 0 0 8px;
	color: inherit;
	font-size: inherit;
	line-height: inherit;
}

#iccp-root .iccp-message p:last-child {
	margin-bottom: 0;
}

#iccp-root .iccp-message a,
#iccp-root .iccp-cat-desc a,
#iccp-root .iccp-modal a {
	color: var(--iccp-link);
	text-decoration: underline;
}

#iccp-root .iccp-message a:hover,
#iccp-root .iccp-cat-desc a:hover {
	text-decoration: none;
}

#iccp-root .iccp-actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px;
	flex: 0 0 auto;
	margin: 0;
}

/* ------------------------------------------------------------------ *
 * Positions
 * ------------------------------------------------------------------ */

#iccp-root .iccp-banner.iccp-pos-bottom-bar {
	left: 0;
	right: 0;
	bottom: 0;
	width: 100%;
	max-width: none;
	border-radius: 0;
	border-left: 0;
	border-right: 0;
	border-bottom: 0;
}

#iccp-root .iccp-banner.iccp-pos-bottom-bar .iccp-banner-inner {
	max-width: 1280px;
	margin: 0 auto;
	flex-wrap: nowrap;
}

#iccp-root .iccp-banner.iccp-pos-bottom-left {
	left: 20px;
	bottom: 20px;
	width: calc(100% - 40px);
	max-width: 420px;
}

#iccp-root .iccp-banner.iccp-pos-bottom-right {
	right: 20px;
	bottom: 20px;
	width: calc(100% - 40px);
	max-width: 420px;
}

#iccp-root .iccp-banner.iccp-pos-center {
	left: 50%;
	top: 50%;
	transform: translate(-50%, -50%);
	width: calc(100% - 40px);
	max-width: 520px;
}

#iccp-root .iccp-banner.iccp-pos-bottom-left .iccp-banner-inner,
#iccp-root .iccp-banner.iccp-pos-bottom-right .iccp-banner-inner,
#iccp-root .iccp-banner.iccp-pos-center .iccp-banner-inner {
	display: block;
	padding: 22px;
}

#iccp-root .iccp-banner.iccp-pos-bottom-left .iccp-logo,
#iccp-root .iccp-banner.iccp-pos-bottom-right .iccp-logo,
#iccp-root .iccp-banner.iccp-pos-center .iccp-logo {
	margin-bottom: 12px;
}

#iccp-root .iccp-banner.iccp-pos-bottom-left .iccp-actions,
#iccp-root .iccp-banner.iccp-pos-bottom-right .iccp-actions,
#iccp-root .iccp-banner.iccp-pos-center .iccp-actions {
	margin-top: 16px;
}

/* ------------------------------------------------------------------ *
 * Buttons
 * ------------------------------------------------------------------ */

#iccp-root .iccp-btn,
.iccp-consent-manager .iccp-btn {
	display: inline-block;
	margin: 0;
	padding: 10px 18px;
	border: 1px solid transparent;
	border-radius: var(--iccp-btn-radius);
	font-family: inherit;
	font-size: 0.94em;
	font-weight: 600;
	line-height: 1.25;
	text-align: center;
	text-decoration: none;
	text-transform: none;
	letter-spacing: normal;
	white-space: nowrap;
	cursor: pointer;
	background: var(--iccp-accept-bg);
	color: var(--iccp-accept-text);
	box-shadow: none;
	transition: opacity 0.15s ease;
	-webkit-appearance: none;
	appearance: none;
}

#iccp-root .iccp-btn:hover,
.iccp-consent-manager .iccp-btn:hover {
	opacity: 0.85;
	text-decoration: none;
}

#iccp-root .iccp-btn-accept,
.iccp-consent-manager .iccp-btn-accept {
	background: var(--iccp-accept-bg);
	color: var(--iccp-accept-text);
	border-color: var(--iccp-accept-bg);
}

#iccp-root .iccp-btn-reject {
	background: var(--iccp-reject-bg);
	color: var(--iccp-reject-text);
	border-color: var(--iccp-reject-bg);
}

#iccp-root .iccp-btn-prefs {
	background: var(--iccp-prefs-bg);
	color: var(--iccp-prefs-text);
	border-color: var(--iccp-prefs-border);
}

#iccp-root .iccp-btn-save {
	background: var(--iccp-accept-bg);
	color: var(--iccp-accept-text);
	border-color: var(--iccp-accept-bg);
}

/* Focus rings — keyboard only, but always visible when they do appear. */

#iccp-root :focus-visible,
.iccp-consent-manager :focus-visible {
	outline: 2px solid var(--iccp-link);
	outline-offset: 2px;
}

#iccp-root .iccp-switch input:focus-visible + .iccp-slider,
.iccp-consent-manager .iccp-switch input:focus-visible + .iccp-slider {
	outline: 2px solid var(--iccp-link);
	outline-offset: 2px;
}

/* ------------------------------------------------------------------ *
 * Preferences modal
 * ------------------------------------------------------------------ */

#iccp-root .iccp-modal-wrap {
	position: fixed;
	inset: 0;
	z-index: 1000000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
}

#iccp-root .iccp-modal-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.6);
}

#iccp-root .iccp-modal {
	position: relative;
	display: flex;
	flex-direction: column;
	width: 100%;
	max-width: 560px;
	max-height: calc(100vh - 40px);
	background: var(--iccp-bg);
	color: var(--iccp-text);
	border: 1px solid var(--iccp-border);
	border-radius: var(--iccp-radius);
	box-shadow: var(--iccp-shadow);
	font-family: var(--iccp-font-family);
	font-size: var(--iccp-font-size);
	line-height: 1.5;
	text-align: left;
	overflow: hidden;
}

#iccp-root .iccp-modal * {
	box-sizing: border-box;
}

#iccp-root .iccp-modal-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 18px 22px;
	border-bottom: 1px solid var(--iccp-border);
	flex: 0 0 auto;
}

#iccp-root .iccp-modal-title {
	margin: 0;
	padding: 0;
	font-size: 1.13em;
	font-weight: 700;
	line-height: 1.3;
	color: var(--iccp-text);
	font-family: inherit;
	text-transform: none;
	letter-spacing: normal;
}

#iccp-root .iccp-modal-close {
	flex: 0 0 auto;
	width: 32px;
	height: 32px;
	padding: 0;
	margin: 0;
	border: 0;
	border-radius: var(--iccp-btn-radius);
	background: transparent;
	color: var(--iccp-text);
	font-size: 20px;
	line-height: 1;
	cursor: pointer;
	-webkit-appearance: none;
	appearance: none;
}

#iccp-root .iccp-modal-close:hover {
	background: var(--iccp-surface-2);
}

#iccp-root .iccp-modal-body {
	flex: 1 1 auto;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
	padding: 6px 22px 12px;
}

#iccp-root .iccp-modal-foot {
	flex: 0 0 auto;
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	padding: 16px 22px;
	border-top: 1px solid var(--iccp-border);
}

#iccp-root .iccp-modal-links {
	flex: 0 0 auto;
	display: flex;
	flex-wrap: wrap;
	gap: 6px 18px;
	padding: 0 22px 16px;
	font-size: 0.88em;
	line-height: 1.4;
}

#iccp-root .iccp-modal-link {
	color: var(--iccp-link);
	text-decoration: underline;
}

#iccp-root .iccp-modal-link:hover {
	text-decoration: none;
}

/* Category rows */

#iccp-root .iccp-cat {
	padding: 16px 0;
	border-bottom: 1px solid var(--iccp-border);
}

#iccp-root .iccp-cat:last-child {
	border-bottom: 0;
}

#iccp-root .iccp-cat-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 14px;
}

#iccp-root .iccp-cat-title {
	font-weight: 700;
	color: var(--iccp-text);
}

#iccp-root .iccp-cat-desc {
	margin-top: 6px;
	color: var(--iccp-muted);
	font-size: 0.92em;
}

#iccp-root .iccp-cat-desc p {
	margin: 0 0 6px;
	color: inherit;
	font-size: inherit;
}

#iccp-root .iccp-cat-desc p:last-child {
	margin-bottom: 0;
}

#iccp-root .iccp-always {
	flex: 0 0 auto;
	font-size: 0.85em;
	font-weight: 600;
	color: var(--iccp-muted);
	white-space: nowrap;
}

/* ------------------------------------------------------------------ *
 * Toggle switch
 * ------------------------------------------------------------------ */

#iccp-root .iccp-switch,
.iccp-consent-manager .iccp-switch {
	position: relative;
	display: inline-block;
	flex: 0 0 auto;
	width: 44px;
	height: 24px;
	margin: 0;
	vertical-align: middle;
}

#iccp-root .iccp-switch input,
.iccp-consent-manager .iccp-switch input {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	margin: 0;
	opacity: 0;
	cursor: pointer;
	z-index: 1;
}

#iccp-root .iccp-slider,
.iccp-consent-manager .iccp-slider {
	position: absolute;
	inset: 0;
	display: block;
	background: var(--iccp-toggle-off);
	border-radius: 999px;
	transition: background-color 0.18s ease;
	pointer-events: none;
}

#iccp-root .iccp-slider::before,
.iccp-consent-manager .iccp-slider::before {
	content: "";
	position: absolute;
	top: 3px;
	left: 3px;
	width: 18px;
	height: 18px;
	background: #ffffff;
	border-radius: 50%;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
	transition: transform 0.18s ease;
}

#iccp-root .iccp-switch input:checked + .iccp-slider,
.iccp-consent-manager .iccp-switch input:checked + .iccp-slider {
	background: var(--iccp-toggle-on);
}

#iccp-root .iccp-switch input:checked + .iccp-slider::before,
.iccp-consent-manager .iccp-switch input:checked + .iccp-slider::before {
	transform: translateX(20px);
}

#iccp-root .iccp-switch input:disabled,
.iccp-consent-manager .iccp-switch input:disabled {
	cursor: default;
}

#iccp-root .iccp-switch input:disabled + .iccp-slider,
.iccp-consent-manager .iccp-switch input:disabled + .iccp-slider {
	opacity: 0.55;
}

/* ------------------------------------------------------------------ *
 * Floating revoke pill
 * ------------------------------------------------------------------ */

#iccp-root .iccp-revoke {
	position: fixed;
	left: 16px;
	bottom: 16px;
	z-index: 999997;
	margin: 0;
	padding: 8px 14px;
	max-width: calc(100vw - 32px);
	border: 1px solid var(--iccp-border);
	border-radius: 999px;
	background: var(--iccp-bg);
	color: var(--iccp-text);
	font-family: var(--iccp-font-family);
	font-size: 0.82em;
	font-weight: 600;
	line-height: 1.3;
	text-align: center;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	cursor: pointer;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.18);
	-webkit-appearance: none;
	appearance: none;
}

#iccp-root .iccp-revoke:hover {
	opacity: 0.88;
}

/* ------------------------------------------------------------------ *
 * Blocked-content placeholders (these live inside page content)
 * ------------------------------------------------------------------ */

.iccp-blocked-iframe[data-iccp-src] {
	display: none;
}

.iccp-placeholder {
	box-sizing: border-box;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 12px;
	min-height: 160px;
	width: 100%;
	padding: 24px 20px;
	border: 2px dashed rgba(127, 127, 127, 0.5);
	border-radius: 8px;
	background: rgba(127, 127, 127, 0.08);
	text-align: center;
	font-size: 14px;
	line-height: 1.5;
}

.iccp-placeholder * {
	box-sizing: border-box;
}

.iccp-placeholder-text {
	margin: 0;
	max-width: 42em;
}

.iccp-placeholder-btn {
	display: inline-block;
	margin: 0;
	padding: 9px 16px;
	border: 1px solid currentColor;
	border-radius: 6px;
	background: transparent;
	color: inherit;
	font: inherit;
	font-weight: 600;
	cursor: pointer;
	-webkit-appearance: none;
	appearance: none;
}

.iccp-placeholder-btn:hover {
	background: rgba(127, 127, 127, 0.14);
}

.iccp-placeholder-btn:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 2px;
}

/* Non-script, non-iframe blocked wrappers (e.g. Elementor video widgets). */
.iccp-blocked {
	position: relative;
}

/* ------------------------------------------------------------------ *
 * Consent manager block ([icc_consent_manager])
 * ------------------------------------------------------------------ */

.iccp-consent-manager {
	margin: 1.5em 0;
	font-size: 15px;
	line-height: 1.5;
	color: inherit;
}

.iccp-consent-manager * {
	box-sizing: border-box;
}

/*
 * Two markups are supported, because the shortcode may or may not wrap the
 * title row in `.iccp-cm-head`: the row itself is a wrapping flex container,
 * so a `.iccp-cm-head` (full width) or a bare button + switch both lay out
 * correctly, with the description always dropping onto its own line.
 */
.iccp-consent-manager .iccp-cm-row {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0 14px;
	border-bottom: 1px solid var(--iccp-border);
	padding: 4px 0;
}

.iccp-consent-manager .iccp-cm-row:first-child {
	border-top: 1px solid var(--iccp-border);
}

.iccp-consent-manager .iccp-cm-head {
	flex: 1 1 100%;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 14px;
}

.iccp-consent-manager .iccp-cm-toggle-row {
	flex: 1 1 auto;
	display: block;
	width: auto;
	min-width: 0;
	margin: 0;
	padding: 14px 0;
	border: 0;
	background: none;
	color: inherit;
	font: inherit;
	font-weight: 600;
	text-align: left;
	cursor: pointer;
	-webkit-appearance: none;
	appearance: none;
}

.iccp-consent-manager .iccp-cm-toggle-row::before {
	content: "\25B8";
	display: inline-block;
	width: 1em;
	margin-right: 0.35em;
	transition: transform 0.15s ease;
}

.iccp-consent-manager .iccp-cm-toggle-row[aria-expanded="true"]::before {
	transform: rotate(90deg);
}

.iccp-consent-manager .iccp-cm-desc {
	flex: 1 1 100%;
	padding: 0 0 14px 1.35em;
	font-size: 0.94em;
	opacity: 0.85;
}

.iccp-consent-manager .iccp-cm-desc p {
	margin: 0 0 8px;
}

.iccp-consent-manager .iccp-cm-desc p:last-child {
	margin-bottom: 0;
}

.iccp-consent-manager .iccp-cm-always {
	flex: 0 0 auto;
	font-size: 0.85em;
	font-weight: 600;
	opacity: 0.7;
	white-space: nowrap;
}

.iccp-consent-manager .iccp-cm-actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px;
	margin-top: 18px;
}

/* Save button rendered as a direct child, with no `.iccp-cm-actions` wrapper. */
.iccp-consent-manager > .iccp-cm-save {
	margin-top: 18px;
}

.iccp-consent-manager > .iccp-cm-save + .iccp-cm-saved {
	margin-left: 12px;
}

.iccp-consent-manager .iccp-cm-status {
	margin-top: 14px;
	font-size: 0.92em;
	opacity: 0.8;
}

.iccp-consent-manager .iccp-cm-saved {
	font-size: 0.92em;
	font-weight: 600;
	color: #1a7f37;
}

.iccp-consent-manager .iccp-cm-saved[hidden] {
	display: none;
}

/* ------------------------------------------------------------------ *
 * Motion
 * ------------------------------------------------------------------ */

@keyframes iccp-slide-up {
	from {
		opacity: 0;
		transform: translateY(16px);
	}

	to {
		opacity: 1;
		transform: translateY(0);
	}
}

@keyframes iccp-fade-in {
	from {
		opacity: 0;
	}

	to {
		opacity: 1;
	}
}

#iccp-root .iccp-animate.iccp-banner:not(.iccp-pos-center) {
	animation: iccp-slide-up 0.28s ease-out both;
}

#iccp-root .iccp-animate.iccp-banner.iccp-pos-center,
#iccp-root .iccp-animate.iccp-overlay,
#iccp-root .iccp-animate.iccp-modal-wrap {
	animation: iccp-fade-in 0.2s ease-out both;
}

@media (prefers-reduced-motion: reduce) {
	#iccp-root .iccp-animate.iccp-banner,
	#iccp-root .iccp-animate.iccp-overlay,
	#iccp-root .iccp-animate.iccp-modal-wrap {
		animation: none;
	}

	#iccp-root .iccp-slider,
	#iccp-root .iccp-slider::before,
	.iccp-consent-manager .iccp-slider,
	.iccp-consent-manager .iccp-slider::before,
	.iccp-consent-manager .iccp-cm-toggle-row::before {
		transition: none;
	}
}

/* ------------------------------------------------------------------ *
 * Responsive
 * ------------------------------------------------------------------ */

@media (max-width: 782px) {
	#iccp-root .iccp-banner.iccp-pos-bottom-bar .iccp-banner-inner {
		flex-wrap: wrap;
	}
}

@media (max-width: 600px) {
	#iccp-root .iccp-banner {
		max-height: calc(100vh - 16px);
	}

	#iccp-root .iccp-banner.iccp-pos-bottom-left,
	#iccp-root .iccp-banner.iccp-pos-bottom-right {
		left: 8px;
		right: 8px;
		bottom: 8px;
		width: auto;
		max-width: none;
	}

	#iccp-root .iccp-banner.iccp-pos-center {
		width: calc(100% - 16px);
	}

	#iccp-root .iccp-banner-inner {
		display: block;
		padding: 18px 16px;
	}

	#iccp-root .iccp-logo {
		margin-bottom: 12px;
	}

	#iccp-root .iccp-actions {
		display: flex;
		flex-direction: column;
		align-items: stretch;
		gap: 8px;
		margin-top: 16px;
	}

	#iccp-root .iccp-btn {
		width: 100%;
		white-space: normal;
	}

	#iccp-root .iccp-modal-wrap {
		padding: 8px;
	}

	#iccp-root .iccp-modal {
		max-height: calc(100vh - 16px);
	}

	#iccp-root .iccp-modal-head,
	#iccp-root .iccp-modal-foot {
		padding: 14px 16px;
	}

	#iccp-root .iccp-modal-body {
		padding: 4px 16px 10px;
	}

	#iccp-root .iccp-modal-links {
		padding: 0 16px 14px;
	}

	#iccp-root .iccp-modal-foot {
		flex-direction: column;
		align-items: stretch;
	}

	#iccp-root .iccp-revoke {
		font-size: 12px;
		padding: 7px 12px;
	}

	.iccp-consent-manager .iccp-cm-actions {
		flex-direction: column;
		align-items: stretch;
	}

	.iccp-consent-manager .iccp-btn {
		width: 100%;
	}
}

/* ------------------------------------------------------------------ *
 * Visibility helper — last rule on purpose.
 *
 * Several of our own selectors set `display` (flex/inline-block), which ties
 * on specificity with an `[hidden]` selector. This is the one place the
 * override is genuinely load-bearing, so it wins outright.
 * ------------------------------------------------------------------ */

#iccp-root [hidden],
.iccp-consent-manager [hidden] {
	display: none !important;
}
