/**
 * Agency Consent Manager public UI.
 * Neutral foundation styles for the consent banner and preference center.
 */

.acm-banner,
.acm-modal,
.acm-banner *,
.acm-modal * {
	box-sizing: border-box;
}

.acm-banner[hidden],
.acm-modal[hidden] {
	display: none !important;
}

.acm-banner {
	position: fixed;
	right: 0;
	bottom: 0;
	left: 0;
	z-index: 999998;
	max-height: 70vh;
	overflow-y: auto;
	padding: 18px;
	color: #1f2933;
	background: #fff;
	border-top: 1px solid #d8dde3;
	box-shadow: 0 -6px 24px rgba(0, 0, 0, 0.12);
	font-family: inherit;
	font-size: 16px;
	line-height: 1.5;
}

.acm-banner__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	width: 100%;
	max-width: 1200px;
	margin: 0 auto;
}

.acm-banner__content {
	max-width: 720px;
}

.acm-banner__title,
.acm-modal__title {
	margin: 0 0 6px;
	color: #111827;
	font-family: inherit;
	font-size: 1.25rem;
	font-weight: 700;
	line-height: 1.3;
}

.acm-banner__text,
.acm-modal__intro {
	margin: 0;
}

.acm-banner__actions,
.acm-modal__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

.acm-banner__actions {
	justify-content: flex-end;
	flex: 0 0 auto;
}

.acm-button {
	min-height: 44px;
	margin: 0;
	padding: 10px 16px;
	color: #1f2933;
	background: #fff;
	border: 1px solid #68737d;
	border-radius: 4px;
	box-shadow: none;
	cursor: pointer;
	font: inherit;
	font-weight: 600;
	line-height: 1.2;
	text-decoration: none;
}

.acm-button:hover {
	background: #f3f4f6;
}

.acm-button--primary {
	color: #fff;
	background: #28323c;
	border-color: #28323c;
}

.acm-button--primary:hover {
	background: #111827;
}

.acm-button--text {
	background: transparent;
	border-color: transparent;
	text-decoration: underline;
	text-underline-offset: 3px;
}

.acm-button:focus-visible,
.acm-toggle__input:focus-visible + .acm-toggle__control {
	outline: 3px solid #4b5563;
	outline-offset: 2px;
}

.acm-modal {
	position: fixed;
	inset: 0;
	z-index: 999999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	font-family: inherit;
	font-size: 16px;
	line-height: 1.5;
}

.acm-modal__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(17, 24, 39, 0.62);
}

.acm-modal__panel {
	position: relative;
	z-index: 1;
	display: flex;
	flex-direction: column;
	width: min(100%, 680px);
	max-height: calc(100vh - 40px);
	color: #1f2933;
	background: #fff;
	border: 1px solid #d8dde3;
	border-radius: 8px;
	box-shadow: 0 20px 55px rgba(0, 0, 0, 0.28);
}

.acm-modal__header {
	padding: 24px 24px 18px;
	border-bottom: 1px solid #e5e7eb;
}

.acm-modal__body {
	overflow-y: auto;
	padding: 0 24px;
}

.acm-modal__actions {
	padding: 18px 24px 24px;
	border-top: 1px solid #e5e7eb;
}

.acm-category {
	padding: 18px 0;
	border-bottom: 1px solid #e5e7eb;
}

.acm-category:last-child {
	border-bottom: 0;
}

.acm-category__label {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
	cursor: pointer;
}

.acm-category__content {
	min-width: 0;
}

.acm-category__title {
	display: inline;
	color: #111827;
	font-weight: 700;
}

.acm-category__status {
	display: inline-block;
	margin-left: 8px;
	padding: 2px 7px;
	color: #4b5563;
	background: #f3f4f6;
	border-radius: 999px;
	font-size: 0.75rem;
	font-weight: 600;
}

.acm-category__description {
	margin: 5px 0 0;
	color: #4b5563;
	font-size: 0.9375rem;
}

.acm-toggle {
	position: relative;
	display: inline-flex;
	flex: 0 0 auto;
}

.acm-toggle__input {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
}

.acm-toggle__control {
	position: relative;
	display: block;
	width: 48px;
	height: 26px;
	background: #8a949e;
	border-radius: 999px;
	transition: background-color 150ms ease;
}

.acm-toggle__control::after {
	position: absolute;
	top: 3px;
	left: 3px;
	width: 20px;
	height: 20px;
	background: #fff;
	border-radius: 50%;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.28);
	content: '';
	transition: transform 150ms ease;
}

.acm-toggle__input:checked + .acm-toggle__control {
	background: #374151;
}

.acm-toggle__input:checked + .acm-toggle__control::after {
	transform: translateX(22px);
}

.acm-toggle__input:disabled + .acm-toggle__control {
	opacity: 0.62;
	cursor: not-allowed;
}

.acm-modal-open {
	overflow: hidden;
}

@media (max-width: 760px) {
	.acm-banner {
		padding: 16px;
	}

	.acm-banner__inner {
		align-items: stretch;
		flex-direction: column;
		gap: 16px;
	}

	.acm-banner__actions,
	.acm-modal__actions {
		justify-content: stretch;
	}

	.acm-banner__actions .acm-button,
	.acm-modal__actions .acm-button {
		flex: 1 1 100%;
	}

	.acm-modal {
		align-items: flex-end;
		padding: 0;
	}

	.acm-modal__panel {
		width: 100%;
		max-height: 92vh;
		border-right: 0;
		border-bottom: 0;
		border-left: 0;
		border-radius: 10px 10px 0 0;
	}

	.acm-modal__header,
	.acm-modal__actions {
		padding-right: 18px;
		padding-left: 18px;
	}

	.acm-modal__body {
		padding-right: 18px;
		padding-left: 18px;
	}

	.acm-category__label {
		align-items: flex-start;
	}
}

@media (prefers-reduced-motion: reduce) {
	.acm-toggle__control,
	.acm-toggle__control::after {
		transition: none;
	}
}

iframe[data-acm-iframe]:not([data-acm-activated="true"]) {
	display: none;
}

.acm-iframe-placeholder,
.acm-iframe-placeholder * {
	box-sizing: border-box;
}

.acm-iframe-placeholder {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	min-height: 220px;
	padding: 24px;
	color: #1f2933;
	background: #f3f4f6;
	border: 1px solid #d1d5db;
	border-radius: 6px;
	font-family: inherit;
	font-size: 16px;
	line-height: 1.5;
	text-align: center;
}

.acm-iframe-placeholder__content {
	width: 100%;
	max-width: 560px;
}

.acm-iframe-placeholder__title {
	margin: 0 0 8px;
	color: #111827;
	font: inherit;
	font-size: 1.125rem;
	font-weight: 700;
}

.acm-iframe-placeholder__text {
	margin: 0 0 16px;
}

.acm-iframe-placeholder__button {
	min-height: 44px;
	margin: 0;
	padding: 10px 16px;
	color: #1f2933;
	background: #fff;
	border: 1px solid #68737d;
	border-radius: 4px;
	cursor: pointer;
	font: inherit;
	font-weight: 600;
}

.acm-iframe-placeholder__button:hover {
	background: #e5e7eb;
}

.acm-iframe-placeholder__button:focus-visible {
	outline: 3px solid #4b5563;
	outline-offset: 2px;
}

iframe[data-acm-iframe][data-acm-activated="true"] {
	display: block;
	max-width: 100%;
}

img[data-acm-pixel]:not([data-acm-activated="true"]) {
	display: none !important;
}

@media (max-width: 600px) {
	.acm-iframe-placeholder {
		min-height: 180px;
		padding: 18px;
	}
}
