/* Make it a bundle
 *
 * Under the buy button on a book page: a boxed panel holding this title and
 * two companions, each a tick, a cover and a price, with the total and the
 * saving beneath. Boxed rather than open like the rest of the column, because
 * it is an offer and should read as one.
 *
 * The covers are small — 56px, the width the thumbnail is already served at in
 * the related row — so three books stack in the second column without pushing
 * the page down. Under 480px the row keeps its shape: a cover that size does
 * not need to reflow.
 */

.saqi-bundle {
	max-width: 40rem;
	margin-top: 2rem;
	padding: 1.5rem;
	border: 1px solid var(--wp--preset--color--rule);
	font-family: var(--wp--preset--font-family--sans);
	font-size: var(--wp--preset--font-size--sm);
}

.saqi-bundle__heading {
	margin: 0 0 1.25rem;
	font-family: var(--wp--preset--font-family--serif);
	font-size: var(--wp--preset--font-size--subhead);
	font-weight: 400;
}

.saqi-bundle__books {
	margin: 0;
	padding: 0;
	list-style: none;
}

.saqi-bundle__book {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	padding: 0.5rem 0;
}

.saqi-bundle__book + .saqi-bundle__book {
	border-top: 1px solid var(--wp--preset--color--rule);
}

.saqi-bundle__tick {
	flex: none;
	width: 1rem;
	height: 1rem;
	margin: 0;
}

/* The book being viewed is always in the bundle, so its tick is disabled.
   Disabled reads as unavailable, which it is not: it is simply not a choice. */
.saqi-bundle__book.is-main .saqi-bundle__tick {
	opacity: 0.45;
}

.saqi-bundle__label {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	min-width: 0;
	cursor: pointer;
}

.saqi-bundle__book.is-main .saqi-bundle__label {
	cursor: default;
}

.saqi-bundle__cover {
	flex: none;
	width: 3.5rem;
}

.saqi-bundle__cover img {
	display: block;
	width: 100%;
	height: auto;
}

.saqi-bundle__detail {
	display: flex;
	flex-direction: column;
	gap: 0.125rem;
	min-width: 0;
}

.saqi-bundle__title {
	font-weight: 500;
}

.saqi-bundle__this,
.saqi-bundle__terms {
	color: var(--wp--preset--color--light);
	font-size: var(--wp--preset--font-size--xs, 0.8125rem);
}

.saqi-bundle__total {
	display: flex;
	align-items: baseline;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin: 1.25rem 0 1rem;
	padding-top: 1rem;
	border-top: 1px solid var(--wp--preset--color--rule);
}

.saqi-bundle__was {
	color: var(--wp--preset--color--light);
}

.saqi-bundle__now {
	font-size: var(--wp--preset--font-size--subhead);
	font-weight: 500;
}

.saqi-bundle__saving {
	color: var(--wp--preset--color--accent, inherit);
}

/* The site's secondary button: outlined in the accent, filling on hover.
   The same shape as the newsletter submit in layout.css, which is where the
   pattern is set. */
.saqi-bundle__add {
	display: flex;
	justify-content: center;
	width: 100%;
	padding: 0.875rem 1.5rem;
	border: 1px solid var(--wp--preset--color--accent);
	border-radius: 3px;
	background-color: transparent;
	font-family: var(--wp--preset--font-family--sans);
	font-size: var(--wp--preset--font-size--3-xs);
	font-weight: 500;
	line-height: 1;
	color: var(--wp--preset--color--accent);
	cursor: pointer;
	transition: background-color 0.15s ease, color 0.15s ease;
}

.saqi-bundle__add:hover,
.saqi-bundle__add:focus-visible {
	background-color: var(--wp--preset--color--accent);
	color: var(--wp--preset--color--background);
}

.saqi-bundle__add[disabled] {
	opacity: 0.5;
	cursor: not-allowed;
}

.saqi-bundle__add[disabled]:hover {
	background-color: transparent;
	color: var(--wp--preset--color--accent);
}

.saqi-bundle__terms {
	margin: 0.75rem 0 0;
	line-height: 1.5;
}

/* The basket's own line, where the plugin prints what each book saved. */
.saqi-bundle-price del {
	color: var(--wp--preset--color--light);
}

.saqi-bundle-note {
	display: block;
	color: var(--wp--preset--color--light);
}
