/* PM Popup - front-end styles */

.pm-popup {
	position: fixed;
	z-index: 100000;
	box-sizing: border-box;
}

.pm-popup[hidden] {
	display: none !important;
}

.pm-popup * {
	box-sizing: border-box;
}

.pm-popup__overlay {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: rgba(0, 0, 0, 0.55);
	z-index: -1;
}

.pm-popup__box {
	background: #fff;
	border-radius: 6px;
	box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25);
	padding: 32px 28px;
	position: relative;
}

.pm-popup__close {
	position: absolute;
	top: 8px;
	right: 10px;
	background: transparent;
	border: 0;
	font-size: 22px;
	line-height: 1;
	cursor: pointer;
	color: #555;
	padding: 4px 8px;
}
.pm-popup__close:hover {
	color: #000;
}

.pm-popup-widget-title {
	margin-top: 0;
}

/* Centered modal
 * The wrapper spans the viewport and flex-centres the box. The width limit
 * lives on .pm-popup__box (set inline per popup), NOT on the wrapper - putting
 * max-width on a fixed element that has both left:0 and right:0 makes the
 * leftover space collapse to one side instead of splitting evenly, which is
 * what pushed the box off-centre.
 */
.pm-popup--center {
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	width: 100%;
	max-width: none;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	overflow-y: auto;
}
.pm-popup--center .pm-popup__box {
	width: 100%;
	margin: auto;
	flex: 0 1 auto;
}

/* Full width top / bottom banners */
.pm-popup--top,
.pm-popup--bottom {
	left: 0;
	right: 0;
	width: 100%;
}
.pm-popup--top { top: 0; }
.pm-popup--bottom { bottom: 0; }
.pm-popup--top .pm-popup__box,
.pm-popup--bottom .pm-popup__box {
	border-radius: 0;
	width: 100%;
	max-width: none;
	text-align: center;
}

/* Corner boxes */
.pm-popup--bottom-right,
.pm-popup--bottom-left {
	bottom: 20px;
	width: auto;
	max-width: none;
}
.pm-popup--bottom-right { right: 20px; }
.pm-popup--bottom-left { left: 20px; }
.pm-popup--bottom-right .pm-popup__box,
.pm-popup--bottom-left .pm-popup__box {
	width: 100%;
}

/* Animations */
.pm-popup--anim-fade.pm-popup--visible .pm-popup__box {
	animation: pm-popup-fade 0.35s ease both;
}
@keyframes pm-popup-fade {
	from { opacity: 0; }
	to { opacity: 1; }
}

.pm-popup--anim-slide.pm-popup--visible.pm-popup--top .pm-popup__box {
	animation: pm-popup-slide-down 0.35s ease both;
}
.pm-popup--anim-slide.pm-popup--visible.pm-popup--bottom .pm-popup__box,
.pm-popup--anim-slide.pm-popup--visible.pm-popup--bottom-right .pm-popup__box,
.pm-popup--anim-slide.pm-popup--visible.pm-popup--bottom-left .pm-popup__box {
	animation: pm-popup-slide-up 0.35s ease both;
}
.pm-popup--anim-slide.pm-popup--visible.pm-popup--center .pm-popup__box {
	animation: pm-popup-pop 0.3s ease both;
}
@keyframes pm-popup-slide-down {
	from { transform: translateY(-100%); }
	to { transform: translateY(0); }
}
@keyframes pm-popup-slide-up {
	from { transform: translateY(100%); }
	to { transform: translateY(0); }
}
@keyframes pm-popup-pop {
	from { transform: scale(0.9); opacity: 0; }
	to { transform: scale(1); opacity: 1; }
}

@media (max-width: 480px) {
	.pm-popup--bottom-right,
	.pm-popup--bottom-left {
		left: 10px;
		right: 10px;
		width: auto;
	}
	.pm-popup--bottom-right .pm-popup__box,
	.pm-popup--bottom-left .pm-popup__box {
		max-width: none !important;
	}
	.pm-popup--center .pm-popup__box {
		max-width: none !important;
	}
}
