
.arkb-menu__field {
	position: relative;
	z-index: 1; // blockPreview より上に
	padding: 0 4px;


	&:not(:first-child) {
		margin-top: 24px;
	}

	&:last-child .components-base-control__field {
		margin-bottom: 0;
	}

	.arkb-menu__field__label,
	.components-base-control__label {
		display: block;
		margin-left: -4px;
		font-weight: bold;
	}

	.arkb-menu__field__label {
		margin-bottom: 8px;
		font-size: 13px;
	}

	.arkb-menu__description {
		margin-top: 8px;
		margin-left: 8px;
		font-style: italic;
		opacity: .8;
	}

	&.-input {

		.components-text-control__input {
			max-width: 600px;
		}
	}


	&.-textarea {

		textarea {
			margin-left: 8px;
		}


		.large-text {
			max-width: 800px;
		}
	}

	// &.-radio {}

	&.-checkbox {
		font-size: inherit;

		+ .-checkbox {
			margin-top: 16px;
		}

		.components-base-control__field {
			margin-bottom: 0;
		}
	}

	&.-range {

		.components-range-control__root {
			max-width: 300px;
			margin-left: 4px;
		}
	}

	&.-color {
		z-index: 2; // blockPreview より上に

		.arkb-menu-help {
			margin-top: .75em;
			margin-left: 8px;
			font-size: 12px;
		}
	}

	&.-select {
		// max-width: 400px;

		.components-input-control__container {
			width: auto;
		}

		// <select>タグ
		.components-select-control__input {
			min-width: 120px;
			max-width: 100%;
		}
	}
}

.arkb-menu__paletteControl {
	display: flex;
	gap: 4px;
	align-items: center;

	.__clearBtn {
		height: auto;
		padding: 0 6px;
		font-size: 12px;
		line-height: 1.75;
	}

	.__value {
		font-size: 11px;
	}

	.__paletteBtn {
		position: relative;
		z-index: 1;
		width: 32px;
		height: 32px;
		margin: 0;
		padding: 0;
		border-radius: 50%;

		&:hover {
			z-index: 99; // パレットのツールチップを次の列の下に潜らないようにする
		}

		.components-button {
			position: relative;
			z-index: 0;
			display: block;
			width: inherit;
			height: inherit;
			margin: 0;
			padding: 0;
			border: solid 1px #fff;
			border-radius: inherit;
			box-shadow: 0 0 0 1px #eee;
		}

		span.components-button {
			pointer-events: none;
		}

		// stylelint-disable function-url-quotes
		&::before {
			position: absolute;
			z-index: -1;
			background: url("data:image/svg+xml,<svg width='32' height='32' fill='none' xmlns='http://www.w3.org/2000/svg'><path d='M6 8V6H4v2h2zM8 8V6h2v2H8zM10 16H8v-2h2v2zM12 16v-2h2v2h-2zM12 18v-2h-2v2H8v2h2v-2h2zM14 18v2h-2v-2h2zM16 18h-2v-2h2v2z' fill='%23555D65'/><path fill-rule='evenodd' clip-rule='evenodd' d='M18 18h2v-2h-2v-2h2v-2h-2v-2h2V8h-2v2h-2V8h-2v2h2v2h-2v2h2v2h2v2zm-2-4v-2h2v2h-2z' fill='%23555D65'/><path d='M18 18v2h-2v-2h2z' fill='%23555D65'/><path fill-rule='evenodd' clip-rule='evenodd' d='M8 10V8H6v2H4v2h2v2H4v2h2v2H4v2h2v2H4v2h2v-2h2v2h2v-2h2v2h2v-2h2v2h2v-2h2v2h2v-2h2v-2h-2v-2h2v-2h-2v-2h2v-2h-2v-2h2V8h-2V6h2V4h-2v2h-2V4h-2v2h-2V4h-2v2h-2V4h-2v2h2v2h-2v2H8zm0 2v-2H6v2h2zm2 0v-2h2v2h-2zm0 2v-2H8v2H6v2h2v2H6v2h2v2h2v-2h2v2h2v-2h2v2h2v-2h2v2h2v-2h-2v-2h2v-2h-2v-2h2v-2h-2v-2h2V8h-2V6h-2v2h-2V6h-2v2h-2v2h2v2h-2v2h-2z' fill='%23555D65'/><path fill-rule='evenodd' clip-rule='evenodd' d='M4 0H2v2H0v2h2v2H0v2h2v2H0v2h2v2H0v2h2v2H0v2h2v2H0v2h2v2H0v2h2v-2h2v2h2v-2h2v2h2v-2h2v2h2v-2h2v2h2v-2h2v2h2v-2h2v2h2v-2h2v-2h-2v-2h2v-2h-2v-2h2v-2h-2v-2h2v-2h-2v-2h2V8h-2V6h2V4h-2V2h2V0h-2v2h-2V0h-2v2h-2V0h-2v2h-2V0h-2v2h-2V0h-2v2H8V0H6v2H4V0zm0 4V2H2v2h2zm2 0V2h2v2H6zm0 2V4H4v2H2v2h2v2H2v2h2v2H2v2h2v2H2v2h2v2H2v2h2v2h2v-2h2v2h2v-2h2v2h2v-2h2v2h2v-2h2v2h2v-2h2v2h2v-2h-2v-2h2v-2h-2v-2h2v-2h-2v-2h2v-2h-2v-2h2V8h-2V6h2V4h-2V2h-2v2h-2V2h-2v2h-2V2h-2v2h-2V2h-2v2H8v2H6z' fill='%23555D65'/></svg>");
			border-radius: 50%;
			content: "";
			inset: 2px;
		}
	}
}


