/* ═══════════════════════════════════════════════════════════════════
   CINEMATIC FORM WIZARD  ·  3-step sequence with progress particles
   ═══════════════════════════════════════════════════════════════════ */

/* ── Wrapper ── */
.czwiz {
  position: relative;
  overflow: hidden;
}

/* ── Commitment badge ── */
.czwiz-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .06em;
  color: rgba(255,255,255,.55);
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 20px;
  padding: 5px 14px;
  margin-bottom: 20px;
  text-transform: uppercase;
}

/* ── Progress bar ── */
.czwiz-progress {
  display: flex;
  align-items: center;
  gap: 0;
  margin-bottom: 28px;
  padding: 0 2px;
}

.czwiz-pstep {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
  min-width: 56px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: rgba(255,255,255,.35);
  transition: color .3s;
}

.czwiz-pstep-active,
.czwiz-pstep-done {
  color: rgba(255,255,255,.85);
}

.czwiz-pdot {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(255,255,255,.1);
  border: 1.5px solid rgba(255,255,255,.18);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
  color: rgba(255,255,255,.4);
  transition: background .3s, color .3s, border-color .3s;
}

.czwiz-pstep-active .czwiz-pdot {
  background: #e82127;
  border-color: #e82127;
  color: #fff;
  box-shadow: 0 0 14px rgba(232,33,39,.45);
}

.czwiz-pstep-done .czwiz-pdot {
  background: rgba(48,209,88,.2);
  border-color: #30d158;
  color: #30d158;
}

/* connector track */
.czwiz-ptrack {
  flex: 1;
  height: 2px;
  background: rgba(255,255,255,.1);
  border-radius: 2px;
  position: relative;
  overflow: visible;
}

.czwiz-pfill {
  display: block;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #e82127, #ff6b35);
  border-radius: 2px;
  transition: width .55s cubic-bezier(.4,0,.2,1);
  position: relative;
}

/* particle dot travelling along the fill */
.czwiz-pfill.czwiz-filling::after {
  content: '';
  position: absolute;
  right: -3px;
  top: 50%;
  transform: translateY(-50%);
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 8px #fff, 0 0 16px rgba(232,33,39,.8);
  animation: czwiz-particle .55s ease-out forwards;
}

@keyframes czwiz-particle {
  0%   { opacity: 0; transform: translateY(-50%) scale(.4); }
  30%  { opacity: 1; transform: translateY(-50%) scale(1.2); }
  70%  { opacity: 1; transform: translateY(-50%) scale(.9); }
  100% { opacity: 0; transform: translateY(-50%) scale(.4); }
}

/* ── Step panels ── */
.czwiz-panel {
  display: none;
  animation: none;
}

.czwiz-panel.czwiz-panel-active {
  display: block;
  animation: czwiz-slide-in .38s cubic-bezier(.4,0,.2,1);
}

.czwiz-panel.czwiz-panel-exit {
  display: block;
  animation: czwiz-slide-out .3s cubic-bezier(.4,0,.2,1) forwards;
  pointer-events: none;
}

.czwiz-panel.czwiz-panel-enter-left {
  display: block;
  animation: czwiz-slide-in-left .38s cubic-bezier(.4,0,.2,1);
}

