/* Hinweis-Popup (Plugin „Benölken Website“) – nutzt die Farben und Schrift des Themes. */

.bnk-popup {
	--bnk-popup-accent: var(--wp--preset--color--accent, #8e0c0f);
	--bnk-popup-ink: var(--wp--preset--color--contrast, #182127);
	--bnk-popup-muted: var(--wp--preset--color--muted, #56626b);
	box-sizing: border-box;
	width: min(560px, calc(100vw - 2rem));
	max-width: none;
	max-height: calc(100vh - 2rem);
	max-height: calc(100dvh - 2rem);
	margin: auto;
	padding: 0;
	border: 0;
	border-radius: var(--bnk-radius, 16px);
	background: var(--wp--preset--color--base, #fff);
	color: var(--bnk-popup-ink);
	box-shadow: 0 24px 64px rgba(24, 33, 39, 0.3);
	overflow: hidden;
	font-family: inherit;
	line-height: 1.55;
}

.bnk-popup:not([open]) {
	display: none;
}

.bnk-popup.has-image {
	width: min(860px, calc(100vw - 2rem));
}

.bnk-popup::backdrop {
	background: rgba(24, 33, 39, 0.58);
}

.bnk-popup *,
.bnk-popup *::before,
.bnk-popup *::after {
	box-sizing: border-box;
}

.bnk-popup__box:focus {
	outline: none;
}

.bnk-popup__box {
	position: relative;
	display: flex;
	flex-direction: column;
	max-height: inherit;
	overflow: auto;
	overscroll-behavior: contain;
}

.bnk-popup__media {
	flex: 0 0 auto;
	background: var(--wp--preset--color--surface, #f5f3ef);
}

.bnk-popup__img {
	display: block;
	width: 100%;
	height: 220px;
	object-fit: cover;
}

.bnk-popup__body {
	padding: 2rem 2rem 1.75rem;
}

.bnk-popup__label {
	display: inline-block;
	margin: 0 0 0.85rem;
	padding: 0.3rem 0.75rem;
	border-radius: 999px;
	background: var(--wp--preset--color--accent-tint, #f8e7e7);
	color: var(--bnk-popup-accent);
	font-size: 0.78rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	line-height: 1.3;
	text-transform: uppercase;
}

.bnk-popup__title {
	margin: 0 2.25rem 0.75rem 0;
	color: var(--bnk-popup-ink);
	font-size: clamp(1.45rem, 3vw, 1.95rem);
	font-weight: 800;
	letter-spacing: -0.02em;
	line-height: 1.2;
}

.bnk-popup__text {
	font-size: 1.02rem;
}

.bnk-popup__text > :first-child {
	margin-top: 0;
}

.bnk-popup__text p,
.bnk-popup__text ul,
.bnk-popup__text ol {
	margin: 0 0 0.75em;
}

.bnk-popup__text > :last-child {
	margin-bottom: 0;
}

.bnk-popup__text a {
	color: var(--bnk-popup-accent);
}

.bnk-popup__actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.75rem 1.5rem;
	margin-top: 1.5rem;
}

.bnk-popup__button {
	display: inline-flex;
	align-items: center;
	text-decoration: none;
}

.bnk-popup__later {
	appearance: none;
	margin: 0;
	padding: 0.5rem 0;
	border: 0;
	background: none;
	color: var(--bnk-popup-muted);
	font: inherit;
	font-weight: 600;
	text-decoration: underline;
	text-underline-offset: 3px;
	cursor: pointer;
}

.bnk-popup__later:hover {
	color: var(--bnk-popup-ink);
}

.bnk-popup__close {
	position: absolute;
	top: 0.75rem;
	right: 0.75rem;
	z-index: 2;
	display: grid;
	place-items: center;
	width: 2.5rem;
	height: 2.5rem;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.94);
	color: var(--bnk-popup-ink);
	box-shadow: 0 1px 4px rgba(24, 33, 39, 0.16);
	cursor: pointer;
}

.bnk-popup__close:hover {
	color: var(--bnk-popup-accent);
}

.bnk-popup__close:focus-visible,
.bnk-popup__later:focus-visible,
.bnk-popup__button:focus-visible,
.bnk-popup__text a:focus-visible {
	outline: 3px solid var(--bnk-popup-accent);
	outline-offset: 2px;
}

.bnk-popup__preview {
	margin: 0 0 1rem;
	padding: 0.5rem 0.75rem;
	border-radius: 8px;
	background: #fff4d6;
	color: #6b4e00;
	font-size: 0.85rem;
	line-height: 1.4;
}

/* Mit Bild: auf breiten Bildschirmen Bild links, Text rechts */
@media (min-width: 760px) {
	.bnk-popup--center.has-image .bnk-popup__box {
		flex-direction: row;
	}

	.bnk-popup--center.has-image .bnk-popup__media {
		flex: 0 0 42%;
	}

	.bnk-popup--center.has-image .bnk-popup__img {
		height: 100%;
		min-height: 360px;
	}

	.bnk-popup--center.has-image .bnk-popup__body {
		flex: 1 1 auto;
		align-self: center;
		padding: 2.5rem 2.25rem 2.25rem;
	}
}

@media (max-width: 480px) {
	.bnk-popup__body {
		padding: 1.5rem 1.25rem 1.25rem;
	}

	.bnk-popup__img {
		height: 170px;
	}
}

/* Kleiner Hinweis unten rechts (nicht modal) */
.bnk-popup--corner {
	position: fixed;
	inset: auto 1.25rem 1.25rem auto;
	z-index: 1000;
	width: min(380px, calc(100vw - 2.5rem));
	margin: 0;
	border: 1px solid var(--wp--preset--color--line, #dcd6cc);
	box-shadow: 0 16px 48px rgba(24, 33, 39, 0.22);
}

.bnk-popup--corner.has-image {
	width: min(380px, calc(100vw - 2.5rem));
}

.bnk-popup--corner .bnk-popup__img {
	height: 150px;
}

.bnk-popup--corner .bnk-popup__body {
	padding: 1.4rem 1.4rem 1.2rem;
}

.bnk-popup--corner .bnk-popup__title {
	font-size: 1.25rem;
}

.bnk-popup--corner .bnk-popup__text {
	font-size: 0.95rem;
}

.bnk-popup--corner .bnk-popup__actions {
	margin-top: 1.1rem;
}

@media (max-width: 480px) {
	.bnk-popup--corner,
	.bnk-popup--corner.has-image {
		inset: auto 0.75rem 0.75rem 0.75rem;
		width: auto;
	}
}

/* Einblenden */
.bnk-popup.is-visible {
	animation: bnk-popup-in 0.4s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.bnk-popup.is-visible::backdrop {
	animation: bnk-popup-fade 0.4s ease both;
}

@keyframes bnk-popup-in {
	from {
		opacity: 0;
		transform: translateY(18px) scale(0.98);
	}

	to {
		opacity: 1;
		transform: none;
	}
}

@keyframes bnk-popup-fade {
	from {
		opacity: 0;
	}

	to {
		opacity: 1;
	}
}

@media (prefers-reduced-motion: reduce) {
	.bnk-popup.is-visible,
	.bnk-popup.is-visible::backdrop {
		animation: none;
	}
}

html.bnk-popup-open {
	overflow: hidden;
}

@media print {
	.bnk-popup {
		display: none !important;
	}
}
