/**
 * SDH Interaktive Vorstellung (Showcase) Widget.
 *
 * Zwei-Spalten-Layout: links Item-Liste (Titel + Beschreibung), rechts
 * Bild/Slider. Aktives Item per Hover (Desktop) / Tap (Mobil). Farben,
 * Typografie, Abstaende etc. werden ueber Elementor-Controls gesetzt –
 * dieses Stylesheet liefert nur Struktur + neutrale Grundwerte.
 */

.sdh-showcase {
	--sdh-shwc-left: 30%;
	--sdh-shwc-gap: 32px;
	--sdh-shwc-ratio: 16 / 9;
	display: flex;
	align-items: flex-start;
	gap: var(--sdh-shwc-gap);
	width: 100%;
}

/* ---------- Linke Spalte: Item-Liste ---------- */
.sdh-showcase__list {
	flex: 0 0 var(--sdh-shwc-left);
	max-width: var(--sdh-shwc-left);
	display: flex;
	flex-direction: column;
	gap: 12px;
	min-width: 0;
}

.sdh-showcase__item {
	background: #fff;
	border: 1px solid #e5e7eb;
	border-radius: 12px;
	padding: 16px 20px;
	cursor: pointer;
	transition: background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
	outline: none;
}

.sdh-showcase__item:focus-visible {
	box-shadow: 0 0 0 3px rgba(17, 24, 39, 0.25);
}

.sdh-showcase__title {
	margin: 0 0 6px;
	font-size: 1.05rem;
	font-weight: 600;
	line-height: 1.3;
	color: #111827;
}

.sdh-showcase__desc {
	margin: 0;
	font-size: 0.95rem;
	line-height: 1.55;
	color: #4b5563;
}

.sdh-showcase__desc > *:first-child { margin-top: 0; }
.sdh-showcase__desc > *:last-child { margin-bottom: 0; }

/* Mount-Punkt fuer mobiles Layout – auf Desktop nicht sichtbar */
.sdh-showcase__slot {
	display: none;
}

/* ---------- Rechte Spalte: Bild/Slider-Buehne ---------- */
.sdh-showcase__stage {
	flex: 1 1 auto;
	min-width: 0;
	position: relative;
}

.sdh-shwc-sticky-yes .sdh-showcase__stage {
	position: sticky;
	top: 24px;
}

.sdh-showcase__panel {
	display: none;
}

.sdh-showcase__panel.is-active {
	display: block;
	animation: sdh-shwc-fade 0.35s ease;
}

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

.sdh-showcase__frame {
	position: relative;
	overflow: hidden;
	border-radius: 12px;
	background: #f3f4f6;
	aspect-ratio: var(--sdh-shwc-ratio);
}

.sdh-showcase__placeholder {
	position: absolute;
	inset: 0;
	background: repeating-linear-gradient(45deg, #f3f4f6 0 12px, #eceff3 12px 24px);
}

/* ---------- Slider ---------- */
.sdh-showcase__slides {
	display: flex;
	height: 100%;
	will-change: transform;
	transition: transform 0.45s ease;
}

.sdh-showcase__slide {
	flex: 0 0 100%;
	width: 100%;
	height: 100%;
}

.sdh-showcase__slide img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* Pfeile */
.sdh-showcase__arrow {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	display: flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	padding: 0;
	margin: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.85);
	color: #111827;
	cursor: pointer;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
	transition: background-color 0.2s ease, opacity 0.2s ease;
	z-index: 2;
}

.sdh-showcase__arrow--prev { left: 12px; }
.sdh-showcase__arrow--next { right: 12px; }

.sdh-showcase__arrow svg {
	width: 55%;
	height: 55%;
}

/* Punkte */
.sdh-showcase__dots {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 12px;
	display: flex;
	justify-content: center;
	gap: 8px;
	z-index: 2;
}

.sdh-showcase__dot {
	width: 9px;
	height: 9px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.6);
	cursor: pointer;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
	transition: background-color 0.2s ease, transform 0.2s ease;
}

.sdh-showcase__dot.is-active {
	background: #fff;
	transform: scale(1.15);
}

/* ---------- Leerzustand (nur Editor) ---------- */
.sdh-showcase-empty {
	padding: 24px;
	text-align: center;
	color: #6b7280;
	border: 1px dashed #d1d5db;
	border-radius: 12px;
}

/* ---------- Mobiles Layout (Klasse via JS anhand Breakpoint) ---------- */
.sdh-showcase.is-mobile {
	flex-direction: column;
}

.sdh-showcase.is-mobile .sdh-showcase__list {
	flex: 1 1 auto;
	max-width: 100%;
	width: 100%;
}

/* Buehne verstecken – aktives Panel wird per JS in das aktive Item verschoben */
.sdh-showcase.is-mobile .sdh-showcase__stage {
	display: none;
}

.sdh-showcase.is-mobile .sdh-showcase__slot {
	display: block;
}

.sdh-showcase.is-mobile .sdh-showcase__panel.is-active {
	margin-top: 14px;
}
