/**
 * Front page: блок «Зв'яжіться з нами» + Contact Form 7 (BEM: fazis-contact).
 */

.fazis-contact {
	--fazis-contact-navy: rgb(0 16 53);
	--fazis-contact-surface: rgb(226 238 255);
	--fazis-contact-label: rgb(8 31 69);
	--fazis-contact-body: rgb(19 43 82);
	--fazis-contact-placeholder: rgb(190 204 223);
	--fazis-contact-blue: rgb(35 101 255);
}

.fazis-contact__layout {
	display: flex;
	flex-direction: row;
	align-items: stretch;
	gap: clamp(1.5rem, 2vw, 2.25rem);
	width: 100%;
}

.fazis-contact__intro {
	flex: 1 1 0;
	align-self: stretch;
	min-height: 22rem;
	background-color: var(--fazis-contact-navy);
	background-image: url("../images/contact-intro-bg-desktop.webp");
	background-repeat: no-repeat;
	background-size: cover;
	background-position: center;
	border-radius: 1rem;
	overflow: hidden;
	padding: clamp(2rem, 4vw, 4rem);
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 1.5rem;
	box-sizing: border-box;
}

.fazis-contact__intro-title {
	margin: 0;
	color: rgb(255 255 255);
	font-size: clamp(2.25rem, 2.5vw + 1.5rem, 4rem);
	font-weight: 700;
	line-height: 1.15;
	text-align: left;
}

.fazis-contact__lede {
	margin: 0;
	color: rgb(255 255 255);
	font-size: clamp(0.875rem, 0.25vw + 0.8rem, 1.25rem);
	line-height: 1.5;
	text-align: left;
}

.fazis-contact__form {
	flex: 0 1 43.75rem;
	width: 100%;
	max-width: 100%;
	align-self: stretch;
	background-color: var(--fazis-contact-surface);
	border: 1px solid var(--fazis-contact-surface);
	border-radius: 1rem;
	padding: clamp(1.5rem, 2vw, 2.25rem);
	box-sizing: border-box;
}

.fazis-contact__form .wpcf7 {
	margin: 0;
}

.fazis-contact__form .wpcf7-form {
	display: flex;
	flex-direction: column;
	gap: 1.5rem;
	align-items: stretch;
	margin: 0;
}

.fazis-contact__form .wpcf7-form > p {
	margin: 0;
	width: 100%;
}

.fazis-contact__form .wpcf7-form label {
	display: block;
	width: 100%;
	color: var(--fazis-contact-label);
	font-size: clamp(0.875rem, 0.1vw + 0.82rem, 1rem);
	line-height: 1.3;
}

.fazis-contact__form .wpcf7-form-control-wrap {
	display: block;
	width: 100%;
	margin-top: 0.375rem;
}

