/* ---------------------------------------------------------------
   DSC Core — App Screenshots Slider
   Carries its own Swiper layout rules so the slider renders even
   when Elementor's swiper stylesheet is not on the page.
   --------------------------------------------------------------- */

.dsc-ss {
	/* geometry (unitless numbers so they can be divided in calc()) */
	--dsc-slide-w: 219;
	--dsc-screen-w: 250;
	--dsc-ratio: 1.76;
	--dsc-bezel: 12;
	--dsc-bezel-y: 28;
	--dsc-screen-radius: 22;
	--dsc-frame-radius: 40;

	--dsc-frame-color: #fff;
	--dsc-frame-offset: 0px;
	--dsc-fit: cover;
	--dsc-pad: 70px;

	--dsc-blur: 2.5px;
	--dsc-grayscale: 0%;
	--dsc-opacity: .55;
	--dsc-scale: .92;

	--dsc-dot-size: 11px;
	--dsc-dot-gap: 9px;
	--dsc-dot-color: #b7b7b7;
	--dsc-dot-active-color: #2ab6f4;

	--dsc-arrow-size: 66px;
	--dsc-arrow-icon: 16px;
	--dsc-arrow-color: #fff;
	--dsc-arrow-bg: #000;
	--dsc-arrow-offset: 0px;

	/* derived */
	--dsc-active-scale: calc(var(--dsc-screen-w) / var(--dsc-slide-w));

	/* read back by the debug panel to confirm this file actually loaded */
	--dsc-probe: ok;

	position: relative;
	width: 100%;
}

.dsc-ss__stage {
	position: relative;
	width: 100%;
}

/* full-bleed strip, like the 1680px Figma frame */
.dsc-ss__stage--bleed {
	width: 100vw;
	max-width: 100vw;
	margin-left: 50%;
	transform: translateX(-50%);
}

/* ---------------------------------------------- swiper layout (self-contained) */

.dsc-ss__swiper {
	position: relative;
	z-index: 1;
	overflow: hidden;
	margin: 0 auto;
	padding: var(--dsc-pad) 0;
	list-style: none;
}

.dsc-ss .dsc-ss__swiper .swiper-wrapper {
	position: relative;
	z-index: 1;
	display: flex;
	align-items: center;
	box-sizing: content-box;
	width: 100%;
	height: 100%;
	transition-property: transform;
	/* Swiper translates this box left as you advance, so any overflow:hidden
	   landing on it from another stylesheet clips every slide to the right of
	   the translate offset. The clipping belongs on .dsc-ss__swiper, never
	   here. !important because the source varies (carousel widgets, themes). */
	overflow: visible !important;
}

.dsc-ss .dsc-ss__swiper .swiper-slide {
	position: relative;
	flex-shrink: 0;
	height: auto;
}

/* ------------------------------------------------------------------- slides */

/* The slide element belongs to Swiper — it writes transforms there and its
   stylesheet sets transform/visibility on it too. Nothing of ours goes on
   .swiper-slide except width and stacking, so the two can never collide. */
.dsc-ss .dsc-ss__swiper .swiper-slide.dsc-ss__slide {
	width: calc(var(--dsc-slide-w) * 1px);
	visibility: visible;
}

.dsc-ss .dsc-ss__swiper .swiper-slide-active.dsc-ss__slide {
	z-index: var(--dsc-active-z, 3);
}

/* neutralise Swiper's own rules inside this widget */
.dsc-ss .dsc-ss__swiper.swiper-backface-hidden .swiper-slide {
	transform: none;
	backface-visibility: visible;
}

.dsc-ss .dsc-ss__swiper .swiper-slide-invisible-blank {
	visibility: visible;
}

/* the scale, blur and fade live on the inner box instead */
.dsc-ss__media {
	display: block;
	overflow: hidden;
	width: 100%;
	height: calc(var(--dsc-slide-w) * var(--dsc-ratio) * 1px);
	line-height: 0;
	border-radius: calc(var(--dsc-screen-radius) * 1px);
	background: #eef1f4;
	transform: scale(var(--dsc-scale));
	transform-origin: center center;
	filter: blur(var(--dsc-blur)) grayscale(var(--dsc-grayscale));
	opacity: var(--dsc-opacity);
	transition: transform .45s ease, filter .45s ease, opacity .45s ease;
	will-change: transform, filter;
}

/* the one active slide: sharp, and scaled to exactly the screen width */
.dsc-ss .dsc-ss__swiper .swiper-slide-active .dsc-ss__media {
	transform: scale(var(--dsc-active-scale));
	filter: none;
	opacity: 1;
	/* radius compensated for the scale so it matches the frame */
	border-radius: calc(var(--dsc-screen-radius) * var(--dsc-slide-w) / var(--dsc-screen-w) * 1px);
}

