// フロントで読み込む

// マージン
.c-postContent {
	padding: 0;
	margin: 0;
	line-height: var(--ark-line_height, 1.8);

	> * {
		margin-top: var(--ark-mt);
		margin-bottom: 0; //コアのスタイルで margin-bottom の指定があったりするので打ち消しておく
	}

	.l-main__body > & {
		margin-top: 4rem;
	}

	.c-pageTitle + & {
		margin-top: 0;
	}
}

:where(.c-postContent) {
	@import "./post_content";
}

// 先頭要素は上側のマージンを打ち消す。@import "./post_content"; の後で指定。
.c-postContent > :first-child {
	margin-top: 0 !important;
}

// マージン小さく維持
:is(
		.wp-block-details,
		.wp-block-accordion-panel,
		.wp-block-quote,
		.wp-block-column,
		.wp-block-media-text__content,
		.wp-block-cover__inner-container,
		.wp-block-group__inner-container:where(:not(.is-layout-grid))
	) {
	> *:not(:first-child) {
		margin-top: var(--ark-mt--inner, var(--ark-mt--s));
		margin-bottom: 0;
	}

	// :first-childの mt0 化は全体的には行わず、ここで具体的にブロックを指定してる
	> :first-child {
		// --ark-mt--inner: 0; → これだと:first-childなブロックの中身なども全てマージン0になる
		margin-top: 0;
	}
}

// 全幅の場合はインナーマージンを通常コンテンツと同じにする
.alignfull {
	--ark-mt--inner: var(--ark-mt);
}
