/* ══════════════════════════════════════════════════
   Qwegle Project Estimator — form.css  v1.1
   Poppins · Black & White · iOS-Minimal
══════════════════════════════════════════════════ */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800&display=swap');

.qe-wrap {
  font-family: 'Poppins', sans-serif;
  display: flex;
  min-height: 100vh;
  background: #ffffff;
  color: #0a0a0a;
  -webkit-font-smoothing: antialiased;
  --ink:  #0a0a0a;
  --ink2: #3a3a3a;
  --ink3: #6b6b6b;
  --ink4: #a0a0a0;
  --line: #e4e4e4;
  --surf: #f6f6f6;
  --white:#ffffff;
  --r:    11px;
  --rsm:  7px;
  --ease: cubic-bezier(0.4,0,0.2,1);
}

/* ══════════════════════════════════════════════════
   LEFT PANEL
══════════════════════════════════════════════════ */
.qe-left {
  width: 50%;
  background: var(--surf);
  border-right: 1px solid var(--line);
  padding: 44px 40px 36px;
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.qe-logo {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink);
  margin-bottom: 24px;
  flex-shrink: 0;
}

/* Progress dots */
.qe-dots {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
  flex-shrink: 0;
}
.qe-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--line);
  transition: background 0.25s, transform 0.2s;
}
.qe-dot.active { background: var(--ink); transform: scale(1.3); }
.qe-dot.done   { background: var(--ink2); }

/* Steps viewport — takes remaining space */
.qe-steps-viewport {
  flex: 1;
  min-height: 0;     /* critical: lets flex child shrink below content size */
  overflow: hidden;
  position: relative;
}

.qe-step {
  display: none;
  flex-direction: column;
  height: 100%;
  overflow-y: auto;
  padding-right: 4px;
  animation: qeIn 0.28s var(--ease) both;
}
.qe-step::-webkit-scrollbar { width: 3px; }
.qe-step::-webkit-scrollbar-thumb { background: var(--line); border-radius: 2px; }
.qe-step.active { display: flex; }

@keyframes qeIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: none; }
}

/* Step header row — label + continue button top-right */
.qe-step-toprow {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 8px;
  gap: 12px;
}
.qe-step-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink4);
  padding-top: 2px;
  flex-shrink: 0;
}

/* Continue button — top-right of step */
.qe-next-btn {
  background: var(--ink);
  color: var(--white);
  border: none;
  border-radius: 20px;
  padding: 7px 18px;
  font-family: 'Poppins', sans-serif;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s, opacity 0.2s, transform 0.1s;
  white-space: nowrap;
  flex-shrink: 0;
}
.qe-next-btn:hover:not(:disabled) { background: #222; transform: translateY(-1px); }
.qe-next-btn:disabled { opacity: 0.3; cursor: default; }

.qe-step-q {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ink);
  line-height: 1.2;
  margin-bottom: 5px;
}
.qe-step-hint {
  font-size: 12px;
  color: var(--ink4);
  margin-bottom: 18px;
}

/* ── CHIPS (step 1) ──────────────────────────────── */
.qe-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 0;
}
.qe-chip {
  padding: 9px 17px;
  border: 1.5px solid var(--line);
  border-radius: 40px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  background: var(--white);
  color: var(--ink2);
  transition: border-color 0.15s, background 0.15s, color 0.15s, transform 0.1s, box-shadow 0.15s;
  user-select: none;
  white-space: nowrap;
  line-height: 1.4;
}
.qe-chip:hover {
  border-color: var(--ink3);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0,0,0,0.07);
}
.qe-chip.sel {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--white);
  box-shadow: 0 3px 12px rgba(0,0,0,0.2);
}

