/**
 * Phone-only subscription popup positioning and close control.
 */

.so-subscribe-close {
	display: none;
}

@media (max-width: 767px) {
	.so-subscribe-popup {
		position: fixed;
		z-index: 99999;
		top: 50%;
		right: auto;
		bottom: auto;
		left: 50%;
		box-sizing: border-box;
		width: min(20rem, calc(100vw - 5rem));
		max-width: calc(100vw - 5rem);
		max-height: calc(100vh - 2rem);
		max-height: calc(100dvh - 2rem);
		padding: clamp(1rem, 5vw, 1.25rem);
		overflow: auto;
		font-size: 1rem;
		text-align: center;
		transform: translate(-50%, -50%);
	}

	.so-subscribe-form {
		justify-items: center;
		width: 100%;
		gap: 0.75rem;
		text-align: center;
	}

	.so-subscribe-form[hidden] {
		display: none !important;
	}

	.so-subscribe-form h2,
	.so-subscribe-message,
	.so-subscribe-success {
		box-sizing: border-box;
		width: 100%;
		max-width: 100%;
		margin-right: auto;
		margin-left: auto;
		text-align: center;
	}

	.so-subscribe-form input,
	.so-subscribe-form button[type="submit"] {
		display: block;
		box-sizing: border-box;
		width: 100%;
		max-width: 100%;
		min-width: 0;
		margin-right: auto;
		margin-left: auto;
	}

	.so-subscribe-close:not([hidden]) {
		position: fixed;
		z-index: 100000;
		display: block;
		box-sizing: border-box;
		width: 1.5rem;
		height: 1.5rem;
		margin: 0;
		padding: 0;
		appearance: none;
		border: 0;
		background: transparent;
		color: #000;
		cursor: pointer;
		font-family: var(--so-type-interface-family);
		font-size: 1.5rem;
		font-weight: 400;
		line-height: 1;
		text-align: center;
	}

	.so-subscribe-close:focus-visible {
		outline: var(--so-focus-width) solid var(--so-color-focus);
		outline-offset: 2px;
	}
}
