/*
 * Signup popup. Layout, the overlay, and a plain box with matching text so
 * it reads on any theme; fonts come from the theme, and popup.js copies the
 * field and button look from the page's own signup form.
 */

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

.kjs-popup {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
}

.kjs-popup-overlay {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.55);
}

.kjs-popup-box {
	position: relative;
	box-sizing: border-box;
	width: 100%;
	max-width: 540px;
	max-height: calc(100vh - 32px);
	overflow-y: auto;
	padding: 32px 32px 24px;
	border-radius: 6px;
	background: var(--wp--preset--color--base, #fff);
	color: var(--wp--preset--color--contrast, #1e1e1e);
	box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
}

.kjs-popup-box:focus {
	outline: none;
}

.kjs-popup-close {
	position: absolute;
	top: 8px;
	right: 8px;
	width: 36px;
	height: 36px;
	padding: 0;
	border: 0;
	background: none;
	color: inherit;
	font-size: 28px;
	line-height: 1;
	cursor: pointer;
	opacity: 0.6;
}

.kjs-popup-close:hover,
.kjs-popup-close:focus-visible {
	opacity: 1;
}

.kjs-popup-title {
	margin: 0 32px 8px 0;
	color: inherit;
	font-size: 24px;
	line-height: 1.2;
}

.kjs-popup-subtitle {
	margin: 0 0 20px;
	color: inherit;
	opacity: 0.65;
}

.kjs-popup .kjs-subscribe-heading {
	color: inherit;
	opacity: 0.65;
}

html.kjs-popup-open {
	overflow: hidden;
}

@media (max-width: 480px) {
	.kjs-popup-box {
		padding: 28px 20px 20px;
	}
}
