/**
 * Book Library front-end styles.
 *
 * Deliberately minimal and unopinionated. Colours and typography are inherited
 * from the active theme so the listing sits inside any design without fighting
 * it. Only layout, spacing and the filter control are styled here.
 */

.book-library-archive {
	margin: 0 auto;
	max-width: 72rem;
	padding: 2rem 1rem;
}

.book-library-archive__header {
	margin-bottom: 1.5rem;
}

/* Filter --------------------------------------------------------------- */

.book-library-filter {
	align-items: center;
	border-block: 1px solid rgba(0, 0, 0, 0.1);
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
	margin-bottom: 2rem;
	padding-block: 1rem;
}

.book-library-filter__label {
	font-weight: 600;
}

.book-library-filter__select {
	min-height: 2.75rem;
	min-width: 12rem;
	padding: 0.35rem 0.5rem;
}

.book-library-filter__submit {
	cursor: pointer;
	min-height: 2.75rem;
	padding: 0.35rem 1.25rem;
}

.book-library-filter__reset {
	font-size: 0.9em;
}

/* Listing -------------------------------------------------------------- */

.book-library-grid {
	display: grid;
	gap: 2rem;
	grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
}

.book-library-card {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
}

.book-library-card__cover img {
	aspect-ratio: 3 / 4;
	display: block;
	height: auto;
	object-fit: cover;
	width: 100%;
}

.book-library-card__title {
	margin: 0;
	font-size: 1.15rem;
	line-height: 1.3;
}

.book-library-card__genres {
	font-size: 0.875rem;
	margin: 0;
	opacity: 0.75;
}

.book-library-card__excerpt {
	font-size: 0.95rem;
}

/* Author, shared by the archive and the single book view --------------- */

.book-library-author {
	margin: 0;
}

.book-library-author__label {
	font-weight: 600;
}

.book-library-empty {
	padding-block: 2rem;
}

@media (prefers-reduced-motion: no-preference) {
	.book-library-card__cover img {
		transition: opacity 150ms ease;
	}

	.book-library-card__cover:hover img {
		opacity: 0.85;
	}
}
