/* Общий дизайн форм сайта (в стиле страницы «Задать вопрос»).
   Подключается только на страницах с формами (functions/assets.php → zkg_forms_page()).
   Все правила — внутри .zf, остальной сайт не затрагивают. */

#content.zf-content { padding: 1.25rem 1rem 2rem; }
@media (min-width: 641px) {
	#content.zf-content { padding: 2rem 2.5rem 2.5rem; }
}

.zf {
	--zf-blue: #147FCB;
	--zf-green: #2ca445;
	--zf-green-dark: #23893a;
	--zf-red: #d63638;
	--zf-text: #1f2328;
	--zf-muted: #6b7280;
	--zf-border: #d6e3e9;
	--zf-soft: #f3f8fc;
	font: 16px/1.55 Roboto, Arial, sans-serif;
	color: var(--zf-text);
}
.zf *, .zf *::before, .zf *::after { box-sizing: border-box; }
.zf a { color: var(--zf-blue); }

/* ---------- Шапка страницы ---------- */
.zf-hero { margin: 0 0 1.5rem; max-width: 760px; }
.zf-hero h1 { font: bold 30px/1.15 'Roboto Condensed', Arial, sans-serif; margin: 0 0 .6rem; }
.zf-hero p { margin: 0 0 .5rem; color: var(--zf-muted); font-size: 17px; }
.zf-badges { display: flex; flex-wrap: wrap; gap: .5rem; margin: .9rem 0 0; padding: 0; list-style: none; }
.zf-badges li { background: var(--zf-soft); border: 1px solid #cfe0f3; color: #1d4f7a; border-radius: 999px; padding: .25rem .8rem; font-size: 14px; }

/* Узкая страница с одной карточкой по центру (вход, восстановление пароля) */
.zf-narrow { max-width: 460px; margin: 0 auto; }
.zf-narrow .zf-hero { text-align: center; }
.zf-medium { max-width: 760px; margin: 0 auto; }

/* ---------- Сетка: форма + боковая колонка ---------- */
.zf-layout { display: grid; gap: 1.5rem; grid-template-columns: 1fr; align-items: start; }
@media (min-width: 960px) {
	.zf-layout { grid-template-columns: minmax(0, 1fr) 320px; gap: 2rem; }
}

/* ---------- Карточка ---------- */
.zf .zf-card {
	width: 100%;
	margin: 0;
	background: #fff;
	border: 1px solid var(--zf-border);
	border-radius: 12px;
	padding: 1.25rem;
	box-shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 4px 16px rgba(16, 24, 40, .04);
}
@media (min-width: 641px) { .zf .zf-card { padding: 1.75rem 2rem; } }

/* ---------- Поля ---------- */
.zf-field { margin: 0 0 1.3rem; }
.zf-row { display: grid; gap: 0 1.25rem; grid-template-columns: 1fr; }
@media (min-width: 641px) { .zf-row { grid-template-columns: 1fr 1fr; } }

.zf-label { display: block; font-weight: bold; font-size: 16px; margin: 0 0 .2rem; }
.zf-label .req { color: var(--zf-red); margin-left: 2px; }
.zf-label .opt { color: var(--zf-muted); font-weight: normal; font-size: 14px; }
.zf-hint { display: block; color: var(--zf-muted); font-size: 14px; line-height: 1.4; margin: 0 0 .5rem; }

.zf input[type="text"],
.zf input[type="email"],
.zf input[type="password"],
.zf input[type="number"],
.zf select,
.zf textarea {
	display: block;
	width: 100%;
	margin: 0;
	padding: .75rem .9rem;
	font: 16px/1.5 Roboto, Arial, sans-serif; /* 16px — iPhone не увеличивает страницу при вводе */
	color: var(--zf-text);
	background: #fff;
	border: 1px solid #c3d1db;
	border-radius: 8px;
	transition: border-color .15s, box-shadow .15s;
}
.zf select { height: auto; appearance: auto; }
.zf textarea { min-height: 220px; resize: vertical; }
.zf input::placeholder, .zf textarea::placeholder { color: #9aa4ae; }
.zf input:focus, .zf select:focus, .zf textarea:focus {
	outline: none;
	border-color: var(--zf-blue);
	box-shadow: 0 0 0 3px rgba(20, 127, 203, .18);
}
.zf .input_error, .zf .input_error:focus { border-color: var(--zf-red); box-shadow: 0 0 0 3px rgba(214, 54, 56, .12); }
.zf .error_text { display: block; color: var(--zf-red); font-size: 14px; margin-top: .35rem; }

.zf-counter { text-align: right; font-size: 13px; color: var(--zf-muted); margin-top: .3rem; }
.zf-counter.is-near { color: #b26200; }

/* Пароль с кнопкой «показать» */
.zf-pass { position: relative; }
.zf-pass input { padding-right: 6.5rem; }
.zf .zf-pass-toggle {
	position: absolute; right: .4rem; top: 50%; transform: translateY(-50%);
	background: none; border: 0; color: var(--zf-blue);
	font: 14px/1 Roboto, Arial, sans-serif; text-transform: none; padding: .5rem; cursor: pointer;
}

/* Чекбоксы */
.zf-check { display: flex; gap: .6rem; align-items: flex-start; cursor: pointer; font-size: 15px; margin: 0; }
.zf-check input { width: 18px; height: 18px; margin: 2px 0 0; flex: none; accent-color: var(--zf-blue); }
.zf-checks { display: grid; gap: .55rem 1rem; grid-template-columns: 1fr; }
@media (min-width: 641px) { .zf-checks { grid-template-columns: 1fr 1fr; } }

/* ---------- Кнопка ---------- */
.zf .zf-submit {
	display: block;
	width: 100%;
	background: var(--zf-green);
	color: #fff;
	border: 0;
	border-radius: 8px;
	padding: .95rem 1.5rem;
	font: bold 17px/1.2 Roboto, Arial, sans-serif;
	text-transform: none;
	letter-spacing: .01em;
	cursor: pointer;
	transition: background .15s, transform .05s;
}
@media (min-width: 641px) { .zf .zf-submit { width: auto; min-width: 260px; } }
.zf-narrow .zf .zf-submit, .zf-narrow .zf-submit { width: 100%; }
.zf .zf-submit:hover { background: var(--zf-green-dark); }
.zf .zf-submit:active { transform: translateY(1px); }
.zf .zf-submit:focus-visible { outline: 3px solid rgba(44, 164, 69, .35); outline-offset: 2px; }
.zf .zf-submit[disabled] { background: #8fc79c; cursor: default; }

.zf-legal { margin: .9rem 0 0; font-size: 13px; color: var(--zf-muted); line-height: 1.45; }
.zf-links { margin: 1.25rem 0 0; display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; justify-content: center; font-size: 15px; }

/* ---------- Сообщения ---------- */
.zf-messages:empty, #submit-feedback:empty { display: none; }
.zf-messages, .zf #submit-feedback { margin: 0 0 1.25rem; display: grid; gap: .5rem; }
.zf-alert { border-radius: 8px; padding: .8rem 1rem; font-size: 15px; font-weight: bold; line-height: 1.45; }
.zf-alert--ok { background: #ecf8ef; border: 1px solid #b7e2c1; color: #1d6b31; }
.zf-alert--err { background: #fdeeee; border: 1px solid #f3c2c3; color: #a02123; }
.zf-alert--info { background: var(--zf-soft); border: 1px solid #cfe0f3; color: #1d4f7a; font-weight: normal; }
.zf-alert--info strong { font-weight: bold; }

/* ---------- Боковая колонка и блоки-подсказки ---------- */
.zf-aside { display: grid; gap: 1.25rem; }
.zf-box { background: var(--zf-soft); border: 1px solid #d9e7f3; border-radius: 12px; padding: 1.1rem 1.2rem; font-size: 15px; }
.zf-box h2 { font: bold 18px/1.3 'Roboto Condensed', Arial, sans-serif; margin: 0 0 .7rem; }
.zf-tips { margin: 0; padding: 0; list-style: none; counter-reset: zf; }
.zf-tips li { position: relative; padding-left: 2rem; margin: 0 0 .75rem; line-height: 1.45; }
.zf-tips li:last-child { margin-bottom: 0; }
.zf-tips li::before {
	counter-increment: zf; content: counter(zf);
	position: absolute; left: 0; top: 0;
	width: 1.4rem; height: 1.4rem; border-radius: 50%;
	background: var(--zf-blue); color: #fff;
	font: bold 13px/1.4rem Roboto, Arial, sans-serif; text-align: center;
}
.zf-box--search > div { margin-bottom: 0 !important; }
.zf-box--search h2 { text-align: left; }

.zf-section-title { font: bold 18px/1.3 'Roboto Condensed', Arial, sans-serif; margin: .3rem 0 .8rem; }
.zf-ads { margin-top: 2rem; }

/* Страница «Задать вопрос»: в style.css темы у формы #qa_new_form ширина 80% и margin:auto */
.zf #qa_new_form { width: 100%; margin: 0; }

/* В паре полей (.zf-row) поля ввода стоят на одной линии, даже если подсказки разной длины */
.zf-row .zf-field { display: flex; flex-direction: column; }
.zf-row .zf-field > input, .zf-row .zf-field > select, .zf-row .zf-field > .zf-pass { margin-top: auto; }
