/* Consent Banner
   Minden színt/méretet CSS változó ad; azokat a plugin írja felül inline. */

:root {
	--cb-font: inherit;
	--cb-bg: #ffffff;
	--cb-text: #212121;
	--cb-title-bg: #212121;
	--cb-title-color: #ffffff;
	--cb-accent: #055d93;
	--cb-accent-hover: #242d65;
	--cb-accent-text: #ffffff;
	--cb-toggle-on: #9fd6ae;
	--cb-radius: 8px;
	--cb-btn-radius: 30px;
	--cb-max-width: 1024px;
	--cb-overlay: rgba(0, 0, 0, 0.5);
	--cb-icon-size: 40px;
}

#cookie-consent-overlay {
	display: none;
	position: fixed;
	inset: 0;
	background: var(--cb-overlay);
	z-index: 10999;
}

#cookie-consent-overlay.is-visible {
	display: block;
}

#cookie-consent-banner {
	display: none;
	position: fixed;
	font-family: var(--cb-font);
	background: var(--cb-bg);
	color: var(--cb-text);
	border-radius: var(--cb-radius);
	box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
	z-index: 11000;
	max-height: 90vh;
	overflow-y: auto;
}

/* A leszármazottakra közvetlen deklaráció kell: a téma p / a / button
   szabályai közvetlenül illeszkednek, és azok mindig legyőzik az öröklést. */
#cookie-consent-banner * {
	font-family: var(--cb-font);
}

#cookie-consent-banner.is-visible {
	display: block;
}

.cb-layout-modal {
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	width: 90%;
	max-width: var(--cb-max-width);
}

.cb-layout-bar {
	bottom: 0;
	left: 0;
	right: 0;
	width: 100%;
	max-width: none;
	border-radius: var(--cb-radius) var(--cb-radius) 0 0;
}

.cookie-title {
	text-align: center;
	font-size: 25px;
	padding: 15px;
	margin: 0;
	font-weight: 700;
	color: var(--cb-title-color);
	background: var(--cb-title-bg);
	border-radius: var(--cb-radius) var(--cb-radius) 0 0;
}

.consent-text {
	padding: 20px;
}

.consent-text p {
	margin: 0 0 .8em;
}

.consent-text p:last-child {
	margin-bottom: 0;
}

.cookie-consent-options {
	display: flex;
	align-items: center;
	justify-content: center;
	flex-wrap: wrap;
	gap: 6px 4px;
	margin: 20px 0;
	padding: 0 20px;
}

.consent-label {
	padding: 0 18px 0 6px;
	font-size: 14px;
}

.consent-buttons {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 8px;
	padding: 0 20px 20px;
}

.cookie-consent-button {
	border: none;
	padding: 16px 26px;
	font-family: inherit;
	font-size: 18px;
	line-height: 1.2;
	cursor: pointer;
	border-radius: var(--cb-btn-radius);
}

.cookie-consent-button:active {
	opacity: .5;
}

.cookie-consent-button:focus-visible {
	outline: 2px solid var(--cb-accent);
	outline-offset: 2px;
}

.cookie-consent-button.btn-success {
	background: var(--cb-accent);
	color: var(--cb-accent-text);
}

.cookie-consent-button.btn-success:hover {
	background: var(--cb-accent-hover);
}

.cookie-consent-button.btn-outline {
	background: transparent;
	border: 1px solid currentColor;
	color: var(--cb-text);
}

.cookie-consent-button.btn-outline:hover {
	background: var(--cb-text);
	color: var(--cb-bg);
}

#cookie-image {
	display: none;
	position: fixed;
	bottom: 15px;
	left: 20px;
	z-index: 9999;
	cursor: pointer;
	width: var(--cb-icon-size);
	background: #fff;
	border-radius: 50%;
	padding: 7px;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}

#cookie-image.is-visible {
	display: block;
}

#cookie-image img {
	display: block;
	width: 100%;
	height: auto;
}

/* TOGGLE */

.checkbox-wrapper-6 .tgl {
	display: none;
}

.checkbox-wrapper-6 .tgl,
.checkbox-wrapper-6 .tgl + .tgl-btn,
.checkbox-wrapper-6 .tgl + .tgl-btn:after,
.checkbox-wrapper-6 .tgl + .tgl-btn:before {
	box-sizing: border-box;
}

.checkbox-wrapper-6 .tgl + .tgl-btn {
	outline: 0;
	display: block;
	width: 4em;
	height: 2em;
	position: relative;
	cursor: pointer;
	user-select: none;
	background: #f0f0f0;
	border-radius: 2em;
	padding: 2px;
	transition: background .4s ease;
}

.checkbox-wrapper-6 .tgl + .tgl-btn:after {
	position: relative;
	display: block;
	content: "";
	width: 50%;
	height: 100%;
	left: 0;
	border-radius: 50%;
	background: #fff;
	transition: left .2s ease;
}

.checkbox-wrapper-6 .tgl:checked + .tgl-btn:after {
	left: 50%;
}

.checkbox-wrapper-6 .tgl:checked + .tgl-btn {
	background: var(--cb-toggle-on);
}

.checkbox-wrapper-6 .tgl:focus-visible + .tgl-btn {
	outline: 2px solid var(--cb-accent);
	outline-offset: 2px;
}

.checkbox-wrapper-6 .tgl:disabled + .tgl-btn {
	cursor: not-allowed;
}

.disabled-button {
	background: #a0a0a0 !important;
}

@media (prefers-reduced-motion: reduce) {
	.checkbox-wrapper-6 .tgl + .tgl-btn,
	.checkbox-wrapper-6 .tgl + .tgl-btn:after {
		transition: none;
	}
}

@media (max-width: 768px) {

	#cookie-consent-banner {
		font-size: 14px;
	}

	.cb-layout-modal {
		width: 92%;
	}

	.cookie-title {
		font-size: 20px;
	}

	.consent-buttons {
		flex-direction: column;
	}

	.cookie-consent-button {
		padding: 12px;
		font-size: 14px;
	}

	.consent-label {
		font-size: 12px;
	}

	.consent-text {
		padding: 12px;
		font-size: 12px;
	}
}
