/*
 * templates.css — the home page's bands, the post, and the list views.
 *
 * Every number here is read off live, at the same breakpoints Breakdance
 * used (1119, 1023, 767, 479); where the theme's tokens have the value it
 * reads the token, and where live's value is a one-off pixel it says so.
 * Theme-authored tokens are --eb-* (layout.css declares them).
 */

/* --- The home page --- */

/*
 * A stack: a band's contents in one centred column, 50px apart, text
 * centred. The hero, About, Books and Contact are all this.
 */
.eb-stack {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 50px;
	text-align: center;
}

/* The statement: hero line and Books' intro. */
.eb-lead {
	margin: 0;
	color: var(--wp--preset--color--foreground);
	font-size: var(--wp--preset--font-size--xl);
	font-weight: 400;
	line-height: 1.3;
	text-wrap: balance;
}

.eb-hero .eb-lead {
	font-size: var(--wp--preset--font-size--2-xl);
}

.eb-hero .eb-band__inner {
	padding-block: var(--eb-pad-y);
}

.eb-heading {
	margin: 0;
	font-size: var(--wp--preset--font-size--2-xl);
	font-weight: 500;
	line-height: 1.2;
	letter-spacing: 5px;
	text-transform: uppercase;
}

.eb-band--section {
	border-bottom: 2px solid var(--wp--preset--color--rule);
}

.eb-band--tint {
	background: var(--wp--preset--color--band);
}

/* About and Contact end 100px below their copy; Books, the tinted band, does not. */
.eb-band--plain .eb-band__inner {
	padding-bottom: 100px;
}

/* Copy: paragraphs a blank line apart, live's <br><br>. */
.eb-prose {
	text-wrap: pretty;
}

.eb-prose > * {
	margin-block: 0 1.4em;
}

.eb-prose > :last-child {
	margin-bottom: 0;
}

#contact .eb-prose {
	text-wrap: balance;
}

/* A sub-heading and its copy: Browse our Catalogue, Book Buying, Opening Hours, Directions. */
.eb-sub {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 25px;
}

.eb-sub__title {
	margin: 0;
	font-size: var(--wp--preset--font-size--xl);
	font-weight: 400;
	line-height: 1.3;
}

/* --- The accordion --- */

/*
 * Native <details>. assets/js/accordion.js only makes it exclusive. The
 * frame is 2px of --line with an 8px radius; each button and each open
 * panel ends in the same 2px rule, except the last button when closed.
 */
.eb-accordion {
	width: 100%;
	overflow: hidden;
	border: 2px solid var(--wp--preset--color--line);
	border-radius: 8px;
	background: var(--wp--preset--color--background);
	text-align: left;
}

.eb-accordion__button {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding: 16px;
	border-bottom: 2px solid var(--wp--preset--color--line);
	color: var(--wp--preset--color--accent);
	cursor: pointer;
	list-style: none;
}

.eb-accordion__button::-webkit-details-marker {
	display: none;
}

.eb-accordion__item:last-child:not([open]) .eb-accordion__button {
	border-bottom: 0;
}

.eb-accordion__title {
	font-size: var(--wp--preset--font-size--lg);
	font-weight: 600;
	line-height: 1.15;
}

.eb-accordion__icon {
	flex: none;
	width: 18px;
	height: 18px;
	background: var(--wp--preset--color--accent);
	-webkit-mask: var(--eb-icon-plus) center / contain no-repeat;
	mask: var(--eb-icon-plus) center / contain no-repeat;
	--eb-icon-plus: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 448 512'%3E%3Cpath d='M256 80c0-17.7-14.3-32-32-32s-32 14.3-32 32V224H48c-17.7 0-32 14.3-32 32s14.3 32 32 32H192V432c0 17.7 14.3 32 32 32s32-14.3 32-32V288H400c17.7 0 32-14.3 32-32s-14.3-32-32-32H256V80z'/%3E%3C/svg%3E");
	--eb-icon-minus: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 448 512'%3E%3Cpath d='M432 256c0 17.7-14.3 32-32 32L48 288c-17.7 0-32-14.3-32-32s14.3-32 32-32l352 0c17.7 0 32 14.3 32 32z'/%3E%3C/svg%3E");
}

.eb-accordion__item[open] .eb-accordion__icon {
	-webkit-mask-image: var(--eb-icon-minus);
	mask-image: var(--eb-icon-minus);
}

.eb-accordion__panel {
	padding: 16px;
	border-bottom: 2px solid var(--wp--preset--color--line);
}

.eb-accordion__item:last-child .eb-accordion__panel {
	border-bottom: 0;
}

.eb-accordion__panel > * {
	margin-block: 0 1.4em;
}

.eb-accordion__panel > :last-child {
	margin-bottom: 0;
}

/* --- Spacing that differs from the default --- */

.eb-band--gallery .eb-band__inner {
	max-width: none;
}

@media (max-width: 1023px) {
	.eb-hero .eb-band__inner {
		padding-block: 50px;
	}

	.eb-band--gallery .eb-band__inner {
		padding-block: 25px;
	}

	.eb-band--plain .eb-band__inner {
		padding-top: 50px;
		padding-bottom: 75px;
	}
}

@media (max-width: 767px) {
	.eb-lead,
	.eb-hero .eb-lead {
		font-size: var(--wp--preset--font-size--lg);
		text-wrap: pretty;
	}
}

/* --- A post --- */

