/* ============================================
   DL MQR Contact Us — Figma design match
   ============================================ */

.mqr-contact-wrap {
	display: flex;
	flex-direction: row;
	gap: 30px;
	align-items: flex-start;
	padding: 90px 50px 60px;
	/* background-color: #F9FAFD; */
	/* border-bottom: 1px solid rgba(37, 45, 55, 0.2); */
	box-sizing: border-box;
	width: 100%;
}

/* ── Left column ── */

.mqr-contact-left {
	width: 429px;
	flex-shrink: 0;
	display: flex;
	flex-direction: column;
	gap: 50px;
	position: sticky;
	top: 100px;
	min-width: 0;
}

.mqr-contact-label {
	font-family: 'Montserrat', sans-serif;
	font-weight: 600;
	font-size: 24px;
	line-height: 1;
	color: #131920;
	margin: 0;
}

.mqr-contact-heading {
	font-family: 'Rasa', serif;
	font-weight: 500;
	font-size: 54px;
	line-height: 47px;
	color: #826D4F;
	margin: 0;
	word-wrap: break-word;
	overflow-wrap: break-word;
}

/* ── Right column ── */

.mqr-contact-right {
	flex: 1;
	min-width: 0;
}

/* ── Form layout ── */

.mqr-contact-form {
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.mqr-credentials-row {
	display: flex;
	gap: 16px;
	align-items: flex-start;
	width: 100%;
}

.mqr-credentials-row .mqr-field {
	flex: 1;
	min-width: 0;
}

/* ── Fields ── */

.mqr-field {
	display: flex;
	flex-direction: column;
	gap: 5px;
}

.mqr-field label {
	font-family: 'Montserrat', sans-serif;
	font-weight: 400;
	font-size: 14px;
	line-height: 21px;
	color: #787C80;
	display: block;
	margin: 0;
}

/* ── Input wrapper (icon + field) ── */

.mqr-input-wrap {
	position: relative;
	display: flex;
	align-items: center;
}

/* ── SVG icons via CSS ::before (avoids CF7 autop tag-replacement conflict) ── */

.mqr-input-name::before,
.mqr-input-email::before,
.mqr-input-message::before {
	content: '';
	position: absolute;
	left: 12px;
	width: 24px;
	height: 24px;
	background-repeat: no-repeat;
	background-size: contain;
	background-position: center;
	pointer-events: none;
	z-index: 1;
}

.mqr-input-name::before,
.mqr-input-email::before {
	top: 13px; /* (50px input height − 24px icon) / 2 — fixed so error tip below doesn't shift icon */
}

.mqr-input-message::before {
	top: 14px;
}

/* person / user icon */
.mqr-input-name::before {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23787C80' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Ccircle cx='12' cy='8' r='3'/%3E%3Cpath d='M6.5 20c0-3.038 2.462-5.5 5.5-5.5s5.5 2.462 5.5 5.5'/%3E%3C/svg%3E");
}

/* email / at icon */
.mqr-input-email::before {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23787C80' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='4'/%3E%3Cpath d='M16 8v5a3 3 0 0 0 6 0v-1a10 10 0 1 0-3.92 7.94'/%3E%3C/svg%3E");
}

/* speech bubble / message icon */
.mqr-input-message::before {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23787C80' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z'/%3E%3C/svg%3E");
}

/* ── Text inputs ── */

.mqr-field input[type="text"],
.mqr-field input[type="email"] {
	width: 100%;
	height: 50px;
	padding: 14px 12px 14px 44px;
	border: 1px solid #B1C5DA;
	border-radius: 10px;
	background: rgba(255, 255, 255, 0.01);
	-webkit-backdrop-filter: blur(4px);
	backdrop-filter: blur(4px);
	font-family: 'Montserrat', sans-serif;
	font-weight: 400;
	font-size: 16px;
	line-height: 23px;
	color: #131920;
	box-sizing: border-box;
	outline: none;
	-webkit-appearance: none;
	appearance: none;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.mqr-field input[type="text"]::placeholder,
.mqr-field input[type="email"]::placeholder {
	color: #787C80;
}

.mqr-field input[type="text"]:focus,
.mqr-field input[type="email"]:focus {
	border-color: #CAAB7D;
	box-shadow: 0 0 0 3px rgba(202, 171, 125, 0.15);
}

/* ── Textarea ── */

.mqr-field textarea {
	width: 100%;
	height: 128px;
	min-height: 128px;
	padding: 14px 12px 14px 44px;
	border: 1px solid #B1C5DA;
	border-radius: 10px;
	background: rgba(255, 255, 255, 0.01);
	-webkit-backdrop-filter: blur(4px);
	backdrop-filter: blur(4px);
	font-family: 'Montserrat', sans-serif;
	font-weight: 400;
	font-size: 16px;
	line-height: 23px;
	color: #131920;
	box-sizing: border-box;
	outline: none;
	resize: vertical;
	-webkit-appearance: none;
	appearance: none;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.mqr-field textarea::placeholder {
	color: #787C80;
}

.mqr-field textarea:focus {
	border-color: #CAAB7D;
	box-shadow: 0 0 0 3px rgba(202, 171, 125, 0.15);
}

/* ── Error states ── */

.mqr-field input.mqr-input-error,
.mqr-field textarea.mqr-input-error {
	border-color: #EC4545;
}

.mqr-field input.mqr-input-error:focus,
.mqr-field textarea.mqr-input-error:focus {
	box-shadow: 0 0 0 3px rgba(236, 69, 69, 0.15);
}

.mqr-field-error {
	font-family: 'Montserrat', sans-serif;
	font-size: 12px;
	line-height: 1.4;
	color: #EC4545;
	min-height: 17px;
	display: block;
}

/* ── Submit button ── */

.mqr-buttons-row {
	display: flex;
	gap: 16px;
	align-items: center;
	margin-top: 4px;
}

.mqr-buttons-row .mqr-submit-btn {
	background: linear-gradient(90deg, #CAAB7D 10%, #E7C797 90%);
	border: none;
	border-radius: 10px;
	width: 123px;
	padding: 12px 24px;
	cursor: pointer;
	font-family: 'Montserrat', sans-serif;
	font-weight: 600;
	font-size: 16px;
	line-height: 21px;
	color: #161109;
	text-align: center;
	transition: opacity 0.2s ease, transform 0.15s ease;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

.mqr-buttons-row .mqr-submit-btn:hover {
	opacity: 0.88;
	transform: translateY(-1px);
}

.mqr-buttons-row .mqr-submit-btn:active {
	transform: translateY(0);
	opacity: 1;
}

.mqr-buttons-row .mqr-submit-btn.loading {
	opacity: 0.65;
	cursor: not-allowed;
	transform: none;
}

/* ── Response message (Toastify fallback) ── */

#mqr-form-response {
	font-family: 'Montserrat', sans-serif;
	font-size: 14px;
	line-height: 1.5;
	padding: 4px 0;
	min-height: 20px;
}

#mqr-form-response.mqr-success {
	color: #2e7d32;
}

#mqr-form-response.mqr-error {
	color: #EC4545;
}

/* ============================================
   Responsive — large tablet (≤ 1024px)
   ============================================ */

@media (max-width: 1024px) {
	.mqr-contact-wrap {
		padding: 60px 40px 50px;
	}

	.mqr-contact-left {
		width: 340px;
	}

	.mqr-contact-heading {
		font-size: 44px;
	}
}

/* ============================================
   Responsive — tablet / mobile (≤ 900px)
   Stacks to single column here, not 768px,
   because tablets (768–900px) are too narrow
   for the two-column layout.
   ============================================ */

@media (max-width: 900px) {
	.mqr-contact-wrap {
		flex-direction: column;
		padding: 48px 28px 44px;
		gap: 28px;
		overflow-x: hidden;
		display: block;
	}

	.mqr-contact-left {
		width: 100%;
		flex-shrink: 1;
		position: static;
		gap: 16px;
	}

	.mqr-contact-right {
		margin-top:50px;
	}

	.mqr-contact-heading {
		font-size: 40px;
	}

	.mqr-credentials-row {
		flex-direction: row; /* keep side-by-side on large tablets */
		gap: 16px;
	}
}

/* ============================================
   Responsive — mobile portrait (≤ 640px)
   ============================================ */

@media (max-width: 640px) {
	.mqr-contact-wrap {
		padding: 40px 20px 36px;
		gap: 24px;
	}

	.mqr-contact-label {
		font-size: 20px;
	}

	.mqr-contact-heading {
		font-size: 34px;
	}

	.mqr-credentials-row {
		flex-direction: column; /* stack Name + Email on phones */
		gap: 16px;
	}

	.mqr-credentials-row .mqr-field {
		width: 100%;
		flex: none;
	}

	/* Full-width submit button on phones */
	.mqr-buttons-row .mqr-submit-btn {
		width: 100%;
	}
}

/* ============================================
   Responsive — small mobile (≤ 400px)
   ============================================ */

@media (max-width: 400px) {
	.mqr-contact-wrap {
		padding: 28px 16px 28px;
	}

	.mqr-contact-label {
		font-size: 18px;
	}

	.mqr-contact-heading {
		font-size: 28px;
	}

	.mqr-field input[type="text"],
	.mqr-field input[type="email"] {
		height: 48px;
		font-size: 15px;
	}

	.mqr-field textarea {
		font-size: 15px;
	}
}

/* ============================================
   Contact Form 7 overrides
   ============================================ */

/* Form element — replaces .mqr-contact-form flex column */
.mqr-contact-right .mqr-cf7-form {
	display: flex;
	flex-direction: column;
	gap: 16px;
	margin: 0;
}

/* CF7 wraps each field in a span — make it block so flex works */
.mqr-field .wpcf7-form-control-wrap {
	display: block;
	width: 100%;
}

/* CF7 autop wraps label and input in <p> — neutralize default p margins and sizing */
.mqr-field > p {
	margin: 0;
	width: 100%;
}

.mqr-input-wrap > p {
	width: 100%;
	margin: 0;
	padding: 0;
}

/* CF7 adds its own focus outline — defer to our styles */
.wpcf7 .mqr-field input[type="text"]:focus,
.wpcf7 .mqr-field input[type="email"]:focus,
.wpcf7 .mqr-field textarea:focus {
	outline: none;
}

/* CF7 invalid field state */
.wpcf7 .mqr-field input.wpcf7-not-valid,
.wpcf7 .mqr-field textarea.wpcf7-not-valid {
	border-color: #EC4545;
}

/* CF7 inline validation tip — matches our .mqr-field-error style */
.wpcf7 .wpcf7-not-valid-tip {
	font-family: 'Montserrat', sans-serif;
	font-size: 12px;
	line-height: 1.4;
	color: #EC4545;
	display: block;
	margin-top: 4px;
}

/* CF7 response bar at bottom — hidden, using Toastify instead */
.wpcf7-response-output {
	display: none !important;
}

/* CF7 spinner after submit button */
.wpcf7-spinner {
	display: none;
}

/* Submit button — CF7 renders as input[type=submit] */
.mqr-buttons-row input[type="submit"].mqr-submit-btn {
	-webkit-appearance: none;
	appearance: none;
	cursor: pointer;
}

/* Honeypot field — visually hidden, inaccessible to real users */
.mqr-hp-wrap {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	opacity: 0;
	overflow: hidden;
	pointer-events: none;
}

.mqr-hp-wrap .wpcf7-form-control-wrap,
.mqr-hp-wrap input {
	pointer-events: none;
}
