:root {
	--color-consent-def: #000;
	--color-consent-text: #6b6b6b;
	--color-consent-bg: #fff;
	--color-consent-muted: #e8e8e8;
	--color-consent-border: #e5e5e5;
	--color-consent-toggle-off: #d8d8d8;
	--color-consent-toggle-on: #4a4a4a;
	--color-consent-btn: #d4d4d4;
}

#CookieConsentBar {
	background-color: var(--color-consent-bg);
	position: fixed;
	left: 0;
	bottom: 0;
	width: 100%;
	z-index: 999999;
	box-shadow: 0 -4px 32px rgba(0, 0, 0, .08);
	padding: 40px 48px 32px;
	display: none;
	flex-direction: column;
	gap: 28px;
	box-sizing: border-box;
}

#CookieConsentBar.show {
	display: flex !important;
}

/* Header: title + logo */
#CookieConsentBar .ccb-header {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 32px;
}

#CookieConsentBar .ccb-intro {
	flex: 1;
	min-width: 0;
	max-width: 920px;
}

#CookieConsentBar .ccb-title {
	font-family: var(--font-title), serif;
	font-size: 28px;
	font-weight: 300;
	text-transform: uppercase;
	letter-spacing: 4px;
	color: var(--color-consent-def);
	margin: 0 0 14px;
	line-height: 1.2;
}

#CookieConsentBar .ccb-desc {
	font-family: var(--font-default), sans-serif;
	font-size: 13px;
	font-weight: 300;
	line-height: 150%;
	letter-spacing: 0.5px;
	color: var(--color-consent-text);
	margin: 0;
	max-width: 780px;
}

#CookieConsentBar .ccb-logo {
	flex-shrink: 0;
	margin-top: 4px;
	font-size: 14px;
	letter-spacing: 2px;
	text-transform: none;
	color: var(--color-consent-def);
	user-select: none;
}

#CookieConsentBar .ccb-logo::first-letter {
	font-style: italic;
}

/* Category toggles — desktop: 4 columns */
#CookieConsentBar .selected {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	border: 1px solid var(--color-consent-border);
	margin: 0;
	max-height: none;
	overflow: visible;
}

#CookieConsentBar .switch-container {
	padding: 20px 24px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-right: 1px solid var(--color-consent-border);
}

#CookieConsentBar .switch-container:last-child {
	border-right: none;
}

#CookieConsentBar .form-switch {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	width: 100%;
	padding: 0;
	margin: 0;
}

#CookieConsentBar label {
	font-family: var(--font-default), sans-serif;
	font-size: 14px;
	font-weight: 600;
	letter-spacing: 0.5px;
	color: var(--color-consent-def);
	margin: 0;
	cursor: pointer;
	line-height: 1.3;
}

#CookieConsentBar .form-switch .form-check-input {
	width: 2.6em !important;
	height: 1.35em !important;
	margin: 0 !important;
	float: none;
	flex-shrink: 0;
	box-shadow: none !important;
	border: none !important;
	border-radius: 2em !important;
	background-color: var(--color-consent-toggle-off) !important;
	background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%23fff'/%3e%3c/svg%3e") !important;
	background-position: left center !important;
	background-repeat: no-repeat !important;
	cursor: pointer;
	transition: background-position .15s ease, background-color .15s ease;
}

#CookieConsentBar .form-switch .form-check-input:checked {
	background-color: var(--color-consent-toggle-on) !important;
	background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%23fff'/%3e%3c/svg%3e") !important;
	background-position: right center !important;
}

#CookieConsentBar .form-switch .form-check-input:disabled {
	background-color: var(--color-consent-toggle-on) !important;
	opacity: 1;
	cursor: default;
}

/* Buttons */
#CookieConsentBar .buttons {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 12px;
	flex-wrap: wrap;
}

#CookieConsentBar button {
	font-family: var(--font-default), sans-serif;
	font-size: 13px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 1.5px;
	background: unset;
	border: 1px solid transparent;
	border-radius: 0;
	padding: 12px 28px;
	white-space: nowrap;
	margin: 0;
	min-width: 0;
	cursor: pointer;
	transition: background-color .2s ease, border-color .2s ease, color .2s ease;
}

