/**
 * eAppSys Cookie Consent – banner, settings dialog and reopen button.
 *
 * The brand colour comes from the --ecc-brand custom property, set inline
 * from the plugin settings.
 *
 * @package EAppSys\CookieConsent
 */
.ecc {
	--ecc-brand: #e4202b;
	position: fixed;
	z-index: 2147483000;
	color: #1f1f21;
	font-family: inherit;
	font-size: 15px;
	line-height: 1.6;
	opacity: 0;
	transition:
		opacity 0.3s,
		transform 0.3s;
}
.ecc.ecc-show,
.ecc.ecc-bar.ecc-show,
.ecc.ecc-box.ecc-show {
	opacity: 1;
	transform: none;
}
.ecc[hidden],
.ecc-reopen[hidden],
.ecc-ov[hidden],
.ecc [hidden] {
	display: none !important;
}
.ecc * {
	box-sizing: border-box;
}
.ecc p {
	margin: 0;
}
.ecc .ecc-title {
	font-size: 18px;
	font-weight: 700;
	margin: 0 0 8px;
	line-height: 1.3;
	color: #1f1f21;
}
.ecc .ecc-msg {
	color: #333;
}
.ecc .ecc-msg2 {
	margin-top: 14px;
}
.ecc .ecc-msg a {
	color: #1f1f21;
	text-decoration: underline;
	font-weight: 400;
}
.ecc .ecc-msg a:hover {
	color: var(--ecc-brand);
}
.ecc .ecc-ptitle {
	display: none;
	font-size: 20px;
	font-weight: 700;
	margin: 0 0 10px;
	color: #1f1f21;
}

/* Buttons: outlined pills, filled on hover */
.ecc-btns {
	display: flex;
	flex-direction: column;
	gap: 14px;
}
.ecc .ecc-btn {
	font: inherit;
	font-size: 16px;
	font-weight: 500;
	line-height: 1.2;
	padding: 15px 24px;
	min-height: 0;
	margin: 0;
	border-radius: 999px;
	border: 2px solid var(--ecc-brand) !important;
	background: transparent !important;
	color: var(--ecc-brand) !important;
	cursor: pointer;
	text-transform: none;
	letter-spacing: 0;
	box-shadow: none;
	transition:
		background 0.2s,
		color 0.2s;
	text-align: center;
	width: 100%;
}
.ecc .ecc-btn:hover,
.ecc .ecc-accept:focus-visible {
	background: var(--ecc-brand) !important;
	color: #fff !important;
}
.ecc .ecc-btn:focus-visible,
.ecc-reopen:focus-visible,
.ecc-switch input:focus-visible + i,
.ecc-close:focus-visible {
	outline: 2px solid var(--ecc-brand);
	outline-offset: 3px;
}
.ecc .ecc-save {
	background: var(--ecc-brand) !important;
	color: #fff !important;
}
.ecc .ecc-save:hover {
	filter: brightness(0.9);
}

/* ---------- Full-width bar (optional) ---------- */
.ecc.ecc-bar {
	left: 0;
	right: 0;
	bottom: 0;
	background: #f2f2f4;
	border-top: 4px solid var(--ecc-brand);
	box-shadow: 0 -6px 30px rgba(0, 0, 0, 0.12);
	transform: translateY(30px);
	max-height: 100vh;
	overflow: auto;
}
.ecc-bar .ecc-main {
	max-width: 1640px;
	margin: 0 auto;
	padding: 30px clamp(20px, 7vw, 140px);
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(260px, 400px);
	gap: clamp(24px, 3vw, 48px);
	align-items: start;
}
.ecc-bar .ecc-text {
	max-width: 1200px;
}

/* ---------- Small box bottom-left (default) ---------- */
.ecc.ecc-box {
	left: 24px;
	bottom: 24px;
	width: min(420px, calc(100vw - 32px));
	max-height: calc(100vh - 48px);
	overflow: auto;
	background: #fff;
	border-top: 4px solid var(--ecc-brand);
	border-radius: 6px;
	box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
	font-size: 14px;
	transform: translateY(16px);
}
.ecc-box .ecc-main {
	padding: 22px;
}
.ecc-box .ecc-msg {
	font-size: 14px;
	color: #444;
}
.ecc-box .ecc-msg2 {
	margin-top: 8px;
}
.ecc-box .ecc-btns {
	margin-top: 16px;
	gap: 8px;
	flex-direction: row;
	flex-wrap: wrap;
}
.ecc-box .ecc-btn {
	font-size: 14px;
	padding: 10px 14px;
	flex: 1 1 auto;
	width: auto;
}
/* Accept and Reject look the same so neither choice is nudged */
.ecc-box .ecc-accept,
.ecc-box .ecc-reject {
	background: var(--ecc-brand) !important;
	color: #fff !important;
}
.ecc-box .ecc-accept:hover,
.ecc-box .ecc-reject:hover {
	filter: brightness(0.9);
}
.ecc-box .ecc-manage {
	flex-basis: 100%;
	order: 3;
	border-color: transparent !important;
	color: #1f1f21 !important;
	text-decoration: underline;
	padding: 6px;
}
.ecc-box .ecc-manage:hover {
	background: none !important;
	color: var(--ecc-brand) !important;
}

