/* AQ Contact — модальная форма заявки.
   Палитра — как в теме «antiquest»: #1F1F1F / #404040, Manrope, переходы .2s.
   Скругление задаётся переменной --aq-radius; строгий дизайн = 0.
   Индекс выше плавающей кнопки (.aq-fab = 9990). */

.aq-contact {
	--aq-radius: 0;
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
}

.aq-contact[hidden] {
	display: none;
}

.aq-contact *,
.aq-contact *::before,
.aq-contact *::after {
	box-sizing: border-box;
}

/* ------------------------------------------------------------------ */
/* Затемнение и появление                                              */
/* ------------------------------------------------------------------ */

.aq-contact__overlay {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.72);
	-webkit-backdrop-filter: blur(6px);
	backdrop-filter: blur(6px);
	opacity: 0;
	transition: opacity 0.25s ease;
}

.aq-contact__dialog {
	position: relative;
	width: min(520px, 100%);
	max-height: calc(100vh - 40px);
	overflow-y: auto;
	overscroll-behavior: contain;
	padding: 40px;
	border: 1px solid var(--wp--preset--color--accent-2, #404040);
	border-radius: var(--aq-radius);
	background: var(--wp--preset--color--accent-3, #1f1f1f);
	color: #ffffff;
	box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55);
	opacity: 0;
	transform: translateY(12px) scale(0.98);
	transition: opacity 0.25s ease, transform 0.25s cubic-bezier(0.2, 0.7, 0.3, 1);
}

.aq-contact.is-open .aq-contact__overlay,
.aq-contact.is-open .aq-contact__dialog {
	opacity: 1;
}

.aq-contact.is-open .aq-contact__dialog {
	transform: translateY(0) scale(1);
}

@media (prefers-reduced-motion: reduce) {
	.aq-contact__overlay,
	.aq-contact__dialog {
		transition: none;
	}
}

/* ------------------------------------------------------------------ */
/* Заголовки                                                           */
/* ------------------------------------------------------------------ */

.aq-contact__eyebrow {
	margin: 0 0 8px;
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 1.4px;
	text-transform: uppercase;
	color: var(--wp--preset--color--accent-1, #d9d9d9);
}

.aq-contact__title {
	margin: 0 0 24px;
	font-family: var(--wp--preset--font-family--manrope, Manrope, sans-serif);
	font-size: clamp(22px, 4vw, 28px);
	font-weight: 500;
	line-height: 1.2;
	letter-spacing: -0.1px;
	color: #ffffff;
}

/* ------------------------------------------------------------------ */
/* Поля                                                                 */
/* ------------------------------------------------------------------ */

.aq-contact__fields {
	display: grid;
	gap: 18px;
	margin: 0 0 28px;
}

.aq-contact__field {
	display: grid;
	gap: 8px;
	margin: 0;
}

.aq-contact__label {
	font-size: 14px;
	font-weight: 500;
	color: var(--wp--preset--color--accent-1, #d9d9d9);
	padding: 0;
}

.aq-contact__optional {
	font-weight: 300;
	color: var(--wp--preset--color--accent-4, #757575);
}

.aq-contact__input {
	width: 100%;
	margin: 0;
	padding: 14px 20px;
	border: 1px solid var(--wp--preset--color--accent-2, #404040);
	border-radius: var(--aq-radius);
	background: rgba(0, 0, 0, 0.35);
	color: #ffffff;
	font-family: inherit;
	font-size: 16px;
	line-height: 1.4;
	transition: border-color 0.2s ease, background-color 0.2s ease;
	/* iOS не зумит страницу при фокусе. */
	-webkit-appearance: none;
	appearance: none;
}

.aq-contact__input::placeholder {
	color: var(--wp--preset--color--accent-4, #757575);
}

.aq-contact__input:hover {
	border-color: var(--wp--preset--color--accent-4, #757575);
}

.aq-contact__input:focus {
	outline: none;
	border-color: #ffffff;
	background: rgba(0, 0, 0, 0.5);
}

.aq-contact__input--area {
	border-radius: var(--aq-radius);
	min-height: 96px;
	resize: vertical;
}

.aq-contact__input.is-invalid {
	border-color: #ff6b6b;
}

/* Honeypot: уводим за экран, но оставляем в DOM. */
.aq-contact__hp {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

/* ------------------------------------------------------------------ */
/* Выбор канала                                                         */
/* ------------------------------------------------------------------ */

.aq-contact__channels {
	margin: 0 0 28px;
	padding: 0;
	border: 0;
}

.aq-contact__label--channels {
	display: block;
	margin-bottom: 12px;
}

.aq-contact__channel-row {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

.aq-contact__channel {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	margin: 0;
	padding: 12px 20px;
	border: 1px solid var(--wp--preset--color--accent-2, #404040);
	border-radius: var(--aq-radius);
	background: transparent;
	color: var(--wp--preset--color--accent-1, #d9d9d9);
	font-family: inherit;
	font-size: 15px;
	font-weight: 500;
	line-height: 1;
	cursor: pointer;
	transition: border-color 0.2s ease, color 0.2s ease, background-color 0.2s ease;
	-webkit-appearance: none;
	appearance: none;
}

.aq-contact__channel:hover {
	border-color: var(--wp--preset--color--accent-4, #757575);
	color: #ffffff;
}

.aq-contact__channel[aria-checked="true"] {
	border-color: var(--aq-channel, #ffffff);
	background: color-mix(in srgb, var(--aq-channel, #ffffff) 14%, transparent);
	color: var(--aq-channel, #ffffff);
}

.aq-contact__channel-icon {
	display: block;
	width: 20px;
	height: 20px;
	line-height: 0;
}

.aq-contact__icon {
	display: block;
	width: 100%;
	height: 100%;
}

/* ------------------------------------------------------------------ */
/* Кнопка отправки и статус                                            */
/* ------------------------------------------------------------------ */

.aq-contact__submit {
	width: 100%;
	margin: 0;
	padding: 16px 24px;
	border: 1px solid transparent;
	border-radius: var(--aq-radius);
	background: #ffffff;
	color: #000000;
	font-family: inherit;
	font-size: 16px;
	font-weight: 600;
	line-height: 1.2;
	cursor: pointer;
	transition: background-color 0.2s ease, color 0.2s ease, opacity 0.2s ease, transform 0.2s ease;
	-webkit-appearance: none;
	appearance: none;
}

.aq-contact__submit:hover:not(:disabled) {
	background: var(--wp--preset--color--accent-1, #d9d9d9);
}

.aq-contact__submit:active:not(:disabled) {
	transform: scale(0.99);
}

.aq-contact__submit:disabled {
	opacity: 0.35;
	cursor: not-allowed;
}

.aq-contact__submit--ghost {
	margin-top: 8px;
	border-color: var(--wp--preset--color--accent-2, #404040);
	background: transparent;
	color: #ffffff;
}

.aq-contact__submit--ghost:hover {
	background: transparent;
	border-color: var(--wp--preset--color--accent-4, #757575);
}

.aq-contact__note {
	margin: 12px 0 0;
	font-size: 12px;
	line-height: 1.5;
	color: var(--wp--preset--color--accent-4, #757575);
	text-align: center;
}

.aq-contact__error {
	margin: 0 0 16px;
	padding: 12px 16px;
	border: 1px solid rgba(255, 107, 107, 0.4);
	border-radius: var(--aq-radius);
	background: rgba(255, 107, 107, 0.1);
	color: #ff9d9d;
	font-size: 14px;
	line-height: 1.5;
}

.aq-contact__error[hidden] {
	display: none;
}

/* ------------------------------------------------------------------ */
/* Экран успеха                                                         */
/* ------------------------------------------------------------------ */

.aq-contact__done[hidden] {
	display: none;
}

.aq-contact__done-text {
	margin: 0 0 20px;
	font-size: 16px;
	line-height: 1.6;
	color: var(--wp--preset--color--accent-1, #d9d9d9);
}

.aq-contact__fallback {
	margin: 0 0 24px;
	font-size: 14px;
	line-height: 1.5;
	color: var(--wp--preset--color--accent-4, #757575);
}

.aq-contact__clipboard {
	margin: 0 0 24px;
	padding: 12px 16px;
	border: 1px solid rgba(255, 255, 255, 0.25);
	font-size: 14px;
	line-height: 1.5;
	color: #ffffff;
}

.aq-contact__clipboard-again {
	margin: 8px 0 0;
	padding: 0;
	border: 0;
	border-bottom: 1px solid currentColor;
	background: none;
	font: inherit;
	color: inherit;
	cursor: pointer;
}

.aq-contact__fallback[hidden] {
	display: none;
}

.aq-contact__fallback a {
	color: #ffffff;
	text-underline-offset: 3px;
}

/* ------------------------------------------------------------------ */
/* Кнопка закрытия                                                      */
/* ------------------------------------------------------------------ */

.aq-contact__close {
	position: absolute;
	top: 16px;
	right: 16px;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	padding: 0;
	border: 1px solid var(--wp--preset--color--accent-2, #404040);
	border-radius: var(--aq-radius);
	background: transparent;
	color: #ffffff;
	cursor: pointer;
	transition: border-color 0.2s ease, background-color 0.2s ease;
	-webkit-appearance: none;
	appearance: none;
}

.aq-contact__close:hover {
	border-color: var(--wp--preset--color--accent-4, #757575);
	background: var(--wp--preset--color--accent-2, #404040);
}

.aq-contact__close svg {
	width: 18px;
	height: 18px;
}

/* ------------------------------------------------------------------ */
/* Телефон на мобильных                                                  */
/* ------------------------------------------------------------------ */

@media (max-width: 560px) {
	.aq-contact {
		padding: 0;
		align-items: flex-end;
	}

	.aq-contact__dialog {
		width: 100%;
		max-height: 92vh;
		padding: 32px 24px;
		border-radius: var(--aq-radius);
		border-bottom: 0;
		transform: translateY(24px);
	}
}

/* Модалка не должна мешать прокрутке страницы под ней. */
body.aq-contact-locked {
	overflow: hidden;
}