/* BH Form Popups – style bazowe. Kolory i wymiary ustawiane są przez zmienne z arkusza generowanego. */

.bhfp[hidden] { display: none !important; }

.bhfp {
	position: fixed;
	inset: 0;
	z-index: 99999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
	box-sizing: border-box;
	opacity: 0;
	transition: opacity var(--bhfp-dur, 250ms) ease;
	-webkit-tap-highlight-color: transparent;
}
.bhfp *, .bhfp *::before, .bhfp *::after { box-sizing: border-box; }
.bhfp.is-open { opacity: 1; }

.bhfp__overlay {
	position: absolute;
	inset: 0;
	background: var(--bhfp-ov, rgba(15, 23, 42, .6));
	-webkit-backdrop-filter: blur(var(--bhfp-blur, 0));
	backdrop-filter: blur(var(--bhfp-blur, 0));
}

.bhfp__dialog {
	position: relative;
	width: min(var(--bhfp-w, 560px), 100%);
	max-height: min(var(--bhfp-mh, 90vh), calc(100vh - 32px));
	max-height: min(var(--bhfp-mh, 90dvh), calc(100dvh - 32px));
	display: flex;
	flex-direction: column;
	background: var(--bhfp-bg, #fff);
	color: var(--bhfp-c, #1d2327);
	border: var(--bhfp-bw, 0) solid var(--bhfp-bc, transparent);
	border-radius: var(--bhfp-r, 12px);
	box-shadow: var(--bhfp-shadow, 0 24px 64px rgba(0, 0, 0, .32));
	outline: none;
	transition: transform var(--bhfp-dur, 250ms) cubic-bezier(.2, .8, .2, 1), opacity var(--bhfp-dur, 250ms) ease;
}

.bhfp__body {
	overflow-y: auto;
	overscroll-behavior: contain;
	padding: var(--bhfp-pad, 32px);
	border-radius: inherit;
	-webkit-overflow-scrolling: touch;
}

.bhfp__title {
	margin: 0 0 .5em;
	padding-right: calc(var(--bhfp-close-s, 34px) + 8px);
	color: inherit;
	font-size: 26px;
	line-height: 1.25;
}
.bhfp--close-outside .bhfp__title { padding-right: 0; }
.bhfp__intro { margin: 0 0 1.25em; }
.bhfp__intro > :last-child { margin-bottom: 0; }
.bhfp__content > :last-child { margin-bottom: 0; }
.bhfp__content .wpforms-container { margin-top: 0; margin-bottom: 0; }

/* Zamknięcie */
.bhfp__close {
	position: absolute;
	top: 10px;
	right: 10px;
	z-index: 2;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: var(--bhfp-close-s, 34px);
	height: var(--bhfp-close-s, 34px);
	min-height: 0;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: var(--bhfp-close-bg, rgba(15, 23, 42, .06));
	color: var(--bhfp-close-c, #334155);
	box-shadow: none;
	cursor: pointer;
	line-height: 1;
	transition: transform .15s ease, background .15s ease;
}
.bhfp__close:hover { transform: rotate(90deg); background: var(--bhfp-close-bg, rgba(15, 23, 42, .1)); }
.bhfp__close:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }
.bhfp__close svg { width: 55%; height: 55%; display: block; }
.bhfp--close-outside .bhfp__close {
	top: calc(var(--bhfp-close-s, 34px) / -2.5);
	right: calc(var(--bhfp-close-s, 34px) / -2.5);
	background: var(--bhfp-bg, #fff);
	box-shadow: 0 2px 8px rgba(0, 0, 0, .2);
}

/* Pozycje */
.bhfp--pos-top { align-items: flex-start; }
.bhfp--pos-bottom { align-items: flex-end; }
.bhfp--pos-bottom-right { align-items: flex-end; justify-content: flex-end; }
.bhfp--pos-bottom-left { align-items: flex-end; justify-content: flex-start; }
.bhfp--pos-side-right, .bhfp--pos-side-left { padding: 0; align-items: stretch; }
.bhfp--pos-side-right { justify-content: flex-end; }
.bhfp--pos-side-left { justify-content: flex-start; }
.bhfp--pos-side-right .bhfp__dialog,
.bhfp--pos-side-left .bhfp__dialog { max-height: none; height: 100%; border-radius: 0; }

/* Tryb niemodalny – strona pod spodem pozostaje klikalna */
.bhfp--nonmodal { pointer-events: none; }
.bhfp--nonmodal .bhfp__dialog { pointer-events: auto; }

/* Animacje */
.bhfp--anim-none, .bhfp--anim-none .bhfp__dialog { transition: none; }
.bhfp--anim-zoom .bhfp__dialog { transform: scale(.92); }
.bhfp--anim-slide-up .bhfp__dialog { transform: translateY(40px); }
.bhfp--anim-slide-down .bhfp__dialog { transform: translateY(-40px); }
.bhfp--anim-slide-side .bhfp__dialog { transform: translateX(60px); }
.bhfp--pos-side-left.bhfp--anim-slide-side .bhfp__dialog,
.bhfp--pos-bottom-left.bhfp--anim-slide-side .bhfp__dialog { transform: translateX(-60px); }
.bhfp--pos-side-right.bhfp--anim-slide-side .bhfp__dialog { transform: translateX(100%); }
.bhfp--pos-side-left.bhfp--anim-slide-side .bhfp__dialog { transform: translateX(-100%); }
.bhfp.is-open .bhfp__dialog { transform: none; }

@media (prefers-reduced-motion: reduce) {
	.bhfp, .bhfp__dialog { transition-duration: 1ms !important; }
}

@media (max-width: 767px) {
	.bhfp { padding: 12px; }
	.bhfp--pos-side-right, .bhfp--pos-side-left { padding: 0; }
	.bhfp--pos-bottom-right, .bhfp--pos-bottom-left { justify-content: center; }
	.bhfp--close-outside .bhfp__close { top: 8px; right: 8px; background: var(--bhfp-close-bg, rgba(15, 23, 42, .06)); box-shadow: none; }
	.bhfp--close-outside .bhfp__title { padding-right: calc(var(--bhfp-close-s, 34px) + 8px); }
}

/* Blokada przewijania */
html.bhfp-lock, html.bhfp-lock body { overflow: hidden !important; }

/* Komunikat dla administratora */
.bhfp-notice { padding: 12px 14px; border-left: 4px solid #d63638; background: #fcf0f1; color: #1d2327; font-size: 14px; }

/* ---------------------------------------------------------------------
 * Przycisk wtyczki – reset, żeby motyw nie nadpisywał wyglądu
 * ------------------------------------------------------------------ */
.bhfp-btn-wrap { display: block; margin: 0; }
.bhfp-btn-wrap--inline { display: inline-block; }
.bhfp-align-left { text-align: left; }
.bhfp-align-center { text-align: center; }
.bhfp-align-right { text-align: right; }
.bhfp-btn-wrap--full { display: block; }

.bhfp-btn {
	-webkit-appearance: none;
	appearance: none;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	margin: 0;
	min-height: 0;
	max-width: 100%;
	font: inherit;
	line-height: 1.2;
	text-align: center;
	text-decoration: none;
	text-shadow: none;
	white-space: normal;
	vertical-align: middle;
	cursor: pointer;
	transition-property: background, color, border-color, box-shadow, transform;
	transition-timing-function: ease;
}
.bhfp-btn:focus { outline: none; }
.bhfp-btn:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }
.bhfp-btn__icon { flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; }
.bhfp-btn svg.bhfp-btn__icon { width: 18px; height: 18px; }
.bhfp-btn__label { display: inline-block; }

/* Widget Elementora */
.bhfp-el-wrap { display: flex; justify-content: var(--bhfp-el-justify, flex-start); }
.bhfp-el-wrap > .bhfp-btn { flex-grow: var(--bhfp-el-grow, 0); }
.bhfp-btn--el { border: 0; transition-duration: 200ms; }
.bhfp-btn--el .bhfp-btn__icon svg { width: 1em; height: 1em; }

/* Pływający przycisk */
.bhfp-floating { position: fixed; bottom: 20px; z-index: 99998; }
.bhfp-floating--bottom-right { right: 20px; }
.bhfp-floating--bottom-left { left: 20px; }
html.bhfp-lock .bhfp-floating { visibility: hidden; }
