/*
 * Chance2Win Cookie Notice box (c2w-cookie-notice.php).
 * Fixed position, so it never pushes the page (no layout shift). Colours follow the
 * theme palette (--c2w-*) when the site has one, with neutral fallbacks otherwise.
 * Accept and Reject share one style on purpose: rejecting must be as easy as accepting.
 */

.c2w-cn {
	--c2w-cn-accent: var(--c2w-primary, #0f6f7f);
	/* Traditional names the text-on-primary colour --c2w-on-primary-fill, Queen --c2w-on-primary. */
	--c2w-cn-on-accent: var(--c2w-on-primary-fill, var(--c2w-on-primary, #ffffff));
	--c2w-cn-bg: var(--c2w-bg, #ffffff);
	--c2w-cn-text: var(--c2w-text, #1d2327);
	--c2w-cn-border: var(--c2w-border, #d0d5da);

	position: fixed;
	z-index: 2147483000; /* above chat widgets, demo bars and sticky footers: consent must be answerable */
	bottom: calc(16px + env(safe-area-inset-bottom, 0px));
	box-sizing: border-box;
	max-width: 380px;
	margin: 0;
	padding: 18px 18px 16px;
	background: var(--c2w-cn-bg);
	color: var(--c2w-cn-text);
	border: 1px solid var(--c2w-cn-border);
	border-radius: 10px;
	box-shadow: 0 8px 30px rgba(0, 0, 0, .18);
	font-family: inherit;
	font-size: 15px;
	line-height: 1.5;
	text-align: left;
}

.c2w-cn--left  { left: 16px; }
.c2w-cn--right { right: 16px; }

.c2w-cn--bar {
	left: 16px;
	right: 16px;
	max-width: none;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px 20px;
}

.c2w-cn[hidden] { display: none; }

.c2w-cn .c2w-cn__title {
	margin: 0 0 4px;
	padding: 0;
	color: inherit;
	font-size: 16px;
	font-weight: 700;
	line-height: 1.3;
}

.c2w-cn--bar .c2w-cn__title { flex: 1 1 100%; margin: 0; }

.c2w-cn .c2w-cn__msg {
	margin: 0 0 14px;
	padding: 0;
	color: inherit;
	font-size: 15px;
}

.c2w-cn--bar .c2w-cn__msg { flex: 1 1 400px; margin: 0; }

.c2w-cn .c2w-cn__msg a {
	color: var(--c2w-cn-accent);
	text-decoration: underline;
}

.c2w-cn .c2w-cn__btns {
	display: flex;
	gap: 10px;
	margin: 0;
	padding: 0;
}

.c2w-cn .c2w-cn__btn {
	flex: 1 1 0;
	min-height: 44px;
	margin: 0;
	padding: 11px 14px;
	border: 2px solid var(--c2w-cn-accent);
	border-radius: 6px;
	background: var(--c2w-cn-accent);
	color: var(--c2w-cn-on-accent);
	font-family: inherit;
	font-size: 15px;
	font-weight: 600;
	line-height: 1.2;
	text-transform: none;
	letter-spacing: normal;
	box-shadow: none;
	cursor: pointer;
}

.c2w-cn .c2w-cn__btn:hover { filter: brightness(.92); }

.c2w-cn .c2w-cn__btn:focus-visible {
	outline: 3px solid var(--c2w-cn-text);
	outline-offset: 2px;
}

@media (max-width: 480px) {
	.c2w-cn,
	.c2w-cn--bar {
		left: 8px;
		right: 8px;
		bottom: calc(8px + env(safe-area-inset-bottom, 0px));
		max-width: none;
	}
}

@media print {
	.c2w-cn { display: none !important; }
}
