/* ============================================================
   КВИЗ «РАСЧЁТ СТОИМОСТИ» — стили
   ============================================================ */

/* ---------- затемнение ---------- */
.qz-overlay{
  position: fixed; inset: 0; z-index: 9500;
  display: none; align-items: center; justify-content: center;
  background: rgba(0, 0, 0, .78);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  padding: 16px;
  opacity: 0; transition: opacity .22s ease;
}
.qz-overlay.is-open{ display: flex; opacity: 1; }

body.qz-locked{ overflow: hidden !important; }

/* ---------- окно ---------- */
.qz-modal{
  position: relative; width: 100%; max-width: 520px;
  max-height: 92vh; overflow: hidden; overscroll-behavior: contain;
  display: flex; flex-direction: column;
  background: #1A1A1A;
  border: 1px solid #2A2A2A;
  border-radius: 20px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, .6);
  transform: translateY(12px) scale(.98);
  transition: transform .22s ease;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}
.qz-overlay.is-open .qz-modal{ transform: translateY(0) scale(1); }

/* ---------- шапка ---------- */
.qz-head{
  position: relative; padding: 18px 18px 0;
  flex: 0 0 auto;
  background: #1A1A1A;
  border-radius: 20px 20px 0 0;
  z-index: 3;
}
.qz-close{
  position: absolute; top: 16px; right: 16px;
  width: 44px; height: 44px; min-height: 44px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid #2A2A2A; background: #1A1A1A; color: #a6a6a6;
  border-radius: 50%; cursor: pointer; font-size: 16px; line-height: 1;
  transition: color .15s, border-color .15s;
  z-index: 5;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.qz-close:hover{ color: #FFD700; border-color: rgba(255,215,0,.4); }

.qz-counter{
  font-family: Montserrat, -apple-system, sans-serif;
  font-weight: 900; font-size: 11px; letter-spacing: .06em;
  text-transform: uppercase; color: #8e8e8e;
  padding-right: 52px;
}
.qz-bar{
  height: 4px; background: #1A1A1A; border-radius: 999px;
  margin-top: 10px; overflow: hidden;
}
.qz-bar-fill{
  height: 100%; width: 25%; border-radius: 999px;
  background: linear-gradient(90deg, #FFD700, #E6C200);
  transition: width .3s cubic-bezier(.4, 0, .2, 1);
}

/* ---------- тело ---------- */
.qz-body{
  padding: 18px 18px 20px;
  flex: 1 1 auto;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.qz-step-label{
  font-size: 11px; font-weight: 700; letter-spacing: .04em;
  text-transform: uppercase; color: #8e8e8e; margin-bottom: 8px;
}
.qz-title{
  font-family: Montserrat, -apple-system, sans-serif;
  font-weight: 900; font-size: 21px; line-height: 1.2;
  color: #fff; margin: 0 0 6px;
}
.qz-sub{
  font-size: 13px; line-height: 1.5; color: #a6a6a6;
  margin: 0 0 18px;
}

/* ---------- поля ---------- */
.qz-field{ margin-bottom: 16px; }
.qz-label{
  display: block; font-size: 12px; font-weight: 700;
  color: #a6a6a6; margin-bottom: 7px;
}

.qz-input{
  width: 100%; box-sizing: border-box;
  padding: 14px 15px; border-radius: 12px;
  border: 1px solid #2A2A2A; background: #1A1A1A;
  color: #fff; font-size: 16px;            /* 16px — чтобы iOS не зумил */
  font-family: inherit; outline: none;
  transition: border-color .15s, background .15s;
  -webkit-appearance: none; appearance: none;
}
.qz-input::placeholder{ color: #7a7a7a; }
.qz-input:focus{ border-color: rgba(255,215,0,.55); background: #1A1A1A; }

.qz-select{
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23a6a6a6' stroke-width='2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 40px;
}
.qz-textarea{ resize: vertical; min-height: 68px; line-height: 1.5; }

/* ---------- карточки услуг ---------- */
.qz-cards{
  display: grid; grid-template-columns: 1fr; gap: 8px;
  margin-bottom: 18px;
}
.qz-card{
  display: flex; align-items: center; gap: 12px;
  width: 100%; box-sizing: border-box;
  padding: 13px 14px; border-radius: 12px;
  border: 1px solid #2A2A2A; background: #1A1A1A;
  color: #fff; text-align: left; cursor: pointer;
  font-family: inherit; font-size: 13px;
  transition: border-color .15s, background .15s, transform .12s;
}
.qz-card:hover{ border-color: rgba(255,215,0,.3); }
.qz-card:active{ transform: scale(.99); }
.qz-card.is-on{
  border-color: #FFD700; background: rgba(255,215,0,.09);
  box-shadow: 0 0 0 1px rgba(255,215,0,.25);
}
.qz-card-ico{ font-size: 19px; line-height: 1; flex-shrink: 0; }
.qz-card-body{ display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.qz-card-t{
  font-family: Montserrat, -apple-system, sans-serif;
  font-weight: 900; font-size: 13px; line-height: 1.25;
}
.qz-card-h{ font-size: 11px; color: #8e8e8e; line-height: 1.3; }

/* ---------- чипы способа связи ---------- */
.qz-chips{
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px;
}
.qz-chip{
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 12px 6px; border-radius: 12px;
  border: 1px solid #2A2A2A; background: #1A1A1A;
  color: #fff; cursor: pointer; font-family: inherit;
  transition: border-color .15s, background .15s;
}
.qz-chip.is-on{
  border-color: #FFD700; background: rgba(255,215,0,.09);
  box-shadow: 0 0 0 1px rgba(255,215,0,.25);
}
.qz-chip-t{
  font-family: Montserrat, -apple-system, sans-serif;
  font-weight: 900; font-size: 12px;
}
.qz-chip-h{ font-size: 10px; color: #8e8e8e; }

/* ---------- фото ---------- */
.qz-photo{ position: relative; }
.qz-file{
  position: absolute; width: 1px; height: 1px;
  opacity: 0; pointer-events: none;
}
.qz-photo-btn{
  display: flex; align-items: center; gap: 10px;
  padding: 13px 14px; border-radius: 12px;
  border: 1px dashed #3a3a3a; background: #1A1A1A;
  color: #a6a6a6; font-size: 13px; cursor: pointer;
  transition: border-color .15s, color .15s;
  min-height: 48px; box-sizing: border-box;
}
.qz-photo-btn:hover{ border-color: rgba(255,215,0,.45); color: #fff; }
.qz-photo-hint{ font-size: 11px; color: #8e8e8e; margin-left: auto; }
.qz-photo-prev{
  width: 40px; height: 40px; object-fit: cover;
  border-radius: 8px; flex-shrink: 0;
}
.qz-photo-name{
  font-size: 12px; color: #a6a6a6;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* ---------- навигация ---------- */
.qz-nav{
  display: flex; gap: 8px; margin-top: 4px;
}
.qz-back{
  flex: 0 0 auto; padding: 14px 18px; border-radius: 12px;
  border: 1px solid #2A2A2A; background: transparent; color: #a6a6a6;
  font-family: Montserrat, -apple-system, sans-serif; font-weight: 900;
  font-size: 12px; letter-spacing: .03em; text-transform: uppercase;
  cursor: pointer; min-height: 48px;
  transition: border-color .15s, color .15s;
}
.qz-back:hover{ border-color: #3a3a3a; color: #fff; }

.qz-next{
  flex: 1 1 auto; padding: 14px 20px; border-radius: 12px;
  border: none; background: #FFD700; color: #000;
  font-family: Montserrat, -apple-system, sans-serif; font-weight: 900;
  font-size: 12px; letter-spacing: .03em; text-transform: uppercase;
  cursor: pointer; min-height: 48px;
  transition: background .15s, opacity .15s, transform .12s;
}
.qz-next:hover:not(:disabled){ background: #FFE44D; }
.qz-next:active:not(:disabled){ transform: scale(.99); }
.qz-next:disabled{
  opacity: .35; cursor: not-allowed;
}
.qz-send{
  background: linear-gradient(135deg, #FFD700, #E6C200);
}

.qz-legal{
  font-size: 11px; line-height: 1.45; color: #8e8e8e;
  text-align: center; margin: 14px 0 0;
}

/* ---------- экран «готово» ---------- */
.qz-done{ text-align: center; padding: 12px 0 4px; }
.qz-done-ico{
  width: 58px; height: 58px; margin: 0 auto 16px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%; background: rgba(0, 200, 81, .12);
  border: 1px solid rgba(0, 200, 81, .35);
  color: #00C851; font-size: 26px; font-weight: 900;
}
.qz-done .qz-title{ margin-bottom: 8px; }
.qz-done .qz-sub{ margin-bottom: 20px; }
.qz-call{
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 15px 20px; border-radius: 12px;
  background: #FFD700; color: #000; text-decoration: none;
  font-family: Montserrat, -apple-system, sans-serif; font-weight: 900;
  font-size: 13px; letter-spacing: .03em; text-transform: uppercase;
  min-height: 48px; box-sizing: border-box;
  margin-bottom: 10px;
}
.qz-call:hover{ background: #FFE44D; }
.qz-again{
  width: 100%; padding: 13px; border-radius: 12px;
  border: 1px solid #2A2A2A; background: transparent; color: #a6a6a6;
  font-family: inherit; font-size: 12px; cursor: pointer;
  min-height: 46px;
}
.qz-again:hover{ color: #fff; border-color: #3a3a3a; }

/* ---------- мобильные ---------- */
@media (max-width: 640px){
  .qz-overlay{ padding: 0; align-items: flex-end; }
  .qz-modal{
    max-width: 100%; max-height: 94vh;
    border-radius: 20px 20px 0 0;
    border-bottom: none;
    transform: translateY(100%);
    display: flex; flex-direction: column;
  }
  .qz-head{ border-radius: 20px 20px 0 0; }
  .qz-overlay.is-open .qz-modal{ transform: translateY(0); }
  .qz-head{ padding: 20px 16px 0; }
  .qz-close{ top: 14px; right: 14px; }
  .qz-body{ padding: 16px 16px 24px; }
  .qz-title{ font-size: 19px; }
  .qz-cards{ gap: 7px; }
  .qz-card{ padding: 12px 13px; }
  /* безопасная зона под iPhone с чёлкой */
  .qz-body{ padding-bottom: max(24px, env(safe-area-inset-bottom, 24px)); }
}

/* ---------- уважение к reduced-motion ---------- */
@media (prefers-reduced-motion: reduce){
  .qz-overlay, .qz-modal, .qz-bar-fill, .qz-card, .qz-next{
    transition: none !important;
  }
}

/* ---------- новые поля: свой объём + топливо ---------- */
.qz-custom-vol{ margin-top: 10px; animation: qzFade .18s ease; }
@keyframes qzFade{ from{opacity:0; transform:translateY(-3px);} to{opacity:1; transform:none;} }

.qz-chips-2{ grid-template-columns: repeat(2, 1fr); }
.qz-chip-ico{ font-size: 20px; line-height: 1; }
.qz-chips-2 .qz-chip{ padding: 14px 8px; gap: 5px; }

/* выбранный вариант из карточки на странице катализаторов */
.qz-variant{
  display: flex; gap: 10px; align-items: flex-start;
  padding: 12px 14px; margin-bottom: 16px;
  border-radius: 12px; border: 1px solid rgba(255,215,0,.35);
  background: rgba(255,215,0,.08);
  font-size: 12px; line-height: 1.45; color: rgba(255,255,255,.9);
}
.qz-variant__ico{ flex-shrink: 0; font-size: 15px; line-height: 1.2; }
.qz-variant__t{ font-family: Montserrat, sans-serif; font-weight: 900; font-size: 12px;
  color: #FFD700; display: block; margin-bottom: 2px; letter-spacing: .02em; }