/* ── TILES (budget / stage) ──────────────────────── */
.qe-tiles {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.qe-tile {
  border: 1.5px solid var(--line);
  border-radius: var(--r);
  padding: 14px 16px;
  cursor: pointer;
  background: var(--white);
  font-size: 13px;
  font-weight: 600;
  color: var(--ink2);
  transition: border-color 0.15s, background 0.15s, transform 0.1s, box-shadow 0.15s;
  user-select: none;
  display: flex;
  flex-direction: column;
  gap: 3px;
  line-height: 1.35;
}
.qe-tile span {
  font-size: 11px;
  font-weight: 400;
  color: var(--ink4);
}
.qe-tile:hover { border-color: var(--ink3); transform: translateY(-1px); box-shadow: 0 3px 10px rgba(0,0,0,0.07); }
.qe-tile.sel   { border-color: var(--ink); border-width: 2px; background: var(--ink); color: var(--white); box-shadow: 0 4px 14px rgba(0,0,0,0.16); }
.qe-tile.sel span { color: rgba(255,255,255,0.6); }

/* ── COUNTRIES (compact 3-col) ───────────────────── */
.qe-countries {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 9px;
}
.qe-country {
  border: 1.5px solid var(--line);
  border-radius: var(--rsm);
  padding: 11px 8px;
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  background: var(--white);
  color: var(--ink2);
  transition: border-color 0.15s, background 0.15s, transform 0.1s;
  user-select: none;
  line-height: 1.4;
}
.qe-country:hover { border-color: var(--ink3); transform: translateY(-1px); }
.qe-country.sel   { border-color: var(--ink); border-width: 2px; background: var(--ink); color: var(--white); }

/* ── APPROACH CARDS ──────────────────────────────── */
.qe-approach-list { display: flex; flex-direction: column; gap: 10px; }
.qe-approach-card {
  border: 1.5px solid var(--line);
  border-radius: var(--r);
  padding: 15px 17px;
  cursor: pointer;
  background: var(--white);
  transition: border-color 0.15s, background 0.15s, transform 0.1s;
  user-select: none;
}
.qe-approach-card:hover { border-color: var(--ink3); transform: translateY(-1px); }
.qe-approach-card.sel   { border-color: var(--ink); border-width: 2px; background: var(--ink); }

.qa-title { font-size: 14px; font-weight: 700; color: var(--ink); margin-bottom: 3px; }
.qe-approach-card.sel .qa-title { color: var(--white); }
.qa-sub   { font-size: 12px; color: var(--ink3); }
.qe-approach-card.sel .qa-sub { color: rgba(255,255,255,0.55); }
.qa-tag {
  display: inline-block; margin-top: 8px;
  font-size: 11px; font-weight: 600;
  background: var(--surf); color: var(--ink2);
  padding: 3px 9px; border-radius: 20px;
}
.qe-approach-card.sel .qa-tag { background: rgba(255,255,255,0.12); color: rgba(255,255,255,0.8); }

/* ── ESTIMATE BAR ────────────────────────────────── */
.qe-estimate {
  background: var(--ink);
  color: var(--white);
  border-radius: var(--r);
  padding: 16px 20px;
  margin-top: 16px;
  flex-shrink: 0;
  animation: qeIn 0.3s var(--ease);
}
.qe-est-row { display: flex; gap: 0; }
.qe-est-block { flex: 1; }
.qe-est-lbl {
  font-size: 9px; font-weight: 600;
  letter-spacing: 0.13em; text-transform: uppercase;
  color: rgba(255,255,255,0.4); margin-bottom: 3px;
}
.qe-est-val { font-size: 14px; font-weight: 800; letter-spacing: -0.01em; color: var(--white); }
.qe-est-save {
  font-size: 11px; color: rgba(255,255,255,0.55);
  margin-top: 9px; padding-top: 9px;
  border-top: 1px solid rgba(255,255,255,0.1);
}

/* Back button */
.qe-step-nav { margin-top: 10px; flex-shrink: 0; }
.qe-back-btn {
  background: none;
  border: 1.5px solid var(--line);
  border-radius: var(--rsm);
  padding: 7px 18px;
  font-family: 'Poppins', sans-serif;
  font-size: 12px; font-weight: 600;
  color: var(--ink3); cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}
.qe-back-btn:hover { border-color: var(--ink); color: var(--ink); }

/* ══════════════════════════════════════════════════
   RIGHT PANEL
══════════════════════════════════════════════════ */
.qe-right {
  width: 50%;
  padding: 44px 44px 44px 40px;
  overflow-y: auto;
  background: var(--white);
}
.qe-right::-webkit-scrollbar { width: 3px; }
.qe-right::-webkit-scrollbar-thumb { background: var(--line); border-radius: 2px; }

.qe-form-hed {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.15;
  margin-bottom: 6px;
}
.qe-form-sub {
  font-size: 13px;
  color: var(--ink3);
  line-height: 1.6;
  margin-bottom: 26px;
}

/* Input rows */
.qe-row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; margin-bottom: 11px; }
.qe-fg   { }

.qe-right label,
.qe-sec-lbl {
  display: block;
  font-size: 10px; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--ink3); margin-bottom: 6px;
}
.qe-opt {
  font-weight: 400; text-transform: none;
  letter-spacing: 0; color: var(--ink4); margin-left: 2px;
}

