/* Just Cookie Consent. Colors come from CSS variables set in the plugin settings. */
#jcc-root {
	--jcc-primary: #1f2937;
	--jcc-primary-text: #fff;
	--jcc-bg: #fff;
	--jcc-text: #1f2937;
	font-size: 15px;
	line-height: 1.5;
}

#jcc-root [hidden] { display: none !important; }

#jcc-banner {
	position: fixed;
	left: 16px;
	right: 16px;
	bottom: 16px;
	z-index: 2147483000;
	box-sizing: border-box;
	max-width: 560px;
	max-height: calc(100vh - 32px);
	overflow-y: auto;
	padding: 22px 22px 18px;
	border-radius: 14px;
	background: var(--jcc-bg);
	color: var(--jcc-text);
	box-shadow: 0 10px 40px rgba(0, 0, 0, .22);
}

#jcc-banner:focus { outline: none; }

#jcc-banner *, #jcc-banner *::before, #jcc-banner *::after { box-sizing: border-box; }

#jcc-banner .jcc-title {
	margin: 0 32px 8px 0;
	font-size: 1.15em;
	font-weight: 700;
	color: var(--jcc-text);
}

#jcc-banner .jcc-message { margin: 0 0 16px; }

#jcc-banner a { color: inherit; text-decoration: underline; }

#jcc-banner .jcc-close {
	position: absolute;
	top: 10px;
	right: 12px;
	width: 32px;
	height: 32px;
	padding: 0;
	border: 0;
	background: none;
	color: inherit;
	font-size: 24px;
	line-height: 1;
	cursor: pointer;
	opacity: .65;
}
#jcc-banner .jcc-close:hover { opacity: 1; }

#jcc-banner .jcc-buttons {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 4px;
}

/* Secondary actions are outlined, never faded: rejecting must stay clearly readable. */
#jcc-banner .jcc-btn {
	flex: 1 1 120px;
	padding: 11px 14px;
	border: 2px solid var(--jcc-text);
	border-radius: 8px;
	background: transparent;
	color: var(--jcc-text);
	font: inherit;
	font-weight: 700;
	cursor: pointer;
	transition: background .15s, color .15s;
}
#jcc-banner .jcc-btn:hover { background: var(--jcc-text); color: var(--jcc-bg); }
#jcc-banner .jcc-btn-primary {
	border-color: var(--jcc-primary);
	background: var(--jcc-primary);
	color: var(--jcc-primary-text);
}
#jcc-banner .jcc-btn-primary:hover { background: var(--jcc-primary); color: var(--jcc-primary-text); filter: brightness(1.12); }
#jcc-banner button:focus-visible,
#jcc-banner input:focus-visible,
#jcc-floating:focus-visible { outline: 3px solid var(--jcc-primary); outline-offset: 2px; }

#jcc-banner .jcc-category {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding: 12px 0;
	border-top: 1px solid rgba(0, 0, 0, .1);
	cursor: pointer;
}
#jcc-banner .jcc-cat-text strong { display: block; }
#jcc-banner .jcc-cat-text span { display: block; font-size: .88em; opacity: .8; }
#jcc-banner .jcc-always { font-style: normal; font-size: .85em; font-weight: 600; white-space: nowrap; }

#jcc-banner .jcc-switch {
	appearance: none;
	-webkit-appearance: none;
	position: relative;
	flex: 0 0 auto;
	width: 44px;
	height: 26px;
	margin: 0;
	border-radius: 26px;
	background: #c4c4c4;
	cursor: pointer;
	transition: background .2s;
}
#jcc-banner .jcc-switch::after {
	content: '';
	position: absolute;
	top: 3px;
	left: 3px;
	width: 20px;
	height: 20px;
	border-radius: 50%;
	background: #fff;
	transition: transform .2s;
}
#jcc-banner .jcc-switch:checked { background: var(--jcc-primary); }
#jcc-banner .jcc-switch:checked::after { transform: translateX(18px); }

#jcc-banner .jcc-id {
	margin: 4px 0 12px;
	font-size: .8em;
	opacity: .75;
	word-break: break-all;
}

#jcc-floating {
	position: fixed;
	left: 16px;
	bottom: 16px;
	z-index: 2147482999;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: var(--jcc-primary);
	color: var(--jcc-primary-text);
	box-shadow: 0 3px 12px rgba(0, 0, 0, .2);
	cursor: pointer;
}

/* Positions */
#jcc-root.jcc-pos-bottom-right #jcc-banner { left: auto; }
#jcc-root.jcc-pos-bottom-right #jcc-floating { left: auto; right: 16px; }
#jcc-root.jcc-pos-bottom #jcc-banner { left: 0; right: 0; bottom: 0; max-width: none; border-radius: 0; }
#jcc-root.jcc-pos-center #jcc-banner {
	top: 50%;
	left: 50%;
	right: auto;
	bottom: auto;
	width: calc(100% - 32px);
	transform: translate(-50%, -50%);
}
#jcc-root .jcc-backdrop { display: none; }
#jcc-root.jcc-pos-center #jcc-banner:not([hidden]) + .jcc-backdrop {
	display: block;
	position: fixed;
	inset: 0;
	z-index: 2147482998;
	background: rgba(0, 0, 0, .45);
}

@media (max-width: 600px) {
	#jcc-root:not(.jcc-pos-center):not(.jcc-pos-bottom) #jcc-banner { left: 8px; right: 8px; bottom: 8px; }
	#jcc-banner { padding: 18px 16px 14px; }
	#jcc-banner .jcc-btn { flex-basis: 100%; }
}

/* External embeds placeholder */
.jcc-embed { position: relative; display: block; }
.jcc-embed-ph {
	--jcc-primary: #1f2937;
	--jcc-primary-text: #fff;
	--jcc-text: #1f2937;
	position: relative;
	box-sizing: border-box;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 12px;
	min-height: 180px;
	padding: 20px;
	background: #f1f1f1;
	color: var(--jcc-text);
	font-size: 14px;
	line-height: 1.45;
	text-align: center;
}
.jcc-embed-ph--cover { position: absolute; inset: 0; z-index: 2; min-height: 0; }
.jcc-embed-ph p { margin: 0; max-width: 460px; }
.jcc-embed-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.jcc-embed-ph button {
	padding: 9px 14px;
	border: 2px solid var(--jcc-primary);
	border-radius: 8px;
	background: transparent;
	color: var(--jcc-text);
	font: inherit;
	font-weight: 700;
	cursor: pointer;
}
.jcc-embed-ph .jcc-embed-load { background: var(--jcc-primary); color: var(--jcc-primary-text); }
