/*
 * Book detail (PLAN §10.5, DESIGN §10.36–10.37, §11.4).
 */

.book-detail {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-start;
	gap: clamp(28px, 5cqi, 64px);
	padding: 28px 0 48px;
}
.book-detail__cover {
	flex: 0 1 340px;
	display: flex;
	justify-content: center;
}
.book-detail__arch { --arch-w: min(100%, 340px); }
.book-detail__text {
	flex: 1 1 440px;
	display: grid;
	justify-items: start;
	gap: 18px;
	min-width: 0;
}
.book-detail__author { margin-top: -6px; font-size: 15px; color: var(--muted); }
.book-detail__desc {
	max-width: 60ch;
	font-size: 17px;
	line-height: 1.65;
	color: var(--fg-2);
}
.book-detail__desc > * + * { margin-top: 1em; }
.book-detail__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; }

/* "Ky libër në gjuhë të tjera": one chip per edition, with its cover. */
.editions { display: grid; gap: 12px; }
.editions__list { display: flex; flex-wrap: wrap; gap: 10px; margin: 0; padding: 0; list-style: none; }
.editions__item {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	min-height: 52px;
	padding: 6px 16px 6px 6px;
	border: 1px solid var(--line);
	border-radius: 12px;
	color: var(--fg);
	font-size: 15px;
	font-weight: 600;
	text-decoration: none;
	transition: border-color .2s;
}
.editions__item:hover { border-color: var(--gold-line); }
.editions__item[aria-current] { border-color: var(--gold-line); background: var(--card); }
.editions__cover { width: 30px; height: 40px; object-fit: cover; border-radius: 3px; }

/* Specs: 1px grid gaps on a line-coloured background draw the rules. */
.specs {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
	gap: 1px;
	width: 100%;
	overflow: hidden;
	border: 1px solid var(--line);
	border-radius: 14px;
	background: var(--line);
}
.specs > div { padding: 12px 14px; background: var(--card); }
.specs dt {
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .16em;
	text-transform: uppercase;
	color: var(--gold-ink);
}
.specs dd { margin: 2px 0 0; font-size: 15px; }

/* Table of contents. */
.toc {
	width: 100%;
	padding-top: 12px;
	border-top: 1px solid var(--gold-line);
}
.toc summary {
	display: flex;
	align-items: center;
	gap: 8px;
	min-height: 44px;
	cursor: pointer;
	list-style: none;
	font-family: var(--font-display);
	font-variation-settings: "SOFT" 50;
	font-size: 22px;
}
.toc summary::-webkit-details-marker { display: none; }
.toc__caret {
	width: 14px;
	height: 14px;
	color: var(--gold-ink);
	transition: transform 200ms var(--ease);
}
.toc[open] .toc__caret { transform: rotate(180deg); }
.toc__list {
	display: grid;
	gap: 6px;
	padding: 8px 0 0 22px !important;
	list-style: decimal !important;
	font-size: 15px;
	color: var(--fg-2);
}

/* Similar books. */
.similar { padding-bottom: clamp(56px, 7cqi, 96px); }
.similar__title {
	margin-bottom: 24px;
	font-size: 30px;
	font-weight: 400;
}
.book-grid--similar { gap: clamp(16px, 2cqi, 24px); }
.book-grid--similar .book-tile__title { font-size: 19px; }

/* Audiobook on YouTube: click-to-load frame (nothing loads from YouTube before play). */
.yt { display: grid; gap: 20px; margin-top: clamp(40px, 6cqi, 72px); }
.yt__frame {
	position: relative;
	aspect-ratio: 16 / 9;
	max-width: 960px;
	overflow: hidden;
	border-radius: 20px;
	background: var(--ink-card);
}
.yt__frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.yt__play {
	position: absolute;
	inset: 0;
	display: grid;
	place-content: center;
	justify-items: center;
	gap: 10px;
	padding: 24px;
	color: var(--parchment);
	text-align: center;
	text-decoration: none;
}
.yt__play:hover { color: var(--parchment); }
.yt__icon {
	display: grid;
	place-items: center;
	width: 76px;
	height: 76px;
	padding-left: 6px;
	border-radius: 50%;
	background: var(--copper-2);
	color: var(--navy);
	font-size: 28px;
	transition: transform 150ms var(--ease);
}
.yt__play:hover .yt__icon,
.yt__play:focus-visible .yt__icon { transform: scale(1.06); }
.yt__label { font-family: var(--font-display); font-size: clamp(22px, 2.6cqi, 30px); }
.yt__note { font-size: 13px; color: var(--on-ink-muted); }
