$modal-settings-height: 30px;
$modal-button-wrapper-width: 90px;

.spectra-popup {

	&__modal {
		width: 100%;
		min-width: auto;
		max-width: 900px;
		height: auto;
		max-height: 600px;
		top: 45%;
		border-radius: 2px;
		box-shadow: 0 10px 36px -10px rgba(0, 0, 0, 0.25);
		overflow: visible;

		.components-modal__content {
			display: flex;
			flex-direction: column;
			padding: 0;
		}

		.components-modal__header {
			margin: 0;
			padding: 0 0 0 32px;
			padding-right: 0;
			border-bottom: 1px solid #e6e7e9;
			border-radius: 2px 2px 0 0;

			.components-button {
				width: 20px;
				height: 20px;
				top: -28px;
				right: -38px;
				left: auto;

				svg {
					width: 20px;
					height: 20px;
					stroke: #aaa;
					fill: #aaa;
				}
			}

			.components-modal__icon-container {
				margin-right: 12px;
				margin-top: 5px;
			}

			.components-modal__icon-container svg {
				width: 30px;
				height: 30px;
			}
		}

		&-settings {
			overflow-y: auto;
			margin: 0;
			padding: 0;
			width: 100%;
			border: none;

			th {
				border-right: 1px solid #e6e7e9;
				border-bottom: 1px solid #e6e7e9;
				width: 25%;
				vertical-align: middle;

				label {
					display: inline-block;
					font-size: 13px;
					line-height: 1.4em;
					font-weight: 600;
					padding: 0;
					color: #333;
				}

				.title {
					padding-bottom: 0;
					border-bottom: 0;
				}
			}

			td {
				padding: 30px 20px;
				position: relative;
				width: 75%;
				border-bottom: 1px solid #e6e7e9;
			}

			tr:last-child th,
			tr:last-child td {
				border-bottom: none;
			}

			&-content {
				display: flex;
				justify-content: space-between;

				.spectra-popup__control--meta-select:first-child {
					margin-top: 0;
				}
			}
		}

		&-select-control {
			width: 100%;
			margin: 0;
			font-size: inherit;
			font-family: inherit;
			max-width: 100% !important;
			height: $modal-settings-height;
			color: #50575e !important;
			border-color: #e6e7e9 !important;

			&-wrapper {
				width: 100%;
			}
		}

		&-button {
			cursor: pointer;
			background: transparent;
			border: none;

			&-wrapper {
				width: $modal-button-wrapper-width;
				height: $modal-settings-height;
				margin-bottom: 5px;
				display: inline-flex;
				align-items: center;
				justify-content: center;
			}

			&--disabled {
				opacity: 0.5;
				pointer-events: none;
			}
		}

		&-footer {
			position: sticky;
			display: flex;
			justify-content: space-between;
			padding: 18px 32px;
			bottom: 0;
			border-radius: 0 0 2px 2px;
			border-top: 1px solid #e6e7e9;
			background: #fff;
			z-index: 9;

			button.button {
				border-radius: 2px;
				min-height: 35px;
				color: #fff;
				background-color: #007cba;
				border: none;
				-webkit-transition: background-color 100ms;
				-moz-transition: background-color 100ms;
				-o-transition: background-color 100ms;
				transition: background-color 100ms;

				&:hover {
					color: #fff;
					background-color: #0063a1;
				}
			}

			&--notice {
				display: flex;
				align-items: center;
				justify-content: center;
				flex-wrap: wrap;
				font-size: 14px;
				color: #50575e;

				.dashicons {
					font-size: 22px;
					color: #555d66;
					margin-right: 10px;
				}
			}
		}
	}

	&__control {

		&--meta-select {

			.spectra__input:focus {
				box-shadow: none;
			}

			svg {
				width: 16px;
				fill: #50575e;
				stroke: #50575e;
			}
		}
	}

	&__notice {
		font-style: italic;
		margin-bottom: 16px;
		color: #1d2327;

		&--clickable {
			cursor: pointer;

			.dashicons {
				-webkit-transition: color 250ms;
				-moz-transition: color 250ms;
				-o-transition: color 250ms;
				transition: color 250ms;
				margin-right: 8px;
			}
		}

		&--secondary {
			font-size: 11px;
			line-height: 1.4;
			color: #a4afb7;
			margin-bottom: 25px;
		}
	}
}

.components-modal__screen-overlay {
	background-color: rgba(0, 0, 0, 0.7);
}

.spectra-control-popup__options--action-wrapper {
	display: flex;
	-webkit-box-align: center;
	align-items: center;
	flex-direction: row;
	-webkit-box-pack: justify;
	justify-content: space-between;
	width: 100%;
	grid-column: 1 / -1;
	gap: calc(8px);
}

.spectra-popup__trigger-element-notice {
	display: grid;
	grid-column: 1 / -1;
	margin-top: -1px;
	padding: calc(16px);
}
