@use "../../scss/layout";
@use "../../scss/calypso-colors";

/* This hack is used to prevent the body from
 * scrolling when the modal is showing */
body.dops-modal-showing {
	overflow: hidden;
}

.dops-modal-wrapper {
	position: fixed;
	top: 0;
	right: 0;
	bottom: 0;
	left: 0;
	z-index: 1050;
	display: block;
	overflow-x: hidden;
	overflow-y: auto;
	text-align: center;
	-webkit-overflow-scrolling: touch;
	outline: 0;
	transition: opacity 0.15s linear;
	background-color: rgba(0, 0, 0, 0.5);
	cursor: pointer;

	&::before {
		content: "";
		display: inline-block;
		height: 100%;
		vertical-align: middle;
	}

	.dops-modal {
		position: relative;
		display: inline-block;
		margin: 0 0;
		width: 100%;
		max-width: 550px;
		vertical-align: middle;
		text-align: left;
		background-color: #fff;
		transition: all 0.5s;
		z-index: 100;
		clear: both;
		cursor: default;

		@include layout.breakpoint( ">480px" ) {
			margin: 0 auto;
			height: auto;
			border-radius: 5px;
			box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
		}
	}
}
