/* Site popup (include/site-popup.php, js/site-popup.js). Colors and type follow scss/_baseline.scss. */

.shc-popup[hidden] {
	display: none;
}

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

.shc-popup__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(32, 44, 50, 0.55);
	opacity: 0;
	transition: opacity 250ms ease-out;
}

.shc-popup__dialog {
	position: relative;
	width: 100%;
	max-width: 480px;
	max-height: calc(100vh - 48px);
	overflow-y: auto;
	background: #fff;
	color: #515151;
	font-family: 'proxima-nova', 'Helvetica Neue', Arial, sans-serif;
	box-shadow: 0 18px 50px rgba(0, 0, 0, 0.25);
	border-top: 4px solid #4a7687;
	opacity: 0;
	transform: translateY(16px);
	transition: opacity 250ms ease-out, transform 250ms ease-out;
}

.shc-popup.is-open .shc-popup__backdrop,
.shc-popup.is-open .shc-popup__dialog {
	opacity: 1;
	transform: none;
}

.shc-popup__dialog:focus {
	outline: none;
}

.shc-popup__close {
	position: absolute;
	top: 8px;
	right: 8px;
	z-index: 1;
	width: 40px;
	height: 40px;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.92);
	color: #335970;
	cursor: pointer;
	transition: background-color 200ms ease-in-out;
}

.shc-popup__close:hover {
	background: #d8e3e8;
}

.shc-popup__image img {
	display: block;
	width: 100%;
	height: auto;
	max-height: 260px;
	object-fit: cover;
}

.shc-popup__body {
	padding: 28px 32px 32px;
}

.shc-popup__heading {
	margin: 0 40px 12px 0;
	font-family: 'jaf-lapture-display', Georgia, serif;
	font-size: 28px;
	font-weight: normal;
	line-height: 1.2;
	color: #335970;
}

.shc-popup__image + .shc-popup__body .shc-popup__heading {
	margin-right: 0;
}

.shc-popup__message {
	margin: 0;
	font-size: 17px;
	line-height: 1.55;
}

.shc-popup__button {
	display: inline-block;
	min-width: 150px;
	margin-top: 22px;
	padding: 16px 25px;
	background-color: #4a7687;
	border-bottom: 2px solid #41748d;
	color: #fff !important;
	font-size: 15px;
	letter-spacing: 1px;
	text-align: center;
	text-transform: uppercase;
	text-decoration: none !important;
	transition: background-color 300ms ease-in-out;
}

.shc-popup__button:hover,
.shc-popup__button:focus {
	background-color: #335970;
	color: #fff;
}

/* The theme removes focus outlines site-wide; keyboard users need them here. */
.shc-popup__close:focus-visible,
.shc-popup__button:focus-visible {
	outline: 3px solid #335970 !important;
	outline-offset: 3px;
}

.shc-popup__button:focus-visible {
	outline-color: #a6bfc9 !important;
	box-shadow: 0 0 0 3px #335970;
}

/* Phones: a card along the bottom instead of a box over the page. */
@media (max-width: 599px) {
	.shc-popup {
		align-items: flex-end;
		padding: 12px;
	}

	.shc-popup__backdrop {
		background: rgba(32, 44, 50, 0.2);
	}

	.shc-popup__dialog {
		max-height: 70vh;
		box-shadow: 0 -4px 30px rgba(0, 0, 0, 0.25);
	}

	.shc-popup__image img {
		max-height: 140px;
	}

	.shc-popup__body {
		padding: 20px 20px 22px;
	}

	.shc-popup__heading {
		font-size: 23px;
		margin-bottom: 8px;
	}

	.shc-popup__message {
		font-size: 16px;
	}

	.shc-popup__button {
		display: block;
		margin-top: 16px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.shc-popup__backdrop,
	.shc-popup__dialog {
		transition: none;
	}
}
