@import "../../variables";

.vpf-component-elements-selector-control-location {
	position: relative;
	// background-color: $light-gray-100;

	& + & {
		margin-top: 17px;
	}

	.vpf-component-elements-selector-control-location-title {
		margin-bottom: 8px;
		font-size: 12px;
		font-weight: 500;
		opacity: 0.6;
	}

	.vpf-component-elements-selector-control-location-align {
		position: absolute;
		top: -2px;
		right: 0;

		button {
			display: flex;
			width: 25px;
			height: auto;
			padding: 4px 5px;
			margin-top: 0;
			font-size: 10px;
			color: #000;
			cursor: pointer;
			background: #fff;
			border: 1px solid #e1e1e1;
			border-radius: 3px;

			&:hover,
			&:focus {
				color: var(--wp-admin-theme-color);
				background: #f9f8f8;
				border-color: #cbcbcb;
			}

			svg {
				width: 100%;
				height: auto;
				margin-left: 0;
				fill: currentcolor;
			}
		}
	}

	.vpf-component-elements-selector-control-location-options {
		display: flex;
		flex-wrap: wrap;
		margin-top: -10px;

		> * {
			width: 100%;
		}
	}
}

// Buttons.
.vpf-component-elements-selector-control-location-options-add-button {
	display: flex;
	align-items: center;
	width: 100%;
	margin-top: 10px;

	.components-button {
		justify-content: center;
		width: 100%;
		height: 40px;
		background: #fff;
		border: 1px solid #e1e1e1;
		border-radius: 4px;
		box-shadow: none;

		&:hover,
		&:focus {
			background: #f9f8f8;
			border-color: #cbcbcb;
		}
	}
}

.vpf-component-elements-selector-control-location-options-item {
	display: flex;
	align-items: center;
	justify-content: space-between;
	width: 100%;
	height: 40px;
	padding: 9px 12px;
	margin-top: 10px;
	font-weight: 500;
	color: #000;
	background-color: #f9f8f8;
	border: 1px solid #ccc;
	border-radius: 4px;
	box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 10%);

	&:hover,
	&:focus {
		color: var(--wp-admin-theme-color);
		border-color: $gray-600;
	}
}

button.vpf-component-elements-selector-control-location-options-item {
	cursor: pointer;

	svg {
		width: 13px;
		height: auto;
		margin-left: 5px;
	}
}

// Align dropdown.
.vpf-component-elements-selector-align__dropdown-content {
	.components-accessible-toolbar {
		border: none;

		.components-button.has-icon.has-icon {
			min-width: 40px;
			height: 30px;
			padding-top: 0;
			padding-right: 0;
			padding-bottom: 0;
			padding-left: 0;
		}

		.components-button::before {
			right: 4px;
			left: 4px;
		}
	}
}

.vpf-component-elements-selector-control-location-options-title-pro {
	padding: 0.2em 0.8em;
	margin-left: 10px;
	font-size: 0.7em;
	font-weight: 600;
	color: #fff;
	background: linear-gradient(to left, #743ad5, #d53a9d);
	border-radius: 1em;
}

.vpf-component-elements-selector-modal {
	.components-panel__body {
		max-width: 350px;
		padding-right: 24px;
		padding-left: 24px;
		margin-right: -24px;
		margin-left: -24px;
	}

	.components-modal__header + .components-panel__body {
		border-top: none;
	}

	.components-panel__body:last-child {
		padding-bottom: 0;
		border-bottom: none;
	}
}