#CookieConsentBar button[data-cookie="kivalasztas"] {
	border-color: var(--color-consent-def);
	color: var(--color-consent-def);
	background-color: transparent;
}

#CookieConsentBar button[data-cookie="kivalasztas"]:hover {
	background-color: var(--color-consent-def);
	color: #fff;
}

#CookieConsentBar button[data-cookie="engedelyezes"] {
	border-color: var(--color-consent-btn);
	background-color: var(--color-consent-btn);
	color: var(--color-consent-def);
}

#CookieConsentBar button[data-cookie="engedelyezes"]:hover {
	background-color: #c4c4c4;
	border-color: #c4c4c4;
}

/* Tablet */
@media (max-width: 992px) {
	#CookieConsentBar {
		padding: 32px 28px 24px;
		gap: 24px;
	}

	#CookieConsentBar .ccb-title {
		font-size: 22px;
		letter-spacing: 3px;
	}

	#CookieConsentBar .selected {
		grid-template-columns: repeat(2, 1fr);
	}

	#CookieConsentBar .switch-container:nth-child(2) {
		border-right: none;
	}

	#CookieConsentBar .switch-container:nth-child(1),
	#CookieConsentBar .switch-container:nth-child(2) {
		border-bottom: 1px solid var(--color-consent-border);
	}
}

/* Mobile — stacked rows */
@media (max-width: 768px) {
	#CookieConsentBar {
		padding: 28px 20px 20px;
		gap: 20px;
		max-height: 90vh;
		overflow-y: auto;
	}

	#CookieConsentBar .ccb-header {
		flex-direction: column-reverse;
		align-items: stretch;
		gap: 20px;
	}

	#CookieConsentBar .ccb-logo {
		align-self: flex-end;
		margin-top: 0;
		font-size: 13px;
	}

	#CookieConsentBar .ccb-title {
		font-size: 20px;
		letter-spacing: 2.5px;
		margin-bottom: 12px;
	}

	#CookieConsentBar .ccb-desc {
		font-size: 12px;
		line-height: 145%;
		max-width: none;
	}

	#CookieConsentBar .selected {
		display: flex;
		flex-direction: column;
		border: none;
		border-top: 1px solid var(--color-consent-border);
		border-bottom: 1px solid var(--color-consent-border);
	}

	#CookieConsentBar .switch-container {
		padding: 16px 0;
		border-right: none;
		border-bottom: 1px solid var(--color-consent-border);
		justify-content: stretch;
	}

	#CookieConsentBar .switch-container:last-child {
		border-bottom: none;
	}

	#CookieConsentBar .switch-container:nth-child(1),
	#CookieConsentBar .switch-container:nth-child(2) {
		border-bottom: 1px solid var(--color-consent-border);
	}

	#CookieConsentBar .form-switch {
		width: 100%;
	}

	#CookieConsentBar label {
		font-size: 14px;
	}

	#CookieConsentBar .buttons {
		justify-content: stretch;
		gap: 10px;
	}

	#CookieConsentBar button {
		flex: 1;
		padding: 14px 12px;
		font-size: 11px;
		letter-spacing: 1px;
		text-align: center;
	}
}

@media (max-width: 400px) {
	#CookieConsentBar .buttons {
		flex-direction: column;
	}

	#CookieConsentBar button {
		width: 100%;
	}
}

/* Reopen trigger — bottom left */
#CookieConsentBarTrigger {
	position: fixed;
	left: 16px;
	bottom: 16px;
	z-index: 999998;
	width: 48px;
	height: 48px;
	padding: 10px;
	border: none;
	border-radius: 50%;
	background-color: #333;
	box-shadow: 0 4px 18px rgba(0, 0, 0, .25);
	cursor: pointer;
	display: none;
	align-items: center;
	justify-content: center;
	transition: transform .2s ease, background-color .2s ease;
}

#CookieConsentBarTrigger.show {
	display: flex;
}

#CookieConsentBarTrigger:hover {
	background-color: #000;
	transform: scale(1.06);
}

#CookieConsentBarTrigger img {
	width: 100%;
	height: auto;
	display: block;
	filter: brightness(1.15);
}

@media (max-width: 768px) {
	#CookieConsentBarTrigger {
		left: 12px;
		bottom: 12px;
		width: 44px;
		height: 44px;
		padding: 9px;
	}
}
