/* Lead capture (inc/forms.php). Loaded only on pages that render a Contact Form 7 form. */

/* Visually hidden label. Also beats the theme's `.wpcf7-form label { width: 100% }`, which made it scroll phones sideways. */
.au-sr,
.wpcf7-form .au-sr {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* Phone number: country code + number (was WPCode #17431) */
.wpcf7 .phone-wrapper {
	display: flex;
	gap: 10px;
	align-items: flex-start;
}

.wpcf7 .phone-wrapper > [data-name="country-code"] {
	flex: 0 0 120px;
}

.wpcf7 .phone-wrapper > [data-name="your-phone"] {
	flex: 1;
	min-width: 0;
}

.wpcf7 .phone-wrapper select,
.wpcf7 .phone-wrapper input {
	width: 100%;
	border-radius: 6px;
}

/* Arabic forms: the theme aligns form text to the left (`.wpcf7-form`, `label`); follow the reading direction. */
.wpcf7[dir="rtl"] .wpcf7-form,
.wpcf7[dir="rtl"] .wpcf7-form label {
	text-align: start;
}

/* Numbers and addresses read left to right inside Arabic forms ("+20", not "20+") */
.wpcf7[dir="rtl"] input[type="tel"],
.wpcf7[dir="rtl"] input[type="email"] {
	direction: ltr;
	text-align: right;
}

.wpcf7[dir="rtl"] select[name="country-code"] {
	direction: ltr;
}

/* Services "Request Service" dialog (was WPCode #17440) */
html:has(.au-dialog[open]) {
	overflow: hidden;
}

.au-dialog {
	width: min(620px, calc(100% - 30px));
	max-width: none;
	max-height: calc(100dvh - 40px);
	padding: 0;
	border: 0;
	background: transparent;
	color: #fff;
	overflow: visible;
}

.au-dialog::backdrop {
	background: rgba(0, 0, 0, 0.72);
	backdrop-filter: blur(6px);
}

.au-dialog__box {
	position: relative;
	max-height: calc(100dvh - 40px);
	overflow-y: auto;
	padding: 34px;
	background: #080808;
	border: 1px solid rgba(255, 255, 255, 0.12);
	border-radius: 18px;
	box-shadow: 0 30px 90px rgba(0, 0, 0, 0.45);
}

.au-dialog__close {
	position: absolute;
	top: 16px;
	inset-inline-end: 18px;
	width: 38px;
	height: 38px;
	padding: 0;
	border: 1px solid rgba(255, 255, 255, 0.18);
	border-radius: 50%;
	background: transparent;
	color: #fff;
	font-size: 28px;
	line-height: 1;
	cursor: pointer;
}

.au-dialog :focus-visible {
	outline: 2px solid var(--au-brand, #3cc0c6);
	outline-offset: 2px;
}

.au-dialog__title {
	margin: 0 0 8px;
	padding-inline-end: 48px;
	color: #fff;
	font-size: 30px;
	line-height: 1.2;
}

.au-dialog__category {
	margin: 0 0 24px;
	color: var(--au-brand, #3cc0c6);
	font-weight: 700;
}

.au-service-form p {
	margin: 0 0 16px;
}

/* Field labels, light on the dark box. The site-wide CF7 label rules (dark ink, margin-bottom: -20px !important
   in site.css, from the old Additional CSS) are for the white contact page, hence the !important here. */
.au-dialog .au-field label,
.au-dialog .au-service-form legend {
	display: block;
	margin-bottom: 8px !important;
	color: rgba(255, 255, 255, 0.82);
	font-size: 14px;
	font-weight: 600;
}

.au-service-form input[type="text"],
.au-service-form input[type="tel"],
.au-service-form input[type="email"],
.au-service-form select,
.au-service-form textarea {
	width: 100%;
	padding: 13px 14px;
	background: #111;
	color: #fff;
	border: 1px solid rgba(255, 255, 255, 0.14);
	border-radius: 10px;
}

.au-service-form input:focus,
.au-service-form select:focus,
.au-service-form textarea:focus {
	border-color: var(--au-brand, #3cc0c6);
}

.au-service-form fieldset {
	min-width: 0;
	margin: 0 0 22px;
	padding: 0;
	border: 0;
}

.au-service-form .wpcf7-checkbox {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 10px;
}

.au-service-form .wpcf7-list-item {
	margin: 0;
}

.au-service-form .wpcf7-list-item[hidden] {
	display: none;
}

.au-service-form .wpcf7-list-item label {
	display: flex;
	gap: 10px;
	align-items: center;
	height: 100%;
	margin: 0;
	padding: 12px;
	background: #111;
	border: 1px solid rgba(255, 255, 255, 0.12);
	border-radius: 12px;
	color: #fff;
	font-weight: 400;
	cursor: pointer;
}

.au-service-form .wpcf7-list-item input {
	flex: 0 0 auto;
	margin: 0;
	accent-color: var(--au-brand, #3cc0c6);
}

.au-service-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 14px;
}

.au-service-form .wpcf7-submit {
	width: 100%;
	padding: 15px 20px;
	background: var(--au-brand, #3cc0c6);
	color: var(--au-on-brand, #111);
	border: 0;
	border-radius: 12px;
	font-weight: 800;
	cursor: pointer;
}

.au-service-form .wpcf7-submit:hover {
	opacity: 0.92;
}

@media (max-width: 767px) {
	.au-dialog__box {
		padding: 28px 20px;
	}

	.au-dialog__title {
		font-size: 24px;
	}

	.au-service-grid,
	.au-service-form .wpcf7-checkbox {
		grid-template-columns: 1fr;
	}
}
