/**
 * Padamz Premium Widget – Process Showcase
 * Namespace prefix: ppsw-
 * Scoped entirely to .ppsw-wrap
 * Author: Padamz
 */

/* ============================================================
   CSS Custom Properties (scoped)
   ============================================================ */
.ppsw-wrap {
	--ppsw-accent:      #c8a96e;
	--ppsw-bg-dark:     #0d0d14;
	--ppsw-bg-media:    #111118;
	--ppsw-text-light:  #ffffff;
	--ppsw-speed:       480ms;
	--ppsw-ease:        cubic-bezier(0.4, 0, 0.2, 1);
	--ppsw-radius:      20px;

	position: relative;
	width: 100%;
	box-sizing: border-box;
	font-family: inherit;
}

/* ============================================================
   Inner wrapper (the two-column grid)
   ============================================================ */
.ppsw-inner {
	display: flex;
	flex-direction: row;
	align-items: stretch;
	width: 100%;
	min-height: 560px;
	overflow: hidden;
	border-radius: var(--ppsw-radius);
}

/* Layout: media-left reverses column order */
.ppsw-layout-media-left .ppsw-inner {
	flex-direction: row-reverse;
}

/* ============================================================
   Media Column
   ============================================================ */
.ppsw-media-col {
	position: relative;
	flex: 0 0 50%;
	max-width: 50%;
	overflow: hidden;
	background-color: var(--ppsw-bg-media);
}

/* ── Media slides ── */
.ppsw-media-slide {
	position: absolute;
	inset: 0;
	opacity: 0;
	transform: scale(1.04);
	transition:
		opacity    var(--ppsw-speed) var(--ppsw-ease),
		transform  var(--ppsw-speed) var(--ppsw-ease);
	will-change: opacity, transform;
	pointer-events: none;
}

.ppsw-media-slide.ppsw-media-active {
	opacity: 1;
	transform: scale(1);
	pointer-events: auto;
	z-index: 1;
}

/* Leaving animation (previous slide) */
.ppsw-media-slide.ppsw-media-leaving {
	opacity: 0;
	transform: scale(0.97);
	z-index: 2;
}

/* ── Image fill ── */
.ppsw-media-img {
	position: absolute;
	inset: 0;
	background-size: cover;
	background-position: center center;
	background-repeat: no-repeat;
	transition: transform 8s linear;
}

.ppsw-media-slide.ppsw-media-active .ppsw-media-img {
	transform: scale(1.06);
}

