.ws-popup-maker {
	position: fixed;
	inset: 0;
	z-index: 999999;
	display: none;
	font-family: Arial, Helvetica, sans-serif;
}

.ws-popup-maker.is-visible {
	display: block;
}

.ws-popup-maker__overlay {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.45);
}

.ws-popup-maker__dialog {
	position: relative;
	display: grid;
	grid-template-columns: minmax(320px, 36%) 1fr;
	grid-template-areas: "content media";
	width: 100vw;
	height: 100vh;
	background: #ffffff;
	overflow: hidden;
	box-sizing: border-box;
}

.ws-popup-maker__content {
	grid-area: content;
	position: relative;
	z-index: 2;
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	padding: 64px 56px 48px;
	background: #ffffff;
	overflow-y: auto;
	text-align: center;
}

.ws-popup-maker__logo-link {
	display: inline-flex;
	align-self: center;
	margin-bottom: 48px;
}

.ws-popup-maker__logo {
	display: block;
	max-width: 220px;
	width: 100%;
	height: auto;
}

.ws-popup-maker__text {
	font-size: 18px;
	line-height: 1.45;
	color: #111111;
	max-width: 520px;
}

.ws-popup-maker__text h1,
.ws-popup-maker__text h2,
.ws-popup-maker__text h3,
.ws-popup-maker__text h4,
.ws-popup-maker__text p {
	margin: 0 0 20px;
}

.ws-popup-maker__text h1,
.ws-popup-maker__text h2 {
	font-size: clamp(42px, 5vw, 86px);
	line-height: 0.95;
	font-weight: 700;
	letter-spacing: -0.03em;
	text-transform: uppercase;
}

.ws-popup-maker__text h3 {
	font-size: clamp(24px, 3vw, 40px);
	line-height: 1.02;
	font-weight: 700;
	text-transform: uppercase;
}

.ws-popup-maker__text p:last-child {
	margin-bottom: 0;
}

.ws-popup-maker__form {
	margin-top: 32px;
	width: 100%;
	max-width: 520px;
}

.ws-popup-maker__media {
	grid-area: media;
	position: relative;
	min-height: 320px;
	background: #d9d1c8;
	overflow: hidden;
}

.ws-popup-maker__media::after {
	content: "";
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.5);
	pointer-events: none;
	z-index: 1;
}

.ws-popup-maker__media-link,
.ws-popup-maker__media-placeholder {
	position: absolute;
	inset: 0;
	display: block;
	width: 100%;
	height: 100%;
	z-index: 0;
}

.ws-popup-maker__media-link.is-disabled {
	pointer-events: none;
	cursor: default;
}

.ws-popup-maker__media-image {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.ws-popup-maker__close {
	position: absolute;
	top: 26px;
	right: 26px;
	z-index: 3;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 48px;
	height: 48px;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: transparent;
	box-shadow: none;
	appearance: none;
	cursor: pointer;
}

.ws-popup-maker__close:hover,
.ws-popup-maker__close:focus,
.ws-popup-maker__close:active {
	background: transparent;
	border: 0;
	box-shadow: none;
	outline: none;
}

.ws-popup-maker__close img {
	width: 18px;
	height: 18px;
	filter: brightness(0) invert(1);
}

body.ws-popup-maker-open {
	overflow: hidden;
}

@media (max-width: 991px) {
	.ws-popup-maker__dialog {
		grid-template-columns: 1fr;
		grid-template-areas:
			"media"
			"content";
		grid-template-rows: minmax(44vh, 1fr) auto;
		height: 100vh;
		overflow-y: auto;
	}

	.ws-popup-maker__content {
		padding: 32px 24px 32px;
	}

	.ws-popup-maker__logo-link {
		margin-bottom: 28px;
	}

	.ws-popup-maker__logo {
		max-width: 180px;
	}

	.ws-popup-maker__text {
		font-size: 16px;
	}

	.ws-popup-maker__media {
		min-height: 44vh;
	}

	.ws-popup-maker__close {
		top: 16px;
		right: 16px;
		width: 42px;
		height: 42px;
	}
}

.ws-popup-maker-admin .form-table th {
	width: 240px;
	padding-top: 18px;
}

.ws-popup-maker-page-list {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
	gap: 10px 16px;
	max-width: 900px;
	padding: 12px;
	border: 1px solid #dcdcde;
	background: #ffffff;
	border-radius: 6px;
}

.ws-popup-maker-page-list label {
	display: flex;
	align-items: center;
	gap: 8px;
}

.ws-popup-maker-media-field {
	display: flex;
	align-items: center;
	gap: 10px;
	flex-wrap: wrap;
}

.ws-popup-maker-slides-list {
	display: flex;
	flex-direction: column;
	gap: 16px;
	margin-bottom: 16px;
}

.ws-popup-maker-slide-row {
	max-width: 900px;
	padding: 16px;
	border: 1px solid #dcdcde;
	border-radius: 6px;
	background: #ffffff;
}

.ws-popup-maker-slide-field {
	margin-bottom: 12px;
}

.ws-popup-maker-slide-field label {
	display: block;
	margin-bottom: 6px;
	font-weight: 600;
}

.ws-popup-maker-remove-slide {
	color: #b32d2e;
	text-decoration: none;
}
