.fb-library {
	max-width: 1000px;
	margin: 0 auto;
}

.fb-library-hero {
	text-align: center;
	padding: 24px 0 8px;
	opacity: 0;
	transform: translateY(-8px);
	animation: fb-hero-in 0.6s ease forwards;
}

.fb-library-heading {
	margin: 0 0 6px;
	font-size: 28px;
	font-weight: 700;
	color: #2c3e50;
}

.fb-library-subheading {
	margin: 0 0 20px;
	font-size: 14px;
	color: #777;
}

.fb-library-search {
	position: relative;
	max-width: 420px;
	margin: 0 auto 32px;
	opacity: 0;
	animation: fb-hero-in 0.6s ease 0.1s forwards;
}

.fb-library-search input {
	width: 100%;
	padding: 12px 14px 12px 38px;
	font-size: 14px;
	border: 1px solid #ccd0d4;
	border-radius: 8px;
	box-sizing: border-box;
	transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.fb-library-search input:focus {
	outline: none;
	border-color: #2271b1;
	box-shadow: 0 0 0 3px rgba(34, 113, 177, 0.15);
}

.fb-search-icon {
	position: absolute;
	left: 13px;
	top: 50%;
	transform: translateY(-50%);
	font-size: 15px;
	opacity: 0.45;
}

.fb-library-grid {
	display: grid;
	grid-template-columns: repeat(var(--fb-columns, 4), 1fr);
	gap: 22px;
}

@media (max-width: 700px) {
	.fb-library-grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

.fb-library-card {
	display: block;
	text-decoration: none;
	color: inherit;
	background: #fff;
	border: 1px solid #eaeaea;
	border-radius: 12px;
	overflow: hidden;
	opacity: 0;
	transform: translateY(16px);
	animation: fb-card-in 0.55s ease forwards;
	animation-delay: var(--fb-delay, 0ms);
	transition: box-shadow 0.25s ease, transform 0.25s ease, border-color 0.25s ease;
}

.fb-library-card:hover {
	box-shadow: 0 10px 24px rgba(0, 0, 0, 0.1);
	transform: translateY(-4px);
	border-color: #dcdcdc;
}

.fb-library-cover {
	aspect-ratio: 3 / 4;
	background: #f0f0f1;
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
}

.fb-library-cover-img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.fb-library-card:hover .fb-library-cover-img {
	transform: scale(1.08);
}

.fb-library-cover-fallback {
	font-size: 40px;
	opacity: 0.4;
	transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.fb-library-card:hover .fb-library-cover-fallback {
	transform: scale(1.12) rotate(-2deg);
}

.fb-library-title {
	margin: 0;
	padding: 12px 14px;
	font-size: 14px;
	font-weight: 600;
	color: #2c3e50;
}

.fb-library-empty,
.fb-library-no-results {
	grid-column: 1 / -1;
	text-align: center;
	color: #777;
	padding: 40px 0;
}

@keyframes fb-hero-in {
	from {
		opacity: 0;
		transform: translateY(-8px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

@keyframes fb-card-in {
	from {
		opacity: 0;
		transform: translateY(16px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

/* Respect users who've asked for less motion. */
@media (prefers-reduced-motion: reduce) {
	.fb-library-hero,
	.fb-library-search,
	.fb-library-card {
		animation: none !important;
		opacity: 1 !important;
		transform: none !important;
	}
	.fb-library-cover-img,
	.fb-library-cover-fallback {
		transition: none !important;
	}
}