/* ── Video fill ── */
.ppsw-media-video {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

/* ── Overlay gradient ── */
.ppsw-media-overlay {
	position: absolute;
	inset: 0;
	background: linear-gradient(to top, rgba(13, 13, 20, 0.75) 0%, transparent 60%);
	z-index: 2;
	pointer-events: none;
}

/* ── Media step badge ── */
.ppsw-media-badge {
	position: absolute;
	top: 24px;
	right: 24px;
	z-index: 3;
	display: flex;
	align-items: center;
	justify-content: center;
	min-width: 48px;
	min-height: 48px;
	padding: 8px 14px;
	background: rgba(255, 255, 255, 0.12);
	backdrop-filter: blur(12px);
	-webkit-backdrop-filter: blur(12px);
	border: 1px solid rgba(255, 255, 255, 0.18);
	border-radius: 50px;
	transition: opacity var(--ppsw-speed) var(--ppsw-ease);
}

.ppsw-media-slide:not(.ppsw-media-active) .ppsw-media-badge {
	opacity: 0;
}

.ppsw-media-badge-num {
	font-size: 1rem;
	font-weight: 700;
	color: #ffffff;
	line-height: 1;
	letter-spacing: 0.04em;
}

/* ── Progress bar ── */
.ppsw-progress-bar {
	position: absolute;
	bottom: 0;
	left: 0;
	right: 0;
	height: 3px;
	background: rgba(255, 255, 255, 0.12);
	z-index: 4;
	overflow: hidden;
}

.ppsw-progress-fill {
	height: 100%;
	width: 0%;
	background: var(--ppsw-accent);
	transition: width linear;
}

/* ============================================================
   Accordion Column
   ============================================================ */
.ppsw-accordion-col {
	flex: 1 1 0%;
	display: flex;
	flex-direction: column;
	justify-content: center;
	background-color: var(--ppsw-bg-dark);
	padding: 48px;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
}

.ppsw-steps-list {
	display: flex;
	flex-direction: column;
	width: 100%;
}

/* ============================================================
   Individual Step
   ============================================================ */
.ppsw-step {
	position: relative;
	padding: 20px 0;
	cursor: pointer;
	outline: none;
	-webkit-tap-highlight-color: transparent;
	border-bottom: 1px solid rgba(255, 255, 255, 0.08);
	transition: background-color 200ms ease;
}

.ppsw-step:last-child {
	border-bottom: none;
}

/* Active indicator bar on the left */
.ppsw-step::before {
	content: '';
	position: absolute;
	left: -48px; /* extends to column edge */
	top: 0;
	bottom: 0;
	width: 3px;
	background-color: transparent;
	transition: background-color var(--ppsw-speed) var(--ppsw-ease);
}

.ppsw-step.ppsw-active::before {
	background-color: var(--ppsw-accent);
}

/* ── Step header (always visible) ── */
.ppsw-step-header {
	display: flex;
	align-items: center;
	gap: 16px;
	min-height: 48px;
}

.ppsw-step-number {
	flex-shrink: 0;
	font-size: 2.25rem;
	font-weight: 800;
	line-height: 1;
	color: rgba(255, 255, 255, 0.18);
	letter-spacing: -0.03em;
	min-width: 56px;
	transition: color var(--ppsw-speed) var(--ppsw-ease);
	font-variant-numeric: tabular-nums;
}

.ppsw-step.ppsw-active .ppsw-step-number,
.ppsw-step:not(.ppsw-active):hover .ppsw-step-number {
	color: var(--ppsw-accent);
}

.ppsw-step-header-content {
	flex: 1;
	display: flex;
	align-items: center;
	gap: 10px;
	min-width: 0;
}

.ppsw-step-icon {
	flex-shrink: 0;
	font-size: 1.125rem;
	color: var(--ppsw-accent);
	line-height: 1;
}

.ppsw-step-icon svg,
.ppsw-step-icon i {
	display: block;
	width: 1.125rem;
	height: 1.125rem;
}

.ppsw-step-title {
	margin: 0;
	padding: 0;
	font-size: 1rem;
	font-weight: 600;
	line-height: 1.35;
	color: rgba(255, 255, 255, 0.75);
	transition: color var(--ppsw-speed) var(--ppsw-ease);
	word-break: break-word;
}

.ppsw-step.ppsw-active .ppsw-step-title,
.ppsw-step:not(.ppsw-active):hover .ppsw-step-title {
	color: #ffffff;
}

/* Chevron icon */
.ppsw-step-chevron {
	flex-shrink: 0;
	margin-left: auto;
	color: rgba(255, 255, 255, 0.35);
	transition:
		transform  var(--ppsw-speed) var(--ppsw-ease),
		color      var(--ppsw-speed) var(--ppsw-ease),
		opacity    var(--ppsw-speed) var(--ppsw-ease);
	opacity: 0;
}

.ppsw-step.ppsw-active .ppsw-step-chevron,
.ppsw-step:not(.ppsw-active):hover .ppsw-step-chevron {
	opacity: 1;
}

.ppsw-step.ppsw-active .ppsw-step-chevron {
	transform: rotate(180deg);
	color: var(--ppsw-accent);
}

/* ── Step body (expanded content) ── */
.ppsw-step-body {
	display: grid;
	grid-template-rows: 0fr;
	transition: grid-template-rows var(--ppsw-speed) var(--ppsw-ease);
	padding-left: 72px; /* aligns with title */
}

.ppsw-step.ppsw-active .ppsw-step-body {
	grid-template-rows: 1fr;
}

.ppsw-step-body > * {
	overflow: hidden;
}

.ppsw-step-desc {
	margin: 0;
	padding: 12px 0 4px;
	font-size: 0.9rem;
	line-height: 1.7;
	color: rgba(255, 255, 255, 0.55);
	transition: opacity var(--ppsw-speed) var(--ppsw-ease);
}

.ppsw-step:not(.ppsw-active) .ppsw-step-desc {
	opacity: 0;
}

.ppsw-step.ppsw-active .ppsw-step-desc {
	opacity: 1;
}

/* ── CTA button inside step ── */
.ppsw-step-btn {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin-top: 16px;
	padding: 10px 22px;
	background-color: var(--ppsw-accent);
	color: var(--ppsw-bg-dark);
	font-size: 0.875rem;
	font-weight: 600;
	text-decoration: none;
	border-radius: 50px;
	letter-spacing: 0.02em;
	transition:
		background-color 200ms ease,
		transform        200ms ease,
		box-shadow       200ms ease;
	white-space: nowrap;
}

.ppsw-step-btn:hover,
.ppsw-step-btn:focus-visible {
	background-color: #b8945a;
	transform: translateY(-1px);
	box-shadow: 0 6px 20px rgba(200, 169, 110, 0.35);
	text-decoration: none;
	color: var(--ppsw-bg-dark);
}

.ppsw-step-btn:active {
	transform: translateY(0);
}

/* ── Keyboard / focus visible styles ── */
.ppsw-step:focus-visible {
	outline: 2px solid var(--ppsw-accent);
	outline-offset: 2px;
	border-radius: 4px;
}

/* ============================================================
   No-items placeholder
   ============================================================ */
.ppsw-no-items {
	padding: 24px;
	color: rgba(255, 255, 255, 0.5);
	font-style: italic;
	text-align: center;
}

/* ============================================================
   RESPONSIVE — Tablet (768px – 1024px)
   ============================================================ */
@media (max-width: 1024px) and (min-width: 768px) {
	.ppsw-accordion-col {
		padding: 36px 32px;
	}

	.ppsw-step-number {
		font-size: 1.75rem;
		min-width: 44px;
	}

	.ppsw-step-body {
		padding-left: 60px;
	}

	.ppsw-step::before {
		left: -32px;
	}
}

/* ============================================================
   RESPONSIVE — Mobile (max 767px)
   Stack vertically: media first, accordion below.
   ============================================================ */
@media (max-width: 767px) {

	.ppsw-inner {
		flex-direction: column !important; /* always stack on mobile */
		min-height: auto;
		border-radius: 16px;
	}

	/* Media comes first regardless of layout setting */
	.ppsw-media-col {
		flex: none;
		max-width: 100%;
		width: 100%;
		height: 320px;
		order: -1; /* always first */
	}

	.ppsw-accordion-col {
		flex: none;
		width: 100%;
		max-width: 100%;
		padding: 28px 20px;
		order: 1;
	}

	.ppsw-step::before {
		left: -20px;
		width: 2px;
	}

	.ppsw-step-body {
		padding-left: 0;
	}

	.ppsw-step-number {
		font-size: 1.5rem;
		min-width: 36px;
	}

	.ppsw-step-header {
		gap: 10px;
	}

	.ppsw-media-badge {
		top: 14px;
		right: 14px;
		min-width: 38px;
		min-height: 38px;
		padding: 6px 10px;
	}

	.ppsw-media-badge-num {
		font-size: 0.875rem;
	}

	.ppsw-step-btn {
		margin-top: 12px;
		font-size: 0.8125rem;
		padding: 9px 18px;
	}

	.ppsw-step-desc {
		font-size: 0.875rem;
	}
}

/* ============================================================
   RESPONSIVE — Very small screens (max 480px)
   ============================================================ */
@media (max-width: 480px) {
	.ppsw-inner {
		border-radius: 12px;
	}

	.ppsw-media-col {
		height: 260px;
	}

	.ppsw-accordion-col {
		padding: 22px 16px;
	}

	.ppsw-step-number {
		font-size: 1.25rem;
		min-width: 30px;
	}
}

/* ============================================================
   Elementor editor safety — ensure widget is visible in editor
   ============================================================ */
.elementor-editor-active .ppsw-wrap {
	pointer-events: auto;
}

/* Prevent overflow bleed in Elementor columns */
.elementor-widget-padamz-process-showcase {
	overflow: hidden;
}

/* ============================================================
   No-number alignment correction
   When the step number/label is hidden, remove the left indent
   from both the step body and the active indicator bar so the
   title and description sit flush to the left edge.
   ============================================================ */
.ppsw-step--no-number .ppsw-step-body {
	padding-left: 0;
}

.ppsw-step--no-number::before {
	left: 0;
}

/* ============================================================
   Reduced motion
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
	.ppsw-media-slide,
	.ppsw-media-img,
	.ppsw-step-body,
	.ppsw-step-title,
	.ppsw-step-number,
	.ppsw-step-chevron,
	.ppsw-step-desc,
	.ppsw-progress-fill {
		transition-duration: 0.01ms !important;
	}
}
