/**
 * ChopSkills — "Behind the Chop" Process Breakdown Styles
 *
 * Covers:
 *  - Collapsible submission modal section
 *  - Drag-and-drop process image dropzone + previews
 *  - Before/After slider (1 process image)
 *  - Thumbnail strip + lightbox trigger (2–3 process images)
 *
 * @package ChopSkills
 * @since   1.5.0
 */

/* ════════════════════════════════════════════════════════════════════════════
   Submission modal — "Behind the Chop" section
   ════════════════════════════════════════════════════════════════════════════ */

.cs-process-section {
	margin-top: 1rem;
	border: 1px solid var(--cs-border-subtle, rgba(255,255,255,0.08));
	border-radius: 10px;
	overflow: hidden;
}

.cs-process-section summary {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.75rem 1rem;
	cursor: pointer;
	font-size: 0.88rem;
	font-weight: 600;
	color: var(--cs-text-primary, #f0f0f5);
	background: var(--cs-bg-card, #1a1a2e);
	user-select: none;
	list-style: none;
	transition: background 0.15s;
}

.cs-process-section summary::-webkit-details-marker { display: none; }

.cs-process-section summary::after {
	content: '›';
	margin-left: auto;
	font-size: 1.1rem;
	line-height: 1;
	transition: transform 0.2s ease;
}

.cs-process-section[open] summary::after {
	transform: rotate(90deg);
}

.cs-process-section summary:hover {
	background: rgba(255, 255, 255, 0.04);
}

.cs-optional-tag {
	font-size: 0.7rem;
	font-weight: 500;
	color: var(--cs-text-muted, #94a3b8);
	background: rgba(255, 255, 255, 0.06);
	border-radius: 4px;
	padding: 1px 6px;
	text-transform: uppercase;
	letter-spacing: 0.05em;
}

.cs-process-body {
	padding: 1rem;
	background: rgba(0, 0, 0, 0.25);
}

.cs-process-description {
	font-size: 0.8rem;
	color: var(--cs-text-muted, #94a3b8);
	margin: 0 0 0.85rem;
	line-height: 1.5;
}

/* ── Dropzone ─────────────────────────────────────────────────────────────── */

.cs-process-dropzone {
	border: 2px dashed var(--cs-border-subtle, rgba(255,255,255,0.12));
	border-radius: 8px;
	padding: 1.25rem;
	text-align: center;
	cursor: pointer;
	transition: border-color 0.15s, background 0.15s;
}

.cs-process-dropzone:hover,
.cs-process-dropzone.cs-process-dz--over {
	border-color: var(--cs-accent, #6366f1);
	background: rgba(99, 102, 241, 0.04);
}

.cs-process-dz-cta {
	pointer-events: none;
}

.cs-process-dz-icon {
	font-size: 1.5rem;
	margin-bottom: 0.35rem;
	display: block;
}

.cs-process-dz-label {
	font-size: 0.8rem;
	color: var(--cs-text-muted, #94a3b8);
}

/* Hidden real file input — click bubbles through dropzone */
#cs-process-input {
	display: none;
}

/* ── Error hint ───────────────────────────────────────────────────────────── */

.cs-process-hint-err {
	font-size: 0.78rem;
	color: #f87171;
	margin: 0.5rem 0 0;
	line-height: 1.45;
}

/* ── Preview thumbnails ───────────────────────────────────────────────────── */

.cs-process-preview {
	display: flex;
	gap: 0.5rem;
	flex-wrap: wrap;
	margin-top: 0.75rem;
}

.cs-process-thumb {
	position: relative;
	width: 70px;
	height: 70px;
	border-radius: 6px;
	overflow: hidden;
	border: 1px solid var(--cs-border-subtle, rgba(255,255,255,0.1));
	flex-shrink: 0;
}

.cs-process-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.cs-process-thumb-remove {
	position: absolute;
	top: 2px;
	right: 2px;
	width: 18px;
	height: 18px;
	border-radius: 50%;
	background: rgba(0, 0, 0, 0.75);
	color: #fff;
	border: none;
	font-size: 0.75rem;
	line-height: 1;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background 0.12s;
}

.cs-process-thumb-remove:hover {
	background: #ef4444;
}

/* ════════════════════════════════════════════════════════════════════════════
   Single entry page — Before/After slider (1 process image)
   ════════════════════════════════════════════════════════════════════════════ */

.cs-process-block {
	margin: 2rem 0;
}

.cs-process-block-title {
	font-size: 1rem;
	font-weight: 700;
	color: var(--cs-text-primary, #f0f0f5);
	margin: 0 0 1rem;
	display: flex;
	align-items: center;
	gap: 0.5rem;
}

/* ── B/A Slider ──────────────────────────────────────────────────────────── */

.cs-ba-slider {
	position: relative;
	overflow: hidden;
	border-radius: 10px;
	cursor: col-resize;
	user-select: none;
	-webkit-user-select: none;
	border: 1px solid var(--cs-border-subtle, rgba(255,255,255,0.08));
	max-width: 100%;
}

.cs-ba-before,
.cs-ba-after {
	display: block;
	width: 100%;
	height: auto;
	pointer-events: none;
}

.cs-ba-after {
	position: absolute;
	inset: 0;
	width: 50%; /* controlled by JS */
	height: 100%;
	object-fit: cover;
	object-position: left center;
}

.cs-ba-handle {
	position: absolute;
	top: 0;
	bottom: 0;
	left: 50%; /* controlled by JS */
	width: 2px;
	background: #fff;
	box-shadow: 0 0 8px rgba(0,0,0,0.5);
	cursor: col-resize;
}

.cs-ba-handle::before,
.cs-ba-handle::after {
	content: '';
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	background: #fff;
	border-radius: 50%;
}

.cs-ba-handle::before {
	width: 38px;
	height: 38px;
	box-shadow: 0 2px 12px rgba(0,0,0,0.45);
}

/* Arrow icons via pseudo-element overlay — CSS-only chevrons */
.cs-ba-handle::after {
	content: '◂ ▸';
	font-size: 0.75rem;
	color: #1e1e2e;
	width: auto;
	height: auto;
	background: transparent;
	letter-spacing: -2px;
	transform: translate(-50%, -50%);
}

.cs-ba-labels {
	position: absolute;
	inset: 0;
	display: flex;
	justify-content: space-between;
	align-items: flex-end;
	padding: 0.65rem 0.85rem;
	pointer-events: none;
}

.cs-ba-label {
	font-size: 0.7rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: #fff;
	background: rgba(0,0,0,0.55);
	padding: 0.25rem 0.55rem;
	border-radius: 4px;
	backdrop-filter: blur(4px);
}

/* ── Thumbnail strip (2–3 process images) ────────────────────────────────── */

.cs-process-strip {
	display: flex;
	gap: 0.65rem;
	flex-wrap: wrap;
}

.cs-process-strip-thumb {
	position: relative;
	flex: 1 1 200px;
	max-width: 280px;
	border-radius: 8px;
	overflow: hidden;
	cursor: pointer;
	border: 1px solid var(--cs-border-subtle, rgba(255,255,255,0.08));
	transition: transform 0.18s, border-color 0.18s;
}

.cs-process-strip-thumb:hover {
	transform: translateY(-2px);
	border-color: var(--cs-accent, #6366f1);
}

.cs-process-strip-thumb img {
	display: block;
	width: 100%;
	aspect-ratio: 4 / 3;
	object-fit: cover;
}

.cs-process-strip-expand {
	position: absolute;
	bottom: 0.45rem;
	right: 0.45rem;
	background: rgba(0,0,0,0.6);
	color: #fff;
	border: 1px solid rgba(255,255,255,0.2);
	border-radius: 5px;
	font-size: 0.7rem;
	padding: 0.2rem 0.45rem;
	pointer-events: none;
}

/* ── Blind voting guard — hide process block during voting_live ───────────── */

.cs-process-block[data-hidden-during-voting] {
	display: none;
}
