/* ======================================================================
   АТЛАС — формы заявок (Долг 51 · v1 · 07.10.2026)
   Вид меняется ЗДЕСЬ: цвета, скругления, размеры — переменными ниже.
   Три стиля: .af--light (светлая карточка), .af--dark (тёмный блок),
   .af--sidebar (без своей рамки — внутри рамки сайдбара карточки товара).
   После правки — W3TC «Очистить все кэши» (версия файла меняется сама).
   ====================================================================== */
.af {
	--af-accent: #d2281e;          /* фирменный красный (кнопка, звёздочка, фокус) */
	--af-accent-hover: #b51f16;
	--af-accent-text: #fff;
	--af-text: #2b2b2b;
	--af-muted: #5f5f5f;           /* подсказки — контраст 6:1 на белом */
	--af-line: #8a8a8a;            /* рамка поля */
	--af-line-soft: #e3e3e3;       /* рамка карточки, разделитель */
	--af-bg: #fff;
	--af-field-bg: #fff;
	--af-error: #b3261e;
	--af-error-bg: #fdf3f2;
	--af-ok: #1e7b3c;
	--af-radius: 4px;              /* скругление полей и кнопки */
	--af-card-radius: 6px;         /* скругление карточки формы */
	--af-gap: 16px;                /* расстояние между полями */
	--af-field-h: 46px;            /* высота поля */
	--af-btn-h: 48px;              /* высота кнопки */
	--af-focus: 0 0 0 3px rgba(210, 40, 30, .22);
	font-size: 16px;
	line-height: 1.45;
	color: var(--af-text);
	box-sizing: border-box;
	position: relative;
}
.af *, .af *::before, .af *::after { box-sizing: border-box; }
.af [hidden] { display: none !important; }

/* --- стили-обёртки --- */
.af--light {
	background: var(--af-bg);
	border: 1px solid var(--af-line-soft);
	border-radius: var(--af-card-radius);
	padding: 24px;
	margin: 24px 0;
	max-width: 680px;
}
.af--dark {
	--af-bg: #1a1a1a;
	--af-text: #f2f2f2;
	--af-muted: #c4c4c4;
	--af-line: #707070;
	--af-line-soft: #333;
	--af-field-bg: #262626;
	--af-error: #ff9b91;
	--af-error-bg: #2d1a19;
	background: var(--af-bg);
	border-radius: var(--af-card-radius);
	padding: 24px;
	margin: 24px 0;
	max-width: 680px;
}
.af--sidebar { padding: 0; margin: 0; }

/* --- заголовок и строка «Авто» --- */
.af .af__title {
	margin: 0 0 18px;
	padding: 0;
	font-size: 21px;
	font-weight: 500;
	font-style: normal;
	line-height: 1.3;
	text-transform: none;
	color: var(--af-text);
}
.af__product {
	display: flex;
	flex-direction: column;
	gap: 2px;
	margin: 0 0 var(--af-gap);
	padding: 10px 12px;
	background: #f4f4f4;
	border-left: 3px solid var(--af-accent);
	border-radius: 0 var(--af-radius) var(--af-radius) 0;
}
.af__product-k { font-size: 12px; letter-spacing: .5px; text-transform: uppercase; color: var(--af-muted); }
.af__product-v { font-weight: 500; line-height: 1.35; word-break: break-word; }