@keyframes czwiz-slide-in {
  from { opacity: 0; transform: translateX(32px); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes czwiz-slide-out {
  from { opacity: 1; transform: translateX(0); }
  to   { opacity: 0; transform: translateX(-32px); }
}

@keyframes czwiz-slide-in-left {
  from { opacity: 0; transform: translateX(-32px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* ── Panel heading ── */
.czwiz-panel-head {
  margin-bottom: 20px;
}

.czwiz-panel-head h4 {
  font-size: 20px;
  font-weight: 700;
  color: rgba(255,255,255,.92);
  margin: 0 0 4px;
  letter-spacing: -.01em;
}

.czwiz-panel-head p {
  font-size: 13px;
  color: rgba(255,255,255,.45);
  margin: 0;
}

/* ── Voice input ── */
.czwiz-voice-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.czwiz-voice-wrap .dw-form-input {
  flex: 1;
  padding-right: 44px;
}

.czwiz-mic-btn {
  position: absolute;
  right: 10px;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 8px;
  color: rgba(255,255,255,.5);
  cursor: pointer;
  transition: background .2s, color .2s, border-color .2s;
  flex-shrink: 0;
}

.czwiz-mic-btn:hover {
  background: rgba(232,33,39,.18);
  border-color: rgba(232,33,39,.4);
  color: #e82127;
}

.czwiz-mic-btn.czwiz-mic-active {
  background: rgba(232,33,39,.22);
  border-color: #e82127;
  color: #e82127;
  animation: czwiz-mic-pulse 1s ease-in-out infinite;
}

@keyframes czwiz-mic-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(232,33,39,.4); }
  50%       { box-shadow: 0 0 0 5px rgba(232,33,39,.0); }
}

/* ── Photo drop zone ── */
.czwiz-photo-drop {
  position: relative;
  border: 1.5px dashed rgba(255,255,255,.2);
  border-radius: 10px;
  padding: 14px 16px;
  cursor: pointer;
  transition: border-color .2s, background .2s;
  min-height: 60px;
}

.czwiz-photo-drop:hover {
  border-color: rgba(255,255,255,.4);
  background: rgba(255,255,255,.04);
}

.czwiz-photo-drop.czwiz-drag-over {
  border-color: #e82127;
  background: rgba(232,33,39,.06);
}

.czwiz-photo-input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
}

.czwiz-photo-hint {
  display: flex;
  align-items: center;
  gap: 8px;
  color: rgba(255,255,255,.4);
  font-size: 13px;
  pointer-events: none;
}

.czwiz-photo-thumbs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.czwiz-photo-thumb {
  width: 52px;
  height: 52px;
  border-radius: 7px;
  object-fit: cover;
  border: 1.5px solid rgba(255,255,255,.18);
  flex-shrink: 0;
  animation: czwiz-thumb-pop .2s ease-out;
}

@keyframes czwiz-thumb-pop {
  from { opacity: 0; transform: scale(.7); }
  to   { opacity: 1; transform: scale(1); }
}

.czwiz-photo-help {
  font-size: 11px;
  color: rgba(255,255,255,.3);
  margin: 6px 0 0;
  line-height: 1.5;
}

/* ── Consent label ── */
.czwiz-consent-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 12px;
  color: rgba(255,255,255,.55);
  cursor: pointer;
  line-height: 1.5;
}

.czwiz-consent-label input[type="checkbox"] {
  margin: 2px 0 0;
  flex-shrink: 0;
  width: 15px;
  height: 15px;
  accent-color: #e82127;
}

/* ── Optional tag ── */
.czwiz-opt-tag {
  font-size: 10px;
  font-weight: 500;
  color: rgba(255,255,255,.35);
  background: rgba(255,255,255,.07);
  border-radius: 4px;
  padding: 1px 6px;
  margin-left: 4px;
  text-transform: uppercase;
  letter-spacing: .04em;
}

/* ── Navigation buttons ── */
.czwiz-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,.07);
}

.czwiz-nav-final {
  justify-content: space-between;
}

.czwiz-back-btn {
  background: none;
  border: 1px solid rgba(255,255,255,.18);
  color: rgba(255,255,255,.55);
  font-size: 13px;
  font-weight: 500;
  padding: 9px 16px;
  border-radius: 8px;
  cursor: pointer;
  transition: border-color .2s, color .2s;
}

.czwiz-back-btn:hover {
  border-color: rgba(255,255,255,.35);
  color: rgba(255,255,255,.8);
}

.czwiz-next-btn {
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.2);
  color: rgba(255,255,255,.85);
  font-size: 14px;
  font-weight: 600;
  padding: 10px 22px;
  border-radius: 10px;
  cursor: pointer;
  transition: background .2s, border-color .2s, transform .15s;
}

.czwiz-next-btn:hover {
  background: rgba(232,33,39,.2);
  border-color: rgba(232,33,39,.5);
  color: #fff;
}

.czwiz-next-btn:active,
.czwiz-back-btn:active {
  transform: scale(.97);
}

/* override submit button to match wizard style */
.czwiz-nav .dw-submit-btn.dw-submit-tesla {
  font-size: 14px;
  padding: 12px 24px;
  border-radius: 10px;
  flex: 1;
  max-width: 320px;
}

.czwiz-nav .dw-submit-btn.dw-submit-v2h {
  font-size: 14px;
  padding: 12px 24px;
  border-radius: 10px;
  flex: 1;
  max-width: 320px;
}

/* ── Validation shake ── */
.czwiz-invalid-shake {
  animation: czwiz-shake .35s ease-out;
}

