// Gutenberg
[data-type="arkhe-blocks/custom-code"] {
	// overflow: hidden;
	border: 1px solid #555;
	border-radius: 3px;

	&.-css {
		--arkb-custom_code_label_bg: #1f789a;
	}

	&.-javascript {
		--arkb-custom_code_label_bg: #b6a114;
	}


	.arkb-proOnlyArea,
	.arkb-proOnlyArea__preview {
		height: 100%;
	}

	.arkb-proOnlyArea::before {
		inset: 0;
	}

	// .ark-block-custom-code__container {
	// 	overflow: hidden;
	// }

	// 言語ラベル
	.ark-block-custom-code__label {
		display: flex;
		flex-wrap: wrap;
		align-items: center;
		min-height: 32px;
		padding: 0;
		color: #fff;
		font-size: 12px;
		background-color: var(--arkb-custom_code_label_bg, #555);
		background-image: repeating-linear-gradient(-45deg, transparent, transparent 4px, rgba(#fff, .08) 4px, rgba(#fff, .08) 10px);

		>.__title {
			display: flex;
			align-items: center;
			margin-right: auto;

			>.__icon {
				width: 2em;
				margin-right: .5em;
				margin-left: 1em;
			}

		}

		>.__now_query {
			margin-right: 1em;
			// margin-left: auto;
			padding: 3px 6px;
			color: #f5f5f5;
			font-size: 12px;
			font-family: Menlo, Consolas, monaco, monospace;
			font-style: italic;
			line-height: 1;
			background-color: rgba(#000, .5);
			border-radius: 2px;
		}

		@include mobile {

			>.__now_query {
				display: none;
			}
		}

		.__deviceBtns {
			display: flex;
			gap: 1px;
			padding-left: 1px;
			background-color: #000;

			--wp-admin-theme-color: #0082c3;
			--wp-admin-theme-color-darker-10: #0082c3;

			.components-button {
				position: relative;
				justify-content: center;
				min-width: unset;
				min-width: 3em;
				height: auto;
				padding: 4px;
				color: #fff;
				font-size: 12px;
				border-radius: 0;

				&[data-has-code="true"]:not(.is-primary) {
					box-shadow: inset 0 -3px 0 0 var(--wp-admin-theme-color, #fff);
				}

				&:focus {
					box-shadow: inset 0 0 0 1px #fff !important;
				}


				.__deviceIcon {
					margin-right: 0;
					font-size: 24px;
				}

				.__arrowIcon {
					margin-left: -2px;
					font-size: 14px;
				}
			}

			.__description {
				padding: 0 4px;
			}

			.components-button:not(.is-primary) {
				background: #3f3f3f;

				.__description {
					display: none;
				}
			}

			.components-button.is-primary {
				z-index: 1;
				// box-shadow: inset 0 0 0 1px rgba(#fff, .8);
			}

		}
	}

	// Loadingオーバーレイ
	.ark-block-custom-code__loadingLayer {
		position: absolute;
		top: 0;
		left: 0;
		z-index: 1;
		display: block;
		display: flex;
		align-items: center;
		justify-content: center;
		width: 100%;
		height: 100%;
		background-color: rgba(#000, .25);
		// opacity: .2;

		.components-spinner {
			margin: 0;
			transform: scale(1.5);
		}
	}

	.ark-block-custom-code__preview {
		height: 100%;
		margin: 0;
		padding: 10px;
		overflow-y: auto;
		color: #fff;
		font-size: 13px;
		white-space: pre;
		background-color: #272626;

		code {
			display: block;
			min-height: 100%;
			margin-left: 48px;
			padding-left: 4px;
			font-size: inherit;
			tab-size: 4;
			border-left: solid 1px #808080;

		}
	}


	.monaco-editor {

		.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;
		}
	}
}