/* --- поля --- */
.af__field { margin: 0 0 var(--af-gap); }
.af .af__label {
	display: block;
	margin: 0 0 6px;
	font-size: 15px;
	font-weight: 500;
	line-height: 1.3;
	color: var(--af-text);
}
.af__req { color: var(--af-accent); margin-left: 3px; }
.af__opt { margin-left: 8px; font-size: 13px; font-weight: 400; color: var(--af-muted); }
.af .af__input {
	display: block;
	width: 100%;
	height: var(--af-field-h);
	margin: 0;
	padding: 10px 12px;
	font: inherit;
	font-size: 16px;            /* 16px — iPhone не увеличивает страницу при вводе */
	line-height: 1.3;
	color: var(--af-text);
	background: var(--af-field-bg);
	border: 2px solid var(--af-line);
	border-radius: var(--af-radius);
	box-shadow: none;
	outline: 0;
	-webkit-appearance: none;
	appearance: none;
	transition: border-color .15s ease, box-shadow .15s ease;
}
.af textarea.af__input { height: auto; min-height: 112px; resize: vertical; line-height: 1.45; }
.af .af__input:focus { border-color: var(--af-accent); box-shadow: var(--af-focus); }
.af .af__input::placeholder { color: #8f8f8f; opacity: 1; }
.af .af__hint { margin: 6px 0 0; font-size: 13px; line-height: 1.4; color: var(--af-muted); }
.af .af__err { margin: 6px 0 0; font-size: 14px; font-weight: 500; line-height: 1.35; color: var(--af-error); }
.af__field--err .af__input { border-color: var(--af-error); background: var(--af-error-bg); }

/* --- кнопка --- */
.af .af__btn {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	width: 100%;
	min-height: var(--af-btn-h);
	margin: 4px 0 0;
	padding: 10px 20px;
	font: inherit;
	font-size: 16px;
	font-weight: 500;
	letter-spacing: 1px;
	line-height: 1.2;
	text-transform: uppercase;
	color: var(--af-accent-text);
	background: var(--af-accent);
	border: 0;
	border-radius: var(--af-radius);
	box-shadow: none;
	cursor: pointer;
	transition: background-color .15s ease;
}
.af .af__btn:hover { background: var(--af-accent-hover); color: var(--af-accent-text); }
.af .af__btn:focus { outline: 0; }
.af .af__btn:focus-visible { outline: 3px solid #1a1a1a; outline-offset: 2px; }
.af--dark .af__btn:focus-visible { outline-color: #fff; }
.af .af__btn[disabled] { cursor: progress; opacity: .88; }
.af__spin {
	display: none;
	width: 18px;
	height: 18px;
	border: 2px solid rgba(255, 255, 255, .45);
	border-top-color: #fff;
	border-radius: 50%;
	animation: af-spin .8s linear infinite;
}
.af__btn--busy .af__spin { display: inline-block; }
@keyframes af-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .af__spin { animation-duration: 2.4s; } }

.af .af__status { margin: 10px 0 0; font-size: 14px; line-height: 1.4; color: var(--af-error); }
.af .af__status:empty { display: none; }
.af .af__noscript { margin: 10px 0 0; font-size: 14px; color: var(--af-muted); }

/* --- ловушка для ботов: людям не видна --- */
.af .af__hp {
	position: absolute !important;
	left: -10000px !important;
	top: auto !important;
	width: 1px !important;
	height: 1px !important;
	overflow: hidden !important;
}

/* --- «Или напишите / позвоните» --- */
.af__alt { margin-top: 18px; padding-top: 14px; border-top: 1px dashed var(--af-line-soft); text-align: center; }
.af__alt-t { display: block; margin-bottom: 10px; font-size: 13px; color: var(--af-muted); }
.af__alt-btns { display: flex; justify-content: center; gap: 14px; }
.af .af__alt-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 46px;
	height: 46px;
	border-radius: 50%;
	color: #fff;
	text-decoration: none;
	transition: transform .15s ease, filter .15s ease;
}
.af .af__alt-btn:hover { transform: translateY(-2px); filter: brightness(1.08); color: #fff; }
.af .af__alt-btn:focus-visible { outline: 3px solid #1a1a1a; outline-offset: 2px; }
.af__alt-btn svg { width: 24px; height: 24px; fill: currentColor; }
.af__alt-btn--viber { background: #7360f2; }
.af__alt-btn--telegram { background: #229ed9; }
.af__alt-btn--phone { background: #2b2b2b; }

/* --- «Спасибо» --- */
.af__done { padding: 8px 4px 4px; text-align: center; outline: 0; }
.af__done-ico {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 52px;
	height: 52px;
	border-radius: 50%;
	background: var(--af-ok);
	color: #fff;
}
.af__done-ico svg { width: 30px; height: 30px; fill: currentColor; }
.af .af__done-t { margin: 12px 0 4px; font-size: 17px; font-weight: 500; line-height: 1.4; color: var(--af-text); }
.af .af__done-n { margin: 0; font-size: 14px; color: var(--af-muted); }

@media (max-width: 600px) {
	.af--light, .af--dark { padding: 18px 16px; }
	.af .af__title { font-size: 19px; }
}
