body.overlayered {
  overflow: hidden;
}

.popup {
	position: fixed;
	top: 0;
	bottom: 0;
	height: 100vh;
	left: 0;
	right: 0;
	z-index: 9998;
  	overflow: auto;
	background: rgba(0,0,0,0.5);
	display: none;

	.popup__message {
		position: fixed;
		top: 50%;
		left: calc(50% - 280px);
		display: block;
		width: 560px;
		background-color: $color--white;
		border-radius: 10px;
		text-align: center;
		padding: 35px 30px 30px 30px;
		transform: translateY(-50%);

		& > .close {
			cursor: pointer;
			display: block;
			width: 30px;
			height: 20px;
			background-color: $color--seashell;
			border-bottom-left-radius: 5px;
			border-bottom-right-radius: 5px;
			position: absolute;
			top: 0;
			right: 15px;
			color: $color--white;
			transition: all 0.2s linear;

			&:hover { 
				background-color: darken($color--seashell, 10%); 
			}

			svg {
				font-size: 10px;
				display: block;
				margin-top: 5px;
				margin: 0.3rem auto;
				width: 1.4rem;
				height: 1.4rem;
			}
		}

		span {
			display: block;
			font-size: 20px;
			margin: 0 auto 20px auto;

			&.form__item__caption {
				font-size: 1.2rem;
				line-height: 1.8rem;
				height: 1.8rem;
				margin-bottom: 0;
				text-align: left;
			}
		}

		.btn--important { margin: 10px; }
		.btn--secondary { margin: 10px; }

	}
	
	&.is-too-high {
		overflow-y: scroll;
		.popup__message {
			position: absolute;
			top: 10rem;
			margin-bottom: 10rem;
			transform: none;
		}
	}
}


.popup--form {
	position: fixed;
	top: 0;
	bottom: 0;
	left: 0;
	right: 0;
	height: 100vh;
	z-index: 9999;
  	overflow: auto;
	background: rgba(0,0,0,0.5);
	display: none;
 
	.popup__content {
		position: absolute;
		margin-bottom: 5rem;
		top: 30%;
		left: calc(50% - 360px);
		display: block;
		width: 900px;
		background-color: $color--white;
		border-radius: 10px;
		text-align: left;
		padding: 35px 40px 30px 40px;

		@media(max-width: 1280px) {
			width: calc(90% - 80px);
			left: 50%;
			min-width: 400px;
		}

		& > .close {
			cursor: pointer;
			display: block;
			width: 30px;
			height: 20px;
			background-color: $color--graymiddle;
			border-bottom-left-radius: 5px;
			border-bottom-right-radius: 5px;
			position: absolute;
			top: 0;
			right: 15px;
			color: $color--graydark;
			transition: all 0.2s linear;

			&:hover { 
				background-color: darken($color--seashell, 10%); 
			}

			svg {
				font-size: 10px;
				display: block;
				margin-top: 5px;
				margin: 0.3rem auto;
				width: 1.4rem;
				height: 1.4rem;
			}
		}

		.centered .btn--important { float: none; }
	}
}


 
.popup__heading {
	display: block;
	width: 100%;
	font-size: 1.8rem;
	color: $color--additional;
	text-transform: uppercase;
	font-weight: 800;
	text-align: center;
}

.popup__buttons {
	padding: 2rem 2rem 0 2rem;
	margin-top: 2rem;
	border-top: 1px dashed rgba($color--seashell, 0.4);
	.btn {
		margin: 0 1rem;
	}
}