/* =========================================================
   Advanced Hero Widgets v4 — Scroll Story Production Engine
   Elementor owns editing/layout. This CSS only stages root Tab panels.
   ========================================================= */

.ish-native-story-enabled {
	--ishns-stage-height: 100dvh;
	--ishns-header-offset: 0px;
	--ishns-stage-bg: #fff;
	position: relative;
}

.ish-native-story-enabled.ishns-full-bleed {
	width: 100vw !important;
	max-width: none !important;
	margin-left: calc(50% - 50vw) !important;
	margin-right: calc(50% - 50vw) !important;
}

/* Added by JS only on frontend. Editor remains native Elementor Tabs. */
.ish-native-story-enabled .e-n-tabs.ishns-stage {
	position: sticky !important;
	top: var(--ishns-header-offset, 0px) !important;
	display: block !important;
	width: 100% !important;
	height: var(--ishns-stage-height) !important;
	max-height: calc(100dvh - var(--ishns-header-offset, 0px));
	overflow: hidden !important;
	isolation: isolate;
	background: var(--ishns-stage-bg, #fff) !important;
}

.ish-native-story-enabled .ishns-stage > .e-n-tabs-heading,
.ish-native-story-enabled .ishns-stage > .e-n-tabs-content > .e-n-tab-title {
	display: none !important;
}

.ish-native-story-enabled .ishns-stage > .e-n-tabs-content {
	position: relative !important;
	display: block !important;
	width: 100% !important;
	height: 100% !important;
	min-height: 0 !important;
	overflow: hidden !important;
	background: var(--ishns-stage-bg, #fff) !important;
}

/* Scene root only. No descendant layout rules. */
.ish-native-story-enabled .ishns-stage > .e-n-tabs-content > .ishns-panel {
	position: absolute !important;
	inset: 0 !important;
	display: var(--display, flex) !important;
	width: 100% !important;
	max-width: none !important;
	height: 100% !important;
	min-height: 0 !important;
	margin: 0 !important;
	overflow: visible !important;
	visibility: hidden !important;
	opacity: 0;
	pointer-events: none !important;
	z-index: 1;
	background-color: var(--ishns-panel-surface, var(--ishns-stage-bg, #fff)) !important;
	transform: none;
	filter: none;
	clip-path: none;
	will-change: transform, opacity, filter;
}

/*
 * Inactive scenes remain measurable for Swiper/carousels.
 * Elementor may re-add [hidden] when we synchronize the native Tab;
 * the story engine uses visibility/inert instead of display:none.
 */
.ish-native-story-enabled .ishns-stage > .e-n-tabs-content > .ishns-panel[hidden] {
	display: var(--display, flex) !important;
}

.ish-native-story-enabled .ishns-stage > .e-n-tabs-content > .ishns-panel.ishns-visible {
	visibility: visible !important;
}

.ish-native-story-enabled .ishns-stage > .e-n-tabs-content > .ishns-panel.ishns-interactive {
	pointer-events: auto !important;
}

/* UI */
.ishns-progress {
	position: absolute;
	z-index: 90;
	left: 0;
	right: 0;
	bottom: 0;
	height: 2px;
	background: rgba(127,127,127,.24);
	overflow: hidden;
	pointer-events: none;
}
.ishns-progress-bar {
	width: 100%;
	height: 100%;
	background: currentColor;
	transform: scaleX(0);
	transform-origin: left center;
}
.ishns-dots {
	position: absolute;
	z-index: 92;
	left: 50%;
	bottom: 22px;
	display: flex;
	gap: 9px;
	align-items: center;
	transform: translateX(-50%);
}
.ishns-dot {
	appearance: none;
	width: 8px;
	height: 8px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(127,127,127,.45);
	cursor: pointer;
}
.ishns-dot.is-active { background: currentColor; transform: scale(1.35); }

/* Door snapshot layer. */
.ishns-transition {
	position: absolute;
	inset: 0;
	z-index: 80;
	overflow: hidden;
	pointer-events: none;
	perspective: 1400px;
}
.ishns-door {
	position: absolute;
	overflow: hidden;
	transform-style: preserve-3d;
	backface-visibility: hidden;
	will-change: transform;
}
.ishns-door > .ishns-snapshot {
	position: absolute !important;
	margin: 0 !important;
	width: var(--ishns-stage-w) !important;
	max-width: none !important;
	height: var(--ishns-stage-h) !important;
	min-height: 0 !important;
	display: var(--display, flex) !important;
	visibility: visible !important;
	opacity: 1 !important;
	pointer-events: none !important;
	transform: none !important;
	filter: none !important;
	clip-path: none !important;
	background-color: var(--ishns-panel-surface, var(--ishns-stage-bg, #fff)) !important;
}
.ishns-split-horizontal .ishns-door { top: 0; bottom: 0; width: 50.05%; }
.ishns-split-horizontal .ishns-door-a { left: 0; }
.ishns-split-horizontal .ishns-door-b { right: 0; }
.ishns-split-vertical .ishns-door { left: 0; right: 0; height: 50.05%; }
.ishns-split-vertical .ishns-door-a { top: 0; }
.ishns-split-vertical .ishns-door-b { bottom: 0; }

@media (prefers-reduced-motion: reduce) {
	.ishns-transition { display: none !important; }
}


/* =========================================================
   v4.1 — Interactive widgets compatibility
   ========================================================= */

/* The stage clips transitions; the live panel itself must not clip dropdowns,
   carousel controls or interactive descendants. */
.ish-native-story-enabled .ishns-stage > .e-n-tabs-content {
	overflow: hidden !important;
}

.ish-native-story-enabled .ishns-panel.ishns-interactive {
	pointer-events: auto !important;
	touch-action: auto;
}

/* Snapshot doors are visual-only and can never steal clicks/touches. */
.ishns-transition,
.ishns-transition *,
.ishns-snapshot,
.ishns-snapshot * {
	pointer-events: none !important;
	user-select: none !important;
}

/* Preserve touch/swipe behavior of live Swiper instances. */
.ish-native-story-enabled .ishns-panel.ishns-interactive .swiper,
.ish-native-story-enabled .ishns-panel.ishns-interactive .swiper-wrapper {
	touch-action: pan-y;
}
