/* APlug Cookie Banner – public UI */
.aplug-cb,
.aplug-cb *,
.aplug-cb-reopen,
.aplug-cb-reopen *,
.aplug-cb-blocker,
.aplug-cb-blocker * {
	box-sizing: border-box;
}

.aplug-cb[hidden],
.aplug-cb-reopen[hidden],
.aplug-cb [hidden] {
	display: none !important;
}

.aplug-cb .screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.aplug-cb {
	position: fixed;
	inset: 0;
	z-index: 2147483000;
	font-family: var(--aplug-cb-font);
	font-size: 16px;
	line-height: 1.5;
	color: var(--aplug-cb-text);
	word-break: normal;
	overflow-wrap: anywhere;
}

.aplug-cb__overlay {
	display: var(--aplug-cb-overlay-display);
	position: absolute;
	inset: 0;
	background: var(--aplug-cb-overlay);
	opacity: .48;
}

.aplug-cb__dialog {
	position: absolute;
	display: flex;
	flex-direction: column;
	width: min(var(--aplug-cb-width), calc(100vw - 32px));
	max-width: calc(100vw - 32px);
	max-height: min(84vh, 820px);
	margin: 0;
	padding: 0;
	overflow: hidden;
	background: var(--aplug-cb-bg);
	border: 1px solid var(--aplug-cb-border);
	border-radius: var(--aplug-cb-radius);
	box-shadow: var(--aplug-cb-shadow);
	color: var(--aplug-cb-text);
}

.aplug-cb--bottom-right .aplug-cb__dialog { right: 20px; bottom: 20px; }
.aplug-cb--bottom-left .aplug-cb__dialog { left: 20px; bottom: 20px; }
.aplug-cb--bottom .aplug-cb__dialog { left: 50%; bottom: 20px; transform: translateX(-50%); }
.aplug-cb--center .aplug-cb__dialog,
.aplug-cb--modal .aplug-cb__dialog { left: 50%; top: 50%; transform: translate(-50%, -50%); }

.aplug-cb--bar .aplug-cb__dialog {
	left: 0;
	right: 0;
	bottom: 0;
	width: 100%;
	max-width: 100%;
	max-height: 90vh;
	border-right: 0;
	border-bottom: 0;
	border-left: 0;
	border-radius: var(--aplug-cb-radius) var(--aplug-cb-radius) 0 0;
}

.aplug-cb__main,
.aplug-cb__preferences {
	width: 100%;
	min-width: 0;
	padding: clamp(20px, 4vw, 32px);
	overflow-x: hidden;
	overflow-y: auto;
}

.aplug-cb--bar .aplug-cb__main {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	gap: 10px 28px;
	align-items: center;
	max-width: 1440px;
	margin: 0 auto;
}

.aplug-cb__logo {
	display: block;
	width: auto;
	max-width: min(260px, 100%);
	height: auto;
	max-height: var(--aplug-cb-logo-height);
	margin: 0 0 16px;
	object-fit: contain;
	object-position: left center;
}

.aplug-cb h2,
.aplug-cb h3,
.aplug-cb p {
	margin-top: 0;
	color: inherit;
	font-family: inherit;
}

.aplug-cb h2 { margin-bottom: 10px; font-size: clamp(1.25rem, 3vw, 1.55rem); line-height: 1.25; }
.aplug-cb h3 { margin-bottom: 5px; font-size: 1rem; line-height: 1.35; }
.aplug-cb p { margin-bottom: 10px; }
.aplug-cb__message { color: var(--aplug-cb-muted); }
.aplug-cb__message > :last-child { margin-bottom: 0; }

.aplug-cb__legal {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin-top: 12px;
	font-size: .875rem;
}

.aplug-cb a,
.aplug-cb__button--link {
	color: var(--aplug-cb-primary);
	text-decoration: underline;
	text-underline-offset: 2px;
}

.aplug-cb__actions,
.aplug-cb__preferences-actions {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 10px;
	width: 100%;
	margin-top: 22px;
}

.aplug-cb__button,
.aplug-cb-blocker button,
.aplug-cb-inline-settings {
	appearance: none;
	min-width: 0;
	min-height: 44px;
	padding: 10px 16px;
	border: 2px solid var(--aplug-cb-primary);
	border-radius: var(--aplug-cb-button-radius);
	font: 600 .95rem/1.25 var(--aplug-cb-font);
	text-align: center;
	cursor: pointer;
}

.aplug-cb__button--primary,
.aplug-cb-blocker button {
	background: var(--aplug-cb-primary);
	color: var(--aplug-cb-primary-text);
}

.aplug-cb__actions [data-aplug-reject] {
	background: var(--aplug-cb-primary);
	color: var(--aplug-cb-primary-text);
}

.aplug-cb__button--secondary,
.aplug-cb-inline-settings {
	background: transparent;
	color: var(--aplug-cb-primary);
}

.aplug-cb__button--link {
	grid-column: 1 / -1;
	min-height: 36px;
	padding: 4px;
	background: transparent;
	border-color: transparent;
}

.aplug-cb button:focus-visible,
.aplug-cb a:focus-visible,
.aplug-cb-reopen:focus-visible,
.aplug-cb-blocker button:focus-visible {
	outline: 3px solid color-mix(in srgb, var(--aplug-cb-primary) 40%, white);
	outline-offset: 3px;
}

.aplug-cb__preferences-head {
	display: grid;
	grid-template-columns: 40px minmax(0, 1fr);
	gap: 12px;
	align-items: start;
}

