/**
 * ZeltaCode Process Steps — front-end styles.
 */

.zcps {
	--zcps-open-speed: 0.35s;
	--zcps-dot-color: rgba(255, 255, 255, 0.055);
	--zcps-dot-gap: 13px;
	--zcps-dot-size: 1px;
	--zcps-num-width: 56px;
	--zcps-frame-w: 2px;
	--zcps-frame-radius: 10px;

	display: flex;
	flex-direction: row;
	align-items: flex-start;
	gap: 48px;
	width: 100%;
	background: #000;
}

.zcps *,
.zcps *::before,
.zcps *::after {
	box-sizing: border-box;
}

/* ------------------------------------------------------------------ */
/* Steps column                                                        */
/* ------------------------------------------------------------------ */

.zcps__steps {
	flex: 0 0 48%;
	max-width: 48%;
	min-width: 0;
	/* Style, not width, gates this line — the thickness control writes a width
	   unconditionally, so "none" is what actually keeps it hidden. */
	border-top: 0 none #1c1f25;
}

.zcps-topline-yes .zcps__steps {
	border-top-style: solid;
}

.zcps__step {
	padding: 22px 4px;
	border-bottom: 1px solid #1c1f25;
	transition: background-color 0.25s ease;
}

/**
 * The step header is a real <button>, which means theme and Elementor Kit
 * button rules ( .elementor-kit-N button:hover, .entry-content button, … )
 * outrank a plain `.zcps__head` reset and repaint the row on hover — that is
 * where the stray accent-coloured background came from. So the reset is
 * scoped for specificity AND covers every interactive state, and the handful
 * of properties themes tend to force are locked. No widget control targets
 * this element (row background lives on .zcps__step, the chevron on
 * .zcps__chev), so nothing here can fight the user's own settings.
 */
.zcps .zcps__head,
.zcps .zcps__head:link,
.zcps .zcps__head:visited,
.zcps .zcps__head:hover,
.zcps .zcps__head:focus,
.zcps .zcps__head:active {
	display: flex;
	align-items: center;
	gap: 0;
	width: 100%;
	min-height: 0;
	margin: 0;
	padding: 0;
	-webkit-appearance: none;
	appearance: none;
	border: 0 none !important;
	border-radius: 0 !important;
	background: none !important;
	background-color: transparent !important;
	background-image: none !important;
	box-shadow: none !important;
	color: inherit !important;
	text-align: left;
	text-decoration: none !important;
	text-transform: none;
	letter-spacing: normal;
	/* Themes routinely ship `button { white-space: nowrap }` so button labels
	   stay on one line. On a full-width accordion header that is exactly wrong:
	   it is what stopped long titles wrapping and pushed them off the right
	   edge. min-width:0 lets the header shrink inside its column too. */
	white-space: normal;
	min-width: 0;
	font: inherit;
	line-height: inherit;
	cursor: pointer;
	transform: none;
	filter: none;
	-webkit-tap-highlight-color: transparent;
	/* Dragging across the row would otherwise flash the theme's selection
	   highlight, which can read as the same stray colour. */
	-webkit-user-select: none;
	-moz-user-select: none;
	user-select: none;
}

/* Mouse clicks get no ring; keyboard focus keeps a clear one. */
.zcps .zcps__head:focus {
	outline: none;
}

.zcps .zcps__head:focus-visible {
	outline: 2px solid #5e9eff;
	outline-offset: 4px;
}

/* Themes that underline or shadow everything inside a hovered button. Colour
   is deliberately not touched here, so the widget's own colour controls win. */
.zcps .zcps__head:hover *,
.zcps .zcps__head:focus * {
	text-decoration: none;
	box-shadow: none;
}

.zcps .zcps__num {
	flex: 0 0 var(--zcps-num-width);
	font-size: 21px;
	font-weight: 700;
	line-height: 1.2;
	letter-spacing: -0.5px;
	color: #4e4e4e;
	transition: color 0.25s ease;
}

.zcps .zcps__step.is-active .zcps__num {
	color: #ff7a45;
}

.zcps .zcps__title {
	flex: 1 1 auto;
	/* A flex item's min-width defaults to auto, i.e. its longest word. Zeroing
	   it lets the title wrap freely; break-word then handles a single word too
	   long for the column instead of letting it overhang. */
	min-width: 0;
	white-space: normal;
	overflow-wrap: break-word;
	word-break: break-word;
	margin: 0;
	padding-right: 16px;
	font-size: 17px;
	font-weight: 600;
	line-height: 1.3;
	letter-spacing: -0.3px;
	color: #d8dbe0;
	transition: color 0.25s ease;
}

.zcps .zcps__step.is-active .zcps__title {
	color: #fff;
}

