/* artelteh — страница консультации (page-consult.php).
 * Макет «Заявка на консультацию» из Claude Design, переложенный на токены темы:
 * в макете цвета захардкожены под тёмную схему, а сайт умеет обе.
 * Грузится только на этой странице, в общий бандл не входит.
 */

body.newui section.consult {
  padding: 1.75rem 0 3rem;
}
@media (min-width: 769px) {
  body.newui section.consult { padding: 2.5rem 0 4rem; }
}
body.newui section.consult > .wrap { max-width: calc(var(--content) + 2 * var(--gutter)); }

body.newui .consult-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  align-items: start;
}
@media (min-width: 900px) {
  body.newui .consult-grid { grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); }
}

body.newui .consult-main,
body.newui .consult-side {
  display: flex; flex-direction: column; gap: 16px; min-width: 0;
}

/* На широком экране форма едет за прокруткой: она — цель страницы. */
@media (min-width: 900px) {
  body.newui .consult-side { position: sticky; top: 76px; }
}

/* ── Шапка ── */
body.newui .consult-badges { display: flex; flex-wrap: wrap; gap: 8px; padding-bottom: 15px; }
body.newui .consult-badge {
  padding: 6px 10px; border-radius: 7px;
  background: var(--bg3); color: var(--text2);
  font-size: 12px; font-weight: 600;
}
body.newui .consult-badge-accent {
  background: var(--accent-dim); color: var(--accent);
  font-weight: 700;
}
body.newui .consult-title {
  margin: 0;
  font-size: clamp(26px, 4vw, 38px); font-weight: 700;
  line-height: 1.15; letter-spacing: -0.6px;
  color: var(--text);
}
body.newui .consult-lead {
  margin: 0; max-width: 62ch;
  font-size: 16px; line-height: 1.65; color: var(--text2);
}

/* ── Карточка ── */
body.newui .consult-card {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px;
  display: flex; flex-direction: column; gap: 14px;
}
body.newui .consult-card-label {
  font-size: 11px; font-weight: 600;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--text3);
}
body.newui .consult-card-foot {
  margin: 0; padding-top: 14px; border-top: 1px solid var(--border);
  font-size: 13px; line-height: 1.6; color: var(--text3);
}

/* ── Что входит ── */
body.newui .consult-works {
  display: grid; grid-template-columns: 1fr; gap: 10px 18px;
}
@media (min-width: 620px) { body.newui .consult-works { grid-template-columns: repeat(2, 1fr); } }
body.newui .consult-work {
  display: flex; gap: 10px; align-items: flex-start;
  font-size: 14px; line-height: 1.5; color: var(--text2);
}
body.newui .consult-tick {
  flex-shrink: 0; width: 18px; height: 18px; margin-top: 2px;
  border-radius: 5px; background: rgba(78, 201, 126, .16); color: #4ec97e;
  font-size: 11px; font-weight: 700; line-height: 18px; text-align: center;
}

/* ── Шаги ── */
body.newui .consult-steps {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: 1fr; gap: 6px;
}
@media (min-width: 620px) { body.newui .consult-steps { grid-template-columns: repeat(4, 1fr); } }
body.newui .consult-step {
  display: flex; flex-direction: column; gap: 9px;
  padding: 12px; border: 1px solid var(--border); border-radius: 11px;
  min-width: 0;
}
body.newui .consult-step-head { display: flex; align-items: center; gap: 8px; }
body.newui .consult-step-num {
  flex-shrink: 0; width: 20px; height: 20px; border-radius: 50%;
  background: var(--bg3); color: var(--text2);
  font-family: var(--font-mono);
  font-size: 10px; font-weight: 700; line-height: 20px; text-align: center;
}
body.newui .consult-step-line { flex: 1; height: 2px; border-radius: 1px; background: var(--border); }
body.newui .consult-step-title { font-size: 13px; font-weight: 600; line-height: 1.35; color: var(--text); }
body.newui .consult-step-note { font-size: 12px; line-height: 1.5; color: var(--text3); }