/* ---------- Settings dialog (opens from "Manage Settings") ---------- */
.ecc-ov {
	position: fixed;
	inset: 0;
	background: rgba(15, 15, 17, 0.55);
	z-index: 2147482998;
}
.ecc.ecc-open {
	left: 50% !important;
	top: 50% !important;
	right: auto !important;
	bottom: auto !important;
	transform: translate(-50%, -50%) !important;
	width: min(620px, calc(100vw - 32px)) !important;
	max-height: calc(100vh - 40px);
	overflow: auto;
	background: #fff;
	border-radius: 8px;
	border-top: 4px solid var(--ecc-brand);
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}
.ecc.ecc-open .ecc-main {
	display: block;
	padding: 28px 28px 24px;
	max-width: none;
}
.ecc.ecc-open .ecc-ptitle {
	display: block;
}
.ecc.ecc-open .ecc-title,
.ecc.ecc-open .ecc-msg {
	display: none;
}
.ecc.ecc-open .ecc-btns {
	flex-direction: row;
	flex-wrap: wrap;
	margin-top: 22px;
	gap: 10px;
}
.ecc.ecc-open .ecc-btn {
	width: auto;
	flex: 1 1 150px;
	font-size: 15px;
	padding: 12px 18px;
}
.ecc.ecc-open .ecc-save {
	order: -1;
}
.ecc-close {
	position: absolute;
	top: 10px;
	right: 12px;
	width: 36px;
	height: 36px;
	border: 0;
	background: none !important;
	color: #666 !important;
	font-size: 26px;
	line-height: 1;
	cursor: pointer;
	padding: 0;
	box-shadow: none;
}
.ecc-text {
	position: relative;
}
.ecc.ecc-open .ecc-close {
	top: -14px;
	right: -12px;
}
.ecc-prefs {
	border-top: 1px solid #e6e6e8;
}
.ecc-cat {
	padding: 14px 0;
	border-bottom: 1px solid #e6e6e8;
}
.ecc .ecc-cat p {
	margin: 4px 0 0;
	color: #555;
	font-size: 14px;
}
.ecc .ecc-cat-hd {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	font-weight: 600;
	color: #1f1f21;
	cursor: pointer;
	margin: 0;
}
.ecc-always {
	font-size: 13px;
	font-weight: 600;
	color: var(--ecc-brand);
}
.ecc-switch {
	position: relative;
	display: inline-block;
	width: 42px;
	height: 24px;
	flex: 0 0 auto;
}
.ecc-switch input {
	position: absolute;
	opacity: 0;
	width: 100%;
	height: 100%;
	margin: 0;
	cursor: pointer;
	z-index: 1;
}
.ecc-switch i {
	position: absolute;
	inset: 0;
	background: #c9c9cd;
	border-radius: 24px;
	transition: background 0.2s;
	pointer-events: none;
}
.ecc-switch i::after {
	content: "";
	position: absolute;
	top: 3px;
	left: 3px;
	width: 18px;
	height: 18px;
	background: #fff;
	border-radius: 50%;
	transition: transform 0.2s;
}
.ecc-switch input:checked + i {
	background: var(--ecc-brand);
}
.ecc-switch input:checked + i::after {
	transform: translateX(18px);
}

/* ---------- Reopen button (bottom left) ---------- */
.ecc-reopen {
	--ecc-brand: #e4202b;
	position: fixed;
	left: 20px;
	bottom: 20px;
	z-index: 2147482997;
	width: 46px;
	height: 46px;
	border-radius: 50%;
	border: 0;
	background: var(--ecc-brand) !important;
	color: #fff !important;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
	padding: 0;
	transition: transform 0.2s;
}
.ecc-reopen:hover {
	transform: scale(1.08);
}

/* ---------- Tablet & mobile ---------- */
@media (max-width: 900px) {
	.ecc-bar .ecc-main {
		grid-template-columns: 1fr;
		padding: 22px 20px;
		gap: 18px;
	}
	.ecc.ecc-bar {
		font-size: 14px;
		max-height: 85vh;
	}
	.ecc-bar .ecc-btns {
		flex-direction: row;
		flex-wrap: wrap;
		gap: 10px;
	}
	.ecc-bar .ecc-btn {
		flex: 1 1 140px;
		font-size: 15px;
		padding: 12px 16px;
	}
}
@media (max-width: 560px) {
	.ecc-bar .ecc-btn {
		flex: 1 1 100%;
	}
	.ecc.ecc-box {
		left: 12px;
		right: 12px;
		bottom: 12px;
		width: auto;
	}
	.ecc.ecc-open .ecc-main {
		padding: 24px 20px 20px;
	}
	.ecc-reopen {
		left: 12px;
		bottom: 12px;
		width: 42px;
		height: 42px;
	}
}
@media (prefers-reduced-motion: reduce) {
	.ecc,
	.ecc-reopen {
		transition: none;
	}
}
