/* ============================================================
   Iframe Overlay Slider — frontend styles
   ============================================================ */

.elementor-widget-iframe_overlay_slider .elementor-widget-container {
	overflow: visible;
}

/* The "bleed" band: this is the element that goes edge-to-edge when Full
   Bleed is on. It is a flex container whose only job is to hold and
   CENTER the actual frame inside it — horizontally always, and
   vertically too if the band ever ends up taller than the frame. This is
   what stops the frame from ever getting pinned into a corner: no matter
   how wide the band gets, the frame sits in the middle of it. */
.ios-bleed {
	position: relative;
	width: 100%;
	box-sizing: border-box;
	display: flex;
	align-items: center;
	justify-content: center;
	/* Background Color control targets this element (and .ios-frame) —
	   it's no longer a hardcoded, unchangeable color. Set it to
	   transparent in the Style tab if you don't want any fill color at
	   all showing around the frame. */
	background-color: #0b0b0c;
}

.ios-bleed.ios-full-bleed {
	width: 100vw !important;
	position: relative;
	left: 50%;
	right: 50%;
	margin-left: -50vw;
	margin-right: -50vw;
}

/* The "frame": the actual sized, curved box — Width, Length (Height) and
   Corner Curvature all target this element directly, and it always
   stays centered inside .ios-bleed via the flexbox above. */
.ios-frame {
	position: relative;
	overflow: hidden;
	box-sizing: border-box;
	width: 100%;
	height: 500px;
	flex: 0 0 auto;
	background-color: #0b0b0c;
}

/* The stack: every slide occupies the exact same box inside the frame,
   laid directly on top of one another. There is no horizontal track to
   move — switching slides never moves anything, it only changes which
   one is on top (Instant Cut), or crossfades opacity in place (Crossfade
   transition mode — see .ios-stack.ios-fade below). Which behavior is
   active is driven entirely by the ios-fade class the JS applies based
   on the "Transition Effect" setting; the markup and CSS both support
   either mode simultaneously. */
.ios-stack {
	position: relative;
	width: 100%;
	height: 100%;
}

.ios-slide {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	/* Center whatever the iframe ends up rendering (e.g. a source image
	   smaller than the frame) within the available space instead of
	   letting it default to a top-left anchor. This only affects the
	   iframe element's own box within the slide — the embedded page's
	   internal layout is controlled by that page, not by us. */
	display: flex;
	align-items: center;
	justify-content: center;
	opacity: 0;
	visibility: hidden;
	z-index: 1;
	/* Deliberately no transition property here by default: switching the
	   active slide is a hard, instant cut, not a fade or a slide. See the
	   JS goToSlide() for the swap itself, and .ios-fade below for the
	   opt-in Crossfade transition. */
}

.ios-slide.ios-active {
	opacity: 1;
	visibility: visible;
	z-index: 2;
}

/* Crossfade transition mode: the JS adds this class to .ios-stack when
   "Transition Effect" is set to Crossfade. Slides stay visible (no
   visibility toggle, which would block the fade) and instead fade their
   opacity in/out. The fade duration is fed in as a CSS custom property
   by the JS, read from the "Fade Duration (ms)" control. */
.ios-stack.ios-fade .ios-slide {
	visibility: visible;
	transition: opacity var(--ios-transition-duration, 400ms) ease;
}

.ios-stack.ios-fade .ios-slide.ios-active {
	opacity: 1;
	z-index: 2;
	pointer-events: auto;
}

.ios-stack.ios-fade .ios-slide:not(.ios-active) {
	opacity: 0;
	z-index: 1;
	pointer-events: none;
}

.ios-slide iframe {
	width: 100%;
	height: 100%;
	border: 0;
	display: block;
	flex: 0 0 auto;
	pointer-events: none;
}

.ios-slide.ios-active iframe {
	pointer-events: auto;
}

/* ------------------------------------------------------------
   Scroll bar
   ------------------------------------------------------------ */

/* Hidden by default; the "Show Scroll Bar" Style control adds a
   `display: block;` rule (via {{WRAPPER}} .ios-scrollbar) once toggled
   on — which it is by default (default value "yes"), preserving the
   original always-on look unless a builder explicitly turns it off. */
.ios-scrollbar {
	display: none;
	position: absolute;
	left: 50%;
	bottom: 16px;
	transform: translateX(-50%);
	width: 90%;
	height: 8px;
	background: rgba(0, 0, 0, 0.15);
	border-radius: 999px;
	cursor: pointer;
	z-index: 6;
}

/* The thumb's left/width are updated on every instant slide swap too,
   but it keeps its own short transition purely as a cosmetic touch on
   the scrubber bar itself — it never affects the iframes, which cut (or
   fade) according to the Transition Effect setting only. Set both to 0s
   if you want the bar equally instant. */
