/*
 * GDV Ebooks: [gdv_ebook_feature], one ebook as a wide card. The card is the
 * grid's, gdv-public-ui's teaser with grid.css's price line; this sheet places
 * the cover on the left and the text beside it, and stacks the two on a
 * narrow screen.
 *
 * Class rules repeat a class where the teaser's own rule weighs two classes:
 * this sheet can print before gdv-public-ui's, so a tie is lost.
 */

/* The theme puts a disc and a bottom margin on every ul it does not name. The
   disc is cleared on the item, where list-style is read. */
.gdv-ebooks-feature.gdv-ebooks-feature {
	padding: 0;
	list-style: none;
}

.gdv-ebooks-feature.gdv-ebooks-feature > li {
	margin: 0;
	list-style: none;
}

/* Stacked: the cover above the text, at most 260px wide and centred. */
.gdv-ebooks-feature .gdv-ebooks-card__media.gdv-ebooks-card__media {
	width: 100%;
	max-width: 260px;
	margin-inline: auto;
}

/*
 * The title in --gdv-ui-success-strong, not the theme's gold, which every h3
 * gets at (0,2,1): #3d7071 is 5.59:1 on the card's #ffffff, and its dark value
 * #6fb0b1 is 6.53:1 on #212121. html body outweighs the theme's rule and the
 * html-prefixed one gdv-public-ui takes over from it. The hover colour stays
 * the teaser's, whose rule weighs three classes.
 */
html body .gdv-ebooks-feature .gdv-ebooks-card__title,
html body .gdv-ebooks-feature .gdv-ebooks-card__title a {
	color: var(--gdv-ui-success-strong, #3d7071);
}

/*
 * Closer lines than the list's card, so the text runs about as tall as the
 * cover. The theme gives every h3 1em above and 0.5em below, and the teaser
 * pads every line by 0.5rem; the title, "By …" and the key facts read as one
 * block here, and the short description keeps its distance from them.
 */
html body .gdv-ebooks-feature .gdv-ebooks-card__title {
	margin: 0;
	padding: 0.5rem 0.5rem 0.25rem;
}

.gdv-ebooks-feature .gdv-ebooks-card .gdv-ui-teaser__meta {
	padding-top: 0.125rem;
	padding-bottom: 0.125rem;
}

.gdv-ebooks-feature .gdv-ebooks-card .gdv-ui-teaser__excerpt {
	padding-top: 0.75rem;
	padding-bottom: 0.75rem;
}

@media (min-width: 700px) {
	/* Side by side: the cover keeps its own height at the top, the text takes the rest. */
	.gdv-ebooks-feature .gdv-ebooks-card.gdv-ebooks-card {
		flex-direction: row;
		align-items: flex-start;
	}

	.gdv-ebooks-feature .gdv-ebooks-card__media.gdv-ebooks-card__media {
		flex: none;
		width: 300px;
		max-width: 40%;
		margin-inline: 0;
	}

	.gdv-ebooks-feature .gdv-ebooks-card .gdv-ui-teaser__body {
		flex: 1 1 0;
		min-width: 0;
		align-self: stretch;
		padding-inline: 1rem;
	}

	/* Left-aligned beside the cover, as the columns around it on the page are. */
	.gdv-ebooks-feature .gdv-ebooks-card .gdv-ui-teaser__meta,
	.gdv-ebooks-feature .gdv-ebooks-card .gdv-ebooks-card__price {
		text-align: left;
	}

	html body .gdv-ebooks-feature .gdv-ebooks-card__title {
		text-align: left;
	}

	.gdv-ebooks-feature .gdv-ebooks-card .gdv-ui-teaser__actions {
		justify-content: flex-start;
	}
}
