/* SIG Link Popup — scoped, prefixed styles to avoid theme/plugin conflicts */

.sig-lp-overlay {
	position: fixed !important;
	inset: 0 !important;
	top: 0 !important;
	left: 0 !important;
	right: 0 !important;
	bottom: 0 !important;
	width: 100% !important;
	height: 100% !important;
	background: var( --sig-lp-overlay-color, rgba(0,0,0,0.6) ) !important;
	z-index: 2147483000 !important;
	display: none;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	padding: 16px;
}

.sig-lp-overlay.sig-lp-visible {
	display: flex !important;
}

/* --- Optional minimal animation, applied only when enabled in settings --- */

.sig-lp-overlay.sig-lp-anim-fade,
.sig-lp-overlay.sig-lp-anim-zoom,
.sig-lp-overlay.sig-lp-anim-slide {
	display: flex !important;
	opacity: 0;
	visibility: hidden;
	transition:
		opacity var( --sig-lp-anim-duration, 200ms ) ease,
		visibility 0s linear var( --sig-lp-anim-duration, 200ms );
}

.sig-lp-overlay.sig-lp-anim-fade.sig-lp-visible,
.sig-lp-overlay.sig-lp-anim-zoom.sig-lp-visible,
.sig-lp-overlay.sig-lp-anim-slide.sig-lp-visible {
	opacity: 1;
	visibility: visible;
	transition:
		opacity var( --sig-lp-anim-duration, 200ms ) ease,
		visibility 0s linear 0s;
}

.sig-lp-anim-zoom .sig-lp-popup {
	transition: transform var( --sig-lp-anim-duration, 200ms ) ease;
	transform: scale( 0.95 );
}

.sig-lp-anim-zoom.sig-lp-visible .sig-lp-popup {
	transform: scale( 1 );
}

.sig-lp-anim-slide .sig-lp-popup {
	transition: transform var( --sig-lp-anim-duration, 200ms ) ease;
	transform: translateY( 16px );
}

.sig-lp-anim-slide.sig-lp-visible .sig-lp-popup {
	transform: translateY( 0 );
}

@media ( prefers-reduced-motion: reduce ) {
	.sig-lp-overlay.sig-lp-anim-fade,
	.sig-lp-overlay.sig-lp-anim-zoom,
	.sig-lp-overlay.sig-lp-anim-slide,
	.sig-lp-anim-zoom .sig-lp-popup,
	.sig-lp-anim-slide .sig-lp-popup {
		transition: none !important;
		transform: none !important;
	}
}

.sig-lp-popup {
	position: relative;
	width: var( --sig-lp-width, 600px );
	height: var( --sig-lp-height, 400px );
	max-width: 96vw;
	max-height: 96vh;
	background: #fff;
	box-shadow: 0 10px 40px rgba( 0, 0, 0, 0.35 );
	border-radius: 4px;
	overflow: visible;
	box-sizing: border-box;
}

/* ------------------------------------------------------------------
   Hardening against theme / page-builder button rules.

   Themes and builders (Elementor kits, etc.) routinely restyle every
   <button> on the page, sometimes with !important and sometimes with
   selectors more specific than a plain class, which used to override
   the close button. To make it immune:

   1. The selector is long on purpose, and ends in :not(#sig-lp-x).
      :not() takes the specificity of its argument, so that counts as
      an ID selector (it never matches anything, it is only there for
      weight). This outranks class/element/attribute-only theme
      selectors, including their :hover/:focus/:active variants.
   2. `all: unset !important` wipes whatever a theme set, in every
      state, because this selector matches in all of them.
   3. Everything the button needs is then re-declared with !important.

   Only an !important theme rule that itself uses two or more ID
   selectors could still win; that is very rare in practice.
   ------------------------------------------------------------------ */

.sig-lp-popup iframe {
	width: 100%;
	height: 100%;
	border: 0;
	display: block;
	border-radius: 4px;
	background: #fff;
}

html body .sig-lp-overlay .sig-lp-popup iframe:not(#sig-lp-x) {
	box-sizing: content-box !important;
	width: 100% !important;
	height: 100% !important;
	max-width: none !important;
	margin: 0 !important;
	padding: 0 !important;
	border: 0 !important;
	display: block !important;
}

html body .sig-lp-overlay .sig-lp-popup button.sig-lp-close.sig-lp-close:not(#sig-lp-x) {
	all: unset !important;
	box-sizing: border-box !important;
	position: absolute !important;
	top: -16px !important;
	right: -16px !important;
	z-index: 2147483001 !important;
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	width: var( --sig-lp-close-size, 36px ) !important;
	height: var( --sig-lp-close-size, 36px ) !important;
	min-width: 24px !important;
	min-height: 24px !important;
	margin: 0 !important;
	padding: 0 !important;
	border: 0 !important;
	border-radius: 50% !important;
	background: var( --sig-lp-close-bg, #000 ) !important;
	color: var( --sig-lp-close-color, #fff ) !important;
	font-family: Arial, Helvetica, sans-serif !important;
	font-size: calc( var( --sig-lp-close-size, 36px ) * 0.55 ) !important;
	font-weight: 400 !important;
	line-height: 1 !important;
	text-align: center !important;
	cursor: pointer !important;
	box-shadow: 0 2px 8px rgba( 0, 0, 0, 0.3 ) !important;
	-webkit-appearance: none !important;
	appearance: none !important;
}

html body .sig-lp-overlay .sig-lp-popup button.sig-lp-close.sig-lp-close:not(#sig-lp-x)::before,
html body .sig-lp-overlay .sig-lp-popup button.sig-lp-close.sig-lp-close:not(#sig-lp-x)::after {
	content: none !important;
	display: none !important;
}

html body .sig-lp-overlay .sig-lp-popup button.sig-lp-close.sig-lp-close:not(#sig-lp-x):hover,
html body .sig-lp-overlay .sig-lp-popup button.sig-lp-close.sig-lp-close:not(#sig-lp-x):focus {
	filter: brightness( 1.15 ) !important;
}

html body .sig-lp-overlay .sig-lp-popup button.sig-lp-close.sig-lp-close:not(#sig-lp-x):focus-visible {
	outline: 2px solid var( --sig-lp-close-color, #fff ) !important;
	outline-offset: 2px !important;
}

/* --- Close button inside the popup: applied when the destination
   URL being opened has htb=1 (from the button's own href or the
   "Append htb=1" setting), since the destination is hiding its own
   top bar. One class more than the base rule, so it always wins. --- */

html body .sig-lp-overlay.sig-lp-close-inside .sig-lp-popup button.sig-lp-close.sig-lp-close:not(#sig-lp-x) {
	top: 16px !important;
	right: 16px !important;
}

body.sig-lp-open {
	overflow: hidden !important;
}