/* ── Факты ── */
body.newui .consult-facts {
  display: grid; grid-template-columns: 1fr; gap: 10px;
}
@media (min-width: 620px) { body.newui .consult-facts { grid-template-columns: repeat(3, 1fr); } }
body.newui .consult-fact {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px 18px;
  display: flex; flex-direction: column; gap: 6px;
}
body.newui .consult-fact-value {
  font-family: var(--font-mono);
  font-size: 22px; font-weight: 700; line-height: 1; color: var(--accent);
}
body.newui .consult-fact-label { font-size: 13px; line-height: 1.45; color: var(--text3); }

/* ── FAQ ── */
body.newui .consult-faq { gap: 0; }
body.newui .consult-faq .consult-card-label { padding-bottom: 8px; }
body.newui .consult-faq-item { border-bottom: 1px solid var(--border); }
body.newui .consult-faq-item:last-child { border-bottom: 0; }
body.newui .consult-faq-q {
  width: 100%; display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 14px 0;
  border: 0; background: transparent; cursor: pointer; text-align: left;
  font-family: inherit; font-size: 14px; font-weight: 600; line-height: 1.45;
  color: var(--text);
}
body.newui .consult-faq-icon {
  flex-shrink: 0; width: 22px; height: 22px; border-radius: 6px;
  background: var(--bg3); color: var(--text3);
  font-size: 14px; font-weight: 600; line-height: 22px; text-align: center;
  transition: transform .18s ease;
}
body.newui .consult-faq-q[aria-expanded="true"] .consult-faq-icon { transform: rotate(45deg); }
body.newui .consult-faq-a {
  padding: 0 0 16px; max-width: 64ch;
  font-size: 14px; line-height: 1.6; color: var(--text2);
}

/* ── Форма ── */
body.newui .consult-form-card {
  background: var(--bg2); border: 1px solid var(--border-strong, var(--border));
  border-radius: var(--radius); padding: 22px;
  display: flex; flex-direction: column; gap: 16px;
}
body.newui .consult-form-head { display: flex; flex-direction: column; gap: 6px; }
body.newui .consult-form-title { font-size: 20px; font-weight: 700; line-height: 1.25; color: var(--text); }
body.newui .consult-form-sub { font-size: 13px; line-height: 1.55; color: var(--text3); }

body.newui #consultForm { display: flex; flex-direction: column; gap: 16px; }
body.newui .consult-field { display: flex; flex-direction: column; gap: 7px; }
body.newui .consult-field label,
body.newui .consult-field-label { font-size: 12px; font-weight: 600; color: var(--text2); }
body.newui .consult-req { color: var(--accent); }

body.newui .consult-input,
body.newui .consult-textarea {
  width: 100%; box-sizing: border-box;
  background: var(--bg); color: var(--text);
  border: 1px solid var(--border); border-radius: 10px;
  font-family: var(--font); font-size: 15px; font-weight: 500;
  transition: border-color var(--transition);
}
body.newui .consult-input { height: 48px; padding: 0 14px; }
body.newui .consult-input-sm { height: 42px; padding: 0 12px; font-size: 14px; }
body.newui .consult-input-mono { font-family: var(--font-mono); font-size: 16px; }
body.newui .consult-textarea { padding: 11px 12px; line-height: 1.5; resize: vertical; }
body.newui .consult-input:focus,
body.newui .consult-textarea:focus { outline: none; border-color: var(--accent-border); }
body.newui .consult-input.is-error { border-color: #e05252; }

body.newui .consult-chips { display: flex; flex-wrap: wrap; gap: 6px; }
body.newui .consult-chips-row .consult-chip { flex: 1; text-align: center; }
body.newui .consult-chip {
  min-height: 38px; padding: 9px 12px;
  background: var(--bg); color: var(--text2);
  border: 1px solid var(--border); border-radius: 9px;
  font-family: inherit; font-size: 13px; font-weight: 600; text-align: left;
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition), color var(--transition);
}
body.newui .consult-chip:hover { border-color: var(--accent-border); }
body.newui .consult-chip[aria-pressed="true"] {
  background: var(--accent-dim); border-color: var(--accent-border); color: var(--accent);
}

body.newui .consult-details {
  display: flex; flex-direction: column; gap: 14px;
  padding: 16px; border-radius: 11px;
  background: var(--bg); border: 1px solid var(--border);
}
body.newui .consult-row2 { display: flex; gap: 10px; }
body.newui .consult-row2 .consult-field { flex: 1; min-width: 0; }