.qe-right input[type="text"],
.qe-right input[type="email"],
.qe-right input[type="tel"],
.qe-right textarea {
  width: 100%;
  border: 1.5px solid var(--line);
  border-radius: var(--rsm);
  background: var(--surf);
  padding: 12px 14px;
  font-family: 'Poppins', sans-serif;
  font-size: 13px;
  color: var(--ink);
  outline: none;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
  -webkit-appearance: none;
  box-sizing: border-box;
}
.qe-right input::placeholder,
.qe-right textarea::placeholder { color: var(--ink4); }
.qe-right input:focus,
.qe-right textarea:focus {
  border-color: var(--ink);
  background: var(--white);
  box-shadow: 0 0 0 3px rgba(10,10,10,0.05);
}
.qe-right textarea { resize: vertical; min-height: 84px; }

.qe-divider { border: none; border-top: 1px solid var(--line); margin: 20px 0; }
.qe-sec-lbl { margin-bottom: 9px; }

/* Company */
.qe-co-list { display: flex; flex-direction: column; gap: 8px; }
.qe-co {
  border: 1.5px solid var(--line);
  border-radius: var(--r);
  padding: 12px 14px;
  display: flex; align-items: center; gap: 12px;
  cursor: pointer; background: var(--white);
  transition: border-color 0.15s, background 0.15s;
  user-select: none;
}
.qe-co:hover { border-color: var(--ink3); }
.qe-co.sel   { border-color: var(--ink); border-width: 2px; background: var(--surf); }
.qe-co-flag  { font-size: 18px; flex-shrink: 0; line-height: 1; }
.qe-co-info  { flex: 1; }
.qe-co-name  { font-size: 13px; font-weight: 700; }
.qe-co-desc  { font-size: 11px; color: var(--ink4); margin-top: 1px; }
.qe-co-radio {
  width: 17px; height: 17px;
  border: 2px solid var(--line);
  border-radius: 50%; flex-shrink: 0;
  transition: border-color 0.15s;
  display: flex; align-items: center; justify-content: center;
}
.qe-co.sel .qe-co-radio { border-color: var(--ink); }
.qe-co.sel .qe-co-radio::after {
  content: ''; display: block;
  width: 7px; height: 7px;
  background: var(--ink); border-radius: 50%;
}

/* ── MEDIA ROW ────────────────────────────────────── */
.qe-media-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 13px;
  margin-top: 0;
}
.qe-media-col { display: flex; flex-direction: column; }
.qe-media-col > label { margin-bottom: 7px; }

/* Upload zone */
.qe-upload-zone {
  border: 1.5px dashed var(--line);
  border-radius: var(--r);
  padding: 18px 12px;
  text-align: center;
  cursor: pointer;
  background: var(--surf);
  transition: border-color 0.15s, background 0.15s;
  flex: 1;
}
.qe-upload-zone:hover,
.qe-upload-zone.drag { border-color: var(--ink); background: var(--white); }
.qe-upload-zone svg { display: block; margin: 0 auto 8px; color: var(--ink3); }
.qe-upl-txt { font-size: 12px; font-weight: 600; color: var(--ink2); margin-bottom: 2px; }
.qe-upl-txt u { color: var(--ink); cursor: pointer; text-underline-offset: 2px; }
.qe-upl-sub { font-size: 10px; color: var(--ink4); }

