/**
 * Cookie Consent Lite — banner styles.
 *
 * Everything visual is driven by --ccl-* custom properties, so a theme can
 * restyle the notice entirely by redeclaring them:
 *
 *   .ccl-banner { --ccl-bg: #fff; --ccl-text: #111; --ccl-btn-bg: #c1121f; }
 *
 * Defaults live here so the plugin still looks right if the inline settings
 * block is stripped by an optimiser.
 */

.ccl-banner {
	--ccl-bg: #111827;
	--ccl-text: #e5e7eb;
	--ccl-btn-bg: #2563eb;
	--ccl-btn-text: #ffffff;
	--ccl-link: #93c5fd;
	--ccl-radius: 10px;
	--ccl-font-size: 14px;
	--ccl-gap: 16px;
	--ccl-pad: 14px 18px;
	--ccl-shadow: 0 6px 24px rgba(0, 0, 0, 0.18);
	--ccl-z: 99999;

	position: fixed;
	z-index: var(--ccl-z);
	box-sizing: border-box;
	background: var(--ccl-bg);
	color: var(--ccl-text);
	font-size: var(--ccl-font-size);
	line-height: 1.45;
	box-shadow: var(--ccl-shadow);
	opacity: 0;
	transition: opacity 0.28s ease, transform 0.28s ease;
	transform: translateY(12px);
}

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

.ccl-banner.ccl-visible {
	opacity: 1;
	transform: none;
}

.ccl-banner *,
.ccl-banner *::before,
.ccl-banner *::after {
	box-sizing: inherit;
}

.ccl-inner {
	display: flex;
	align-items: center;
	gap: var(--ccl-gap);
	padding: var(--ccl-pad);
	position: relative;
}

.ccl-message {
	margin: 0;
	flex: 1 1 auto;
	color: inherit;
	font-size: inherit;
	line-height: inherit;
}

.ccl-actions {
	display: flex;
	align-items: center;
	gap: 14px;
	flex: 0 0 auto;
}

/* Buttons do not inherit colour: always declare it or the UA stylesheet
   renders the label black. */
.ccl-banner .ccl-accept {
	appearance: none;
	-webkit-appearance: none;
	border: 0;
	cursor: pointer;
	margin: 0;
	padding: 9px 20px;
	border-radius: calc(var(--ccl-radius) - 2px);
	background: var(--ccl-btn-bg);
	color: var(--ccl-btn-text);
	font: inherit;
	font-size: inherit;
	font-weight: 600;
	line-height: 1.2;
	white-space: nowrap;
	transition: filter 0.15s ease;
}

.ccl-banner .ccl-accept:hover,
.ccl-banner .ccl-accept:focus-visible {
	filter: brightness(1.1);
	color: var(--ccl-btn-text);
}

.ccl-banner .ccl-accept:focus-visible,
.ccl-banner .ccl-link:focus-visible,
.ccl-banner .ccl-dismiss:focus-visible {
	outline: 2px solid var(--ccl-link);
	outline-offset: 2px;
}

.ccl-banner .ccl-link {
	color: var(--ccl-link);
	text-decoration: underline;
	white-space: nowrap;
}

.ccl-banner .ccl-link:hover {
	color: var(--ccl-link);
	opacity: 0.85;
}

.ccl-banner .ccl-dismiss {
	appearance: none;
	-webkit-appearance: none;
	background: none;
	border: 0;
	cursor: pointer;
	color: var(--ccl-text);
	opacity: 0.6;
	font-size: 20px;
	line-height: 1;
	padding: 2px 4px;
	margin: 0;
}

.ccl-banner .ccl-dismiss:hover {
	opacity: 1;
	color: var(--ccl-text);
}

/* ---- Positions ---------------------------------------------------------- */

.ccl-pos-bottom-bar,
.ccl-pos-top-bar {
	left: 0;
	right: 0;
	width: 100%;
	border-radius: 0;
}

.ccl-pos-bottom-bar {
	bottom: 0;
}

.ccl-pos-top-bar {
	top: 0;
	transform: translateY(-12px);
}

.ccl-pos-bottom-bar .ccl-inner,
.ccl-pos-top-bar .ccl-inner {
	max-width: 1160px;
	margin: 0 auto;
}

.ccl-pos-bottom-left,
.ccl-pos-bottom-right {
	bottom: 20px;
	width: min(360px, calc(100vw - 32px));
	border-radius: var(--ccl-radius);
}

.ccl-pos-bottom-left {
	left: 20px;
}

.ccl-pos-bottom-right {
	right: 20px;
}

.ccl-pos-bottom-left .ccl-inner,
.ccl-pos-bottom-right .ccl-inner {
	flex-direction: column;
	align-items: flex-start;
	gap: 12px;
	padding: 18px;
}

.ccl-pos-bottom-left .ccl-actions,
.ccl-pos-bottom-right .ccl-actions {
	width: 100%;
	justify-content: space-between;
}

.ccl-pos-bottom-left .ccl-dismiss,
.ccl-pos-bottom-right .ccl-dismiss {
	position: absolute;
	top: 6px;
	right: 8px;
}

/* ---- Small screens ------------------------------------------------------ */

@media (max-width: 640px) {
	.ccl-pos-bottom-bar .ccl-inner,
	.ccl-pos-top-bar .ccl-inner {
		flex-direction: column;
		align-items: flex-start;
		gap: 12px;
	}

	.ccl-pos-bottom-bar .ccl-actions,
	.ccl-pos-top-bar .ccl-actions {
		width: 100%;
		justify-content: space-between;
	}

	.ccl-pos-bottom-left,
	.ccl-pos-bottom-right {
		left: 12px;
		right: 12px;
		bottom: 12px;
		width: auto;
	}
}

@media (prefers-reduced-motion: reduce) {
	.ccl-banner {
		transition: none;
		transform: none;
	}
}