/*
 * Live's post template: Inter, not Baskervville, throughout — the title,
 * the byline, the copy and the date; the Share label alone is serif. The
 * sizes step down at 1023, 767 and 479.
 */
.eb-post__header,
.eb-post__body {
	border-bottom: 2px solid var(--wp--preset--color--foreground);
}

.eb-post__head {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 20px;
	padding-top: 150px;
}

.eb-post__image {
	width: 100%;
	margin: 0;
}

.eb-post__image img {
	width: 100%;
	height: auto;
}

.eb-post .entry-title {
	margin: 0;
	color: var(--wp--preset--color--accent);
	font-family: var(--wp--preset--font-family--sans);
	font-size: var(--wp--preset--font-size--4-xl);
	font-weight: 600;
	line-height: 1;
	letter-spacing: -5px;
	text-transform: capitalize;
	text-decoration: underline;
	text-wrap: wrap;
}

/* Live's asterisk after every post title, kept out of the title itself. */
.eb-post .entry-title::after {
	content: " *";
}

.eb-post__meta {
	display: flex;
	flex-direction: column;
	gap: 5px;
	margin: 0;
	padding: 0;
	color: var(--wp--preset--color--ink);
	font-family: var(--wp--preset--font-family--sans);
	font-weight: 500;
	letter-spacing: -1px;
	list-style: none;
}

.eb-post .entry-content {
	font-family: var(--wp--preset--font-family--sans);
	font-size: var(--wp--preset--font-size--xl);
	font-weight: 500;
	line-height: 1.4;
	letter-spacing: -1px;
}

.eb-post .entry-content > * {
	margin-block: 30px;
}

.eb-post .entry-content > :first-child {
	margin-top: 0;
}

.eb-post .entry-content > :last-child {
	margin-bottom: 0;
}

.eb-post .entry-content strong,
.eb-post .entry-content b {
	font-weight: 700;
}

.eb-post .entry-content img {
	max-width: 100%;
	height: auto;
}

.eb-post .entry-content .alignleft {
	float: left;
	margin: 0 30px 30px 0;
}

.eb-post .entry-content .alignright {
	float: right;
	margin: 0 0 30px 30px;
}

.eb-post .entry-content .aligncenter {
	margin-inline: auto;
}

.eb-post__foot {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
}

.eb-post__share {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px;
}

.eb-post__share-label {
	line-height: 1.4;
}

.eb-share {
	display: flex;
	flex-wrap: wrap;
	gap: 15px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.eb-share__link {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	color: var(--wp--preset--color--foreground);
}

.eb-share__link:hover,
.eb-share__link:focus-visible {
	color: var(--wp--preset--color--accent);
	text-decoration: none;
}

.eb-share .eb-icon {
	width: 18px;
	height: 18px;
}

.eb-post__posted {
	display: flex;
	flex-wrap: wrap;
	gap: 25px;
	margin: 0;
	color: var(--wp--preset--color--ink);
	font-family: var(--wp--preset--font-family--sans);
	font-weight: 500;
	letter-spacing: -1px;
}

@media (max-width: 1023px) {
	.eb-post__head {
		padding-top: 100px;
	}

	.eb-post .entry-title {
		font-size: var(--wp--preset--font-size--3-xl);
	}
}

@media (max-width: 767px) {
	.eb-post__head {
		padding-top: 80px;
	}

	.eb-post .entry-title {
		font-size: 2.1875rem;
	}

	.eb-post__foot {
		gap: 20px;
	}
}

@media (max-width: 479px) {
	.eb-post .entry-title {
		font-size: var(--wp--preset--font-size--xl);
	}

	.eb-post__meta {
		gap: 10px;
		font-size: var(--wp--preset--font-size--sm);
	}

	.eb-post .entry-content {
		font-size: 1.5625rem;
	}

	.eb-post__foot {
		flex-direction: row;
	}

	.eb-post__posted {
		flex-direction: column;
		gap: 10px;
	}
}

/* --- Pages, and the lists (archive, search, 404) --- */

.eb-page__inner > .entry-title {
	margin-bottom: 0.5em;
	font-size: var(--wp--preset--font-size--2-xl);
	letter-spacing: 5px;
	text-transform: uppercase;
}

.page-header {
	margin-block: var(--eb-pad-y) var(--wp--preset--spacing--40);
}

.page-title {
	margin: 0;
	font-size: var(--wp--preset--font-size--2-xl);
	letter-spacing: 5px;
	text-transform: uppercase;
}

.post-list {
	display: flex;
	flex-direction: column;
	gap: var(--wp--preset--spacing--50);
	margin-block: var(--wp--preset--spacing--50);
}

.entry-summary-item .entry-title {
	margin: 0 0 0.25em;
	font-size: var(--wp--preset--font-size--xl);
	font-weight: 400;
}

.entry-summary-item .entry-title a {
	text-decoration: none;
}

.entry-meta {
	color: var(--wp--preset--color--muted);
	font-size: var(--wp--preset--font-size--sm);
}

.entry-summary p {
	margin-block: 0.5em;
}

.no-results,
.error-404 {
	margin-block: var(--wp--preset--spacing--60);
}

.pagination {
	margin-block: var(--wp--preset--spacing--60);
	font-size: var(--wp--preset--font-size--sm);
}

.pagination .nav-links {
	display: flex;
	flex-wrap: wrap;
	gap: var(--wp--preset--spacing--30);
}