.arkb-menu__flexArea {
	display: flex;
	flex-wrap: wrap;
	gap: 2em;

	.arkb-menu__fieldArea {
		flex: 1 0 auto;
		width: 400px;
		max-width: 100%;
	}

	.arkb-menu__previewArea {
		position: relative;
		z-index: 0;
		flex-shrink: 0;
		width: 100%;
		max-width: 360px;
		padding: 1em;

		.__label {
			margin-bottom: 4px;
			font-size: 12px;
			text-align: center;
		}

		.__inner {
			padding: 24px;
			border-radius: 2px;
			box-shadow: inset 0 0 3px 1px rgba(0, 0, 0, .1);

			> :first-child {
				margin-top: 0;
			}

			> :last-child {
				margin-bottom: 0;
			}
		}
	}
}

.arkb-menu__codeEditor {
	position: relative;
	height: 320px;
	border: 1px solid #ddd;

	.components-spinner {
		position: absolute;
		top: 50%;
		left: 50%;
		z-index: 1;
		margin: 0;
		transform: translate(-50%, -50%);
	}

	.monaco-editor {
		width: 100%;

		.find-widget {

			.button {
				color: inherit;
				background: none;
				border: none;

				&:focus {
					box-shadow: none;
				}

				&.disabled {
					color: inherit !important;
					background: none !important;
				}
			}

			textarea:focus {
				box-shadow: none;
			}
		}

		.inputarea {
			padding: 0;
			color: inherit;
			box-shadow: none;
		}

		.monaco-icon-label-container > .monaco-icon-name-container > .label-name {
			text-decoration: none;
		}

		.monaco-highlighted-label .highlight {
			display: inline;
			margin: 0;
			padding: 0;
			background: transparent;
		}
	}
}

.arkb-menu__saveWrap {
	position: sticky;
	bottom: 2.5em;
	z-index: 99;
	display: flex;
	flex-flow: column;
	align-items: flex-end;
	width: fit-content;
	margin-top: 2em;
	margin-left: auto;

	@include sp {
		bottom: 1.5em;
	}
}

[data-type="core/spacer"][data-visible="1"] {
	background-image: repeating-linear-gradient(-45deg, rgba(160, 170, 180, .15), rgba(160, 170, 180, .15) 2px, transparent 2px, transparent 7px);
	background-clip: padding-box;
	border: solid 1px rgba(160, 180, 200, .2);
	border-image: repeating-linear-gradient(45deg, rgba(160, 180, 200, .5), rgba(160, 180, 200, .5) 6px, transparent 6px, transparent 9px) 1;
}
