/* ============================================================
   МОТО ТОП — zapitvane.css
   Multi-step RFQ wizard. Extends base.css tokens.
   ============================================================ */

.wiz-wrap {
  width: min(760px, 100% - 2.5rem);
  margin-inline: auto;
}

.wiz-shell {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-2);
  overflow: hidden;
}

/* ---------- progress ---------- */
.wiz-progress {
  height: 5px;
  background: rgba(0, 0, 0, 0.3);
}
.wiz-progress::after {
  content: "";
  display: block;
  height: 100%;
  width: var(--p, 25%);
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transition: width 0.3s ease;
}
.wiz-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem 1.5rem 0;
  gap: 1rem;
}
.wiz-step-label {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  color: var(--muted);
  text-transform: uppercase;
}

/* ---------- steps ---------- */
.wiz-body {
  padding: 1rem 1.5rem 1.75rem;
}
.wiz-step {
  animation: wiz-slide 0.28s ease;
}
.wiz-step[hidden] {
  display: none;
}
@keyframes wiz-slide {
  from {
    opacity: 0;
    transform: translateX(14px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
.wiz-step h2 {
  font-size: 1.5rem;
  margin: 0.4rem 0 0.35rem;
}
.wiz-step h2:focus {
  outline: none;
}
.wiz-step .hint {
  color: var(--muted);
  font-size: 0.95rem;
  margin: 0 0 1.4rem;
}

/* ---------- choice cards ---------- */
.wiz-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.85rem;
}
@media (max-width: 520px) {
  .wiz-cards {
    grid-template-columns: 1fr;
  }
}
.wiz-card {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  text-align: left;
  min-height: 74px;
  padding: 1rem 1.15rem;
  border-radius: var(--radius-btn);
  border: 1px solid var(--line);
  background: var(--bg-2);
  color: var(--text);
  cursor: pointer;
  font-size: 1.02rem;
  font-weight: 500;
  transition: border-color 0.15s, background 0.15s, transform 0.12s;
}
.wiz-card:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
}
.wiz-card[aria-pressed="true"] {
  border-color: var(--accent);
  background: rgba(246, 143, 71, 0.14);
}
.wiz-card__ico {
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: rgba(246, 143, 71, 0.16);
  color: var(--accent);
}
.wiz-card__ico svg {
  width: 22px;
  height: 22px;
}
.wiz-card small {
  display: block;
  color: var(--muted);
  font-weight: 400;
  font-size: 0.85rem;
}

/* ---------- RFQ line builder ---------- */
.rfq-rows {
  display: grid;
  gap: 0.75rem;
}
.rfq-row {
  display: grid;
  grid-template-columns: 1fr 0.8fr auto auto;
  gap: 0.6rem;
  align-items: end;
  padding: 0.75rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-btn);
  background: var(--bg-2);
}
.rfq-row label {
  font-size: 0.75rem;
  color: var(--muted);
  margin-bottom: 0.25rem;
}
.rfq-row select {
  min-height: 44px;
}
@media (max-width: 620px) {
  .rfq-row {
    grid-template-columns: 1fr 1fr;
  }
  .rfq-row .rfq-qty-wrap {
    grid-column: 1;
  }
  .rfq-row .rfq-remove {
    grid-column: 2;
    justify-self: end;
    align-self: center;
  }
}

/* quantity stepper */
.qty {
  display: inline-flex;
  align-items: stretch;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  background: var(--bg);
}
.qty button {
  width: 44px;
  min-height: 44px;
  border: 0;
  background: transparent;
  color: var(--text);
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.qty button:hover {
  background: var(--accent);
  color: var(--ink);
}
.qty input {
  width: 52px;
  text-align: center;
  border: 0;
  border-inline: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  padding: 0;
  font-family: var(--font-mono);
}
.qty input::-webkit-outer-spin-button,
.qty input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.rfq-remove {
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: color 0.15s, border-color 0.15s;
}
.rfq-remove:hover {
  color: var(--danger);
  border-color: var(--danger);
}
.rfq-remove svg {
  width: 18px;
  height: 18px;
}
.rfq-add {
  margin-top: 0.9rem;
}
.rfq-total {
  margin-top: 0.75rem;
  font-size: 0.9rem;
  color: var(--muted);
}
.rfq-total b {
  color: var(--accent);
  font-family: var(--font-mono);
}

/* ---------- chip groups (step 3) ---------- */
.wiz-group {
  margin-bottom: 1.5rem;
}
.wiz-group__label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.7rem;
}
.wiz-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}
.wiz-chip {
  min-height: 44px;
  padding-inline: 1.1rem;
  font-size: 0.95rem;
}

/* ---------- contact fields ---------- */
.wiz-fields {
  display: grid;
  gap: 0.25rem;
}
.wiz-fields .field {
  margin-bottom: 0.85rem;
}
.wiz-two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
@media (max-width: 520px) {
  .wiz-two {
    grid-template-columns: 1fr;
  }
}

/* ---------- nav ---------- */
.wiz-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
}
.wiz-nav__right {
  display: flex;
  gap: 0.6rem;
  margin-left: auto;
}
.wiz-status {
  margin: 0.9rem 0 0;
  color: #ff6b64;
  font-size: 0.9rem;
  min-height: 1.2em;
}

/* reveal safety: the wizard must always be visible even without main.js */
.wiz-shell.reveal,
.js .wiz-shell.reveal {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .wiz-step {
    animation: none;
  }
  .wiz-progress::after {
    transition: none;
  }
}
