/* OW Horizontal Scroll — marker widget + native Elementor child containers. */

/* The marker is hidden on the published site and remains selectable in Elementor. */
.elementor-widget-ow-horizontal-scroll {
	display: none !important;
	margin: 0 !important;
	min-height: 0 !important;
}

.ow-hs-marker {
	display: none;
}

body.elementor-editor-active .elementor-widget-ow-horizontal-scroll,
body.elementor-editor-preview .elementor-widget-ow-horizontal-scroll {
	display: block !important;
}

body.elementor-editor-active .ow-hs-marker,
body.elementor-editor-preview .ow-hs-marker {
	display: block;
	padding: 8px 10px;
	border: 1px dashed #8b8b8b;
	border-radius: 4px;
	background: rgba(128, 128, 128, .08);
	color: inherit;
	font-size: 12px;
	line-height: 1.4;
}

.ow-hs-editor-indicator {
	display: none;
}

body.elementor-editor-active .ow-hs-editor-indicator,
body.elementor-editor-preview .ow-hs-editor-indicator {
	display: inline;
}

/* The marker's parent becomes the vertical scroll track. */
.ow-hs-root {
	position: relative !important;
	display: block !important;
	width: 100%;
	box-sizing: border-box;
	overflow: visible !important;
	height: var(--ow-hs-total-height) !important;
	min-height: var(--ow-hs-total-height) !important;
}

.ow-hs-panel-parent {
	position: static !important;
	display: block !important;
	width: 100% !important;
	max-width: none !important;
	overflow: visible !important;
}

.ow-hs-stage {
	position: absolute;
	top: 0;
	left: 0;
	z-index: 1;
	width: 100%;
	height: var(--ow-hs-stage-height, 100vh);
	min-height: 320px;
	box-sizing: border-box;
	overflow: hidden;
	isolation: isolate;
	background-color: transparent;
}

.ow-hs-viewport {
	position: relative;
	width: 100%;
	height: 100%;
	overflow: hidden;
}

.ow-hs-panels {
	display: flex;
	flex-flow: row nowrap;
	align-items: stretch;
	gap: var(--ow-hs-panel-gap, 0px);
	width: max-content;
	height: 100%;
	transform: translate3d(0, 0, 0);
	will-change: transform;
}

.ow-hs-panel {
	position: relative;
	flex: 0 0 var(--ow-hs-panel-width, 100vw) !important;
	width: var(--ow-hs-panel-width, 100vw) !important;
	min-width: var(--ow-hs-panel-width, 100vw) !important;
	height: 100% !important;
	min-height: 100% !important;
	box-sizing: border-box;
	overflow-x: hidden;
	overflow-y: auto;
	scrollbar-width: thin;
	scroll-snap-align: start;
	background-color: transparent !important;
}

.ow-hs-progress {
	position: absolute;
	z-index: 5;
	left: clamp(18px, 4vw, 56px);
	right: clamp(18px, 4vw, 56px);
	bottom: 20px;
	height: 3px;
	border-radius: 999px;
	background: rgba(255, 255, 255, .28);
	pointer-events: none;
	overflow: hidden;
}

.ow-hs-progress__bar {
	display: block;
	width: 100%;
	height: 100%;
	border-radius: inherit;
	background: currentColor;
	color: #fff;
	transform: scaleX(0);
	transform-origin: left center;
	will-change: transform;
}



/* Desktop stage is moved to a viewport-level portal while its reserved track
   remains in the original Elementor section. This avoids sticky failures inside
   transformed smooth-scroll wrappers and does not hijack native page scrolling. */
.ow-hs-stage-placeholder {
  display: block !important;
  width: 100% !important;
  height: 0 !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  flex: 0 0 0 !important;
  pointer-events: none !important;
  visibility: hidden !important;
}

.ow-hs-portal-root {
  position: fixed !important;
  display: block !important;
  box-sizing: border-box !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: visible !important;
  transform: none !important;
  filter: none !important;
  perspective: none !important;
  isolation: isolate;
  z-index: 15 !important;
}

.ow-hs-portal-root > .ow-hs-stage {
  position: relative !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
  min-height: 0 !important;
}

/* Mobile: native touch scrolling with snap points, no sticky vertical stage. */
@media (max-width: 767px) {
	.ow-hs-root.ow-hs-mobile-active {
		height: auto !important;
		min-height: 0 !important;
	}

	.ow-hs-mobile-active .ow-hs-stage {
		position: relative !important;
		top: auto !important;
		height: auto !important;
		min-height: 70vh;
		min-height: 70svh;
		overflow: visible;
	}

	.ow-hs-mobile-active .ow-hs-viewport {
		height: auto;
		overflow-x: auto;
		overflow-y: hidden;
		-webkit-overflow-scrolling: touch;
		overscroll-behavior-x: contain;
		scroll-snap-type: x mandatory;
		scrollbar-width: none;
		/* Vertical page scrolling stays native; horizontal touch is axis-locked
		   by the OW gesture handler so theme smoothers cannot steal the swipe. */
		touch-action: pan-y;
		scroll-behavior: auto !important;
	}

	.ow-hs-mobile-active .ow-hs-viewport.ow-hs-touch-dragging {
		scroll-snap-type: none !important;
		user-select: none;
		-webkit-user-select: none;
		cursor: grabbing;
	}

	.ow-hs-mobile-active .ow-hs-viewport::-webkit-scrollbar {
		display: none;
	}

	.ow-hs-mobile-active .ow-hs-panels {
		width: max-content !important;
		height: auto !important;
		gap: var(--ow-hs-panel-gap, 0px);
		transform: none !important;
		will-change: auto;
	}

	.ow-hs-mobile-active .ow-hs-panel {
		flex: 0 0 var(--ow-hs-mobile-panel-width, 90vw) !important;
		width: var(--ow-hs-mobile-panel-width, 90vw) !important;
		min-width: var(--ow-hs-mobile-panel-width, 90vw) !important;
		height: auto !important;
		min-height: 70vh !important;
		min-height: 70svh !important;
		overflow: visible;
		scroll-snap-align: start;
	}

	.ow-hs-mobile-active .ow-hs-progress {
		position: relative;
		left: auto;
		right: auto;
		bottom: auto;
		margin: 14px 5vw 18px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.ow-hs-panels,
	.ow-hs-progress__bar {
		will-change: auto;
	}
}
