/* Zhuti - Sliding Doors Loader */

.zsd-overlay {
	--zsd-duration: 1.2s;
	--zsd-delay: 0.15s;
	--zsd-ease: cubic-bezier(0.77, 0, 0.175, 1);
	--zsd-fade: 0.4s;

	position: fixed;
	inset: 0;
	z-index: 999999;
	overflow: hidden;
	pointer-events: auto;
}

.zsd-door {
	position: absolute;
	background-color: #111;
	background-repeat: no-repeat;
	background-size: cover;
	background-position: center center;
	transition: transform var(--zsd-duration) var(--zsd-ease) var(--zsd-delay);
	will-change: transform;
}

/* Horizontal: two side-by-side doors (1px overlap prevents a seam). */
.zsd-horizontal .zsd-door--a {
	top: 0;
	left: 0;
	width: calc(50% + 1px);
	height: 100%;
}

.zsd-horizontal .zsd-door--b {
	top: 0;
	right: 0;
	width: calc(50% + 1px);
	height: 100%;
}

/* Vertical: top and bottom doors. */
.zsd-vertical .zsd-door--a {
	top: 0;
	left: 0;
	width: 100%;
	height: calc(50% + 1px);
}

.zsd-vertical .zsd-door--b {
	bottom: 0;
	left: 0;
	width: 100%;
	height: calc(50% + 1px);
}

/* Open state */
.zsd-open.zsd-horizontal .zsd-door--a { transform: translateX(-102%); }
.zsd-open.zsd-horizontal .zsd-door--b { transform: translateX(102%); }
.zsd-open.zsd-vertical .zsd-door--a { transform: translateY(-102%); }
.zsd-open.zsd-vertical .zsd-door--b { transform: translateY(102%); }

/* Optional overlay fade-out, starts after the doors finish sliding. */
.zsd-fade {
	transition: opacity var(--zsd-fade) ease calc(var(--zsd-duration) + var(--zsd-delay));
}

.zsd-fade.zsd-open {
	opacity: 0;
}

/* Fully finished - removed from the page. */
.zsd-done {
	display: none !important;
}

/* Scroll lock while the doors are closed. */
html.zsd-lock,
html.zsd-lock body {
	overflow: hidden !important;
}

/* ---------------------------------------------------------------------
 * Elementor editor preview: contained box instead of a fixed overlay.
 * ------------------------------------------------------------------- */
.zsd-editor-frame {
	position: relative;
	height: 60vh;
	min-height: 320px;
	overflow: hidden;
	outline: 1px dashed rgba(0, 0, 0, 0.2);
}

.zsd-overlay.zsd-editor {
	position: absolute;
	z-index: 1;
}

/*
 * In the editor the open/closed state is driven by the --zsd-open variable
 * (0 = closed, 1 = open), set by the "Door State" control or the Replay
 * button. Transitions stay active, so toggling animates with the widget's
 * configured duration/easing/delay.
 */
.zsd-editor.zsd-horizontal .zsd-door--a { transform: translateX(calc(-102% * var(--zsd-open, 0))); }
.zsd-editor.zsd-horizontal .zsd-door--b { transform: translateX(calc(102% * var(--zsd-open, 0))); }
.zsd-editor.zsd-vertical .zsd-door--a { transform: translateY(calc(-102% * var(--zsd-open, 0))); }
.zsd-editor.zsd-vertical .zsd-door--b { transform: translateY(calc(102% * var(--zsd-open, 0))); }

/* Fade preview: dims most of the way but stays slightly visible in the editor. */
.zsd-editor.zsd-fade {
	opacity: calc(1 - 0.9 * var(--zsd-open, 0));
}

/* Used by the Replay button to reset to closed with no animation. */
.zsd-snap,
.zsd-snap .zsd-door {
	transition: none !important;
}

/* In-canvas test button (rendered only in the editor). */
.zsd-replay-btn {
	position: absolute;
	top: 12px;
	right: 12px;
	z-index: 10;
	padding: 6px 14px;
	background: rgba(0, 0, 0, 0.75);
	color: #fff;
	font: 12px/1.6 sans-serif;
	border: 1px solid rgba(255, 255, 255, 0.35);
	border-radius: 999px;
	cursor: pointer;
}

.zsd-replay-btn:hover {
	background: #000;
}
