/*
Theme Name: Aldine Catalog Pagination Fix
Theme URI: https://pressbooks.palomar.edu/
Description: Child theme for Aldine that corrects pagination on the network catalog page.
Author: Palomar College
Template: pressbooks-aldine
Version: 1.0.0
Text Domain: aldine-catalog-fix
Requires PHP: 8.1
*/

/* Add child-theme customizations below this line. */

/* Catalog card layout */
.network-catalog .books {
	align-items: stretch;
	gap: 1rem;
}

.network-catalog .book {
	background: #fff;
	border: 1px solid #767676;
	border-top: 4px solid #8f1018;
	box-shadow: 0 2px 6px rgb(0 0 0 / 10%);
	color: #222;
	display: flex;
	flex-direction: column;
	height: auto;
	min-height: 10rem;
	padding: 1.25rem;
	transition:
		box-shadow 0.2s ease,
		transform 0.2s ease;
}

.network-catalog .book:hover {
	box-shadow: 0 5px 14px rgb(0 0 0 / 16%);
	transform: translateY(-2px);
}

/* Book title */
.network-catalog .book__title {
	font-size: 1.15rem;
	font-weight: 600;
	line-height: 1.4;
	margin: 0 0 0.6rem;
}

.network-catalog .book__title a {
	color: #222;
	text-decoration: none;
}

.network-catalog .book__title a:hover {
	color: #8f1018;
	text-decoration: underline;
	text-decoration-thickness: 2px;
	text-underline-offset: 0.2em;
}

/* Metadata */
.network-catalog .book__subject,
.network-catalog .book__institutions {
	color: #444;
	font-size: 0.875rem;
	line-height: 1.5;
	margin: 0 0 0.4rem;
}

/* Subject is a link, so do not distinguish it by color alone */
.network-catalog .book__subject a {
	color: #444;
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 0.15em;
}

.network-catalog .book__subject a:hover {
	color: #8f1018;
	text-decoration-thickness: 2px;
}

/* Keep the action aligned near the bottom */
.network-catalog .book__read-more {
	margin: auto 0 0;
	padding-top: 1rem;
}

.network-catalog .book__read-more a {
	color: #8f1018;
	display: inline-flex;
	font-size: 0.875rem;
	font-weight: 600;
	gap: 0.35rem;
	line-height: 1.5;
	min-height: 2.75rem;
	align-items: center;
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 0.2em;
}

.network-catalog .book__read-more a:hover {
	text-decoration-thickness: 2px;
}

/* Visible keyboard focus */
.network-catalog .book a:focus-visible {
	border-radius: 2px;
	outline: 3px solid #005fcc;
	outline-offset: 4px;
}

/* Do not require users to experience motion */
@media (prefers-reduced-motion: reduce) {
	.network-catalog .book {
		transition: none;
	}

	.network-catalog .book:hover {
		transform: none;
	}
}

@media screen and (max-width: 767px) {
	.network-catalog .books {
		gap: 0.75rem;
	}

	.network-catalog .book {
		min-height: 0;
		padding: 1rem;
	}
}

/* Preserve controls and focus indicators in Windows High Contrast Mode */
@media (forced-colors: active) {
	.network-catalog .book {
		border: 1px solid CanvasText;
	}

	.network-catalog .book a:focus-visible {
		outline-color: Highlight;
	}
}