.after-hours-popup {
	position: fixed;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 2rem;
	z-index: 10000;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.2s ease, visibility 0.2s ease;
}

.after-hours-popup.is-visible {
	opacity: 1;
	visibility: visible;
}

.after-hours-popup__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.72);
}

.after-hours-popup__dialog {
	position: relative;
	width: min(100%, 42rem);
	max-height: calc(100vh - 4rem);
	overflow: auto;
	background: var(--light);
	color: var(--dark);
	box-shadow: var(--box-shadow);
}

.after-hours-popup__content {
	padding: 3rem;
}

.after-hours-popup__content h2 {
	position: relative;
	padding: 1.1875rem 1rem 1rem 1.8125rem;
	font-size: 2.1875rem;
	text-transform: uppercase;
}

.after-hours-popup__content h2:before {
	content: "";
	position: absolute;
	bottom: 0;
	left: 0;
	width: 0.625rem;
	height: 100%;
	background: var(--red);
}

.after-hours-popup__content p {
	margin: 1.5rem 0;
}

.after-hours-popup__close {
	position: absolute;
	top: 1rem;
	right: 1rem;
	width: 2.5rem;
	height: 2.5rem;
	padding: 0;
	background: transparent;
	z-index: 1;
}

.after-hours-popup__close:before,
.after-hours-popup__close:after {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	width: 1.5rem;
	height: 3px;
	background: var(--dark);
	transform-origin: center;
}

.after-hours-popup__close:before {
	transform: translate(-50%, -50%) rotate(45deg);
}

.after-hours-popup__close:after {
	transform: translate(-50%, -50%) rotate(-45deg);
}

.after-hours-popup__close:hover {
	background: transparent;
}

.after-hours-popup__form form {
	display: grid;
	grid-template-columns: 1fr;
	gap: 0.5rem;
	margin-top: 1rem;
}

.after-hours-popup__form label {
	display: block;
	font-size: 0;
	line-height: 0;
	margin: 0;
}

.after-hours-popup__form label .wpcf7-form-control-wrap {
	display: block;
	font-size: 1rem;
	line-height: 1;
}

.after-hours-popup__contact-row {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
	gap: 0.75rem;
	align-items: center;
}

.after-hours-popup__contact-row span {
	font-weight: 600;
	text-align: center;
}

.after-hours-popup__form input[type="text"],
.after-hours-popup__form input[type="email"],
.after-hours-popup__form input[type="tel"],
.after-hours-popup__form textarea {
	max-width: none;
	background: var(--dark);
	color: var(--light);
	padding: 1rem 2rem;
	border-radius: 2rem;
}

.after-hours-popup__form textarea {
	min-height: 7rem;
	border-radius: 1.5rem;
}

.after-hours-popup__form .wpcf7-submit {
	margin-top: 0.5rem;
}

.after-hours-popup__form .wpcf7-response-output {
	border: none;
	margin: 1rem 0 0;
	padding: 0;
}

.after-hours-popup__form .wpcf7-not-valid-tip {
	font-size: 0.875rem;
	line-height: 1.2;
	margin-top: 0.25rem;
}

body.after-hours-popup-open {
	overflow: hidden;
}

@media screen and (max-width: 40rem) {

	.after-hours-popup {
		padding: 1rem;
	}

	.after-hours-popup__dialog {
		max-height: calc(100vh - 2rem);
	}

	.after-hours-popup__content {
		padding: 2rem;
	}

	.after-hours-popup__content h2 {
		font-size: 1.5625rem;
		padding-right: 2rem;
	}

	.after-hours-popup__contact-row {
		grid-template-columns: 1fr;
		gap: 0.5rem;
	}
}