.fazis-contact__form .wpcf7-form-control-wrap:not(:has(.wpcf7-tel)) .wpcf7-form-control.wpcf7-text,
.fazis-contact__form .wpcf7-form-control-wrap:not(:has(.wpcf7-tel)) .wpcf7-form-control.wpcf7-email,
.fazis-contact__form .wpcf7-form-control-wrap:not(:has(.wpcf7-tel)) textarea.wpcf7-form-control {
	width: 100%;
	min-height: 3rem;
	padding: 0.625rem 0.875rem;
	font-family: inherit;
	font-size: 1rem;
	line-height: 1.5;
	color: var(--fazis-contact-label);
	background-color: rgb(255 255 255);
	border: 1px solid var(--fazis-contact-surface);
	border-radius: 0.5rem;
	box-sizing: border-box;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.fazis-contact__form .wpcf7-form-control-wrap:not(:has(.wpcf7-tel)) textarea.wpcf7-form-control {
	max-height: 6rem;
	resize: vertical;
}

.fazis-contact__form .wpcf7-form-control-wrap:not(:has(.wpcf7-tel)) .wpcf7-form-control:focus,
.fazis-contact__form .wpcf7-form-control-wrap:not(:has(.wpcf7-tel)) textarea.wpcf7-form-control:focus {
	outline: none;
	border-color: rgb(35 101 255);
	box-shadow: 0 0 0 1px rgb(35 101 255);
}

.fazis-contact__form ::placeholder {
	color: var(--fazis-contact-placeholder);
	opacity: 1;
}

/* Телефон: базові стилі, якщо браузер не підтримує :has() для комбінованого рядка з прапором */
.fazis-contact__form .wpcf7-form-control-wrap .wpcf7-tel {
	width: 100%;
	min-height: 3rem;
	padding: 0.625rem 0.875rem;
	font-family: inherit;
	font-size: 1rem;
	line-height: 1.5;
	color: var(--fazis-contact-label);
	background-color: rgb(255 255 255);
	border: 1px solid var(--fazis-contact-surface);
	border-radius: 0.5rem;
	box-sizing: border-box;
}

.fazis-contact__form .wpcf7-form-control-wrap:has(.wpcf7-tel) {
	display: flex;
	flex-direction: row;
	align-items: center;
	gap: 0.5rem;
	margin-top: 0.375rem;
	padding: 0.625rem 0.875rem;
	min-height: 3rem;
	background-color: rgb(255 255 255);
	border: 1px solid var(--fazis-contact-surface);
	border-radius: 0.5rem;
	box-sizing: border-box;
}

/* .fazis-contact__form .wpcf7-form-control-wrap:has(.wpcf7-tel)::before {
	content: "";
	flex-shrink: 0;
	width: 1.25rem;
	height: 0.875rem;
	background: url("../images/ua-flag.svg") center / cover no-repeat;
	border-radius: 1px;
} */

.fazis-contact__form .wpcf7-form-control-wrap:has(.wpcf7-tel) .wpcf7-tel {
	flex: 1 1 auto;
	min-width: 0;
	min-height: 0;
	padding: 0;
	font-family: inherit;
	font-size: 1rem;
	line-height: 1.5;
	color: var(--fazis-contact-label);
	background-color: transparent;
	border: none;
	box-shadow: none;
}

.fazis-contact__form .wpcf7-form-control-wrap:has(.wpcf7-tel) .wpcf7-tel:focus {
	outline: none;
}

.fazis-contact__form .wpcf7-form-control-wrap:has(.wpcf7-tel):focus-within {
	border-color: rgb(35 101 255);
	box-shadow: 0 0 0 1px rgb(35 101 255);
}

.fazis-contact__form span.wpcf7-list-item {
	margin: 0;
}

.fazis-contact__form .wpcf7-acceptance .wpcf7-list-item label,
.fazis-contact__form .wpcf7-checkbox .wpcf7-list-item label {
	display: flex;
	flex-direction: row;
	align-items: flex-start;
	gap: 0.5rem;
	font-size: 0.875rem;
	line-height: 1.45;
	color: var(--fazis-contact-label);
	cursor: pointer;
}

.fazis-contact__form .wpcf7-acceptance input[type="checkbox"],
.fazis-contact__form .wpcf7-checkbox input[type="checkbox"] {
	width: 1.125rem;
	height: 1.125rem;
	margin: 0.1rem 0 0;
	flex-shrink: 0;
	accent-color: var(--fazis-contact-blue);
	cursor: pointer;
}

.fazis-contact__form .wpcf7-form > p:has(.wpcf7-submit) {
	display: flex;
	justify-content: flex-end;
	width: 100%;
	position: relative;
}

.wpcf7-spinner{
	position: absolute;
    left: 0;
}

.fazis-contact__form input.wpcf7-submit {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 3.5rem;
	padding: 0.5rem 2.25rem;
	font-family: inherit;
	font-size: 1.25rem;
	font-weight: 700;
	line-height: 1.25;
	color: rgb(255 255 255);
	background-color: var(--fazis-contact-blue);
	border: none;
	border-radius: 2.5rem;
	cursor: pointer;
	transition: background-color 0.15s ease;
}

.fazis-contact__form input.wpcf7-submit:hover,
.fazis-contact__form input.wpcf7-submit:focus-visible {
	background-color: rgb(29 84 214);
}

.fazis-contact__form input.wpcf7-submit:focus-visible {
	outline: 2px solid rgb(255 255 255);
	outline-offset: 2px;
}

.fazis-contact__form .wpcf7-not-valid-tip {
	margin-top: 0.375rem;
	font-size: 0.8125rem;
	color: rgb(185 28 28);
}

.fazis-contact__form .wpcf7-response-output {
	margin: 0;
	padding: 0.75rem 1rem;
	font-size: 0.875rem;
	border-radius: 0.5rem;
	box-sizing: border-box;
}

.fazis-contact__form .wpcf7-spinner {
	margin: 0 0 0 0.5rem;
}

.fazis-contact__missing {
	margin: 0;
	color: var(--fazis-contact-label);
	font-size: 0.875rem;
	line-height: 1.5;
}

@media (max-width: 550px) {
	.fazis-contact__layout {
		flex-direction: column;
	}

	.fazis-contact__intro {
		min-height: 12.5rem;
		background-image: url("../images/contact-intro-bg-mobile.webp");
		align-items: center;
		padding: 2.25rem 1.5rem;
		flex: 1 1 100%;
	}

	.fazis-contact__intro-title,
	.fazis-contact__lede {
		text-align: center;
	}

	.fazis-contact__form .wpcf7-form > p:has(.wpcf7-submit) {
		justify-content: stretch;
	}

	.fazis-contact__form input.wpcf7-submit {
		width: 100%;
		min-height: 2.75rem;
		font-size: 1rem;
	}
}
