.high-contrast .wp-block-code,
.high-contrast .wp-block-code textarea,
.wp-block-code.high-contrast {
	background: black;
	color: white;
}

.em-mt-1 {
	margin-top: 0.5rem;
}

.em-custom-panel {
	border: 1px solid black !important;
}

.em-panel-helper {
	font-size: 11px;
	font-style: italic;
	line-height: 1.4;
	color: #a4afb7;
}

.em-btn-group {
	.em-res-btn {
		height: 18px;
		padding: 0px;
		cursor: pointer;
		.dashicons {
			font-size: 12px;
			height: 12px;
		}
	}
}

.em-font-picker {
	position: relative;
	padding: 11px 7px 3px;
	border-radius: 4px;
	background: rgb(208 204 204 / 8%);
	margin-top: 5px;
	.em-btn-group {
		position: absolute;
		right: 45px;
	}
	.components-font-size-picker__controls {
		margin: 0;
	}
}

.em-custom-media-panel{
	position: relative;
	.em-btn-group{
		position: absolute;
		right: 12px;
		top: 12px;
		z-index: 1;
	}
	.em-image-panel {
		margin-top: 15px !important;
		.components-placeholder__fieldset {
			position: relative;
			border-radius: 5px;
			box-shadow: 0px 0px 26px #0000000f;
			overflow: hidden;
			.em-image-reset-btn {
				width: auto !important;
				position: absolute;
				cursor: pointer;
				display: none;
				top: 8px;
				z-index: 2;
				right: 8px;
				color: #a4afb7;
				background: #fff;
				border: 0;
				padding: 0.2rem 0.3rem;
				border-radius: 4px;
				box-shadow: 0px 0px 26px #0000000f;
			}
			.em-image {
				position: relative;
				// padding: 56px 64px;
				width: 100%;
				height: 190px;
				align-items: center;
				display: flex;
				justify-content: center;
	
				&:before {
					content: "";
					width: 100%;
					height: 100%;
					z-index: 1;
					position: absolute;
					top: 0;
					border: 0;
					left: 0;
					right: 0;
				}
				.em-image-select {
					height: 100%;
					width: 100%;
					position: absolute;
					top: 0;
					z-index: 0;
					object-fit: cover;
					object-position: center;
				}
				.em-slider {
					display: grid;
					grid-template-columns: auto auto auto;
					gap: 6px;
					padding: 6px;
					.em-slider-images{
						height: 55px;
						width: 100%;
						object-fit: cover;
						object-position: center;
						border-radius: 5px;
					}
				}
				.em-image-select-btn {
					z-index: 1;
					margin: 0 auto;
					background: black !important;
					color: white !important;
					border: 1px solid white;
					box-shadow: none !important;
					border-radius: 5px;
				}
			}
	
			&:hover {
				.em-image-reset-btn {
					display: block;
				}
				.em-image {
					&::before {
						background: black;
						opacity: 0.2;
					}
				}
			}
		}
	}
}


.em-select-panel {
	margin-top: 5px;
	padding: 7px;
	// border: 1px solid #000;
	background: rgb(208 204 204 / 8%);

	.em-btn-group {
		.components-button-group {
			width: 100%;
			text-align: end;
			margin-bottom: 5px;
		}
	}
	.components-panel__row {
		margin-top: 0;
		h4 {
			margin: 0;
		}
		.components-base-control {
			margin-bottom: 0 !important;
			> div {
				padding-top: 0;
				margin-bottom: 0;
			}
		}
	}
}

.em-custom-range {
	position: relative;
	padding: 7px;
	background: rgb(208 204 204 / 8%);
	margin-top: 5px;
	.em-btn-group {
		position: absolute;
		right: 5px;
	}
	.components-range-control {
		margin-bottom: 0 !important;
		> div {
			margin-bottom: 0;
		}
	}
}

.em-custom-unit-control-1 {
	position: relative;
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	align-items: center;
	padding: 7px;
	margin: 5px auto;
	background: rgb(208 204 204 / 8%);
	h4 {
		margin: 0;
	}
	.em-btn-group {
		text-align: end;
		margin-bottom: 3px;
	}
	.components-range-control {
		flex-grow: 1;
		margin-bottom: 0;
		margin-right: 10px;
		> div {
			margin-bottom: 0 !important;
		}
	}
	.components-unit-control-wrapper {
		width: 90px;
	}
}

