/**
 * Bookshelf
 *
 * The index at /bookshelf/. Bootstrap, Font Awesome, and base.css come first
 * from partials/head.php - this is only the page layer on top, and the Learn
 * hub subnav it shares with the video library is in base.css.
 *
 * @copyright   2026, ON1
 */

/* !- Page head */
#bookshelf-head {
	padding-bottom: 2.5rem;
	padding-top: 3.5rem;
}

#bookshelf-head h1 {
	margin-bottom: 0.5rem;
}

#bookshelf-head .eyebrow {
	margin-bottom: 1rem;
}

#bookshelf-head .bookshelf-intro {
	color: var(--text-400);
	font-size: var(--text-sm);
}

/* !- Category chips */
.bookshelf-filters {
	display: flex;
	flex-wrap: wrap;
	gap: 0.625rem;
	justify-content: center;
	margin-top: 2rem;
}

.book-chip {
	background: var(--bg-850);
	border: 1px solid var(--bg-700);
	border-radius: 1.25rem;
	color: var(--text-300);
	cursor: pointer;
	font-size: var(--text-mini);
	font-weight: 600;
	padding: 0.625rem 1.25rem;
}

.book-chip:hover {
	border-color: var(--bg-500);
	color: var(--text-50);
}

.book-chip.active {
	background: color-mix(in srgb, var(--blue-500) 12%, transparent);
	border-color: var(--blue-500);
	color: var(--blue-400);
}

/* !- Section dots */
.book-section .section-dot {
	border-radius: 50%;
	flex-shrink: 0;
	height: 0.5rem;
	width: 0.5rem;
}

.book-section .section-dot-blue {
	background: var(--blue-500);
}

.book-section .section-dot-orange {
	background: var(--orange-500);
}

.book-section .section-dot-teal {
	background: var(--teal-500);
}

/* !- Sections */
#bookshelf-body {
	padding-bottom: 3rem;
}

.book-section {
	padding-bottom: 3rem;
	padding-top: 3rem;
}

/*
 * User Guides is the page's one light band. It runs full width rather than
 * sitting in a rounded card, so the section takes the padding and the
 * container inside keeps the grid aligned with every other section.
 */
.book-section.theme-inverted .section-title {
	color: var(--text-100);
}

.book-section .section-head {
	align-items: baseline;
	display: flex;
	gap: 1rem;
	justify-content: space-between;
	margin-bottom: 0.375rem;
}

.book-section .section-title {
	align-items: center;
	display: flex;
	font-size: var(--text-xl);
	gap: 0.625rem;
	margin-bottom: 0;
}

.book-section .section-count {
	color: var(--text-500);
	font-size: var(--text-mini);
	white-space: nowrap;
}

.book-section .section-blurb {
	color: var(--text-500);
	font-size: var(--text-mini);
	margin-bottom: 1.5rem;
}

.book-card .book-cover {
	aspect-ratio: 4 / 5;
	background: var(--bg-800);
	border-radius: var(--border-radius);
	box-shadow: 0 0.75rem 1.5rem color-mix(in srgb, var(--black) 35%, transparent);
	display: block;
	margin-bottom: 0.625rem;
	overflow: hidden;
}

.book-card .book-cover img {
	display: block;
	height: 100%;
	object-fit: cover;
	transition: transform 0.2s;
	width: 100%;
}

.book-card .book-cover:hover img {
	transform: scale(1.03);
}

.book-card .book-title {
	font-size: var(--text-xs);
	font-weight: 600;
	line-height: 1.4;
	margin-bottom: 0.5rem;
}

.book-card .book-title a {
	color: var(--text-100);
	text-decoration: none;
}

.book-card .book-title a:hover {
	color: var(--link);
}

.book-card .book-tag {
	background: color-mix(in srgb, var(--orange-500) 15%, transparent);
	border-radius: var(--border-radius);
	color: var(--orange-400);
	display: inline-block;
	font-size: var(--text-tiny);
	font-weight: 700;
	letter-spacing: 0.08em;
	padding: 0.1875rem 0.5rem;
	text-transform: uppercase;
}

