/* Cookie banner + embed placeholders (kolozs-consent.php). Colours from the theme palette. */

.kolozs-consent[hidden],
.kolozs-embed template {
	display: none !important;
}

.kolozs-consent {
	position: fixed;
	left: 16px;
	right: 16px;
	bottom: 16px;
	z-index: 9999;
	display: flex;
	justify-content: center;
	pointer-events: none;
}

.kolozs-consent__inner {
	pointer-events: auto;
	box-sizing: border-box;
	width: 100%;
	max-width: 960px;
	display: grid;
	grid-template-columns: 1fr auto;
	gap: 8px 32px;
	align-items: center;
	padding: 20px 24px;
	background: var(--wp--preset--color--base, #fff);
	color: var(--wp--preset--color--contrast, #231f20);
	border-top: 4px solid var(--wp--preset--color--accent-1, #00843d);
	border-radius: 8px;
	box-shadow: 0 8px 32px rgba(0, 0, 0, .22);
	font-size: 15px;
	line-height: 1.5;
}

.kolozs-consent__title {
	grid-column: 1 / -1;
	margin: 0;
	font-weight: 700;
	font-size: 17px;
}

.kolozs-consent__text {
	margin: 0;
}

.kolozs-consent__text a {
	color: var(--wp--preset--color--accent-3, #00592a);
	text-decoration: underline;
	white-space: nowrap;
}

.kolozs-consent__actions {
	display: flex;
	gap: 12px;
}

.kolozs-consent__btn,
.kolozs-embed__load {
	min-height: 44px;
	padding: 10px 20px;
	border: 2px solid var(--wp--preset--color--accent-1, #00843d);
	border-radius: 999px;
	background: var(--wp--preset--color--accent-1, #00843d);
	color: #fff;
	font: inherit;
	font-weight: 600;
	line-height: 1.2;
	cursor: pointer;
	white-space: nowrap;
}

.kolozs-consent__btn--secondary {
	background: transparent;
	color: var(--wp--preset--color--accent-3, #00592a);
}

.kolozs-consent__btn:hover,
.kolozs-embed__load:hover {
	background: var(--wp--preset--color--accent-3, #00592a);
	border-color: var(--wp--preset--color--accent-3, #00592a);
	color: #fff;
}

.kolozs-consent__btn:focus-visible,
.kolozs-embed__load:focus-visible,
.kolozs-consent-open:focus-visible {
	outline: 3px solid var(--wp--preset--color--accent-1, #00843d);
	outline-offset: 2px;
}

@media (max-width: 699px) {
	.kolozs-consent {
		left: 8px;
		right: 8px;
		bottom: 8px;
	}
	.kolozs-consent__inner {
		grid-template-columns: 1fr;
		padding: 16px;
		font-size: 14px;
	}
	.kolozs-consent__actions {
		flex-direction: column-reverse;
	}
	.kolozs-consent__btn {
		width: 100%;
	}
}

/* Footer "Süti-beállítások": looks like the other footer links. */
.kolozs-consent-open {
	padding: 0;
	border: 0;
	background: none;
	color: inherit;
	font: inherit;
	text-decoration: inherit;
	cursor: pointer;
}

.kolozs-consent-open:hover {
	text-decoration: underline;
}

/* Placeholder that stands in for a YouTube/Facebook player until it is allowed. */
.kolozs-embed {
	position: relative;
	box-sizing: border-box;
	width: 100%;
	max-width: 854px;
	margin: 1.5em 0;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	background: var(--wp--preset--color--accent-4, #edf6f0);
	border: 1px solid #cfe5d7;
	border-radius: 8px;
	text-align: center;
}

.kolozs-embed__inner {
	max-width: 440px;
}

.kolozs-embed__title {
	margin: 0 0 4px;
	font-weight: 700;
	font-size: 18px;
}

.kolozs-embed__text {
	margin: 0 0 14px;
	font-size: 14px;
	color: var(--wp--preset--color--accent-6, #5f5f5f);
}

.kolozs-embed__actions {
	margin: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 8px 16px;
	align-items: center;
	justify-content: center;
}

.kolozs-embed__link {
	color: var(--wp--preset--color--accent-3, #00592a);
	font-size: 14px;
}

/* Videos pasted as a link in the editor (embed block): core reserves the height with a ::before
   spacer and positions the iframe absolutely; the placeholder takes over that job. */
.wp-block-embed__wrapper:has(> .kolozs-embed)::before {
	display: none;
}

.wp-block-embed__wrapper > .kolozs-embed {
	margin: 0;
}

/* Loaded player keeps the placeholder's size. */
.kolozs-embed.is-loaded {
	padding: 0;
	border: 0;
	background: #000;
}

.kolozs-embed.is-loaded iframe {
	position: absolute;
	inset: 0;
	display: block;
	width: 100%;
	height: 100%;
	border: 0;
}

/* Phone menu open: the menu wins (the header's stacking context keeps it under the banner otherwise). */
body:has(.wp-block-navigation__responsive-container.is-menu-open) .kolozs-consent {
	display: none;
}

@media print {
	.kolozs-consent {
		display: none !important;
	}
}
