/* Internal Consent Manager — public consent surface (Cool / Precise).
   Site-themeable via --icm-primary-color / --icm-background-color /
   --icm-text-color; defaults follow the plugin's design system. */

.internal-consent-manager-hidden {
	display: none !important;
}

.icm-consent,
.icm-consent * {
	box-sizing: border-box;
}

.icm-consent[hidden],
.icm-consent [hidden],
.icm-consent__revisit[hidden] {
	display: none !important;
}

.icm-consent {
	position: fixed;
	inset: auto 16px 16px 16px;
	z-index: 99998;
	color: var(--icm-text-color, #131620);
	font-family: inherit;
}

.icm-consent[data-icm-position="top"] {
	inset: 16px 16px auto 16px;
}

.icm-consent__banner {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	gap: 18px;
	align-items: center;
	max-width: 980px;
	margin: 0 auto;
	padding: 20px 22px;
	border: 1px solid #d6dae1;
	border-radius: 12px;
	background: var(--icm-background-color, #ffffff);
	box-shadow: 0 4px 12px rgba(19, 22, 32, 0.07), 0 16px 44px rgba(19, 22, 32, 0.14);
	animation: icm-rise 0.22s cubic-bezier(0.22, 1, 0.36, 1);
}

.icm-consent[data-icm-layout="stacked"] .icm-consent__banner {
	grid-template-columns: 1fr;
}

.icm-consent[data-icm-layout="stacked"] .icm-consent__actions {
	justify-content: flex-start;
}

.icm-consent__title,
.icm-consent__modal-title {
	margin: 0;
	color: var(--icm-text-color, #131620);
	font-size: 17px;
	font-weight: 700;
	line-height: 1.3;
	letter-spacing: -0.01em;
	text-wrap: balance;
}

.icm-consent__message {
	max-width: 68ch;
	margin: 6px 0 0;
	color: var(--icm-text-color, #131620);
	opacity: 0.82;
	font-size: 14px;
	line-height: 1.55;
	letter-spacing: 0;
}

.icm-consent__policy-link {
	display: inline-block;
	margin-top: 8px;
	color: var(--icm-primary-color, #3b53d6);
	font-size: 14px;
	font-weight: 600;
	text-decoration: underline;
	text-underline-offset: 3px;
}

.icm-consent__policy-link:hover {
	text-decoration-thickness: 2px;
}

.icm-consent__actions,
.icm-consent__modal-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	justify-content: flex-end;
}

.icm-consent__button,
.icm-consent__revisit,
.icm-consent__icon-button {
	min-height: 40px;
	border: 1px solid transparent;
	border-radius: 8px;
	cursor: pointer;
	font: inherit;
	font-size: 14px;
	font-weight: 600;
	letter-spacing: 0;
	transition: background-color 0.15s ease-out, border-color 0.15s ease-out, color 0.15s ease-out;
}

.icm-consent__button {
	padding: 8px 16px;
}

.icm-consent__button--primary {
	border-color: var(--icm-primary-color, #3b53d6);
	background: var(--icm-primary-color, #3b53d6);
	color: #ffffff;
}

.icm-consent__button--primary:hover {
	filter: brightness(0.92);
}

.icm-consent__button--secondary {
	border-color: #d6dae1;
	background: var(--icm-background-color, #ffffff);
	color: var(--icm-text-color, #131620);
}

.icm-consent__button--secondary:hover {
	border-color: #b9bfc9;
	background: rgba(19, 22, 32, 0.04);
}

.icm-consent__button:active {
	filter: brightness(0.88);
}

.icm-consent__button:focus-visible,
.icm-consent__revisit:focus-visible,
.icm-consent__icon-button:focus-visible,
.icm-consent__category input:focus-visible,
.icm-consent__policy-link:focus-visible {
	outline: 2px solid var(--icm-primary-color, #3b53d6);
	outline-offset: 2px;
}

.icm-consent__modal {
	position: fixed;
	inset: 0;
	z-index: 99999;
	display: grid;
	place-items: center;
	padding: 18px;
	background: rgba(19, 22, 32, 0.55);
	animation: icm-fade 0.18s ease-out;
}

.icm-consent__modal-panel {
	width: min(100%, 560px);
	max-height: calc(100vh - 36px);
	overflow: auto;
	padding: 22px;
	border: 1px solid #d6dae1;
	border-radius: 12px;
	background: var(--icm-background-color, #ffffff);
	box-shadow: 0 8px 20px rgba(19, 22, 32, 0.1), 0 28px 80px rgba(19, 22, 32, 0.22);
	animation: icm-pop 0.22s cubic-bezier(0.22, 1, 0.36, 1);
}

.icm-consent__modal-header {
	display: flex;
	gap: 12px;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 16px;
}

.icm-consent__icon-button {
	width: 40px;
	padding: 0;
	border-color: #d6dae1;
	background: var(--icm-background-color, #ffffff);
	color: var(--icm-text-color, #131620);
	font-size: 22px;
	line-height: 1;
}

.icm-consent__icon-button:hover {
	border-color: #b9bfc9;
	background: rgba(19, 22, 32, 0.04);
}

.icm-consent__categories {
	display: grid;
	gap: 8px;
	margin-bottom: 18px;
}

.icm-consent__category {
	display: flex;
	gap: 16px;
	align-items: center;
	justify-content: space-between;
	padding: 13px 14px;
	border: 1px solid #e6e9ee;
	border-radius: 10px;
	background: #f6f8fa;
	transition: border-color 0.15s ease-out;
}

.icm-consent__category:hover {
	border-color: #d6dae1;
}

.icm-consent__category strong {
	display: block;
	color: var(--icm-text-color, #131620);
	font-size: 14px;
	font-weight: 600;
	line-height: 1.4;
}

.icm-consent__category small {
	display: block;
	margin-top: 3px;
	color: var(--icm-text-color, #131620);
	opacity: 0.72;
	font-size: 13px;
	line-height: 1.4;
}

.icm-consent__category input {
	flex: 0 0 auto;
	width: 20px;
	height: 20px;
	margin: 0;
	accent-color: var(--icm-primary-color, #3b53d6);
}

.icm-consent__category input:disabled {
	opacity: 0.55;
}

.icm-consent__revisit {
	position: fixed;
	right: 16px;
	bottom: 16px;
	z-index: 99997;
	padding: 8px 14px;
	border-color: #d6dae1;
	background: var(--icm-background-color, #ffffff);
	color: var(--icm-text-color, #131620);
	box-shadow: 0 2px 6px rgba(19, 22, 32, 0.08), 0 10px 28px rgba(19, 22, 32, 0.14);
}

.icm-consent__revisit:hover {
	border-color: #b9bfc9;
}

.icm-blocked-embed {
	border: 1px solid #d6dae1;
	border-radius: 12px;
	background: var(--icm-background-color, #ffffff);
	color: var(--icm-text-color, #131620);
}

.icm-blocked-embed__placeholder {
	display: grid;
	gap: 10px;
	place-items: center;
	min-height: 180px;
	padding: 24px;
	text-align: center;
}

.icm-blocked-embed__placeholder strong {
	font-size: 15px;
	letter-spacing: -0.01em;
}

.icm-blocked-embed__placeholder p {
	max-width: 460px;
	margin: 0;
	color: var(--icm-text-color, #131620);
	opacity: 0.75;
	font-size: 14px;
	line-height: 1.5;
}

.icm-blocked-embed iframe {
	display: block;
	width: 100%;
	max-width: 100%;
	border: 0;
	border-radius: 11px;
}

@keyframes icm-rise {
	from {
		opacity: 0;
		transform: translateY(10px);
	}

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

@keyframes icm-fade {
	from {
		opacity: 0;
	}

	to {
		opacity: 1;
	}
}

@keyframes icm-pop {
	from {
		opacity: 0;
		transform: scale(0.985) translateY(6px);
	}

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

@media (max-width: 720px) {
	.icm-consent {
		inset: auto 10px 10px 10px;
	}

	.icm-consent[data-icm-position="top"] {
		inset: 10px 10px auto 10px;
	}

	.icm-consent__banner {
		grid-template-columns: 1fr;
		padding: 16px;
	}

	.icm-consent__actions,
	.icm-consent__modal-actions {
		display: grid;
		grid-template-columns: 1fr;
	}

	.icm-consent__button {
		width: 100%;
	}

	.icm-consent__category {
		align-items: flex-start;
	}
}

@media (prefers-reduced-motion: reduce) {
	.icm-consent__banner,
	.icm-consent__modal,
	.icm-consent__modal-panel {
		animation: none;
	}

	.icm-consent__button,
	.icm-consent__revisit,
	.icm-consent__icon-button,
	.icm-consent__category {
		transition: none;
	}
}
