/* Chips on the books page are clickable. */
.as-filter-bar .as-fchip,
.as-filter-bar .as-fchip-on {
	cursor: pointer;
	user-select: none;
}

.as-filter-bar .as-fchip:hover {
	filter: brightness( 0.96 );
}

.as-filter-bar .as-fchip:focus-visible,
.as-filter-bar .as-fchip-on:focus-visible {
	outline: 2px solid rgb( 46, 110, 81 );
	outline-offset: 2px;
}

.as-books-empty {
	text-align: center;
	color: rgb( 109, 127, 118 );
	padding: 32px 16px;
	margin: 0;
}

.as-books-empty[hidden] {
	display: none;
}

/*
 * Cover frame. Almost every cover is a 4:5 photo of the book on a near-white
 * backdrop, so the frame takes that shape, loses its padding and lattice, and
 * matches the photos' own backdrop: a 4:5 cover fills it edge to edge.
 * A cover of another shape is shown whole over a blurred copy of itself
 * (books-filter.js marks it and hands over the image), so no frame shows round it.
 */
.elementor .as-book-grid .as-bcard-media {
	position: relative;
	isolation: isolate;
	aspect-ratio: 4 / 5;
	padding: 0;
	background: rgb( 248, 246, 244 );
	overflow: hidden;
}

.elementor .as-book-grid .as-bcard-img {
	position: relative;
	z-index: 1;
	display: block;
	width: 100%;
	height: 100%;
	max-width: none;
	object-fit: contain;
	object-position: center;
	transition: transform 0.4s ease;
}

.elementor .as-book-grid .as-bcard-media.is-fit .as-bcard-img {
	object-fit: cover;
}

.elementor .as-book-grid .as-bcard-media.is-blur::before {
	content: '';
	position: absolute;
	inset: -24px;
	z-index: 0;
	background: var( --as-cover ) center / cover no-repeat;
	filter: blur( 18px ) saturate( 1.15 );
	opacity: 0.7;
}

.elementor .as-book-grid .as-bcard-media.is-blur .as-bcard-img {
	filter: drop-shadow( 0 6px 14px rgba( 0, 0, 0, 0.18 ) );
}

.elementor .as-book-grid .as-bcard:hover .as-bcard-img {
	transform: scale( 1.03 );
}

@media ( prefers-reduced-motion: reduce ) {
	.elementor .as-book-grid .as-bcard-img {
		transition: none;
	}

	.elementor .as-book-grid .as-bcard:hover .as-bcard-img {
		transform: none;
	}
}
