/* Квиз заказа (order.html). Опирается на переменные и .btn/.label/.size-table из style.css. Без inline-стилей (site-check). */
.order-page { background: var(--soft, #F6F8FB); }
.quiz { padding: 96px 0 140px; max-width: 720px; }
.quiz-head { margin-bottom: 22px; }
.quiz-head h1 { font-size: clamp(26px, 5vw, 40px); margin-top: 12px; }
.progress { height: 4px; background: var(--line); border-radius: 2px; margin-top: 12px; overflow: hidden; }
.progress i { display: block; height: 100%; width: 0; background: var(--accent); transition: width .3s ease; }

.quiz fieldset { border: 0; padding: 0; margin: 0; display: none; }
.quiz fieldset[data-active] { display: block; animation: quiz-in .25s ease; }
@keyframes quiz-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.quiz .sub { display: block; font-family: var(--mono); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin: 18px 0 8px; }
.quiz .hint { color: var(--muted); font-size: 14px; margin: 14px 0 0; }
.hp { position: absolute; left: -9999px; top: -9999px; height: 0; overflow: hidden; }

/* карточки-варианты с картинкой */
.cards { display: grid; gap: 12px; grid-template-columns: 1fr 1fr; }
.card { position: relative; cursor: pointer; }
.card input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.card-body { display: grid; gap: 6px; background: #fff; border: 2px solid var(--line); border-radius: var(--radius); padding: 10px; height: 100%; transition: border-color .15s, box-shadow .15s; }
.card-body img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: var(--radius-sm); }
.card-body b { font-size: 17px; }
.card-body small { color: var(--muted); font-size: 13px; line-height: 1.35; }
.card-body em { font-style: normal; font-family: var(--mono); font-weight: 700; }
.card input:checked + .card-body { border-color: var(--accent); box-shadow: 0 0 0 4px #FFF3EE; }
.card input:focus-visible + .card-body { outline: 3px solid var(--accent); outline-offset: 2px; }

/* чипы-варианты */
.quiz .chips { display: flex; flex-wrap: wrap; gap: 8px; }
.quiz .chip { position: relative; display: inline-flex; align-items: center; gap: 8px; padding: 12px 16px; border: 2px solid var(--line); border-radius: 999px; background: #fff; cursor: pointer; font-weight: 600; font-size: 15px; }
.quiz .chip input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.quiz .chip:has(input:checked) { border-color: var(--accent); background: #FFF3EE; }
.quiz .chip:has(input:focus-visible) { outline: 3px solid var(--accent); outline-offset: 2px; }
.quiz .chip .add { font-family: var(--mono); font-size: 12px; color: var(--accent-dark); }
.chip-wide { margin-top: 10px; }
.sizes { margin-top: 18px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px 14px; }
.sizes summary { cursor: pointer; font-weight: 600; }
.sizes p { font-size: 14px; color: var(--muted); }

/* поля */
.field { display: grid; gap: 6px; margin-top: 14px; }
.field label { font-weight: 600; font-size: 14px; }
.field input { font: inherit; font-size: 16px; padding: 12px 14px; border: 2px solid var(--line); border-radius: var(--radius-sm); background: #fff; }
.field input:focus { outline: none; border-color: var(--accent); }
.field input[aria-invalid="true"] { border-color: #D93025; }
.opt-mark { color: var(--muted); font-weight: 400; }
.check { display: flex; gap: 10px; align-items: flex-start; margin-top: 14px; font-size: 14px; line-height: 1.4; cursor: pointer; }
.check input { width: 20px; height: 20px; flex: 0 0 auto; margin-top: 1px; accent-color: var(--accent); }
.check a { color: var(--accent-dark); }
.check[data-error] { color: #D93025; }

/* фото */
.upload { display: grid; gap: 4px; justify-items: center; text-align: center; padding: 26px 16px; border: 2px dashed var(--line); border-radius: var(--radius); background: #fff; cursor: pointer; margin-top: 12px; }
.upload input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.upload b { font-size: 16px; color: var(--accent-dark); }
.upload small { color: var(--muted); font-size: 13px; }
.previews { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 12px; }
.previews figure { margin: 0; position: relative; }
.previews img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: var(--radius-sm); display: block; }
.previews button { position: absolute; top: 4px; right: 4px; width: 26px; height: 26px; border: 0; border-radius: 50%; background: rgba(0,0,0,.6); color: #fff; font-size: 16px; line-height: 26px; cursor: pointer; }

/* итог */
.summary { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; font-size: 15px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 14px 16px; }
.summary dt { color: var(--muted); }
.summary dd { margin: 0; font-weight: 600; }
.total { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 14px; }
.total div { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px; display: grid; gap: 4px; }
.total small { color: var(--muted); font-size: 12px; }
.total b { font-family: var(--mono); font-size: 18px; }
.notice { margin-top: 16px; padding: 14px 16px; border-radius: var(--radius-sm); background: #FFF3EE; border: 1px solid #FFD2C2; font-size: 15px; line-height: 1.45; }
.notice a { color: var(--accent-dark); font-weight: 600; }

/* нижняя панель с ценой и кнопками */
.quiz-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; background: #fff; border-top: 1px solid var(--line); box-shadow: 0 -8px 24px rgba(16,27,43,.08); padding: 10px 0 calc(10px + env(safe-area-inset-bottom)); }
.quiz-bar .container { display: flex; align-items: center; justify-content: space-between; gap: 12px; max-width: 720px; }
.bar-price { display: grid; line-height: 1.2; }
.bar-price small { color: var(--muted); font-size: 12px; }
.bar-price b { font-family: var(--mono); font-size: 20px; white-space: nowrap; }
.bar-actions { display: flex; gap: 8px; }
.bar-actions .btn { padding: 12px 18px; }
[data-prev][disabled] { opacity: .35; pointer-events: none; }

@media (max-width: 560px) {
  .cards { grid-template-columns: 1fr 1fr; gap: 8px; }
  .card-body { padding: 8px; }
  .total { grid-template-columns: 1fr; }
  .bar-price small { display: none; }
  .bar-actions { flex: 1; justify-content: flex-end; }
  .bar-actions .btn { padding: 12px 14px; font-size: 14px; white-space: nowrap; }
  .bar-actions .long { display: none; }
  .bar-price b { font-size: 17px; }
  .previews { grid-template-columns: repeat(3, 1fr); }
}

/* подсказка «здесь не заполнено» */
.shake { animation: quiz-shake .35s ease; }
@keyframes quiz-shake { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }

/* атрибут hidden сильнее display у .btn/.chips/.field — иначе кнопка «Оплатить» видна на первом шаге */
.order-page [hidden] { display: none !important; }

/* страница «Спасибо» */
.thanks { padding-bottom: 60px; }
.thanks-h2 { font-size: 22px; margin: 28px 0 8px; }
.steps-next { display: grid; gap: 10px; margin-top: 18px; }
.steps-next div { display: flex; gap: 12px; align-items: flex-start; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px 14px; font-size: 15px; }
.steps-next b { flex: 0 0 28px; height: 28px; border-radius: 50%; background: var(--accent); color: #fff; display: inline-grid; place-items: center; font-family: var(--mono); }
.thanks-msg { margin-top: 12px; }
.thanks .hint a { color: var(--accent-dark); }
.upload-progress { margin-top: 10px; font-size: 14px; color: var(--muted); }

/* подсказка городов (22.09): справочник лежит локально, внешних запросов нет — CSP не ослабляем */
.city-field { position: relative; }
.city-list { position: absolute; z-index: 20; left: 0; right: 0; top: 100%; margin: 4px 0 0; padding: 4px; list-style: none; background: #fff; border: 2px solid var(--line); border-radius: var(--radius-sm); box-shadow: 0 12px 28px rgba(16,27,43,.12); max-height: 260px; overflow-y: auto; }
.city-list li { padding: 10px 12px; border-radius: 8px; cursor: pointer; font-size: 15px; display: flex; justify-content: space-between; gap: 10px; }
.city-list li[aria-selected="true"], .city-list li:hover { background: #FFF3EE; }
.city-list small { color: var(--muted); font-size: 13px; white-space: nowrap; }
.city-field .hint { margin-top: 6px; }
.city-field .hint:empty { display: none; }

/* «перенесли ваш выбор с главной» (22.09) */
.handoff { background: #FFF3EE; border: 1px solid #FFD2C2; border-radius: var(--radius-sm); padding: 12px 14px; margin-top: 14px; font-size: 15px; line-height: 1.45; }
.handoff p { margin: 0; }
.handoff-ask { margin-top: 6px; color: var(--muted); font-size: 14px; }
.linklike { border: 0; background: none; padding: 0; font: inherit; color: var(--accent-dark); font-weight: 600; cursor: pointer; text-decoration: underline; }

/* Блок «оплата не прошла» — показывается при возврате с FailURL Т-Кассы (order.html?fail=1). */
.fail { background: #FFF1F1; border: 1px solid #F5C2C2; border-radius: var(--radius-sm); padding: 14px 16px; margin-top: 14px; font-size: 15px; line-height: 1.45; }
.fail p { margin: 0; }
.fail-why { margin-top: 6px; color: var(--muted); font-size: 14px; }
.fail-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.fail-actions .btn { flex: 1 1 auto; text-align: center; }