body.newui .consult-details-toggle {
  align-self: flex-start; padding: 0;
  border: 0; background: transparent; cursor: pointer;
  font-family: inherit; font-size: 13px; font-weight: 600; color: var(--text3);
}
body.newui .consult-details-toggle:hover { color: var(--text); }

body.newui .consult-submit {
  height: 52px; border: 0; border-radius: 11px;
  background: var(--accent-surface); color: #000;
  font-family: inherit; font-size: 16px; font-weight: 700; cursor: pointer;
  transition: background var(--transition);
}
body.newui .consult-submit:hover { background: var(--accent-surface-hover); }
body.newui .consult-submit[disabled] { opacity: .6; cursor: wait; }

body.newui .consult-agree { margin: 0; font-size: 12px; line-height: 1.55; color: var(--text3); }
body.newui .consult-error { margin: 0; font-size: 13px; color: #e05252; }

/* Honeypot: скрыт от человека, виден боту. */
body.newui .consult-hp {
  position: absolute; left: -9999px; width: 1px; height: 1px;
  opacity: 0; pointer-events: none;
}

/* ── Успех ── */
body.newui .consult-done { border-color: rgba(78, 201, 126, .35); }
body.newui .consult-done-tick {
  width: 40px; height: 40px; border-radius: 50%;
  background: rgba(78, 201, 126, .16); color: #4ec97e;
  font-size: 17px; font-weight: 700; line-height: 40px; text-align: center;
}
body.newui .consult-done-text { margin: 0; font-size: 14px; line-height: 1.6; color: var(--text2); }
body.newui .consult-done-num { font-family: var(--font-mono); color: var(--text); }
body.newui .consult-done-hint { margin: 0; font-size: 13px; line-height: 1.55; color: var(--text3); }

/* ── Телефон и мессенджеры ── */
body.newui .consult-phone {
  height: 46px; border-radius: 10px;
  background: var(--bg3); border: 1px solid var(--border); color: var(--text);
  font-family: var(--font-mono); font-size: 15px; font-weight: 700;
  line-height: 46px; text-align: center; text-decoration: none;
}
body.newui .consult-phone:hover { border-color: var(--accent-border); }
body.newui .consult-messengers { display: flex; gap: 8px; }
body.newui .consult-messengers a {
  flex: 1; height: 42px; border-radius: 10px;
  border: 1px solid var(--border); color: var(--text2);
  font-size: 13px; font-weight: 600; line-height: 42px;
  text-align: center; text-decoration: none;
}
body.newui .consult-messengers a:hover { border-color: var(--accent-border); color: var(--text); }

/* ── Другие услуги ── */
body.newui .consult-related {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 14px; border-radius: 10px;
  background: var(--bg); border: 1px solid var(--border);
  color: var(--text); text-decoration: none;
  font-size: 14px; font-weight: 600; line-height: 1.35;
  transition: border-color var(--transition);
}
body.newui .consult-related:hover { border-color: var(--accent-border); }
body.newui .consult-related-arrow { color: var(--text3); }
body.newui .consult-related-all { background: transparent; border-style: dashed; }

/* ── Телефон: форма сразу под заголовком ──
 * Макет требует именно такого порядка — на узком экране описание не должно
 * отодвигать форму вниз. DOM оставляем «десктопным» (описание первым: так
 * правильнее для поисковика и для чтения с экрана), а порядок меняем
 * раскладкой: `display:contents` поднимает детей колонок на уровень сетки,
 * и им можно назначить order.
 */
@media (max-width: 899px) {
  body.newui .consult-grid { display: flex; flex-direction: column; gap: 16px; }
  body.newui .consult-main,
  body.newui .consult-side { display: contents; }

  body.newui .consult-head      { order: 1; display: flex; flex-direction: column; gap: 12px; }
  body.newui .consult-form-card { order: 2; }
  body.newui .consult-main > .consult-card,
  body.newui .consult-main > .consult-facts { order: 3; }
  body.newui .consult-side > .consult-card  { order: 4; }
}

/* Липкой панели из макета нет: у сайта своя нижняя навигация, две панели
   встали бы друг на друга. Класс оставлен на случай, если она понадобится. */
body.newui .consult-sticky { display: none; }

/* Вопрос аккордеона — настоящий h3 (совпадает с FAQPage-разметкой). */
body.newui .consult-faq-h { margin: 0; font-size: inherit; font-weight: inherit; }