.zcps .zcps__chev {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto;
	width: 24px;
	height: 24px;
	border: 1px solid #2a2f38;
	border-radius: 5px;
	background-color: rgba(255, 255, 255, 0.02);
	color: #8a90a0;
	font-size: 9px;
	line-height: 1;
	transition: color 0.25s ease, background-color 0.25s ease, border-color 0.25s ease;
}

.zcps .zcps__chev-icon {
	display: inline-flex;
	align-items: center;
	line-height: 0;
	transition: transform var(--zcps-open-speed) ease;
}

.zcps .zcps__chev svg {
	width: 1em;
	height: 1em;
	fill: currentColor;
}

/* ------------------------------------------------------------------ */
/* Accordion body                                                      */
/* ------------------------------------------------------------------ */

/**
 * grid-template-rows 0fr → 1fr animates to the content's natural height
 * without JavaScript having to measure anything.
 */
.zcps__body {
	display: grid;
	grid-template-rows: 0fr;
	transition: grid-template-rows var(--zcps-open-speed) ease;
}

.zcps__step.is-active .zcps__body {
	grid-template-rows: 1fr;
}

/* Indent tracks the number column so the copy lines up under the title. */
.zcps__body-inner {
	overflow: hidden;
	min-height: 0;
	padding-left: var(--zcps-num-width);
}

.zcps .zcps__desc {
	margin: 9px 0 0;
	font-size: 12.5px;
	line-height: 1.6;
	color: #8a90a0;
	overflow-wrap: break-word;
	word-break: break-word;
}

.zcps__tags {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 7px;
	margin-top: 14px;
}

.zcps .zcps__tag {
	display: inline-flex;
	align-items: center;
	padding: 5px 9px;
	border: 1px solid #2a2f38;
	border-radius: 3px;
	background-color: rgba(255, 255, 255, 0.02);
	color: #6e7480;
	font-size: 8.5px;
	font-weight: 600;
	letter-spacing: 0.9px;
	line-height: 1;
	text-transform: uppercase;
	/* Tags stay on one line, but never wider than the column they sit in. */
	white-space: nowrap;
	max-width: 100%;
	overflow-wrap: break-word;
}

.zcps .zcps__tag.is-accent {
	border-color: #2f6bff;
	background-color: rgba(94, 158, 255, 0.1);
	color: #5e9eff;
}

/* ------------------------------------------------------------------ */
/* Visual column                                                       */
/* ------------------------------------------------------------------ */

.zcps__visuals {
	position: relative;
	flex: 1 1 auto;
	min-width: 0;
	align-self: stretch;
}

.zcps__visual {
	width: 100%;
}

.zcps__visual[hidden] {
	display: none;
}

