/* News listing (template news-parent), loaded by css('@auto').
   Year buttons (snippets/news-years.php): the theme's page-number buttons, made compact so
   the 18 years wrap neatly, with the year being shown clearly marked. */

.news-years {
	margin: 0;
}

/* the rule under the years and the active filters, in the theme's line color, separates the
   controls from the posts */
.news-rule {
	margin: 30px 0 60px;
	border: 0;
	border-top: 1px solid #CED7E0;
	opacity: 1;
}

.news-rule + .news-year-heading {
	margin-top: -20px;
}

.news-years .pagination {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	padding: 0;
	margin: 0; /* the theme indents .pagination 30px; line up with the topics and the posts */
}

.news-years .pagination > li {
	margin: 0;
}

.news-years .pagination > li > a {
	padding: 6px 12px 7px;
	border-radius: 3px;
	border: 2px solid transparent;
	font-size: 14px;
	line-height: 1.2;
}

/* the year being shown: outlined, not filled */
.news-years .pagination > li.active > a,
.news-years .pagination > li.active > a:hover {
	background: #fff;
	color: var(--color-blue);
	border-color: var(--color-blue);
}

.news-year-heading small {
	font-size: 55%;
	color: var(--color-gray-dark);
}

/* Active filters (snippets/news-filters.php), under the year buttons:
   outlined like the selected year, each with an × that removes it */
.news-filters {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	margin: 40px 0 0;
}

.news-filters-label {
	font-size: 14px;
	color: var(--color-gray-dark);
}

.news-filter {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 5px 10px 6px 12px;
	border: 2px solid var(--color-blue);
	border-radius: 3px;
	background: #fff;
	color: var(--color-blue);
	font-size: 14px;
	line-height: 1.2;
	text-decoration: none;
}

.news-filter:hover,
.news-filter:focus {
	background: var(--color-blue);
	color: #fff;
}

.news-filter-x {
	font-size: 18px;
	line-height: 1;
	font-weight: 700;
}

/* "Clear filters": a small solid button after the filter buttons */
.news-filters .news-filter-clear {
	margin: 0 0 0 4px;
	padding: 7px 14px 8px;
	font-size: 14px;
	line-height: 1.2;
	border-radius: 3px;
}

/* Page numbers at the bottom of the list (snippets/pagination.php): centered */
.posts ~ nav > .pagination {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 10px;
}

.posts ~ nav > .pagination > li {
	margin-left: 0;
}

/* Author name above the title: larger than the theme's 14px */
.classic-blog .post-content p.author {
	font-size: 18px;
	line-height: 1.2;
	margin-bottom: 0;
}

/* Post titles in the list: tighter lines so the author sits close above */
.classic-blog .post-content h2.post-title {
	line-height: 1.1;
}

/* Browse by topic (snippets/news-browse.php), above the year buttons */
.news-browse {
	margin: 0 0 20px;
}

.news-browse-label {
	display: block;
	margin: 0 0 8px;
	font-size: 18px;
	font-weight: 700;
	color: var(--color-gray-dark);
}

/* main topics: the same compact buttons as the years */
.news-topics .pagination {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	padding: 0;
	margin: 0;
}

.news-topics .pagination > li {
	margin: 0;
}

.news-topics .pagination > li > a {
	padding: 6px 12px 7px;
	border-radius: 3px;
	border: 2px solid transparent;
	font-size: 14px;
	line-height: 1.2;
}

.news-topics .pagination > li.active > a,
.news-topics .pagination > li.active > a:hover {
	background: #fff;
	color: var(--color-blue);
	border-color: var(--color-blue);
}

/* the other tags: a list in columns, opened by "More topics" */
.news-more-topics {
	margin: 10px 0 0;
}

.news-more-topics summary {
	cursor: pointer;
	font-size: 14px;
	color: var(--color-blue);
}

.news-more-topics ul {
	list-style: none;
	margin: 10px 0 0;
	padding: 0;
	columns: 3 12em;
	column-gap: 24px;
	font-size: 14px;
}

.news-more-topics li {
	break-inside: avoid;
	padding: 2px 0;
}

.news-more-topics li.active a {
	font-weight: 700;
}

.news-more-topics .count {
	color: var(--color-gray-dark);
	font-size: 12px;
}

.news-browse + .news-years {
	margin-top: 0;
}

/* The theme shifts .pagination in the blog list (left: -30px, margin-left: 30px) to sit under the
   date circles; the topic and year buttons line up with their labels and the posts instead */
.classic-blog .news-topics .pagination,
.classic-blog .news-years .pagination {
	left: 0;
	margin-left: 0;
	border-left: 0;
}

/* Search box for the news posts (snippets/news-search.php), at the top */
.news-search {
	margin: 0 0 20px;
}

.news-search-row {
	display: flex;
	gap: 8px;
}

.news-search input[type="search"] {
	flex: 1;
	min-width: 0;
	padding: 7px 10px;
	font-size: 15px;
	border: 1px solid #ccc;
	border-radius: 3px;
	background: #fff;
}

.news-search .btn {
	margin: 0;
	padding: 7px 16px;
	font-size: 14px;
}

.news-none {
	margin: 20px 0 40px;
	font-size: 16px;
}

/* The controls above the posts (search, filters, topics, years) use the posts' "sidemeta" offsets
   so they line up with them, but hide the theme's vertical line: it starts with the posts */
.classic-blog .news-controls {
	border-left-color: transparent;
}

/* The search box and the rule under the year buttons run the full width of the posts, which the
   theme sizes per screen width (.classic-blog .post in main.css); these follow the same widths */
.classic-blog .news-search, .classic-blog .news-rule { width: 728px; max-width: 100%; }
@media (min-width: 1025px) and (max-width: 1199px) { .classic-blog .news-search, .classic-blog .news-rule { width: 593px; } }
@media (max-width: 1024px) { .classic-blog .news-search, .classic-blog .news-rule { width: 623px; } }
@media (max-width: 991px)  { .classic-blog .news-search, .classic-blog .news-rule { width: 630px; } }
@media (max-width: 979px)  { .classic-blog .news-search, .classic-blog .news-rule { width: 601px; } }
@media (max-width: 767px)  { .classic-blog .news-search, .classic-blog .news-rule { width: 100%; } }
