/* 公開画面とエディターで共有する本文のスタイル。 */
:is(.nt-article-button, .wp-block-button[class*="is-style-nt-button-"]) .wp-block-button__link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 20px;
	min-height: 54px;
	box-sizing: border-box;
	padding: 13px 30px;
	border: 1px solid transparent;
	border-radius: 999px;
	font-size: 16px;
	line-height: 1.6;
	text-decoration: none;
}
:is(.nt-article-button, .wp-block-button[class*="is-style-nt-button-"]) .wp-block-button__link::after {
	content: "";
	flex-shrink: 0;
	width: 10px;
	height: 10px;
	border-top: 2px solid currentColor;
	border-right: 2px solid currentColor;
	transform: rotate(45deg);
}

/* セットを選んだボタンだけに適用。既存の個別色・インライン色より優先する。 */
.wp-block-button[class*="is-style-nt-button-"] .wp-block-button__link {
	background-color: var(--nt-button-bg) !important;
	color: var(--nt-button-text) !important;
	border-color: var(--nt-button-border) !important;
	transition: background-color 120ms ease-out, border-color 120ms ease-out, color 120ms ease-out;
}
@media (hover: hover) and (pointer: fine) {
	.wp-block-button[class*="is-style-nt-button-"] .wp-block-button__link:hover {
		background-color: var(--nt-button-hover) !important;
	}
}
.wp-block-button[class*="is-style-nt-button-"] .wp-block-button__link:focus-visible {
	background-color: var(--nt-button-hover) !important;
	outline: 2px solid #12365e;
	outline-offset: 3px;
	box-shadow: 0 0 0 3px #ffffff;
}
.wp-block-button[class*="is-style-nt-button-"] .wp-block-button__link:active {
	background-color: var(--nt-button-active) !important;
}
@media (prefers-reduced-motion: reduce) {
	.wp-block-button[class*="is-style-nt-button-"] .wp-block-button__link { transition: none; }
}

:where(.entry-content, .editor-styles-wrapper) {
	overflow-wrap: anywhere;
	line-height: 1.8;
}

:where(.entry-content, .editor-styles-wrapper) img {
	max-width: 100%;
	height: auto;
}

/* 個別指定は部品の角丸・標準の丸形スタイル・インラインの角丸より優先する。 */
.wp-block-image.nt-image-no-radius,
.wp-block-image.nt-image-no-radius > a,
.wp-block-image.nt-image-no-radius img {
	border-radius: 0 !important;
}
.wp-block-image.nt-image-no-radius.is-style-circle-mask img {
	-webkit-mask-image: none !important;
	mask-image: none !important;
}

:where(.entry-content, .editor-styles-wrapper) a {
	text-underline-offset: 0.2em;
}

:where(.entry-content, .editor-styles-wrapper) .wp-block-table {
	overflow-x: auto;
	margin-block: 26px;
}

/* 基本情報ボックスの表は専用の罫線・レイアウトを維持する。 */
:where(.entry-content, .editor-styles-wrapper) .wp-block-table:not(:where(.nt-basic-info *)) table {
	border: 1px solid #c7cdd1;
	border-collapse: separate;
	border-spacing: 0;
	border-radius: 6px;
	overflow: hidden;
}

:where(.entry-content, .editor-styles-wrapper) .wp-block-table:not(:where(.nt-basic-info *)) :is(th, td) {
	border: 0;
	border-inline-end: 1px solid #c7cdd1;
	border-block-end: 1px solid #c7cdd1;
}

:where(.entry-content, .editor-styles-wrapper) .wp-block-table:not(:where(.nt-basic-info *)) tr > :last-child {
	border-inline-end: 0;
}

:where(.entry-content, .editor-styles-wrapper) .wp-block-table:not(:where(.nt-basic-info *)) table > :last-child > tr:last-child > :is(th, td) {
	border-block-end: 0;
}

@media (max-width: 600px) {
	:where(.entry-content, .editor-styles-wrapper) .wp-block-table { margin-block: 22px; }
}

:where(.entry-content, .editor-styles-wrapper) .wp-block-file {
	font-size: 1rem;
}

/* WordPress記事カードの外枠。動画など他のiframeには適用しない。 */
:where(.entry-content, .editor-styles-wrapper) iframe.wp-embedded-content {
	display: block;
	width: 100%;
	max-width: 100%;
	margin-block: 26px;
	border: 0;
	border-radius: 6px;
}
:where(.entry-content, .editor-styles-wrapper) .wp-block-embed:has(iframe.wp-embedded-content) {
	width: 100%;
	margin: 26px 0;
}
:where(.entry-content, .editor-styles-wrapper) .wp-block-embed iframe.wp-embedded-content { margin: 0; }
@media (max-width: 600px) {
	:where(.entry-content, .editor-styles-wrapper) iframe.wp-embedded-content,
	:where(.entry-content, .editor-styles-wrapper) .wp-block-embed:has(iframe.wp-embedded-content) { margin-block: 22px; }
	:where(.entry-content, .editor-styles-wrapper) .wp-block-embed iframe.wp-embedded-content { margin: 0; }
}
