/*
 * Homepage popup. Loaded only when a popup is set to appear
 * on the front page or the posts page.
 */

.popstar-overlay {
	display: none;
	position: fixed;
	inset: 0;
	z-index: 999999;
	background: rgba(0, 0, 0, 0.45);
	align-items: center;
	justify-content: center;
	padding: 20px;
	box-sizing: border-box;
}

.popstar-popup {
	--popstar-width: 760px;
	--popstar-bg: #ffffff;
	--popstar-title-color: #111111;
	--popstar-text-color: #666666;
	--popstar-button-bg: #000000;
	--popstar-button-color: #ffffff;
	--popstar-title-size: 28px;
	--popstar-text-size: 16px;
	--popstar-button-size: 15px;
	position: relative;
	background: var(--popstar-bg);
	border-radius: 14px;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
	width: min(var(--popstar-width), 90vw);
	max-width: 90vw;
	overflow: hidden;
	animation: popstar-fade-in 0.25s ease;
	box-sizing: border-box;
}

.popstar-close {
	position: absolute;
	top: 12px;
	right: 12px;
	width: 36px;
	height: 36px;
	border-radius: 50%;
	border: none;
	cursor: pointer;
	background: #000;
	color: #fff;
	font-size: 26px;
	font-weight: 800;
	line-height: 34px;
	z-index: 10;
	padding: 0;
	text-align: center;
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
}

.popstar-close:hover,
.popstar-close:focus {
	background: #000;
	color: #fff;
	opacity: 0.88;
	outline: none;
}

.popstar-title {
	color: var(--popstar-title-color);
	font-size: var(--popstar-title-size);
	margin: 0 0 14px;
	font-weight: 800;
	line-height: 1.15;
}

.popstar-text,
.popstar-text-image,
.popstar-media {
	color: var(--popstar-text-color);
	font-size: var(--popstar-text-size);
	line-height: 1.45;
}

.popstar-text {
	margin-bottom: 22px;
}

.popstar-text p,
.popstar-text-image p,
.popstar-media p {
	margin-top: 0;
}

.popstar-text-image img,
.popstar-media img {
	max-width: 100%;
	height: auto;
	display: block;
}

.popstar-button {
	display: inline-block;
	background: var(--popstar-button-bg);
	color: var(--popstar-button-color) !important;
	font-size: var(--popstar-button-size);
	text-decoration: none;
	padding: 12px 28px;
	border-radius: 4px;
	font-weight: 600;
	text-align: center;
	box-sizing: border-box;
}

.popstar-template1 {
	max-width: 90vw;
	text-align: center;
	padding: 45px 55px 30px;
}

.popstar-template1 .popstar-text-image {
	margin-bottom: 18px;
}

.popstar-template1 .popstar-text-image img {
	margin-left: auto;
	margin-right: auto;
}

.popstar-template1 .popstar-button {
	width: 100%;
}

.popstar-template2 {
	max-width: 90vw;
	display: grid;
	grid-template-columns: 1fr 1fr;
	padding: 60px;
	gap: 45px;
	align-items: center;
}

.popstar-template2 .popstar-media {
	width: 100%;
}

.popstar-template2 .popstar-media img {
	width: 100%;
	max-height: 260px;
	object-fit: contain;
}

.popstar-template2 .popstar-button {
	width: 100%;
}

.popstar-template3 {
	max-width: 90vw;
	display: grid;
	grid-template-columns: 1fr 1fr;
}

.popstar-template3 .popstar-media {
	min-height: 360px;
	overflow: hidden;
}

.popstar-template3 .popstar-media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.popstar-template3 .popstar-content {
	padding: 65px 50px;
}

.popstar-template3 .popstar-title {
	text-transform: uppercase;
}

.popstar-template3 .popstar-button {
	width: 100%;
	text-transform: uppercase;
}

.popstar-template4 {
	padding: 0;
	max-width: 90vw;
}

.popstar-template4 .popstar-full-image {
	width: 100%;
	display: block;
	line-height: 0;
	overflow: hidden;
}

.popstar-template4 .popstar-full-image-link {
	display: block;
	width: 100%;
	line-height: 0;
	position: relative;
	z-index: 2;
	cursor: pointer;
	text-decoration: none;
}

.popstar-template4 .popstar-full-image img {
	width: 100%;
	height: auto;
	display: block;
	margin: 0 !important;
	padding: 0 !important;
	border: 0;
}

.popstar-template4 .popstar-content {
	padding: 28px 35px 32px;
	box-sizing: border-box;
}

.popstar-template4 .popstar-text {
	margin-bottom: 20px;
}

.popstar-template4 .popstar-button {
	width: 100%;
}

@keyframes popstar-fade-in {
	from {
		opacity: 0;
		transform: scale(0.96);
	}

	to {
		opacity: 1;
		transform: scale(1);
	}
}

@media (max-width: 700px) {
	.popstar-overlay {
		align-items: flex-start;
		padding-top: 25px;
		padding-bottom: 25px;
		overflow-y: auto;
	}

	.popstar-popup {
		width: 90vw;
		max-width: 90vw;
		max-height: calc(100vh - 50px);
		overflow-y: auto;
	}

	.popstar-close {
		position: sticky;
		top: 12px;
		margin-left: auto;
		display: block;
	}

	.popstar-template1 {
		padding: 40px 25px 25px;
	}

	.popstar-template2,
	.popstar-template3 {
		display: block;
		padding: 35px 25px;
	}

	.popstar-template3 .popstar-content {
		padding: 35px 10px 10px;
	}

	.popstar-template3 .popstar-media {
		min-height: auto;
		margin-bottom: 22px;
	}

	.popstar-template3 .popstar-media img {
		height: auto;
	}

	.popstar-template4 .popstar-content {
		padding: 24px 22px 26px;
	}

	.popstar-overlay-template4 {
		align-items: center;
		padding-top: 20px;
		padding-bottom: 20px;
	}

	.popstar-template4 {
		max-height: calc(100dvh - 40px);
		overflow: hidden;
	}

	.popstar-template4 .popstar-close {
		position: absolute;
		top: 12px;
		right: 12px;
		margin-left: 0;
	}

	.popstar-template4 .popstar-full-image img {
		max-height: calc(100dvh - 40px);
		object-fit: contain;
	}
}
