/*
 * The shortcode itself is the anchor. It stays in the WPBakery content order;
 * only its visual child is positioned outside normal flow.
 */
.pfp-free-position-stage,
.pfp-free-position-stage .row-inner,
.pfp-free-position-stage .row-parent,
.pfp-free-position-stage .uncell,
.pfp-free-position-stage .uncont {
	overflow: visible !important;
}

.pfp-free-position {
	position: relative !important;
	display: block !important;
	width: 100% !important;
	min-width: 0 !important;
	max-width: 100% !important;
	height: 0 !important;
	min-height: 0 !important;
	box-sizing: border-box !important;
	margin: 0 !important;
	padding: 0 !important;
	border: 0 !important;
	line-height: 0 !important;
	overflow: visible !important;
	pointer-events: none !important;
}

.pfp-free-position__visual {
	position: absolute !important;
	top: calc(50% + var(--pfp-y, 0rem));
	left: calc(var(--pfp-anchor-x, 50%) + var(--pfp-x, 0rem));
	display: block;
	width: var(--pfp-width, 300px) !important;
	min-width: 0 !important;
	max-width: none !important;
	height: auto;
	box-sizing: border-box !important;
	margin: 0 !important;
	padding: 0 !important;
	line-height: 0;
	transform: translate(-50%, -50%);
	transform-origin: center;
	opacity: var(--pfp-opacity, 1);
	pointer-events: none;
	user-select: none;
}

.pfp-free-position--anchor-left {
	--pfp-anchor-x: 0%;
}

.pfp-free-position--anchor-center {
	--pfp-anchor-x: 50%;
}

.pfp-free-position--anchor-right {
	--pfp-anchor-x: 100%;
}

.pfp-free-position--front .pfp-free-position__visual {
	z-index: var(--pfp-z-index, 50);
}

.pfp-free-position--normal .pfp-free-position__visual {
	z-index: var(--pfp-z-index, 1);
}

.pfp-free-position__link,
.pfp-free-position__rotation,
.pfp-free-position__animation,
.pfp-free-position__parallax-content,
.pfp-free-position__magnetic,
.pfp-free-position__magnetic-target,
.pfp-free-position__native-effect,
.pfp-free-position__native-thumbnail,
.pfp-free-position__native-thumbnail > .t-inside,
.pfp-free-position__native-thumbnail .t-entry-visual,
.pfp-free-position__native-thumbnail .t-entry-visual-tc,
.pfp-free-position__native-thumbnail .t-entry-visual-cont {
	display: block;
	width: 100%;
	min-width: 0 !important;
	max-width: none !important;
	height: auto;
	box-sizing: border-box !important;
}

/*
 * Rotate only the rendered media. Parallax, entrance animation and Magnetic
 * remain on outer, unrotated layers and therefore move parallel to the page.
 */
.pfp-free-position__rotation {
	transform: rotate(var(--pfp-rotation, 0deg));
	transform-origin: center;
}

.pfp-free-position--magnetic .pfp-free-position__magnetic,
.pfp-free-position--magnetic .pfp-free-position__magnetic-target {
	height: auto !important;
	overflow: visible;
}

.pfp-free-position--magnetic .pfp-free-position__magnetic {
	pointer-events: auto;
}

.pfp-free-position__magnetic-target {
	transform-origin: center;
	will-change: transform;
}

.pfp-free-position__visual.parallax-move {
	overflow: visible !important;
}

.pfp-free-position__native-effect.single-wrapper,
.pfp-free-position__native-thumbnail.tmb,
.pfp-free-position__native-thumbnail > .t-inside,
.pfp-free-position__native-thumbnail .t-entry-visual,
.pfp-free-position__native-thumbnail .t-entry-visual-tc,
.pfp-free-position__native-thumbnail .t-entry-visual-cont {
	float: none !important;
	max-width: none !important;
	margin: 0 !important;
	padding: 0 !important;
	line-height: 0 !important;
}

.pfp-free-position__link {
	border-radius: var(--pfp-radius, 0px);
	pointer-events: auto;
}

.pfp-free-position__image {
	display: block;
	width: 100% !important;
	min-width: 0 !important;
	max-width: none !important;
	height: auto !important;
	box-sizing: border-box !important;
	object-fit: contain;
	margin: 0 !important;
	padding: 0 !important;
	border-radius: var(--pfp-radius, 0px);
}

