/* =================================================================
   Emerald Enquiry Form
   ================================================================= */

   .emerald-enquiry {
	box-sizing: border-box;
	width: 100%;
	padding: 40px;
	border-radius: 20px;
	background: #ffffff;
	box-shadow: 0 12px 40px rgba(31, 45, 42, 0.1);
}

.emerald-enquiry__grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 20px 24px;
}

.emerald-enquiry__field {
	display: flex;
	flex-direction: column;
	gap: 8px;
	min-width: 0;
}

.emerald-enquiry__field--full {
	grid-column: 1 / -1;
}

.emerald-enquiry__label {
	margin: 0;
	color: var(--emerald-heading-color, #1f2d2a);
	font-family: 'Manrope', sans-serif;
	font-size: 14px;
	font-weight: 700;
	line-height: 1.3;
}

.emerald-enquiry__req {
	color: #e24b4b;
}

.emerald-enquiry__input {
	display: block;
	width: 100%;
	box-sizing: border-box;
	padding: 14px 16px;
	border: 1px solid #e3e7e5;
	border-radius: 12px;
	background: #f7f8f8;
	color: var(--emerald-text-color, #1f2d2a);
	font-family: 'Source Sans 3', sans-serif;
	font-size: 15px;
	line-height: 1.4;
	appearance: none;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.emerald-enquiry__input::placeholder {
	color: #9aa3a1;
}

.emerald-enquiry__input:focus {
	outline: none;
	border-color: var(--emerald-primary-color, #41a48f);
	box-shadow: 0 0 0 3px rgba(65, 164, 143, 0.18);
	background: #ffffff;
}

.emerald-enquiry__textarea {
	min-height: 140px;
	resize: vertical;
}

.emerald-enquiry__select-wrap {
	position: relative;
}

.emerald-enquiry__select-wrap::after {
	content: "";
	position: absolute;
	top: 50%;
	right: 16px;
	width: 8px;
	height: 8px;
	border-right: 2px solid #6b7a75;
	border-bottom: 2px solid #6b7a75;
	transform: translateY(-60%) rotate(45deg);
	pointer-events: none;
}

.emerald-enquiry__select {
	padding-right: 40px;
	cursor: pointer;
}

.emerald-enquiry__consents {
	display: flex;
	flex-direction: column;
	gap: 0;
	margin-top: 28px;
}

.emerald-enquiry__check {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	padding: 16px 0;
	margin: 0;
	cursor: pointer;
	color: var(--emerald-text-color, #1f2d2a);
	font-size: 14px;
	line-height: 1.45;
}

.emerald-enquiry__check + .emerald-enquiry__check {
	border-top: 1px solid #e8e9ec;
}

.emerald-enquiry__check input {
	position: absolute;
	opacity: 0;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.emerald-enquiry__check-box {
	position: relative;
	flex: 0 0 20px;
	width: 20px;
	height: 20px;
	margin-top: 1px;
	border: 1.5px solid #1f2d2a;
	border-radius: 4px;
	background: #ffffff;
	box-sizing: border-box;
}

.emerald-enquiry__check input:checked + .emerald-enquiry__check-box {
	background: #1f2d2a;
	border-color: #1f2d2a;
}

.emerald-enquiry__check input:checked + .emerald-enquiry__check-box::after {
	content: "";
	position: absolute;
	left: 6px;
	top: 2px;
	width: 5px;
	height: 10px;
	border: solid #ffffff;
	border-width: 0 2px 2px 0;
	transform: rotate(45deg);
}

.emerald-enquiry__check-text a {
	color: inherit;
	text-decoration: underline;
	text-underline-offset: 2px;
}

.emerald-enquiry__actions {
	display: flex;
	justify-content: center;
	margin-top: 28px;
}

.emerald-enquiry__submit {
	cursor: pointer;
}

.emerald-enquiry__submit:disabled {
	opacity: 0.65;
	cursor: wait;
	transform: none;
	filter: none;
}

.emerald-enquiry__status {
	margin-top: 18px;
	padding: 12px 16px;
	border-radius: 10px;
	font-size: 14px;
	line-height: 1.4;
	text-align: center;
}

.emerald-enquiry__status.is-success {
	background: rgba(65, 164, 143, 0.12);
	color: #1d5f51;
}

.emerald-enquiry__status.is-error {
	background: rgba(226, 75, 75, 0.1);
	color: #b42318;
}

.emerald-enquiry__field.is-invalid .emerald-enquiry__input {
	border-color: #e24b4b;
}

/* Consent confirmation modal */
.emerald-enquiry__modal {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
	box-sizing: border-box;
}

.emerald-enquiry__modal[hidden] {
	display: none !important;
}

.emerald-enquiry__modal-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(18, 40, 34, 0.55);
	-webkit-backdrop-filter: blur(6px);
	backdrop-filter: blur(6px);
}

.emerald-enquiry__modal-dialog {
	position: relative;
	z-index: 1;
	width: 100%;
	max-width: 520px;
	max-height: min(80vh, 640px);
	overflow: auto;
	padding: 28px 28px 24px;
	border-radius: 18px;
	background: #ffffff;
	box-shadow: 0 20px 50px rgba(31, 45, 42, 0.22);
	box-sizing: border-box;
}

.emerald-enquiry__modal-close {
	position: absolute;
	top: 12px;
	right: 14px;
	width: 36px;
	height: 36px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: #6b7a75;
	font-size: 28px;
	line-height: 1;
	cursor: pointer;
}

.emerald-enquiry__modal-title {
	margin: 0 36px 14px 0;
	color: var(--emerald-heading-color, #1f2d2a);
	font-family: 'Manrope', sans-serif;
	font-size: 20px;
	font-weight: 700;
	line-height: 1.3;
}

.emerald-enquiry__modal-body {
	margin: 0 0 24px;
	color: var(--emerald-text-color, #1f2d2a);
	font-size: 15px;
	line-height: 1.6;
}

.emerald-enquiry__modal-actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: flex-end;
	gap: 12px;
}

.emerald-enquiry__modal-cancel {
	padding: 10px 16px;
	border: 0;
	border-radius: 999px;
	background: transparent;
	color: #6b7a75;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
}

.emerald-enquiry__modal-confirm {
	cursor: pointer;
	padding: 4px 16px 4px 16px;
}

.emerald-enquiry__modal button{
	outline: none;
}

body.emerald-enquiry-modal-open {
	overflow: hidden;
}

@media (max-width: 767px) {
	.emerald-enquiry {
		padding: 24px 20px;
	}

	.emerald-enquiry__grid {
		grid-template-columns: 1fr;
		gap: 16px;
	}

	.emerald-enquiry__modal {
		padding: 16px;
		align-items: center;
	}

	.emerald-enquiry__modal-dialog {
		padding: 24px 20px 20px;
		border-radius: 18px 18px 12px 12px;
		max-height: 85vh;
	}

	.emerald-enquiry__modal-actions {
		justify-content: flex-end;
	}

	.emerald-enquiry__modal-confirm {
		justify-content: center;
	}
}