@keyframes czwiz-shake {
  0%,100% { transform: translateX(0); }
  20%      { transform: translateX(-6px); }
  40%      { transform: translateX(6px); }
  60%      { transform: translateX(-4px); }
  80%      { transform: translateX(4px); }
}

/* ── Required field highlight ── */
.czwiz-field-error .dw-form-input,
.czwiz-field-error .dw-form-select {
  border-color: rgba(232,33,39,.6) !important;
  box-shadow: 0 0 0 2px rgba(232,33,39,.18);
}

/* ── Mobile adjustments ── */
@media (max-width: 480px) {
  .czwiz-pstep span:last-child {
    display: none;
  }
  .czwiz-pstep {
    min-width: 36px;
  }
  .czwiz-nav {
    flex-wrap: wrap;
  }
  .czwiz-nav .dw-submit-btn {
    max-width: 100%;
    width: 100%;
  }
  .czwiz-next-btn {
    flex: 1;
  }
}

/* ═══ Upgrade 2026-11 · inline errors, step status, sticky CTA, contrast ═══ */
.czwiz-step-status {
  margin: -10px 0 14px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: rgba(255,255,255,.5);
}
.czwiz-pstep[role="button"][tabindex="0"] { cursor: pointer; }
.czwiz-pstep[aria-current="step"] .czwiz-pdot { box-shadow: 0 0 0 4px rgba(232,33,39,.22); }
.czwiz-panel-head h4:focus { outline: none; }

.czwiz-error-msg {
  margin: 6px 0 0;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.35;
  color: #ff8a8a;
  display: flex;
  align-items: flex-start;
  gap: 6px;
}
.czwiz-error-msg::before {
  content: "!";
  flex: 0 0 16px;
  height: 16px;
  border-radius: 50%;
  background: #e82127;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  line-height: 16px;
  text-align: center;
}
.czwiz-field-error .czwiz-consent-label { color: #ffb4b4; }

/* charger rows inside the dark wizard card were dark-on-dark */
.czwiz .qty-copy strong { color: #f5f7fb; }
.czwiz .qty-copy span { color: rgba(255,255,255,.6); }
.czwiz .qty-row { border-top-color: rgba(255,255,255,.08); }
.czwiz .qty-btn {
  background: rgba(255,255,255,.08);
  border-color: rgba(255,255,255,.22);
  color: #fff;
  width: 44px; height: 44px;           /* 44px touch target */
  touch-action: manipulation;
}
.czwiz .qty-btn:hover { background: rgba(232,33,39,.25); border-color: rgba(232,33,39,.6); }
.czwiz .qty-num { background: rgba(255,255,255,.06); color: #fff; border-color: rgba(255,255,255,.18); }
.czwiz .qty-chip { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.16); color: #e9edf5; }
.czwiz .qty-chip:has(input:checked) { background: rgba(232,33,39,.18); border-color: #e82127; color: #fff; }

/* primary step CTA reads as the main action */
.czwiz-next-btn {
  background: #e82127;
  border-color: #e82127;
  color: #fff;
}
.czwiz-next-btn:hover { background: #ff3b40; border-color: #ff3b40; }

/* Sticky Next / Submit bar on phones — always reachable above the keyboard */
@media (max-width: 720px) {
  .czwiz { overflow: visible; }
  .czwiz-nav {
    position: sticky;
    bottom: 0;
    z-index: 5;
    margin: 20px -18px 0;
    padding: 12px 18px calc(12px + env(safe-area-inset-bottom));
    background: linear-gradient(180deg, rgba(8,12,22,0) 0%, rgba(8,12,22,.92) 28%, rgba(8,12,22,.98) 100%);
    border-top: 1px solid rgba(255,255,255,.08);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    flex-wrap: nowrap;
  }
  .czwiz-nav .czwiz-next-btn,
  .czwiz-nav .dw-submit-btn { flex: 1; min-height: 48px; margin-top: 0; }
  .czwiz-nav .czwiz-back-btn { flex: 0 0 auto; min-height: 48px; }
  .czwiz-nav .dw-submit-btn.dw-submit-tesla { max-width: none; font-size: 15px; }
}
@media (max-width: 720px) {
  /* sticky needs no overflow:hidden scroll-container between the bar and the drawer body */
  .dw-card:has(.czwiz),
  .dw-card:has(.czwiz) > .dw-card-body { overflow: visible; }
}
