/* ── Banner ───────────────────────────────────────────────────────────
 * Hidden until the script decides it is needed (no flash for visitors who
 * already chose). It never covers the page with an overlay and never traps
 * focus: a cookie wall is not freely given consent.
 */
.cct-consent-wrap {
	--cct-consent-offset: 24px;
	--cct-reopen-offset: 16px;
}

.cct-consent {
	position: fixed;
	bottom: 0;
	z-index: 9999;
	box-sizing: border-box;
	padding: 20px 24px;
	background: #fff;
	color: #1a1a1a;
	box-shadow: 0 -2px 24px rgba(0, 0, 0, 0.12);
	font-size: 0.95rem;
	line-height: 1.5;
}

.cct-consent[hidden] {
	display: none !important;
}

.cct-consent--bar {
	left: 0;
	right: 0;
	width: 100%;
}

.cct-consent--left,
.cct-consent--right,
.cct-consent--center {
	bottom: var(--cct-consent-offset);
	width: calc(100% - 2 * var(--cct-consent-offset));
	max-width: 440px;
	border-radius: 12px;
	box-shadow: 0 8px 32px rgba(0, 0, 0, 0.16);
}

.cct-consent--left {
	left: var(--cct-consent-offset);
}

.cct-consent--right {
	right: var(--cct-consent-offset);
}

.cct-consent--center {
	left: 50%;
	transform: translateX(-50%);
}

.cct-consent-inner {
	display: flex;
	align-items: center;
	gap: 24px;
	margin: 0 auto;
	max-width: 1200px;
}

.cct-consent--left .cct-consent-inner,
.cct-consent--right .cct-consent-inner,
.cct-consent--center .cct-consent-inner {
	flex-direction: column;
	align-items: stretch;
	gap: 16px;
}

.cct-consent-body {
	flex: 1 1 auto;
	min-width: 0;
}

.cct-consent-title {
	margin: 0 0 6px;
	font-weight: 600;
	font-size: 1.05em;
}

.cct-consent-text {
	margin: 0;
}

.cct-consent-link {
	color: inherit;
	text-decoration: underline;
	text-underline-offset: 2px;
}

/* ── Buttons ──────────────────────────────────────────────────────────
 * Accept and Reject share one size and one shape: Reject must be as easy
 * to see and press as Accept. Only colour tells them apart, and the site
 * can override that per button in the widget's Style tab.
 */
.cct-consent-actions {
	display: flex;
	flex: 0 0 auto;
	flex-wrap: wrap;
	gap: 12px;
}

.cct-consent--left .cct-consent-actions,
.cct-consent--right .cct-consent-actions,
.cct-consent--center .cct-consent-actions {
	flex-direction: column;
}

.cct-consent-btn {
	flex: 1 1 0;
	min-width: 140px;
	min-height: 44px;
	margin: 0;
	padding: 10px 22px;
	border: 1px solid #1a1a1a;
	border-radius: 6px;
	background: #fff;
	color: #1a1a1a;
	font: inherit;
	font-weight: 600;
	line-height: 1.3;
	text-align: center;
	cursor: pointer;
	transition: background-color 0.15s, color 0.15s, border-color 0.15s;
}

.cct-consent-btn--accept {
	background: #1a1a1a;
	color: #fff;
}

.cct-consent-btn:hover,
.cct-consent-btn:focus-visible {
	background: #333;
	border-color: #333;
	color: #fff;
}

.cct-consent-btn:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 2px;
}

/* ── Floating "Cookies" button ────────────────────────────────────────
 * The always-available way back to the banner, so withdrawing consent is
 * as easy as giving it. Shown once a choice has been made.
 */
.cct-consent-reopen-btn {
	position: fixed;
	bottom: var(--cct-reopen-offset);
	z-index: 9998;
	margin: 0;
	padding: 8px 14px;
	border: 1px solid rgba(0, 0, 0, 0.15);
	border-radius: 999px;
	background: #fff;
	color: #1a1a1a;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12);
	font: inherit;
	font-size: 0.8rem;
	line-height: 1.2;
	cursor: pointer;
	transition: background-color 0.15s, color 0.15s;
}

.cct-consent-reopen-btn[hidden] {
	display: none !important;
}

.cct-consent-reopen-btn--left {
	left: var(--cct-reopen-offset);
}

.cct-consent-reopen-btn--right {
	right: var(--cct-reopen-offset);
}

.cct-consent-reopen-btn:hover,
.cct-consent-reopen-btn:focus-visible {
	background: #1a1a1a;
	color: #fff;
}

/* ── Small screens ────────────────────────────────────────────────────── */
@media (max-width: 767px) {
	.cct-consent {
		padding: 16px;
		font-size: 0.9rem;
	}

	.cct-consent--left,
	.cct-consent--right,
	.cct-consent--center {
		left: 12px;
		right: 12px;
		bottom: 12px;
		width: auto;
		max-width: none;
		transform: none;
	}

	.cct-consent-inner {
		flex-direction: column;
		align-items: stretch;
		gap: 14px;
	}

	.cct-consent-actions {
		flex-direction: column;
	}

	.cct-consent-btn {
		width: 100%;
	}
}

/* ── Elementor editor ─────────────────────────────────────────────────
 * Inside the editor the banner is always shown so it can be styled, and
 * sits in the flow of the page instead of floating over the editor UI.
 */
.elementor-editor-active .cct-consent {
	position: relative;
	bottom: auto;
	left: auto;
	right: auto;
	transform: none;
	width: auto;
	margin: 0 auto;
}

.elementor-editor-active .cct-consent-reopen-btn {
	position: relative;
	bottom: auto;
	left: auto;
	right: auto;
	margin-top: 12px;
}
