$modalZindex: 10000000000;
.ac-value-modal {
	$e: &;

	.ac-value-modal-background {
		position: fixed;
		left: 0;
		top: 0;
		right: 0;
		bottom: 0;
		z-index: $modalZindex;
		background: rgba(0, 0, 0, .6);
	}

	.ac-value-modal-container {
		display: flex;
		position: fixed;
		top: 0;
		left: 0;
		bottom: 0;
		right: 0;
		align-items: center;
		justify-content: center;
		z-index: $modalZindex + 1;
	}

	table td {
		vertical-align: top;
	}

	&.-w-large .ac-value-modal-panel {
		width: 800px;
	}

	.ac-value-modal-panel {
		background: #fff;
		width: 600px;

		&__header {
			background: #fafafa;
			border-bottom: 1px solid #ccc;
			text-align: right;
			display: flex;

			.ac-value-modal-title {

				text-align: left;
				display: flex;
				align-items: center;
				flex: 1;
				overflow: hidden;

				h2 {
					margin: 0;
					font-size: 15px;
					padding: 10px 20px;
					white-space: nowrap;
					overflow: hidden;
					text-overflow: ellipsis;
				}
			}

			.ac-value-modal-actions {
				width: 70px;
				display: flex;
				align-items: center;
				justify-content: flex-end;

				button {
					border: none;
					background-color: transparent;
					cursor: pointer;
					border-left: 1px solid #ccc;
					display: block;
					width: 50px;
					height: 50px;

					&:hover {
						background: #efefef;
					}
				}
			}
		}

		&__body {
			padding: 20px;
			max-height: calc(100vh - 150px);
			overflow: auto;

			video {
				display: block;
			}

			img {
				width: 100%;
				height: auto;
			}

			span.loading {
				display: block;
				margin: 20px;
				text-align: center;
			}
		}

		&__footer {
			display: flex;
			border-top: 1px solid #ccc;
			background: #fafafa;

			.ac-value-modal__edit {
				a {
					margin-top: 5px;
					margin-bottom: 5px;
				}
			}

			button {
				width: 40px;
				height: 40px;
				border: none;
				border-left: 1px solid #ccc;
				justify-content: center;
				cursor: pointer;
				background: none;
				align-items: center;

				.dashicons {
					transform: translateY(2px);
					font-size: 16px;
				}

				&:hover {
					background: #efefef;
				}
			}
		}
	}

	&__edit {
		flex-grow: 1;
		padding-left: 10px;
		display: flex;
		align-items: center;

		a.button {
			margin-right: 5px;
		}
	}

	&__navigation {
		flex-grow: 0;
		width: 100px;
		display: flex;
		justify-content: flex-end;
	}

	.ac-badge {
		background: #eee;
		border-radius: 3px;
		color: #464646;
		font-size: 13px;
		padding: 2px 10px;
	}

	&.-nopadding {
		.ac-value-modal-panel__body {
			padding: 0;

			.loading {
				padding: 20px;
			}
		}
	}

}

.ac-value-modal.-preview {
	.ac-value-modal-panel {
		width: auto;
		max-width: 80vw;
		min-width: 400px;
		top: 0;
		left: 0;
		transform: none;

		.ac-value-modal-panel__header {
			h2 {
				text-overflow: ellipsis;
				max-width: 500px;
				overflow: hidden;
				white-space: nowrap;
			}
		}

		.ac-value-modal-panel__body {

			img {
				width: auto;
				min-width: 300px;
				max-width: 100%;
				max-height: calc(100vh - 150px);
				display: block;
				margin: auto;
			}
		}
	}
}