/*
 * Eva Books: the book box (the 29 Nov 2026 book box plan, sections 3.2-3.6), in UpJourney's own tokens (theme style.css :root),
 * with fallbacks so the editor preview draws the same.
 * Desktop and tablet (601 px and wider): the cover on the tinted panel at the left (up to 144 x 196, never cropped),
 * the amber button at the right with the other formats and shops as outlined buttons beside or under it. Phones (600 px
 * and narrower): stacked, the cover up to 172 px tall, the buttons full width, every link at least 44 px tall.
 * Selectors that start "body .entry-content" weigh (0,3,2) and up, above the theme's body-link and list rules (0,3,1),
 * the same way the theme's own headings and buttons do. Every link in the box sets each property of the theme's body-link
 * rule (2.9.35: colour, underline, its colour, thickness and offset, skip-ink, radius, transition; hovered at (0,4,1):
 * colour, underline colour, wash), so the box draws the same whether or not the theme excludes it (2.9.36 does).
 */

.eva-book {
	display: grid;
	grid-template-columns: 200px minmax(0, 1fr);
	align-items: stretch;
	box-sizing: border-box;
	max-width: var(--uj-measure, 40rem);
	margin: 32px 0;
	background: #fff;
	border: 1px solid var(--uj-hair, #e4eaf0);
	border-radius: 14px;
	overflow: hidden;
	font-family: var(--uj-font-body, "Figtree", system-ui, -apple-system, sans-serif);
	line-height: 1.4;
}

/* left: the cover on the tinted panel */
.eva-book__cover {
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px 20px;
	background: var(--uj-tint, #eff8fa);
}
.eva-book a.eva-book__cover-link,
body .entry-content .eva-book a.eva-book__cover-link {
	display: block;
	line-height: 0;
	border-radius: 6px;
	background: transparent;
	color: inherit;
	text-decoration: none;
	text-underline-offset: auto;
	text-decoration-skip-ink: auto;
	transition: none;
}
.eva-book a.eva-book__cover-link:hover,
body .entry-content .eva-book a.eva-book__cover-link:hover {
	background: transparent;
	color: inherit;
	text-decoration: none;
}
.eva-book .eva-book__img {
	display: block;
	width: auto;
	height: 196px;
	max-width: 144px;
	margin: 0;
	object-fit: contain;
	border-radius: 6px;
	box-shadow: 0 10px 26px rgba(16, 59, 99, 0.2);
}
.eva-book .eva-book__img--wide {
	width: 144px;
	height: auto;
}
/* a product's Amazon picture (round 2, P8): a white square in the same panel, scaled whole, never cropped */
.eva-book .eva-book__img--product {
	width: 144px;
	height: 144px;
	max-width: 144px;
	object-fit: contain;
	background: #fff;
	box-shadow: none;
}

/* the plain cover drawn when we keep no picture of the book: a navy jacket with a spine, an amber rule, the title in
   white and the author under a fine line, so it reads as a book on the pale panel (Neon review fixes, 3 Dec 2026, 3C) */
.eva-book__drawn {
	display: flex;
	flex-direction: column;
	justify-content: flex-start;
	gap: 10px;
	box-sizing: border-box;
	width: 131px;
	height: 196px;
	padding: 16px 13px 14px 20px;
	overflow: hidden;
	text-align: left;
	line-height: 1.25;
	background: linear-gradient(90deg, #0a2744 0 9px, #174b7a 10px, #0f375d 12px, var(--uj-primary, #103b63) 100%);
	border: 1px solid #0c2e4d;
	border-radius: 3px 7px 7px 3px;
	box-shadow: 0 12px 26px rgba(16, 59, 99, 0.28);
}
.eva-book__drawn::before {
	content: "";
	flex: none;
	width: 28px;
	height: 3px;
	border-radius: 2px;
	background: var(--uj-cta, #ffb648);
}
.eva-book__drawn-title {
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 6;
	overflow: hidden;
	overflow-wrap: anywhere;
	font-family: var(--uj-font-heading, "Lora", Georgia, serif);
	font-size: 14.5px;
	font-weight: 700;
	line-height: 1.28;
	color: #fff;
}
/* the title links to the book's Amazon page, as the old boxes' titles did: it reads as the title, underlined on hover */
.eva-book a.eva-book__name-link,
body .entry-content .eva-book a.eva-book__name-link {
	color: inherit;
	font: inherit;
	text-decoration: none;
	background: none;
	box-shadow: none;
}
.eva-book a.eva-book__name-link:hover,
.eva-book a.eva-book__name-link:focus-visible,
body .entry-content .eva-book a.eva-book__name-link:hover,
body .entry-content .eva-book a.eva-book__name-link:focus-visible {
	color: inherit;
	text-decoration: underline;
	text-underline-offset: 3px;
}
.eva-book__drawn-author {
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
	margin-top: auto;
	padding-top: 8px;
	overflow: hidden;
	overflow-wrap: anywhere;
	border-top: 1px solid rgba(255, 255, 255, 0.18);
	font-size: 11.5px;
	color: #bfd9ea;
}

/* right: the shop column, centred so a box with few links has no empty space under the button */
.eva-book__shop {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	justify-content: center;
	min-width: 0;
	padding: 20px 26px;
}
.eva-book--product {
	grid-template-columns: minmax(0, 1fr);
}
.eva-book--product.eva-book--pictured {
	grid-template-columns: 200px minmax(0, 1fr);
}
.eva-book .eva-book__name,
body .entry-content .eva-book p.eva-book__name {
	max-width: none;
	margin: 0 0 14px;
	font-family: var(--uj-font-heading, "Lora", Georgia, serif);
	font-size: 19px;
	line-height: 1.3;
	font-weight: 700;
	color: var(--uj-primary, #103b63);
}

/* the one filled button: amber is reserved for shop buttons */
.eva-book a.eva-book__buy,
body .entry-content .eva-book a.eva-book__buy {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	min-height: 44px;
	padding: 11px 20px;
	border: 0;
	border-radius: 10px;
	background: var(--uj-cta, #ffb648);
	color: var(--uj-cta-ink, #231a0d);
	font-family: var(--uj-font-body, "Figtree", system-ui, -apple-system, sans-serif);
	font-size: 15px;
	font-weight: 700;
	line-height: 1.2;
	text-align: center;
	text-decoration: none;
	text-underline-offset: auto;
	text-decoration-skip-ink: auto;
	transition: background 0.15s;
}
.eva-book a.eva-book__buy:hover,
body .entry-content .eva-book a.eva-book__buy:hover {
	background: var(--uj-cta-hover, #f0a032);
	color: var(--uj-cta-ink, #231a0d);
	text-decoration: none;
}

/* the other formats and shops (Neon review fixes, 3 Dec 2026, from its mockup 3A): quiet outlined buttons in the box's
   own tokens. One sits beside the amber button; two or more sit in a labelled row under it, after a hairline. */
.eva-book__actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px;
}
.eva-book a.eva-book__alt,
body .entry-content .eva-book a.eva-book__alt {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	min-height: 44px;
	padding: 10px 16px;
	border: 1px solid #d3dfe9;
	border-radius: 10px;
	background: #fff;
	color: var(--uj-primary, #103b63);
	font-family: var(--uj-font-body, "Figtree", system-ui, -apple-system, sans-serif);
	font-size: 14.5px;
	font-weight: 600;
	line-height: 1.2;
	text-align: center;
	text-decoration: none;
	text-underline-offset: auto;
	text-decoration-skip-ink: auto;
	transition: background-color 0.15s, border-color 0.15s;
}
.eva-book a.eva-book__alt:hover,
body .entry-content .eva-book a.eva-book__alt:hover {
	background: var(--uj-tint, #eff8fa);
	border-color: var(--uj-accent, #0aa6a6);
	color: var(--uj-primary, #103b63);
	text-decoration: none;
}
.eva-book__others {
	align-self: stretch;
	margin-top: 14px;
	padding-top: 12px;
	border-top: 1px solid var(--uj-hair, #e4eaf0);
}
.eva-book__others-label {
	display: block;
	margin: 0 0 8px;
	font-size: 11px;
	font-weight: 700;
	line-height: 1.2;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--uj-muted, #5b6770);
}
.eva-book ul.eva-book__more,
body .entry-content .eva-book ul.eva-book__more {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	max-width: none;
	margin: 0;
	padding: 0;
	list-style: none;
}
.eva-book ul.eva-book__more > li,
body .entry-content .eva-book ul.eva-book__more > li {
	display: flex;
	margin: 0;
	padding: 0;
}
.eva-book ul.eva-book__more > li::before,
body .entry-content .eva-book ul.eva-book__more > li::before {
	content: none;
}
.eva-book a:focus-visible {
	outline: 2px solid var(--uj-primary, #103b63);
	outline-offset: 2px;
}

/* a product with no picture: one compact card, its name at the left with a teal edge, the button at the right */
.eva-book.eva-book--compact {
	display: flex;
	border-left: 4px solid var(--uj-accent, #0aa6a6);
	background: linear-gradient(90deg, var(--uj-tint, #eff8fa) 0%, #fff 45%);
}
.eva-book--compact .eva-book__shop {
	flex: 1 1 auto;
	flex-direction: row;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 12px 20px;
	padding: 16px 20px 16px 22px;
}
.eva-book--compact .eva-book__name,
body .entry-content .eva-book--compact p.eva-book__name {
	flex: 1 1 14rem;
	margin: 0;
	font-size: 17.5px;
}
.eva-book--compact .eva-book__others {
	flex: 1 1 100%;
	margin-top: 0;
}

/* phones: panel on top, button full width */
@media (max-width: 600px) {
	.eva-book {
		grid-template-columns: minmax(0, 1fr);
	}
	.eva-book__cover {
		padding: 20px;
	}
	.eva-book .eva-book__img {
		height: 172px;
		max-width: 126px;
	}
	.eva-book .eva-book__img--wide {
		width: 126px;
		height: auto;
	}
	.eva-book--product.eva-book--pictured {
		grid-template-columns: minmax(0, 1fr);
	}
	.eva-book .eva-book__img--product {
		width: 126px;
		height: 126px;
		max-width: 126px;
	}
	.eva-book__drawn {
		width: 116px;
		height: 172px;
		padding: 13px 11px 12px 17px;
	}
	.eva-book__drawn-title {
		font-size: 13px;
		-webkit-line-clamp: 5;
	}
	.eva-book__shop {
		align-items: stretch;
		padding: 18px 20px 12px;
	}
	.eva-book__actions {
		flex-direction: column;
		align-items: stretch;
	}
	.eva-book a.eva-book__buy,
	body .entry-content .eva-book a.eva-book__buy,
	.eva-book a.eva-book__alt,
	body .entry-content .eva-book a.eva-book__alt {
		display: flex;
		width: 100%;
	}
	.eva-book ul.eva-book__more > li,
	body .entry-content .eva-book ul.eva-book__more > li {
		flex: 1 1 auto;
	}
	.eva-book .eva-book__more a.eva-book__alt,
	body .entry-content .eva-book .eva-book__more a.eva-book__alt {
		width: 100%;
	}
	.eva-book--compact .eva-book__shop {
		flex-direction: column;
		align-items: stretch;
		padding: 16px 18px;
	}
	.eva-book--compact .eva-book__name,
	body .entry-content .eva-book--compact p.eva-book__name {
		flex: none;
	}
}
