/**
 * Content
 *
 * Styles for the classic WordPress loop templates (posts, archives, search,
 * 404, comments). Pages are built from blocks and need none of this, but the
 * templates still ship with the theme so the blog side is not broken.
 *
 * @package Norwegian_Flagstone
 */

.site-main {
	display: block;
}

/*
 * Constrain the editorial templates only. Block-built pages carry
 * `.site-main--blocks` and stay full-bleed so each block owns its own width.
 */
.site-main:not(.site-main--blocks) {
	margin-inline: auto;
	max-width: calc(var(--nf-content) + (var(--nf-gutter) * 2));
	padding-block: var(--nf-section-space-m);
	padding-inline: var(--nf-gutter);
	width: 100%;
}

.entry-header {
	margin-bottom: var(--nf-space-m);
}

.entry-title {
	font-size: var(--nf-fs-h1);
	margin-bottom: var(--nf-space-2xs);
}

.entry-title a {
	text-decoration: none;
}

.entry-meta,
.entry-footer {
	color: var(--nf-color-text-muted);
	font-size: var(--nf-fs-small);
}

.entry-meta > span:not(:last-child)::after {
	content: " · ";
}

.entry-footer {
	margin-top: var(--nf-space-m);
}

.entry-content {
	max-width: var(--nf-measure);
}

.entry-content > * + * {
	margin-top: var(--nf-space-m);
}

.post-thumbnail {
	display: block;
	margin-bottom: var(--nf-space-m);
}

.post-thumbnail img {
	border-radius: var(--nf-radius-l);
	width: 100%;
}

/* Archives ----------------------------------------------------------------- */

.page-header {
	margin-bottom: var(--nf-space-xl);
}

.page-title {
	font-size: var(--nf-fs-h2);
}

.archive-description {
	color: var(--nf-color-text-muted);
}

.hfeed .site-main article + article {
	border-top: var(--nf-border-width) solid var(--nf-color-border);
	margin-top: var(--nf-space-xl);
	padding-top: var(--nf-space-xl);
}

/* Pagination -------------------------------------------------------------- */

.navigation.pagination,
.navigation.post-navigation {
	margin-top: var(--nf-space-xl);
}

.nav-links {
	display: flex;
	flex-wrap: wrap;
	gap: var(--nf-space-s);
}

.page-numbers {
	text-decoration: none;
}

.page-numbers.current {
	color: var(--nf-color-accent);
}

/* Comments ---------------------------------------------------------------- */

.comments-area {
	border-top: var(--nf-border-width) solid var(--nf-color-border);
	margin-top: var(--nf-space-2xl);
	max-width: var(--nf-measure);
	padding-top: var(--nf-space-xl);
}

.comment-list {
	list-style: none;
	padding: 0;
}

.comment-list .children {
	list-style: none;
	padding-left: var(--nf-space-m);
}

.comment-body {
	border-bottom: var(--nf-border-width) solid var(--nf-color-border);
	padding-block: var(--nf-space-m);
}

.comment-meta {
	font-size: var(--nf-fs-small);
	margin-bottom: var(--nf-space-2xs);
}

.comment-form p {
	margin-bottom: var(--nf-space-s);
}

.comment-form .submit {
	background-color: var(--nf-mork-sort);
	border: 0;
	border-radius: var(--nf-radius);
	color: var(--nf-lys);
	font-family: var(--nf-font-body);
	font-weight: var(--nf-font-weight-medium);
	min-height: var(--nf-control-height);
	padding-inline: var(--nf-control-padding-x);
	width: auto;
}

/* Search & 404 ------------------------------------------------------------ */

.no-results .page-content,
.error-404 .page-content {
	max-width: var(--nf-measure);
}

.search-form {
	display: flex;
	gap: var(--nf-space-2xs);
	margin-top: var(--nf-space-m);
}

.search-form label {
	flex: 1;
	margin: 0;
}

.search-submit {
	background-color: var(--nf-mork-sort);
	border: 0;
	border-radius: var(--nf-radius);
	color: var(--nf-lys);
	min-height: var(--nf-control-height);
	padding-inline: var(--nf-space-s);
}

/* Widgets ---------------------------------------------------------------- */

.widget-area {
	margin-top: var(--nf-space-2xl);
}

.widget {
	margin-bottom: var(--nf-space-xl);
}

.widget-title {
	font-size: var(--nf-fs-h3);
}

.widget ul {
	list-style: none;
	padding: 0;
}