/* The gradient frame is a padded background; the canvas covers its middle. */
.zcps__frame {
	padding: var(--zcps-frame-w);
	border-radius: var(--zcps-frame-radius);
	background: linear-gradient(135deg, #ff8a4c 0%, #7a4a38 14%, #24262e 34%, #23252d 56%, #6c4be0 82%, #4e7bff 100%);
	box-shadow: 0 0 40px rgba(94, 123, 255, 0.18);
}

/* Inner radius tracks the outer one minus the frame thickness, so the two
   curves stay concentric at any setting. */
.zcps__canvas {
	position: relative;
	min-height: 320px;
	padding: 30px;
	border-radius: max(0px, calc(var(--zcps-frame-radius) - var(--zcps-frame-w)));
	background-color: #0a0b0f;
	overflow: hidden;
}

.zcps-dots-yes .zcps__canvas::before {
	content: "";
	position: absolute;
	inset: 0;
	background-image: radial-gradient(circle, var(--zcps-dot-color) var(--zcps-dot-size), transparent var(--zcps-dot-size));
	background-size: var(--zcps-dot-gap) var(--zcps-dot-gap);
	pointer-events: none;
}

.zcps__canvas > * {
	position: relative;
	z-index: 1;
}

.zcps__image {
	display: block;
	width: 100%;
	height: auto;
	border-radius: 6px;
}

/* ------------------------------------------------------------------ */
/* Chat mockup                                                         */
/* ------------------------------------------------------------------ */

.zcps__chat {
	display: flex;
	flex-direction: column;
	gap: 12px;
	width: 100%;
}

.zcps__row {
	display: flex;
	justify-content: flex-start;
	width: 100%;
}

.zcps__row--out {
	justify-content: flex-end;
}

.zcps__bubble {
	max-width: 62%;
	padding: 13px 16px;
	border: 1px solid #262a32;
	border-radius: 7px;
	background-color: #15171c;
	color: #c7cbd1;
	font-size: 13px;
	line-height: 1.5;
	/* A pasted URL in a message would otherwise stretch the bubble. */
	overflow-wrap: break-word;
	word-break: break-word;
}

.zcps__bubble--out {
	border-color: #2f6bff;
	background-color: #15335e;
	color: #fff;
}

.zcps__bubble--typing {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	max-width: none;
	padding: 9px 12px;
}

.zcps__typing-dot {
	display: block;
	width: 4px;
	height: 4px;
	border-radius: 50%;
	background-color: #8a90a0;
}

.zcps-typing-yes .zcps__typing-dot {
	animation: zcps-typing 1.4s infinite ease-in-out both;
}

.zcps-typing-yes .zcps__typing-dot:nth-child(2) {
	animation-delay: 0.18s;
}

.zcps-typing-yes .zcps__typing-dot:nth-child(3) {
	animation-delay: 0.36s;
}

@keyframes zcps-typing {
	0%,
	70%,
	100% {
		opacity: 0.35;
		transform: translateY(0);
	}
	35% {
		opacity: 1;
		transform: translateY(-3px);
	}
}

/* ------------------------------------------------------------------ */
/* Panel switch animations                                             */
/* ------------------------------------------------------------------ */

.zcps-anim-fade .zcps__visual.is-active .zcps__frame {
	animation: zcps-fade var(--zcps-open-speed) ease both;
}

.zcps-anim-fade-up .zcps__visual.is-active .zcps__frame {
	animation: zcps-fade-up var(--zcps-open-speed) cubic-bezier(0.22, 0.61, 0.36, 1) both;
}

.zcps-anim-zoom .zcps__visual.is-active .zcps__frame {
	animation: zcps-zoom var(--zcps-open-speed) cubic-bezier(0.22, 0.61, 0.36, 1) both;
}

@keyframes zcps-fade {
	from {
		opacity: 0;
	}
	to {
		opacity: 1;
	}
}

@keyframes zcps-fade-up {
	from {
		opacity: 0;
		transform: translateY(14px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

@keyframes zcps-zoom {
	from {
		opacity: 0;
		transform: scale(0.97);
	}
	to {
		opacity: 1;
		transform: scale(1);
	}
}

/* ------------------------------------------------------------------ */
/* Motion                                                              */
/* ------------------------------------------------------------------ */

@media (prefers-reduced-motion: reduce) {
	.zcps__body,
	.zcps__chev-icon,
	.zcps__step,
	.zcps__num,
	.zcps__title,
	.zcps__chev {
		transition: none !important;
	}

	.zcps__visual.is-active .zcps__frame {
		animation: none !important;
	}

	.zcps-typing-yes .zcps__typing-dot {
		animation: none !important;
		opacity: 0.6;
	}
}

/* ------------------------------------------------------------------ */
/* Responsive stacking                                                 */
/* ------------------------------------------------------------------ */

@media (max-width: 1024px) {
	.zcps-stack-tablet .zcps {
		flex-direction: column !important;
	}

	.zcps-stack-tablet .zcps__steps {
		flex: 1 1 auto !important;
		max-width: 100% !important;
		width: 100%;
	}

	.zcps-stack-tablet .zcps__visuals {
		width: 100%;
	}
}

@media (max-width: 767px) {
	.zcps-stack-mobile .zcps {
		flex-direction: column !important;
	}

	.zcps-stack-mobile .zcps__steps {
		flex: 1 1 auto !important;
		max-width: 100% !important;
		width: 100%;
	}

	.zcps-stack-mobile .zcps__visuals {
		width: 100%;
	}

	.zcps__body-inner {
		padding-left: 0;
	}

	.zcps__bubble {
		max-width: 80%;
	}

	/* Narrow screens: give the title every pixel the number column can spare,
	   and let a long tag wrap rather than run off the edge. */
	.zcps .zcps__title {
		padding-right: 10px;
	}

	.zcps .zcps__tag {
		white-space: normal;
	}

	.zcps__canvas {
		min-height: 220px;
	}
}

/* ------------------------------------------------------------------ */
/* Overflow safety                                                     */
/* ------------------------------------------------------------------ */

/**
 * A flex item refuses to shrink below its content's min-content width unless
 * told otherwise, which is how a widget ends up pushing the page wider than
 * the viewport. Kept to min-width only — .zcps__steps carries its own
 * max-width from the column control and must not be overridden here.
 */
.zcps,
.zcps__steps,
.zcps__visuals,
.zcps__step,
.zcps__body,
.zcps__body-inner {
	min-width: 0;
}

/* max-width guard, only on elements that have no width cap of their own. */
.zcps__visuals,
.zcps__step,
.zcps__body,
.zcps__body-inner,
.zcps__frame,
.zcps__canvas {
	max-width: 100%;
}