.aplug-cb__preferences-head p { color: var(--aplug-cb-muted); font-size: .9rem; }
.aplug-cb__back { width: 40px; height: 40px; padding: 0; border: 1px solid var(--aplug-cb-border); border-radius: 50%; background: transparent; color: var(--aplug-cb-text); font-size: 1.4rem; cursor: pointer; }
.aplug-cb__category-list { display: grid; gap: 10px; margin-top: 14px; }

.aplug-cb__category {
	min-width: 0;
	padding: 15px;
	border: 1px solid var(--aplug-cb-border);
	border-radius: calc(var(--aplug-cb-radius) * .7);
}

.aplug-cb__category-summary,
.aplug-cb__service-head {
	display: flex;
	gap: 14px;
	align-items: flex-start;
	justify-content: space-between;
	min-width: 0;
}

.aplug-cb__category-summary > div,
.aplug-cb__service-head > div { min-width: 0; }
.aplug-cb__category-summary p { margin: 0; color: var(--aplug-cb-muted); font-size: .85rem; }
.aplug-cb__services { margin-top: 12px; border-top: 1px solid var(--aplug-cb-border); padding-top: 10px; }
.aplug-cb__services summary { color: var(--aplug-cb-primary); cursor: pointer; font-size: .875rem; font-weight: 600; }
.aplug-cb__service { min-width: 0; padding: 14px 0; border-bottom: 1px solid var(--aplug-cb-border); font-size: .82rem; }
.aplug-cb__service:last-child { border-bottom: 0; padding-bottom: 0; }
.aplug-cb__service small { display: block; color: var(--aplug-cb-muted); }
.aplug-cb__service p { margin: 7px 0; }

.aplug-cb__switch { position: relative; flex: 0 0 46px; width: 46px; height: 26px; }
.aplug-cb__switch input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.aplug-cb__switch span { position: absolute; inset: 0; border-radius: 999px; background: #aeb6c2; transition: .18s ease; cursor: pointer; }
.aplug-cb__switch span::before { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,.22); transition: .18s ease; }
.aplug-cb__switch input:checked + span { background: var(--aplug-cb-primary); }
.aplug-cb__switch input:checked + span::before { transform: translateX(20px); }
.aplug-cb__switch input:focus-visible + span { outline: 3px solid color-mix(in srgb, var(--aplug-cb-primary) 40%, white); outline-offset: 2px; }
.aplug-cb__switch input:disabled + span { opacity: .68; cursor: not-allowed; }
.aplug-cb__switch--small { transform: scale(.86); transform-origin: right top; }

.aplug-cb-reopen {
	position: fixed;
	right: 16px;
	bottom: 16px;
	z-index: 2147482990;
	display: inline-flex;
	align-items: center;
	gap: 7px;
	max-width: calc(100vw - 32px);
	padding: 9px 12px;
	border: 1px solid var(--aplug-cb-border);
	border-radius: 999px;
	background: var(--aplug-cb-bg);
	box-shadow: var(--aplug-cb-shadow);
	color: var(--aplug-cb-text);
	font: 600 12px/1.2 var(--aplug-cb-font);
	cursor: pointer;
}

.aplug-cb-blocker {
	display: grid;
	place-items: center;
	width: 100%;
	max-width: 100%;
	min-height: 240px;
	padding: 24px;
	overflow: hidden;
	border: 1px solid var(--aplug-cb-border, #d9dee5);
	border-radius: var(--aplug-cb-radius, 12px);
	background: color-mix(in srgb, var(--aplug-cb-bg, #fff) 92%, #d9dee5);
	color: var(--aplug-cb-text, #1d2327);
	font-family: var(--aplug-cb-font, sans-serif);
	text-align: center;
}

.aplug-cb-blocker__notice { width: min(520px, 100%); }
.aplug-cb-blocker__notice p { color: var(--aplug-cb-muted, #5b6470); }
.aplug-cb-blocker [data-aplug-content],
.aplug-cb-blocker [data-aplug-content] > *,
.aplug-cb-blocker iframe { width: 100%; max-width: 100%; }
.aplug-cb-blocker.is-loaded { display: block; min-height: 0; padding: 0; border: 0; background: transparent; }

body.aplug-cb-open { overflow: hidden; }

@media (max-width: 600px) {
	.aplug-cb__dialog,
	.aplug-cb--bottom-right .aplug-cb__dialog,
	.aplug-cb--bottom-left .aplug-cb__dialog,
	.aplug-cb--bottom .aplug-cb__dialog {
		left: 8px;
		right: 8px;
		bottom: 8px;
		width: auto;
		max-width: calc(100vw - 16px);
		max-height: calc(100dvh - 16px);
		transform: none;
	}
	.aplug-cb--center .aplug-cb__dialog,
	.aplug-cb--modal .aplug-cb__dialog {
		left: 8px;
		right: 8px;
		top: 8px;
		bottom: 8px;
		width: auto;
		max-width: calc(100vw - 16px);
		max-height: calc(100dvh - 16px);
		transform: none;
	}
	.aplug-cb__main,
	.aplug-cb__preferences { padding: 20px; }
	.aplug-cb__actions,
	.aplug-cb__preferences-actions { grid-template-columns: 1fr; }
	.aplug-cb__button--link { grid-column: auto; }
	.aplug-cb--bar .aplug-cb__main { display: block; }
	.aplug-cb-reopen span:last-child { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
}

@media (prefers-reduced-motion: reduce) {
	.aplug-cb *, .aplug-cb-reopen * { scroll-behavior: auto !important; transition: none !important; }
}