.pfp-free-position--shadow-small .pfp-free-position__image {
	filter: drop-shadow(0 3px 5px rgba(0, 0, 0, 0.18));
}

.pfp-free-position--shadow-medium .pfp-free-position__image {
	filter: drop-shadow(0 8px 14px rgba(0, 0, 0, 0.22));
}

.pfp-free-position--shadow-large .pfp-free-position__image {
	filter: drop-shadow(0 16px 28px rgba(0, 0, 0, 0.26));
}

/* Avoid a horizontal scrollbar when a visual crosses the viewport edge. */
html.pfp-page-has-free-position,
html.pfp-page-has-free-position body {
	overflow-x: clip;
}

@media (min-width: 960px) {
	.pfp-free-position--hidden-desktop {
		display: none !important;
	}
}

@media (min-width: 570px) and (max-width: 959.98px) {
	.pfp-free-position--hidden-tablet {
		display: none !important;
	}
}

@media (max-width: 569.98px) {
	.pfp-free-position--hidden-mobile {
		display: none !important;
	}
}

/*
 * WPBakery front-end editor: the real shortcode remains a normal 5px-high
 * (or user-defined), full-width content block. Its absolutely positioned image cannot capture
 * editor input, so WPBakery always selects and drags the anchor block itself.
 */
body.compose-mode .pfp-free-position-editor-host,
body.vc_editor .pfp-free-position-editor-host {
	--pfp-editor-controls-z: 100002;
	position: relative !important;
	display: block !important;
	width: 100% !important;
	min-width: 0 !important;
	max-width: 100% !important;
	height: var(--pfp-editor-height, 5px) !important;
	min-height: var(--pfp-editor-height, 5px) !important;
	max-height: var(--pfp-editor-height, 5px) !important;
	box-sizing: border-box !important;
	overflow: visible !important;
	pointer-events: auto !important;
	cursor: pointer;
}

/*
 * When PLEGRO control bars overlap, hovering the still exposed part of one
 * anchor temporarily lifts only its WPBakery controls. The original stacking
 * order returns automatically as soon as the pointer leaves the element.
 */
body.compose-mode .pfp-free-position-editor-host:hover,
body.vc_editor .pfp-free-position-editor-host:hover,
body.compose-mode .pfp-free-position-editor-host:focus-within,
body.vc_editor .pfp-free-position-editor-host:focus-within,
body.compose-mode .pfp-free-position-editor-host--visual-hover,
body.vc_editor .pfp-free-position-editor-host--visual-hover {
	--pfp-editor-controls-z: 100012;
}

/* Recolour WPBakery's outer element guide, not only the inner PLEGRO outline. */
body.compose-mode .pfp-free-position-editor-host,
body.vc_editor .pfp-free-position-editor-host,
body.compose-mode .pfp-free-position-editor-host::before,
body.vc_editor .pfp-free-position-editor-host::before,
body.compose-mode .pfp-free-position-editor-host::after,
body.vc_editor .pfp-free-position-editor-host::after,
body.compose-mode .pfp-free-position-editor-host > .vc_element-overlay,
body.vc_editor .pfp-free-position-editor-host > .vc_element-overlay,
body.compose-mode .pfp-free-position-editor-host > .vc_element-overlay::before,
body.vc_editor .pfp-free-position-editor-host > .vc_element-overlay::before,
body.compose-mode .pfp-free-position-editor-host > .vc_element-overlay::after,
body.vc_editor .pfp-free-position-editor-host > .vc_element-overlay::after,
body.compose-mode .pfp-free-position-editor-host > .vc_element-container,
body.vc_editor .pfp-free-position-editor-host > .vc_element-container,
body.compose-mode .pfp-free-position-editor-host > .vc_element-container::before,
body.vc_editor .pfp-free-position-editor-host > .vc_element-container::before,
body.compose-mode .pfp-free-position-editor-host > .vc_element-container::after,
body.vc_editor .pfp-free-position-editor-host > .vc_element-container::after {
	border-color: #d85567 !important;
	outline-color: #d85567 !important;
}

body.compose-mode .pfp-free-position,
body.vc_editor .pfp-free-position {
	display: block !important;
	width: 100% !important;
	min-width: 0 !important;
	max-width: 100% !important;
	height: var(--pfp-editor-height, 5px) !important;
	min-height: var(--pfp-editor-height, 5px) !important;
	max-height: var(--pfp-editor-height, 5px) !important;
	box-sizing: border-box !important;
	overflow: visible !important;
	opacity: 1 !important;
	pointer-events: auto !important;
	cursor: pointer;
}

