.mv-items {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100vh;
	overflow: hidden;
	z-index: 1;
}

.mv-item {
	position: absolute;
	inset: 0;
	opacity: 0;
	transition: opacity 0.6s ease-in-out;
}

.mv-item.is-active {
	opacity: 1;
}

.mv-item img {
	width: 100%;
	height: auto;
	display: block;
	object-fit: cover;
}

/* エディタ用 */
.mv-items-editor__guide {
	font-size: 12px;
	color: #888;
	margin-bottom: 8px;
}

.block-editor-block-list__layout .wp-block-lp-main-visual {
	padding-top: 50px;
}

/* 疑似要素で+ボタンを右上に表示 */
.block-editor-block-list__layout .wp-block-lp-main-visual::before {
	content: '';
	position: absolute;
	right: 0;
	top: 0;
	width: 40px;
	height: 40px;
	background-color: #1e1e1e;
	background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="white"><path d="M11 12.5V17.5H12.5V12.5H17.5V11H12.5V6H11V11H6V12.5H11Z"/></svg>');
	background-repeat: no-repeat;
	background-position: center;
	background-size: 20px 20px;
	border-radius: 4px;
	z-index: 100;
	cursor: pointer;
}

/* 本物の+ボタンを非表示 */
.wp-block-lp-main-visual .block-list-appender {
	opacity: 0;
	pointer-events: none;
}

.wp-block-lp-main-visual .block-editor-inner-blocks {
	border: 1px dashed #aaa;
	padding: 12px;
	min-height: 200px;
	background: #f5f5f5;
	position: relative;
}

/* 横並びスライダー風表示 */
.wp-block-lp-main-visual .block-editor-block-list__layout {
	display: flex;
	gap: 12px;
	overflow-x: auto;
	padding-bottom: 8px;
	counter-reset: item;
}

.wp-block-lp-main-visual .block-editor-block-list__layout > [data-type="lp/main-visual-item"] {
	min-width: 300px;
	flex-shrink: 0;
	position: relative;
}

/* スライド番号表示 */
.wp-block-lp-main-visual .block-editor-block-list__layout > [data-type="lp/main-visual-item"]::before {
	content: "スライド " counter(item);
	counter-increment: item;
	display: block;
	font-size: 11px;
	color: #666;
	margin-bottom: 4px;
	font-weight: 600;
}

/* PC/SP画像を横並び */
.mv-item-upload__wrapper {
	display: flex;
	gap: 12px;
}

.mv-item-upload {
	flex: 1;
	padding: 12px;
	border: 1px solid #ddd;
	background: #f9f9f9;
}

.mv-item-upload__label {
	font-size: 12px;
	margin: 0 0 8px;
	color: #555;
	font-weight: 600;
}

.mv-item-upload__preview {
	display: block;
	width: 100%;
	height: auto;
	margin-bottom: 8px;
	border: 1px solid #ddd;
}



@media (max-width: 768px) {
	.mv-items {
		aspect-ratio: 4 / 3; /* SP用のアスペクト比 */
	}
}

.mv-item {
	position: absolute;
	inset: 0;
	opacity: 0;
	transition: opacity 0.6s ease-in-out;
}

.mv-item.is-active {
	opacity: 1;
}

.mv-item img {
	width: 100%;
	height: 100%;
	display: block;
	object-fit: cover;
}