@charset 'utf-8';
@use '../global' as *;

/* 個別ページ
--------------------------------------------- */
.entry-title {
	margin-block: 0 1rem;
	@include typography(var(--headings-color), var(--h1-font-size), inherit, var(--title-font-weight));
}

.entry-meta {
	margin-block: 0 1rem;
	font-size: var(--font-size--sm);
}

.entry-featured-image {
	margin-block: px-to-rem(40px);
	&:where(:first-child) {
		margin-block-start: 0;
	}
}

// 記事内容
.entry-content {
	margin-block: px-to-rem(40px);

	&::after {
		clear: both;
		content: "";
		display: table;
	}

	>*:where(:not(:last-child)) {
		margin-block: 0 1.5em;
	}

	h1, h2, h3, h4, h5, h6 {
		position: relative;
		&:where(:first-child) {
			margin-block-start: 0;
		}
	}
	:where(h1, h2) {
		margin-block: 3em 1em;
	}
	:where(h3, h4) {
		margin-block: 2em 1em;
	}
	:where(h5, h6) {
		margin-block: 1.5em 1em;
	}

	:where(ul:not(.wp-block-latest-posts):not(.wp-block-latest-comments):not(.wp-block-post-template)) {
		list-style: disc;
		margin-block: 0 1.5em;
		padding-left: 1.5em;
	}
	:where(ol:not(.wp-block-latest-posts):not(.wp-block-latest-comments):not(.wp-block-comment-template):not(.wp-block-post-template)) {
		list-style: decimal;
		margin-block: 0 1.5em;
		padding-left: 1.5em;
	}

	li {
		margin-block: .25em;
	}

	:where(a:not([class])) {
		text-decoration: underline;
	}

	// クラシックエディターのoEmbed（iframeが直接出力される場合）のレスポンシブ対応。
	iframe:where(
		[src*="youtube.com"],
		[src*="youtu.be"],
		[src*="vimeo.com"]
	):where(:not(.wp-block-embed__wrapper *)) {
		aspect-ratio: 16 / 9;
		width: 100%;
		height: auto;
	}

	hr {
		margin-block: 2.5em;
		border-width: 1px;
		height: 0;
		&:where(:not(.is-style-dots):not(.is-style-wide)) {
			width: 100px;
			margin-inline: auto;
		}
	}
}


.entry-terms {
	display: flex;
	flex-wrap: wrap;
	gap: .5em;
	margin-block: 0 1rem;
	font-size: var(--font-size--xs);
	// .entry-terms__prefix
	&__prefix {
		display: inline-flex;
		align-items: center;
		font-size: 120%;
		color: var(--ap-color-primary);
		svg {
			fill: currentColor;
		}
	}
}

.entry.entry--notfound {}

.entry--notfound {
	.entry-content {
		margin-block-start: 0;
	}

	.search-form {
		margin-block: 1rem 0;
	}
}


.entry.entry--error404 {
	text-align: center;
}

.entry--error404 {

	.entry-content {
		margin-block-start: 2rem;
	}

	.button, .search-form {
		margin-block: 2rem 0;
	}
}