.em-custom-unit-control {
	position: relative;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	padding: 7px;
	margin: 5px auto;
	background: rgb(208 204 204 / 8%);
	h4 {
		margin: 0 0 3px;
		width: 100%;
	}
	.em-btn-group {
		position: absolute;
		right: 7px;
		top: 6px;
	}
	.components-range-control {
		flex-grow: 1;
		margin-bottom: 0;
		margin-right: 10px;
		> div {
			margin-bottom: 0 !important;
		}
	}
	.components-unit-control-wrapper {
		width: 90px;
	}
}

.em-bg {
	margin-bottom: 10px;
	h4 {
		margin: 0;
	}
	.components-base-control {
		margin: 0;
	}
}

.em-custom-toggle {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	align-items: center;
	padding: 7px;
	margin: 5px auto;
	background: rgb(208 204 204 / 8%);
	.components-toggle-control {
		margin: 0;
	}
}

.em-custom-color-picker {
	position: relative;
	padding: 7px;
	margin: 5px auto;
	background: rgb(208 204 204 / 8%);
	.em-btn-group {
		position: absolute;
		right: 7px;
		top: 7px;
	}
}

.em-custom-icon-picker {
	position: relative;
	padding: 7px;
	margin: 5px auto;
	background: rgb(208 204 204 / 8%);
	.em-btn-group {
		text-align: end;
	}
	p {
		margin-bottom: 0;
	}
}

.em-custom-radio-control {
	position: relative;
	padding: 7px;
	margin: 5px auto;
	background: rgb(208 204 204 / 8%);
	.em-btn-group {
		position: absolute;
		right: 7px;
	}
	p {
		margin-bottom: 0;
	}
}

.em-custom-input-field {
	position: relative;
	padding: 7px;
	margin: 5px auto;
	flex-wrap: wrap;
	background: rgb(208 204 204 / 8%);
	.em-input-field {
		.em-btn-group {
			text-align: end;
			margin-bottom: 3px;
		}
		.components-number-control {
			width: 90px;
		}
	}
}

.em-custom-group-btn {
	position: relative;
	padding: 7px;
	margin: 5px auto;
	background: rgb(208 204 204 / 8%);
	h4 {
		margin: 10px 0;
	}
	.em-custom-btn {
		height: 30px;
		padding: 1px 8px;
		font-size: 12px;
	}
}

.custom-box-control {
	position: relative;
	padding: 7px;
	margin: 5px auto;
	background: rgb(208 204 204 / 8%);
	.em-btn-group {
		position: absolute;
		right: 80px;
		top: 7px;
	}
}

.em-icon-picker {
	.em-flex {
		display: flex;
		flex-direction: row;
		justify-content: space-between;
		width: 100%;
		align-items: center;
		div {
			display: flex;
			align-items: center;
			flex-direction: row;
		}
	}
}

.em-icon-picker-popover {
	&.is-expanded {
		.components-popover__content {
			overflow-y: scroll !important;
		}
	}

	.components-popover__content {
		width: 300px;
		height: 400px;
		border-radius: 10px;
		&::-webkit-scrollbar {
			width: 10px;
		}
		&::-webkit-scrollbar-track {
			box-shadow: inset 0 0 5px grey;
			border-radius: 10px;
		}
		&::-webkit-scrollbar-thumb {
			background: grey;
			border-radius: 10px;
			&:hover {
				background: rgb(75, 75, 75);
			}
		}
	}
}

.em-icon-picker-root {
	.em-icon-picker-grid {
		padding: 10px 0px;
		display: grid;
		grid-template-columns: repeat(4, 1fr);
		grid-gap: 5px;

		.em-icon {
			text-align: center;
			padding: 15px 0px;
			width: 100%;
			background: #eee;
			font-size: 20px;
			cursor: pointer;
			&.em-active {
				background: #000;
				color: #fff;
			}

			&:not(.em-active):hover {
				background: #e8e5e5;
			}
		}
	}
}
