.acec-banner,
.acec-modal,
.acec-reopen-button {
	box-sizing: border-box;
	font-family: inherit;
}

.acec-banner *,
.acec-modal *,
.acec-reopen-button * {
	box-sizing: border-box;
}

.acec-banner {
	background: #ffffff;
	border: 1px solid rgba(15, 23, 42, 0.14);
	box-shadow: 0 18px 60px rgba(15, 23, 42, 0.18);
	color: #111827;
	left: 16px;
	max-width: min(980px, calc(100vw - 32px));
	position: fixed;
	right: 16px;
	z-index: 999990;
}

.acec-banner--bottom {
	bottom: 16px;
}

.acec-banner--top {
	top: 16px;
}

.acec-banner[hidden] {
	display: none;
}

.acec-banner__content {
	align-items: center;
	display: grid;
	gap: 18px;
	grid-template-columns: 1fr auto;
	padding: 18px;
}

.acec-banner__text h2,
.acec-modal__header h2 {
	color: #111827;
	font-size: 18px;
	font-weight: 700;
	letter-spacing: 0;
	line-height: 1.25;
	margin: 0;
}

.acec-banner__text p,
.acec-modal__intro {
	color: #374151;
	font-size: 14px;
	line-height: 1.55;
	margin: 8px 0 0;
}

.acec-banner__links {
	display: flex;
	flex-wrap: wrap;
	gap: 6px 14px;
	margin-top: 10px;
}

.acec-policy-link {
	color: var(--acec-primary, #0f766e);
	display: inline-block;
	font-size: 14px;
	font-weight: 600;
	text-decoration: underline;
	text-underline-offset: 2px;
}

.acec-banner__actions,
.acec-modal__actions {
	align-items: center;
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	justify-content: flex-end;
}

.acec-button,
.acec-inline-settings,
.acec-reopen-button {
	appearance: none;
	border-radius: 6px;
	cursor: pointer;
	font: inherit;
	font-size: 14px;
	font-weight: 700;
	letter-spacing: 0;
	line-height: 1.2;
	min-height: 42px;
	padding: 10px 16px;
	text-align: center;
	transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.acec-button:hover,
.acec-inline-settings:hover,
.acec-reopen-button:hover {
	transform: translateY(-1px);
}

.acec-button:focus-visible,
.acec-inline-settings:focus-visible,
.acec-reopen-button:focus-visible,
.acec-switch input:focus-visible + span {
	outline: 3px solid rgba(15, 118, 110, 0.35);
	outline-offset: 2px;
}

.acec-button--choice {
	background: #ffffff;
	border: 1px solid #111827;
	color: #111827;
	min-width: 116px;
}

.acec-button--choice:hover {
	background: #111827;
	color: #ffffff;
}

.acec-button--quiet {
	background: #f3f4f6;
	border: 1px solid #d1d5db;
	color: #111827;
	min-width: 116px;
}

.acec-button--quiet:hover {
	background: #e5e7eb;
}

.acec-button--solid {
	background: var(--acec-primary, #0f766e);
	border: 1px solid var(--acec-primary, #0f766e);
	color: #ffffff;
	min-width: 156px;
}

.acec-button--solid:hover {
	filter: brightness(0.94);
}

.acec-modal {
	align-items: center;
	background: rgba(17, 24, 39, 0.55);
	display: flex;
	inset: 0;
	justify-content: center;
	padding: 20px;
	position: fixed;
	z-index: 999991;
}

.acec-modal__panel {
	background: #ffffff;
	border-radius: 8px;
	box-shadow: 0 20px 70px rgba(0, 0, 0, 0.3);
	color: #111827;
	max-height: min(720px, calc(100vh - 40px));
	max-width: 680px;
	overflow: auto;
	padding: 22px;
	width: 100%;
}

.acec-modal__header {
	align-items: center;
	display: flex;
	gap: 16px;
	justify-content: space-between;
}

.acec-modal__close {
	align-items: center;
	appearance: none;
	background: #f3f4f6;
	border: 1px solid #d1d5db;
	border-radius: 999px;
	color: #111827;
	cursor: pointer;
	display: inline-flex;
	font: inherit;
	font-size: 16px;
	font-weight: 700;
	height: 34px;
	justify-content: center;
	line-height: 1;
	padding: 0;
	width: 34px;
}

.acec-category-list {
	display: grid;
	gap: 10px;
	margin: 18px 0;
}

.acec-category {
	align-items: center;
	border: 1px solid #e5e7eb;
	border-radius: 8px;
	display: grid;
	gap: 16px;
	grid-template-columns: 1fr auto;
	padding: 14px;
}

.acec-category__text {
	display: grid;
	gap: 5px;
}

.acec-category__text strong {
	color: #111827;
	font-size: 15px;
	line-height: 1.3;
}

.acec-category__text span {
	color: #4b5563;
	font-size: 13px;
	line-height: 1.45;
}

.acec-category em {
	background: #f3f4f6;
	border-radius: 999px;
	color: #374151;
	font-size: 12px;
	font-style: normal;
	font-weight: 700;
	padding: 7px 10px;
	white-space: nowrap;
}

.acec-switch {
	display: inline-flex;
	position: relative;
}

.acec-switch input {
	height: 1px;
	opacity: 0;
	position: absolute;
	width: 1px;
}

.acec-switch span {
	background: #d1d5db;
	border-radius: 999px;
	display: block;
	height: 28px;
	position: relative;
	transition: background-color 160ms ease;
	width: 52px;
}

.acec-switch span::after {
	background: #ffffff;
	border-radius: 50%;
	box-shadow: 0 2px 6px rgba(15, 23, 42, 0.24);
	content: "";
	height: 22px;
	left: 3px;
	position: absolute;
	top: 3px;
	transition: transform 160ms ease;
	width: 22px;
}

.acec-switch input:checked + span {
	background: var(--acec-primary, #0f766e);
}

.acec-switch input:checked + span::after {
	transform: translateX(24px);
}

.acec-inline-settings {
	background: transparent;
	border: 0;
	color: inherit;
	display: inline;
	min-height: 0;
	padding: 0;
	text-decoration: underline;
	text-underline-offset: 2px;
}

.acec-reopen-button {
	background: #ffffff;
	border: 1px solid rgba(17, 24, 39, 0.2);
	bottom: 16px;
	box-shadow: 0 10px 30px rgba(15, 23, 42, 0.18);
	color: #111827;
	left: 16px;
	min-height: 38px;
	padding: 8px 13px;
	position: fixed;
	z-index: 999989;
}

[data-acec-src][data-acec-category] {
	background:
		linear-gradient(135deg, rgba(15, 118, 110, 0.08), rgba(17, 24, 39, 0.08)),
		#f9fafb;
	border: 1px solid #e5e7eb;
	min-height: 180px;
}

@media (max-width: 760px) {
	.acec-banner {
		left: 10px;
		max-width: calc(100vw - 20px);
		right: 10px;
	}

	.acec-banner--bottom {
		bottom: 10px;
	}

	.acec-banner--top {
		top: 10px;
	}

	.acec-banner__content {
		grid-template-columns: 1fr;
		padding: 16px;
	}

	.acec-banner__actions,
	.acec-modal__actions {
		display: grid;
		grid-template-columns: 1fr;
		width: 100%;
	}

	.acec-button {
		width: 100%;
	}

	.acec-modal {
		align-items: flex-end;
		padding: 10px;
	}

	.acec-modal__panel {
		max-height: calc(100vh - 20px);
		padding: 18px;
	}

	.acec-category {
		align-items: start;
		grid-template-columns: 1fr;
	}
}
