/* Sitewide modal (template-parts/contact-modal.php) — one instance in the
   DOM, opened from any .js-open-contact-modal button anywhere on the site.
   z-index above .site-header (100) and .mobile-nav (90) so it always sits
   on top regardless of what page/state it's opened from. */
/* display stays flex always (not display:none/flex toggled) so opacity/
   transform below can actually transition — display can't be animated,
   and visibility's own transition-delay is what removes this from the hit
   area and tab order once it's fully faded out, instead of doing that
   abruptly at the same instant the fade-out starts. */
.contact-modal {
	display: flex;
	position: fixed;
	inset: 0;
	z-index: 200;
	align-items: flex-start;
	justify-content: center;
	overflow-y: auto;
	padding: 96px var(--space-5) var(--space-6);
	visibility: hidden;
	opacity: 0;
	transition: opacity 0.25s ease, visibility 0s linear 0.25s;
}

.contact-modal.is-open {
	visibility: visible;
	opacity: 1;
	transition: opacity 0.25s ease;
}

.contact-modal__backdrop {
	position: fixed;
	inset: 0;
	z-index: 0;
	background: rgba(20, 23, 31, 0.55);
}

body.contact-modal-open {
	overflow: hidden;
}

/* Dialog animates on its own timeline, slower/springier than the plain
   backdrop fade above — starts slightly down + scaled down and settles
   into place with --ease-out's decelerated curve (no bounce, just a
   confident "arrival"), the entrance premium sites use instead of a flat
   fade or an abrupt pop-in. Closing reverses the same properties but
   quicker (0.18s vs 0.4s) — a fast dismissal reads as responsive, a slow
   one feels laggy. */
.contact-modal__dialog {
	position: relative;
	z-index: 1;
	width: 100%;
	max-width: 580px;
	background: var(--color-white);
	padding: var(--space-8) var(--space-7) var(--space-6);
	opacity: 0;
	transform: translateY(28px) scale(0.96);
	transition: opacity 0.18s ease, transform 0.18s ease;
}

.contact-modal.is-open .contact-modal__dialog {
	opacity: 1;
	transform: translateY(0) scale(1);
	transition: opacity 0.4s var(--ease-out), transform 0.4s var(--ease-out);
}

.contact-modal__close {
	position: absolute;
	top: var(--space-5);
	right: var(--space-5);
	background: none;
	border: none;
	padding: 0;
	line-height: 0;
	color: rgba(0, 0, 0, 0.35);
	transition: color 0.2s var(--ease-out);
}

.contact-modal__close:hover {
	color: var(--color-text-dark);
}

.contact-form__field {
	margin-bottom: var(--space-3);
}

.contact-form__field input,
.contact-form__field textarea {
	display: block;
	width: 100%;
	border: none;
	border-radius: 0;
	outline: none;
	background: #F5F5F5;
	padding: var(--space-4);
	font-family: inherit;
	font-size: 15px;
	color: var(--color-text-dark);
}

.contact-form__field input::placeholder,
.contact-form__field textarea::placeholder {
	color: var(--color-text-muted);
}

/* Filled state — :not(:placeholder-shown) matches once an input/textarea
   has real content (vs. still showing its placeholder). background-color
   (not the background shorthand) so this can't clobber anything else
   riding on the background property. */
.contact-form__field input:not(:placeholder-shown),
.contact-form__field textarea:not(:placeholder-shown) {
	background-color: #EBFFFE;
}

.contact-form__field textarea {
	resize: vertical;
	min-height: 96px;
}

/* --- Custom "Inquiry Type" listbox --------------------------------------
   Not a native <select>: its open popup is OS/browser chrome and can't be
   restyled (no border removal, no arbitrary background), which is exactly
   what this component needs to match the rest of the form's fields. */
.contact-form__select {
	position: relative;
}

.contact-form__select-trigger {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--space-3);
	width: 100%;
	border: none;
	background: #F5F5F5;
	padding: var(--space-4);
	font-family: inherit;
	font-size: 15px;
	color: var(--color-text-muted);
	text-align: left;
}

.contact-form__select-trigger svg {
	flex-shrink: 0;
	color: var(--color-text-muted);
	transition: transform 0.2s var(--ease-out);
}

.contact-form__select.is-open .contact-form__select-trigger svg {
	transform: rotate(180deg);
}

.contact-form__select.is-filled .contact-form__select-trigger {
	background-color: #EBFFFE;
	color: var(--color-text-dark);
}

.contact-form__select-list {
	position: absolute;
	top: calc(100% + 4px);
	left: 0;
	right: 0;
	z-index: 10;
	max-height: 240px;
	overflow-y: auto;
	margin: 0;
	padding: var(--space-2) 0;
	list-style: none;
	background: #F5F5F5;
	box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
}

.contact-form__select-list[hidden] {
	display: none;
}

.contact-form__select-option {
	padding: var(--space-3) var(--space-4);
	font-size: 15px;
	color: var(--color-text-dark);
	cursor: pointer;
}

.contact-form__select-option:hover,
.contact-form__select-option.is-active {
	background: #EBFFFE;
}

.contact-form__status {
	margin: 0 0 var(--space-3);
	min-height: 1em;
	font-size: 14px;
}

.contact-form__status.is-error {
	color: #C0392B;
}

.contact-form__status.is-success {
	color: var(--color-teal);
}

.contact-form__submit {
	display: block;
	width: 100%;
	border: none;
	border-radius: 0;
	background: var(--color-teal);
	color: var(--color-white);
	padding: var(--space-4);
	font-size: 14px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	transition: background 0.2s var(--ease-out);
}

.contact-form__submit:hover {
	background: var(--color-teal-light);
}

.contact-form__submit:disabled {
	opacity: 0.6;
	cursor: default;
}

@media (max-width: 640px) {
	.contact-modal {
		padding: 72px var(--space-4) var(--space-4);
	}

	.contact-modal__dialog {
		padding: var(--space-8) var(--space-4) var(--space-8);
	}
}