/* The light band's own shadow, since the dark one disappears on white */
.book-section.theme-inverted .book-cover {
	box-shadow: 0 0.5rem 1.25rem color-mix(in srgb, var(--black) 15%, transparent);
}

/*==============================================================================
 * SINGLE BOOK
 =============================================================================*/

/* !- Breadcrumb */
#book-breadcrumb {
	padding-top: 1.25rem;
}

#book-breadcrumb .breadcrumb-list {
	color: var(--text-500);
	display: flex;
	flex-wrap: wrap;
	font-size: var(--text-mini);
	gap: 0.5rem;
	margin-bottom: 0;
}

#book-breadcrumb .breadcrumb-list li:not(:last-child)::after {
	color: var(--bg-500);
	content: '\203a';
	margin-left: 0.5rem;
}

#book-breadcrumb .breadcrumb-list a {
	color: var(--text-500);
	text-decoration: none;
}

#book-breadcrumb .breadcrumb-list a:hover {
	color: var(--text-100);
}

#book-breadcrumb .breadcrumb-list li[aria-current] {
	color: var(--text-300);
}

/* !- Plus gate */
#book-gate {
	padding-bottom: 3rem;
	padding-top: 2rem;
}

/* !- Cover hero
 *
 * The page's light band, and the cover is deliberately the largest thing on
 * the page rather than a thumbnail beside the copy.
 */
#book-cover-hero {
	margin-top: 1.5rem;
	padding-bottom: 3.75rem;
	padding-top: 3.125rem;
}

.book-cover-large {
	aspect-ratio: 4 / 5;
	border-radius: var(--border-radius);
	box-shadow: 0 0.75rem 1.75rem color-mix(in srgb, var(--black) 35%, transparent);
	overflow: hidden;
	width: 16.25rem;
}

.book-cover-large img {
	display: block;
	height: 100%;
	object-fit: cover;
	width: 100%;
}

.book-actions {
	display: flex;
	flex-direction: column;
	gap: 0.875rem;
	width: 13.75rem;
}

.book-actions .btn {
	align-items: center;
	display: flex;
	font-size: var(--text-sm);
	gap: 0.5rem;
	justify-content: center;
	padding: 0.875rem 1.25rem;
	width: 100%;
}

.book-actions .book-actions-note {
	color: var(--text-400);
	font-size: var(--text-mini);
}

@media (max-width: 575.98px) {
	.book-cover-large,
	.book-actions {
		width: 100%;
	}
}

/* !- Body */
#book-body {
	padding-bottom: 5rem;
	padding-top: 3.125rem;
}

.book-title-large {
	font-size: var(--text-3xl);
	line-height: 1.2;
	margin-bottom: 0.75rem;
}

.book-title-large .preview-badge {
	background: var(--green-500);
	border-radius: var(--border-radius);
	color: var(--white);
	font-size: var(--text-micro);
	font-weight: 700;
	letter-spacing: 0.04em;
	padding: 0.25rem 0.5rem;
	position: relative;
	text-transform: uppercase;
	top: -0.375rem;
	white-space: nowrap;
}

.book-meta {
	color: var(--text-500);
	font-size: var(--text-mini);
	margin-bottom: 1.75rem;
}

.book-meta .list-inline-item:not(:last-child)::after {
	content: '\2022';
	margin-left: 0.5rem;
}

/* !- Categories */
.book-tags {
	border-top: 1px solid var(--bg-700);
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin-bottom: 0;
	padding-top: 1.5rem;
}

.book-tag-pill {
	background: var(--bg-850);
	border: 1px solid var(--bg-700);
	border-radius: 1.25rem;
	color: var(--text-400);
	display: inline-block;
	font-size: var(--text-tiny);
	font-weight: 600;
	letter-spacing: 0.1em;
	padding: 0.375rem 0.75rem;
	text-transform: uppercase;
}

/* !- Comments */
#book-comments {
	border-top: 1px solid var(--bg-700);
	margin-top: 2.75rem;
	padding-top: 1.875rem;
}

/* !- Small screens */
@media (max-width: 767.98px) {
	.book-title-large {
		font-size: var(--text-2xl);
	}
}
