/**
 * TWC CMP — banner público (neutro, responsive).
 */

.twc-cmp-banner {
	--twc-cmp-bg: #ffffff;
	--twc-cmp-border: #dcdcde;
	--twc-cmp-text: #1d2327;
	--twc-cmp-muted: #646970;
	--twc-cmp-surface: #fafafa;
	--twc-cmp-accent: #1d2327;
	--twc-cmp-accent-text: #ffffff;
	--twc-cmp-focus: #2271b1;
	--twc-cmp-switch-on: #00a32a;
	--twc-cmp-switch-off: #d63638;
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	align-items: flex-end;
	justify-content: center;
	padding: 0.75rem;
	box-sizing: border-box;
	pointer-events: none;
}

.twc-cmp-banner[hidden] {
	display: none !important;
}

.twc-cmp-banner--align-left {
	justify-content: flex-start;
}

.twc-cmp-banner--align-center {
	justify-content: center;
}

.twc-cmp-banner--align-right {
	justify-content: flex-end;
}

.twc-cmp-banner--v-top {
	align-items: flex-start;
}

.twc-cmp-banner--v-bottom {
	align-items: flex-end;
}

.twc-cmp-banner__panel {
	pointer-events: auto;
	max-width: 34rem;
	width: 100%;
	max-height: 90vh;
	overflow-y: auto;
	margin: 0;
	padding: 1.25rem 1.25rem 1rem;
	background: var(--twc-cmp-bg);
	border: 1px solid var(--twc-cmp-border);
	border-radius: 8px;
	box-shadow: 0 4px 24px rgba(0, 0, 0, 0.12);
	color: var(--twc-cmp-text);
}

.twc-cmp-banner__brand {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	margin-bottom: 0.75rem;
}

.twc-cmp-banner__logo {
	display: block;
	width: 40px;
	height: 40px;
	border-radius: 6px;
	object-fit: contain;
	background: #fff;
	border: 1px solid #e2e4e7;
	flex-shrink: 0;
}

.twc-cmp-banner__title {
	margin: 0;
	padding: 0;
	font-size: 1.125rem;
	font-weight: 600;
	line-height: 1.3;
	color: var(--twc-cmp-text);
}

.twc-cmp-banner__text {
	margin: 0 0 0.75rem;
	font-size: 0.9375rem;
	line-height: 1.5;
	color: var(--twc-cmp-muted);
}

.twc-cmp-banner__policy-wrap {
	margin: 0 0 1rem;
}

.twc-cmp-banner__policy {
	font-size: 0.875rem;
	color: var(--twc-cmp-focus);
	text-decoration: underline;
	text-underline-offset: 2px;
}

.twc-cmp-banner__policy:hover,
.twc-cmp-banner__policy:focus-visible {
	color: var(--twc-cmp-text);
}

.twc-cmp-banner__cats {
	display: grid;
	gap: 0.5rem;
	margin: 0 0 1.25rem;
	padding: 0.75rem;
	background: var(--twc-cmp-surface);
	border: 1px solid #f0f0f1;
	border-radius: 6px;
}

.twc-cmp-banner__cat {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	min-height: 2.25rem;
}

.twc-cmp-banner__cat-label {
	display: flex;
	flex-direction: column;
	gap: 0.125rem;
	cursor: pointer;
}

.twc-cmp-banner__cat-name {
	font-size: 0.9375rem;
	font-weight: 600;
	color: var(--twc-cmp-text);
}

.twc-cmp-banner__cat-hint {
	font-size: 0.75rem;
	color: var(--twc-cmp-muted);
}

/* Switch-style checkboxes */
.twc-cmp-banner__switch {
	appearance: none;
	-webkit-appearance: none;
	position: relative;
	width: 2.75rem;
	height: 1.5rem;
	margin: 0;
	flex-shrink: 0;
	border: 1px solid var(--twc-cmp-switch-off);
	border-radius: 999px;
	background: var(--twc-cmp-switch-off);
	cursor: pointer;
	transition: background 0.15s ease, border-color 0.15s ease;
}

.twc-cmp-banner__switch::after {
	content: "";
	position: absolute;
	top: 2px;
	left: 2px;
	width: 1.125rem;
	height: 1.125rem;
	border-radius: 50%;
	background: #fff;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
	transition: transform 0.15s ease;
}

.twc-cmp-banner__switch:checked {
	background: var(--twc-cmp-switch-on);
	border-color: var(--twc-cmp-switch-on);
}

.twc-cmp-banner__switch:checked::after {
	transform: translateX(1.2rem);
}

.twc-cmp-banner__switch:disabled {
	opacity: 0.7;
	cursor: not-allowed;
}

.twc-cmp-banner__switch:focus-visible {
	outline: 2px solid var(--twc-cmp-focus);
	outline-offset: 2px;
}

.twc-cmp-banner__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
}

.twc-cmp-banner__btn {
	flex: 1 1 auto;
	min-width: 7.5rem;
	padding: 0.625rem 1rem;
	font-size: 0.9375rem;
	font-weight: 600;
	line-height: 1.3;
	border-radius: 4px;
	border: 1px solid var(--twc-cmp-border);
	background: #fff;
	color: var(--twc-cmp-text);
	cursor: pointer;
	text-align: center;
}

.twc-cmp-banner__btn:hover {
	background: var(--twc-cmp-surface);
}

.twc-cmp-banner__btn:focus-visible {
	outline: 2px solid var(--twc-cmp-focus);
	outline-offset: 2px;
}

.twc-cmp-banner__btn:disabled {
	opacity: 0.6;
	cursor: wait;
}

.twc-cmp-banner__btn--accept {
	background: var(--twc-cmp-accent);
	border-color: var(--twc-cmp-accent);
	color: var(--twc-cmp-accent-text);
}

.twc-cmp-banner__btn--accept:hover {
	background: #2c3338;
	border-color: #2c3338;
}

@media (max-width: 600px) {
	.twc-cmp-banner {
		padding: 0.75rem;
	}

	.twc-cmp-banner__panel {
		border-radius: 8px;
		padding: 1rem;
	}

	.twc-cmp-banner__actions {
		flex-direction: column;
	}

	.twc-cmp-banner__btn {
		width: 100%;
		min-width: 0;
	}
}