.qe-file-list { margin-top: 7px; display: flex; flex-direction: column; gap: 5px; }
.qe-fi {
  display: flex; align-items: center; gap: 8px;
  background: var(--surf); border-radius: var(--rsm);
  padding: 8px 11px; font-size: 12px;
}
.qe-fi-name  { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.qe-fi-state { font-size: 10px; color: var(--ink4); flex-shrink: 0; }
.qe-fi-rm    { cursor: pointer; color: var(--ink4); font-size: 14px; flex-shrink: 0; transition: color 0.12s; }
.qe-fi-rm:hover { color: var(--ink); }

.qe-upload-progress { margin-top: 7px; }
.qe-prog-bar  { height: 3px; background: var(--line); border-radius: 2px; overflow: hidden; }
.qe-prog-fill { height: 100%; background: var(--ink); border-radius: 2px; transition: width 0.3s; width: 0%; }
.qe-prog-txt  { font-size: 10px; color: var(--ink4); margin-top: 4px; }

/* Voice */
.qe-voice-wrap {
  border: 1.5px solid var(--line);
  border-radius: var(--r);
  padding: 13px;
  display: flex; align-items: center; gap: 11px;
  background: var(--surf);
  flex: 1;
}
.qe-rec-btn {
  width: 42px; height: 42px; border-radius: 50%;
  border: 1.5px solid var(--ink);
  background: var(--white);
  cursor: pointer; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.15s, color 0.15s;
  color: var(--ink);
}
.qe-rec-btn:hover { background: var(--ink); color: var(--white); }
.qe-rec-btn.on    { background: var(--ink); color: var(--white); animation: qePulse 1s infinite; }
@keyframes qePulse {
  0%,100%{box-shadow:0 0 0 0 rgba(10,10,10,0.2);}
  50%{box-shadow:0 0 0 6px rgba(10,10,10,0);}
}
.qe-rec-btn svg { display: block; }
.qe-voice-info { flex: 1; min-width: 0; }
.qe-v-title    { font-size: 12px; font-weight: 600; margin-bottom: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.qe-v-sub      { font-size: 10px; color: var(--ink4); }
.qe-v-timer    { font-size: 17px; font-weight: 700; font-variant-numeric: tabular-nums; flex-shrink: 0; }

.qe-waves { display: flex; align-items: center; gap: 2px; height: 14px; margin-top: 3px; }
.qe-w { width: 2px; border-radius: 2px; background: var(--ink); height: 3px; }
.qe-waves.on .qe-w { animation: qeWave 0.8s ease-in-out infinite; }
.qe-w:nth-child(2){animation-delay:.1s}.qe-w:nth-child(3){animation-delay:.2s}
.qe-w:nth-child(4){animation-delay:.15s}.qe-w:nth-child(5){animation-delay:.05s}
@keyframes qeWave { 0%,100%{height:3px;}50%{height:13px;} }
.qe-voice-uploading { font-size: 10px; color: var(--ink4); margin-top: 5px; }

/* ── SUBMIT ──────────────────────────────────────── */
.qe-submit-btn {
  width: 100%;
  background: var(--ink);
  color: var(--white);
  border: none;
  border-radius: var(--r);
  padding: 16px;
  font-family: 'Poppins', sans-serif;
  font-size: 14px; font-weight: 700;
  cursor: pointer;
  margin-top: 20px;
  position: relative;
  overflow: hidden;
  transition: background 0.15s, transform 0.1s, box-shadow 0.15s;
  display: flex; align-items: center; justify-content: center;
}
.qe-submit-btn:hover { background: #1a1a1a; transform: translateY(-1px); box-shadow: 0 5px 20px rgba(0,0,0,0.18); }
.qe-submit-btn.ld .qe-btn-txt { opacity: 0; }
.qe-spinner {
  display: none;
  width: 17px; height: 17px;
  border: 2px solid rgba(255,255,255,0.2);
  border-top-color: white; border-radius: 50%;
  animation: qeSpin 0.65s linear infinite;
  position: absolute;
}
.qe-submit-btn.ld .qe-spinner { display: block; }
@keyframes qeSpin { to { transform: rotate(360deg); } }

.qe-trust {
  display: flex; justify-content: center; gap: 18px;
  margin-top: 12px; flex-wrap: wrap;
}
.qe-trust span {
  font-size: 11px; color: var(--ink4);
  padding-left: 11px; position: relative;
}
.qe-trust span::before {
  content: ''; position: absolute; left: 0; top: 50%;
  transform: translateY(-50%);
  width: 4px; height: 4px; border-radius: 50%; background: var(--line);
}

/* ── SUCCESS ─────────────────────────────────────── */
.qe-success {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center; min-height: 60vh;
  animation: qeIn 0.4s var(--ease);
}
.qe-success-icon {
  width: 60px; height: 60px; border-radius: 50%;
  border: 1.5px solid var(--ink);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 18px;
}
.qe-s-title { font-size: 22px; font-weight: 800; letter-spacing: -0.02em; margin-bottom: 9px; }
.qe-s-sub   { font-size: 14px; color: var(--ink3); line-height: 1.6; max-width: 290px; }

/* ══════════════════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════════════════ */
@media (max-width: 880px) {
  .qe-wrap { flex-direction: column; min-height: auto; }
  .qe-left {
    width: 100%; position: static;
    height: auto; min-height: 500px;
  }
  .qe-steps-viewport { min-height: 380px; }
  .qe-right { width: 100%; padding: 32px 24px; }
  .qe-row2  { grid-template-columns: 1fr; }
  .qe-media-row { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .qe-left  { padding: 28px 20px 20px; }
  .qe-right { padding: 24px 18px; }
  .qe-tiles { grid-template-columns: 1fr; }
  .qe-countries { grid-template-columns: repeat(3,1fr); }
}
