@charset "UTF-8";
@import "../../theme/variables";
@import "~@jereation/sass-helpers/_mixins";

.vui-popup {
	position: fixed;
	z-index: map-get($popup, z-index);
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	@include display-flex;
	@include justify-content(center);
	@include align-items(center);
}

.vui-popup-backdrop {
	position: absolute;
	top: 0;
	right: 0;
	bottom: 0;
	left: 0;
	background-color: rgba(0, 0, 0, 0.5);
	z-index: -1;
}

.vui-popup-view {
	z-index: 1;
	max-width: 86%;
	max-height: 86%;
	overflow-x: auto;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
	-ms-overflow-style: -ms-autohiding-scrollbar;
	border-radius: 0.15rem;
	background-color: #fafafc;
}

.vui-popup-close {
	position: relative;
	display: inline-block;
	vertical-align: middle;
	width: 24px;
	height: 24px;
	overflow: hidden;
	&:before, &:after {
		content: '';
		position: absolute;
		top: 50%;
		left: 0;
		width: 100%;
		height: 1px;
		background-color: #98979d;
	}
	&:before {
		@include rotate(45deg);
	}
	&:after {
		@include rotate(-45deg);
	}
}

// animation normal
// -----------------------------------------
.vui-popup {
	@include transition-property(opacity);
	@include transition-duration(400ms);
	.vui-popup-view {
		@include transition-property(transform);
		@include transition-duration(400ms);
	}
	&.vui-popup-enter, &.vui-popup-leave-active {
		opacity: 0;
		.vui-popup-view {
			@include transform(scale(1.115));
		}
	}
	&.vui-popup-enter-to {
		opacity: 1;
		.vui-popup-view {
			@include transform(scale(1));
		}
	}
}
