/*
 * Site-wide and property enquiry modal (shared).
 *
 * Extracted so marketing CTAs can open the same dialog off the property page.
 */

/*
 * Enquiry modal, as measured from the design at 1440 and 390: a 560 white card over a soft dark
 * veil, Name and Phone side by side above 810px, stacked below. Without JavaScript the Enquiry
 * button still opens the Contact page.
 */
.as-enquiry {
	position: fixed;
	inset: 0;
	display: grid;
	place-items: center;
	width: 100%;
	max-width: none;
	height: 100%;
	max-height: none;
	margin: 0;
	padding: 24px 16px;
	border: 0;
	background: transparent;
	overflow: auto;
	color: #101a2e;
}

.as-enquiry::backdrop {
	background: rgba(8, 12, 22, 0.45);
}

.as-enquiry:not([open]) {
	display: none;
}

.as-enquiry__panel {
	display: flex;
	flex-direction: column;
	gap: 24px;
	width: min(560px, 100%);
	padding: 36px 40px 40px;
	border-radius: 8px;
	background: var(--as-white);
	box-shadow: 0 24px 64px rgba(8, 12, 22, 0.28);
}

.as-enquiry__head {
	display: flex;
	gap: 16px;
	align-items: flex-start;
	justify-content: space-between;
}

.as-enquiry__titles {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	gap: 6px;
	min-width: 0;
}

.as-enquiry__title {
	margin: 0;
	font-size: 26px;
	font-weight: 500;
	line-height: 1.25;
	letter-spacing: -0.02em;
	color: #101a2e;
}

.as-enquiry__address {
	margin: 0;
	font-size: 14px;
	line-height: 1.4;
	color: var(--as-red);
}

.as-enquiry__close {
	display: flex;
	flex: 0 0 auto;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	padding: 0;
	border: 0;
	border-radius: 100px;
	background: transparent;
	color: #101a2e;
	cursor: pointer;
}

.as-enquiry__close:hover {
	background: rgb(16 26 46 / 6%);
}

.as-enquiry__close:focus-visible {
	outline: 2px solid #101a2e;
	outline-offset: 2px;
}

.as-enquiry__form {
	display: flex;
	flex-direction: column;
	gap: 14px;
}

.as-enquiry__row {
	display: flex;
	gap: 14px;
}

.as-enquiry__row > .as-enquiry__field {
	flex: 1 1 0;
	min-width: 0;
}

.as-enquiry__field {
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.as-enquiry__label {
	font-size: 14px;
	line-height: 1.4;
	color: #101a2e;
}

.as-enquiry__label--required {
	color: rgb(17 17 17 / 50%);
}

.as-enquiry__name {
	color: #101a2e;
}

.as-enquiry__input {
	display: block;
	width: 100%;
	height: 50px;
	margin: 0;
	padding: 14px;
	border: 0;
	border-radius: 4px;
	background: var(--as-white);
	box-shadow: inset 0 0 0 1px var(--as-page-border, #d7dbe3);
	font: inherit;
	font-size: 15px;
	line-height: 21px;
	color: #101a2e;
	appearance: none;
}

.as-enquiry__input--area {
	height: 120px;
	resize: vertical;
}

.as-enquiry__input::placeholder {
	color: rgb(17 17 17 / 45%);
	opacity: 1;
}

.as-enquiry__input:focus {
	outline: none;
	box-shadow: inset 0 0 0 1px #101a2e;
}

.as-enquiry__input:focus-visible {
	outline: 2px solid #101a2e;
	outline-offset: 2px;
}

.as-enquiry__input[aria-invalid="true"] {
	box-shadow: inset 0 0 0 1px var(--as-red);
}

.as-enquiry__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 12px 16px;
	align-items: center;
	justify-content: flex-end;
	padding-top: 6px;
}

.as-enquiry__status {
	flex: 1 1 200px;
	margin: 0;
	font-size: 14px;
	line-height: 1.4;
}

.as-enquiry__status.is-error {
	color: var(--as-red);
}

.as-enquiry__submit {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 16px 36px;
	border: 0;
	border-radius: 100px;
	background: var(--as-red);
	font: inherit;
	font-size: 16px;
	font-weight: 500;
	line-height: 1.4;
	color: var(--as-white);
	cursor: pointer;
	transition: background-color 0.2s ease;
}

.as-enquiry__submit:hover {
	background: var(--as-red-deep, #d30824);
}

.as-enquiry__submit:focus-visible {
	outline: 2px solid #101a2e;
	outline-offset: 2px;
}

@media (max-width: 809px) {
	.as-enquiry__panel {
		gap: 20px;
		padding: 28px 20px;
	}

	.as-enquiry__title {
		font-size: 22px;
		letter-spacing: -0.02em;
	}

	.as-enquiry__row {
		flex-direction: column;
	}

	.as-enquiry__submit {
		width: 100%;
	}
}