.ios-scrollbar-thumb {
	position: absolute;
	top: 0;
	left: 0;
	height: 100%;
	width: 100%;
	background: #000000;
	border-radius: 999px;
	transition: left 0.12s ease, width 0.12s ease;
}

.ios-scrollbar:focus-visible {
	outline: 2px solid #ffffff;
	outline-offset: 3px;
}

/* ------------------------------------------------------------
   Progress bar (Auto mode "stories"-style countdown line)
   ------------------------------------------------------------ */

.ios-progress-bar {
	display: none;
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 3px;
	background-color: rgba(255, 255, 255, 0.25);
	z-index: 7;
	overflow: hidden;
}

.ios-progress-fill {
	width: 0%;
	height: 100%;
	background-color: #ffffff;
	/* Width is driven by JS on a fast interval rather than a single CSS
	   transition, so it can be paused/resumed mid-flight (hover, manual
	   interaction, the Play/Pause button) without losing its place. */
}

/* ------------------------------------------------------------
   Navigation arrows
   ------------------------------------------------------------ */

.ios-arrow {
	display: none;
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	width: 44px;
	height: 44px;
	align-items: center;
	justify-content: center;
	border: 0;
	border-radius: 50%;
	background-color: rgba(0, 0, 0, 0.35);
	color: #ffffff;
	cursor: pointer;
	z-index: 6;
	padding: 0;
	line-height: 1;
	transition: background-color 0.15s ease, opacity 0.15s ease;
}

.ios-arrow:hover {
	background-color: rgba(0, 0, 0, 0.55);
}

.ios-arrow:focus-visible {
	outline: 2px solid #ffffff;
	outline-offset: 2px;
}

.ios-arrow-prev {
	left: 16px;
}

.ios-arrow-next {
	right: 16px;
}

.ios-arrow svg,
.ios-arrow i {
	width: 1em;
	height: 1em;
	font-size: inherit;
}

/* ------------------------------------------------------------
   Dot indicators
   ------------------------------------------------------------ */

.ios-dots {
	display: none;
	position: absolute;
	bottom: 14px;
	left: 50%;
	transform: translateX(-50%);
	gap: 8px;
	align-items: center;
	justify-content: center;
	z-index: 6;
}

.ios-dot {
	width: 8px;
	height: 8px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background-color: rgba(255, 255, 255, 0.5);
	cursor: pointer;
	transition: background-color 0.15s ease, transform 0.15s ease;
}

.ios-dot:hover {
	transform: scale(1.2);
}

.ios-dot.ios-dot-active {
	background-color: #ffffff;
}

.ios-dot:focus-visible {
	outline: 2px solid #ffffff;
	outline-offset: 2px;
}

/* ------------------------------------------------------------
   Play / Pause button (Auto mode)
   ------------------------------------------------------------ */

.ios-playpause {
	display: none;
	position: absolute;
	top: 14px;
	right: 14px;
	width: 40px;
	height: 40px;
	align-items: center;
	justify-content: center;
	border: 0;
	border-radius: 50%;
	background-color: rgba(0, 0, 0, 0.35);
	color: #ffffff;
	cursor: pointer;
	z-index: 7;
	padding: 0;
	line-height: 1;
}

.ios-playpause:hover {
	background-color: rgba(0, 0, 0, 0.55);
}

.ios-playpause:focus-visible {
	outline: 2px solid #ffffff;
	outline-offset: 2px;
}

.ios-playpause-icon {
	display: none;
	width: 1em;
	height: 1em;
}

.ios-playpause-icon svg,
.ios-playpause-icon i {
	width: 1em;
	height: 1em;
	font-size: inherit;
}

/* Autoplay currently running: show the Pause icon (clicking it pauses).
   Autoplay currently paused: show the Play icon (clicking it resumes).
   The JS toggles .ios-playing on the wrapper; nothing here ever needs a
   PHP re-render to reflect play state. */
.ios-bleed.ios-playing .ios-playpause-icon-pause {
	display: flex;
	align-items: center;
	justify-content: center;
}

.ios-bleed:not(.ios-playing) .ios-playpause-icon-play {
	display: flex;
	align-items: center;
	justify-content: center;
}

.ios-empty-notice {
	padding: 60px 20px;
	text-align: center;
	background: #f5f5f5;
	color: #666666;
	border: 1px dashed #cccccc;
	font-size: 14px;
}

@media (max-width: 767px) {
	.ios-scrollbar {
		height: 6px;
		bottom: 10px;
	}

	.ios-arrow {
		width: 36px;
		height: 36px;
	}

	.ios-arrow-prev {
		left: 8px;
	}

	.ios-arrow-next {
		right: 8px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.ios-scrollbar-thumb,
	.ios-stack.ios-fade .ios-slide,
	.ios-arrow,
	.ios-dot {
		transition: none;
	}
}