body.compose-mode .pfp-free-position-editor-host:hover .pfp-free-position,
body.vc_editor .pfp-free-position-editor-host:hover .pfp-free-position,
body.compose-mode .pfp-free-position-editor-host--visual-hover .pfp-free-position,
body.vc_editor .pfp-free-position-editor-host--visual-hover .pfp-free-position,
body.compose-mode .pfp-free-position:hover,
body.vc_editor .pfp-free-position:hover {
	outline: 1px dashed #d85567;
	outline-offset: -1px;
}

/* Uncode's entrance classes must never hide the actual image in the editor. */
body.compose-mode .pfp-free-position__animation.animate_when_almost_visible,
body.vc_editor .pfp-free-position__animation.animate_when_almost_visible {
	opacity: 1 !important;
	visibility: visible !important;
	transform: none !important;
	animation: none !important;
}

/* Native Uncode effects must not hide or move the editor preview. */
body.compose-mode .pfp-free-position__native-thumbnail.tmb-mask-reveal .t-entry-visual-cont,
body.vc_editor .pfp-free-position__native-thumbnail.tmb-mask-reveal .t-entry-visual-cont,
body.compose-mode .pfp-free-position__parallax-content,
body.vc_editor .pfp-free-position__parallax-content,
body.compose-mode .pfp-free-position__magnetic-target,
body.vc_editor .pfp-free-position__magnetic-target {
	clip-path: inset(0% 0% 0% 0%) !important;
	transform: none !important;
	transition: none !important;
}

body.compose-mode .pfp-free-position__visual,
body.vc_editor .pfp-free-position__visual,
body.compose-mode .pfp-free-position__visual *,
body.vc_editor .pfp-free-position__visual * {
	pointer-events: none !important;
}

body.compose-mode .pfp-free-position-editor-host > .vc_controls,
body.vc_editor .pfp-free-position-editor-host > .vc_controls,
body.compose-mode .pfp-free-position-editor-host > .vc_controls-container > div,
body.vc_editor .pfp-free-position-editor-host > .vc_controls-container > div,
body.compose-mode .pfp-free-position-editor-host .vc_controls-cc,
body.vc_editor .pfp-free-position-editor-host .vc_controls-cc {
	top: 0 !important;
	right: 0 !important;
	left: auto !important;
	transform: none !important;
	text-align: right !important;
	justify-content: flex-end !important;
	margin-right: 0 !important;
	margin-left: auto !important;
	overflow: visible !important;
	z-index: var(--pfp-editor-controls-z, 100002) !important;
}

/* Show the block controls when its freely positioned image is hovered. */
body.compose-mode .pfp-free-position-editor-host--visual-hover > .vc_controls,
body.vc_editor .pfp-free-position-editor-host--visual-hover > .vc_controls,
body.compose-mode .pfp-free-position-editor-host--visual-hover > .vc_controls-container,
body.vc_editor .pfp-free-position-editor-host--visual-hover > .vc_controls-container,
body.compose-mode .pfp-free-position-editor-host--visual-hover > .vc_controls-container > div,
body.vc_editor .pfp-free-position-editor-host--visual-hover > .vc_controls-container > div,
body.compose-mode .pfp-free-position-editor-host--visual-hover .vc_controls-cc,
body.vc_editor .pfp-free-position-editor-host--visual-hover .vc_controls-cc {
	opacity: 1 !important;
	visibility: visible !important;
	pointer-events: auto !important;
}

.pfp-free-position--placeholder {
	display: none !important;
}

body.compose-mode .pfp-free-position--placeholder,
body.vc_editor .pfp-free-position--placeholder {
	display: block !important;
}

@supports not (overflow: clip) {
	html.pfp-page-has-free-position,
	html.pfp-page-has-free-position body {
		overflow-x: hidden;
	}
}

@media (prefers-reduced-motion: reduce) {
	.pfp-free-position__animation.animate_when_almost_visible {
		opacity: 1 !important;
		visibility: visible !important;
		transform: none !important;
		animation: none !important;
	}

	.pfp-free-position__visual.parallax-move > .pfp-free-position__parallax-content {
		transform: none !important;
	}

	.pfp-free-position__magnetic-target {
		transform: none !important;
	}
}