.dsc-ss__media img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: var(--dsc-fit);
	object-position: top center;
}

/* empty slide — no image picked yet, so it is obvious instead of blank white */
.dsc-ss__empty {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	border: 2px dashed #b9c2cb;
	border-radius: inherit;
	box-sizing: border-box;
	color: #7a8794;
	font-size: 13px;
	line-height: 1.3;
	text-align: center;
}

/* ------------------------------------------------------------- phone frame */

.dsc-ss__device {
	position: absolute;
	top: 50%;
	left: 50%;
	z-index: var(--dsc-frame-z, 5);
	transform: translate(-50%, -50%);
	pointer-events: none;
}

.dsc-ss__device--css {
	box-sizing: border-box;
	width: calc((var(--dsc-screen-w) + var(--dsc-bezel) * 2) * 1px);
	height: calc((var(--dsc-screen-w) * var(--dsc-ratio) + var(--dsc-bezel-y) * 2) * 1px);
	border-style: solid;
	border-width: calc(var(--dsc-bezel-y) * 1px) calc(var(--dsc-bezel) * 1px);
	border-color: var(--dsc-frame-color);
	border-radius: calc(var(--dsc-frame-radius) * 1px);
}

/* speaker bar in the top bezel */
.dsc-ss__notch {
	position: absolute;
	top: calc(var(--dsc-bezel-y) * -0.6px);
	left: 50%;
	width: 34%;
	height: 5px;
	transform: translateX(-50%);
	border-radius: 4px;
	background: rgba(0, 0, 0, .16);
}

/* home ring in the bottom bezel */
.dsc-ss__home {
	position: absolute;
	bottom: calc(var(--dsc-bezel-y) * -0.78px);
	left: 50%;
	width: 20px;
	height: 20px;
	transform: translateX(-50%);
	border: 2px solid rgba(0, 0, 0, .16);
	border-radius: 50%;
}

.dsc-ss__device--img {
	transform: translate(-50%, calc(-50% + var(--dsc-frame-offset)));
}

.dsc-ss__device-img {
	display: block;
	width: 290px;
	height: auto;
	max-width: none;
}

/* screenshot on top of the frame — for mockup PNGs with a solid screen */
.dsc-ss--frame-behind {
	--dsc-frame-z: 1;
	--dsc-active-z: 6;
}

/* ---------------------------------------------------------------- dots */

.dsc-ss__dots {
	position: static;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: var(--dsc-dot-gap);
	width: 100%;
}

.dsc-ss__dots .swiper-pagination-bullet {
	width: var(--dsc-dot-size);
	height: var(--dsc-dot-size);
	margin: 0;
	border-radius: 50%;
	background: var(--dsc-dot-color);
	opacity: 1;
	cursor: pointer;
	transition: background .3s ease, transform .3s ease;
}

.dsc-ss__dots .swiper-pagination-bullet-active {
	background: var(--dsc-dot-active-color);
	transform: scale(1.1);
}

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

.dsc-ss__arrow {
	position: absolute;
	top: 50%;
	z-index: 6;
	display: flex;
	align-items: center;
	justify-content: center;
	width: var(--dsc-arrow-size);
	height: var(--dsc-arrow-size);
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: var(--dsc-arrow-bg);
	color: var(--dsc-arrow-color);
	cursor: pointer;
	transform: translateY(-50%);
	transition: opacity .3s ease;
}

.dsc-ss__arrow:hover {
	opacity: .85;
}

.dsc-ss__arrow svg {
	width: var(--dsc-arrow-icon);
	height: var(--dsc-arrow-icon);
}

.dsc-ss__arrow--prev {
	left: var(--dsc-arrow-offset);
}

.dsc-ss__arrow--next {
	right: var(--dsc-arrow-offset);
}

@media (max-width: 767px) {
	.dsc-ss__arrow {
		--dsc-arrow-size: 44px;
		--dsc-arrow-icon: 12px;
	}
}


/* ---------------------------------------------------------------- debug */

.dsc-ss__debug {
	position: relative;
	z-index: 9;
	max-width: 640px;
	margin: 24px auto 0;
	padding: 14px 18px;
	border: 1px solid #d5dbe1;
	border-radius: 8px;
	background: #fbfcfd;
	color: #384049;
	font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	font-size: 12px;
	line-height: 1.7;
	text-align: left;
	word-break: break-all;
}

.dsc-ss__debug ul {
	margin: 8px 0 0;
	padding: 0;
	list-style: none;
}

.dsc-ss__debug li {
	margin: 0;
}

.dsc-ss__debug span {
	display: inline-block;
	min-width: 150px;
	color: #7a8794;
}

.dsc-ss__debug-js {
	margin-top: 10px;
	padding-top: 10px;
	border-top: 1px dashed #d5dbe1;
}
