/**
 * テキストブロック縦書き
 */

.swell-child-vertical-text {
	writing-mode: vertical-rl;
	text-orientation: mixed;
	width: fit-content;
	max-width: 100%;
}

ol.swell-child-vertical-text,
ul.swell-child-vertical-text {
	display: block;
	width: fit-content;
	margin-block: 0;
	padding: 0;
}

ol.swell-child-vertical-text li,
ul.swell-child-vertical-text li {
	list-style-position: inside;
}

/* 縦書き配置（margin で左右調整） */
.swell-child-vertical-text--align-left {
	margin-left: 0;
	margin-right: auto;
}

.swell-child-vertical-text--align-center {
	margin-left: auto;
	margin-right: auto;
}

.swell-child-vertical-text--align-right {
	margin-left: auto;
	margin-right: 0;
}

@media (max-width: 599px) {
	.swell-child-vertical-text.swell-child-vertical-text--sp-horizontal {
		writing-mode: horizontal-tb;
		width: auto;
		max-width: none;
		margin-left: 0;
		margin-right: 0;
	}

	.swell-child-vertical-text.swell-child-vertical-text--sp-horizontal.swell-child-vertical-text--align-left {
		text-align: left;
	}

	.swell-child-vertical-text.swell-child-vertical-text--sp-horizontal.swell-child-vertical-text--align-center {
		text-align: center;
	}

	.swell-child-vertical-text.swell-child-vertical-text--sp-horizontal.swell-child-vertical-text--align-right {
		text-align: right;
	}

	ol.swell-child-vertical-text.swell-child-vertical-text--sp-horizontal,
	ul.swell-child-vertical-text.swell-child-vertical-text--sp-horizontal {
		display: block;
		width: auto;
	}
}

/* エディター（p / h / ul 本体にクラスが付く） */
.editor-styles-wrapper .swell-child-vertical-text {
	writing-mode: vertical-rl;
	text-orientation: mixed;
	width: fit-content;
	max-width: 100%;
}

.editor-styles-wrapper ol.swell-child-vertical-text,
.editor-styles-wrapper ul.swell-child-vertical-text {
	display: block;
	width: fit-content;
	margin-block: 0;
	padding: 0;
}

.editor-styles-wrapper ol.swell-child-vertical-text li,
.editor-styles-wrapper ul.swell-child-vertical-text li {
	list-style-position: inside;
}

.editor-styles-wrapper .swell-child-vertical-text--align-left {
	margin-left: 0 !important;
	margin-right: auto !important;
}

.editor-styles-wrapper .swell-child-vertical-text--align-center {
	margin-left: auto !important;
	margin-right: auto !important;
}

.editor-styles-wrapper .swell-child-vertical-text--align-right {
	margin-left: auto !important;
	margin-right: 0 !important;
}

.editor-styles-wrapper
	.swell-child-vertical-text:is( p, h1, h2, h3, h4, h5, h6 ) {
	min-height: 6em;
	min-width: 1.5em;
}

.editor-styles-wrapper .swell-child-vertical-text.wp-block-list {
	min-height: 8em;
	min-width: 2em;
}

@media (max-width: 599px) {
	.editor-styles-wrapper
		.swell-child-vertical-text.swell-child-vertical-text--sp-horizontal {
		writing-mode: horizontal-tb;
		width: auto;
		max-width: none;
		margin-left: 0 !important;
		margin-right: 0 !important;
	}

	.editor-styles-wrapper
		.swell-child-vertical-text.swell-child-vertical-text--sp-horizontal.swell-child-vertical-text--align-left {
		text-align: left;
	}

	.editor-styles-wrapper
		.swell-child-vertical-text.swell-child-vertical-text--sp-horizontal.swell-child-vertical-text--align-center {
		text-align: center;
	}

	.editor-styles-wrapper
		.swell-child-vertical-text.swell-child-vertical-text--sp-horizontal.swell-child-vertical-text--align-right {
		text-align: right;
	}

	.editor-styles-wrapper
		ol.swell-child-vertical-text.swell-child-vertical-text--sp-horizontal,
	.editor-styles-wrapper
		ul.swell-child-vertical-text.swell-child-vertical-text--sp-horizontal {
		display: block;
		width: auto;
	}
}
