/*
 * DS Dent image accordion. Scoped to .dsdent-ia. No script.
 *
 * A row of photos. Each is the label of a radio button; the photo of the checked one is three
 * times as wide as the others. Sizes follow the widget this replaces (ElementsKit image
 * accordion, Nov 2026).
 */

.dsdent-ia {
	--dsdent-ia-height: 460px;
	display: flex;
	height: var(--dsdent-ia-height);
	overflow: hidden;
	position: relative;
}

.dsdent-ia .dsdent-ia__input {
	border: 0;
	clip: rect(0, 0, 0, 0);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute;
	white-space: nowrap;
	width: 1px;
}

.dsdent-ia .dsdent-ia__item {
	cursor: pointer;
	display: block;
	flex: 1 1 0;
	margin: 0;
	min-width: 0;
	overflow: hidden;
	position: relative;
	transition: flex-grow 0.4s ease;
}

.dsdent-ia .dsdent-ia__input:checked + .dsdent-ia__item {
	cursor: default;
	flex-grow: 3;
}

.dsdent-ia .dsdent-ia__input:focus-visible + .dsdent-ia__item {
	outline: 3px solid #3ca5da;
	outline-offset: -3px;
}

.dsdent-ia .dsdent-ia__img {
	border-radius: 0;
	height: 100%;
	inset: 0;
	max-width: none;
	object-fit: cover;
	position: absolute;
	width: 100%;
}

/* A dark fade rises from the bottom of the open photo. */
.dsdent-ia__item::after {
	background: linear-gradient(0deg, #000 0, rgba(255, 255, 255, 0) 60%);
	content: "";
	inset: 0;
	opacity: 0;
	pointer-events: none;
	position: absolute;
	transform: translateY(100%);
	transition: transform 0.5s ease, opacity 0.5s ease;
}

.dsdent-ia__input:checked + .dsdent-ia__item::after {
	opacity: 1;
	transform: none;
}

.dsdent-ia__title {
	bottom: 24px;
	color: #fff;
	font-size: 22px;
	font-weight: 700;
	left: 24px;
	line-height: 1.2;
	opacity: 0;
	position: absolute;
	right: 24px;
	transition: opacity 0.4s ease;
	z-index: 1;
}

.dsdent-ia__input:checked + .dsdent-ia__item .dsdent-ia__title {
	opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
	.dsdent-ia .dsdent-ia__item,
	.dsdent-ia__item::after,
	.dsdent-ia__title {
		transition: none;
	}
}
