/**
 * Archive layout (body.bst-archive): category, tag, author and date
 * archives and page 2 onward of the Blog page. Markup through the
 * GeneratePress templates and inc/archive.php. Loaded on those pages only.
 * See "Archives" and "Pagination" in docs/design-system.md
 * (blog-archive-01.jpg, blog-archive-02.jpg).
 */

/*
 * The section, columns and sidebar position are shared with single
 * posts: `.bst-has-sidebar` in sidebar.css. Here only the archive list.
 */

/* GeneratePress separate-containers margin below the list and pagination. */
.bst-archive .site-main > * {
	margin-bottom: 0;
}

/* Post list: default cards, 1 column, 2 from 600px. */
.bst-archive__grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: var(--gap);
	margin: 0;
	padding: 0;
	list-style: none;
}

.bst-archive__item {
	display: flex;
	margin: 0;
}

.bst-archive__item > .bst-card {
	width: 100%;
}

@media (min-width: 600px) {

	.bst-archive__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

.bst-archive__empty {
	margin: 0;
}

/*
 * Pagination: centered below the grid. Numbers in the heading font at
 * --text-link, at least 44x44px; the current page has a 1px forest
 * outline. Previous / next: thin accent chevrons.
 */
.bst-pagination {
	margin-top: calc(var(--section-y) / 2);
}

.bst-pagination__list {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 0.5em;
	margin: 0;
	padding: 0;
	list-style: none;
}

.bst-pagination__item {
	margin: 0;
}

.bst-pagination .page-numbers {
	display: flex;
	align-items: center;
	justify-content: center;
	min-width: 44px;
	min-height: 44px;
	padding: 0 0.5em;
	border: 1px solid transparent;
	color: var(--color-text);
	font-family: var(--font-heading);
	font-size: var(--text-link);
	line-height: 1;
	text-decoration: none;
}

.bst-pagination a.page-numbers:hover,
.bst-pagination a.page-numbers:focus {
	color: var(--color-forest);
}

.bst-pagination .page-numbers.current {
	border-color: var(--color-forest);
	color: var(--color-forest);
}

.bst-pagination .page-numbers.prev,
.bst-pagination .page-numbers.next,
.bst-pagination a.prev:hover,
.bst-pagination a.next:hover,
.bst-pagination a.prev:focus,
.bst-pagination a.next:focus {
	color: var(--color-accent);
}

.bst-pagination__icon {
	display: block;
	width: 24px;
	height: 24px;
}

/* Search results: one line with the number of results and the query. */
.bst-archive .bst-search-summary {
	margin: 0 0 var(--gap);
}

/* No results or an empty query: message, search form, link to the Blog. */
.bst-search-empty__text {
	margin: 0 0 1em;
}

.bst-search-empty .bst-search-form {
	max-width: 32em;
	margin-bottom: 1.5em;
}

.bst-search-empty__more {
	margin: 0;
}
