/* ============================================================
   COTIZADOR (/cotizador) — wizard multipaso
   Paleta de marca Alg-Coding, compatible con body.dark-theme
   ============================================================ */

.qtz-hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(160deg, #ffffff 0%, #f6f5ff 55%, #fdf4ff 100%);
  padding: 3.25rem 0 2.5rem;
  border-bottom: 1px solid rgba(99, 102, 241, 0.1);
}

.qtz-hero .container { position: relative; z-index: 2; text-align: center; }

.qtz-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.4rem 0.95rem;
  border-radius: 999px;
  background: #eeedfe;
  color: #4f46e5;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.qtz-hero h1 {
  margin: 1.1rem auto 0.7rem;
  max-width: 22ch;
  font-size: clamp(1.7rem, 3.4vw, 2.6rem);
  font-weight: 800;
  line-height: 1.15;
  color: #0f172a;
  letter-spacing: -0.02em;
}

.qtz-hero h1 .qtz-grad {
  background: linear-gradient(120deg, #6366f1 0%, #764ba2 55%, #d946ef 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.qtz-hero p {
  margin: 0 auto;
  max-width: 60ch;
  color: #475569;
  font-size: 1rem;
  line-height: 1.65;
}

.qtz-hero-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6rem 1.4rem;
  margin-top: 1.4rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: #4f46e5;
}

.qtz-hero-meta span { display: inline-flex; align-items: center; gap: 0.4rem; }

/* ---------- contenedor ---------- */
.qtz-wrap {
  padding: 2.5rem 0 4rem;
  background: #f8fafc;
}

.qtz-card {
  max-width: 880px;
  margin: 0 auto;
  background: #ffffff;
  border: 1px solid rgba(99, 102, 241, 0.14);
  border-radius: 22px;
  box-shadow: 0 22px 60px rgba(15, 23, 42, 0.08);
  overflow: hidden;
}

/* ---------- barra de pasos ---------- */
.qtz-steps {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 1.5rem 1.75rem;
  border-bottom: 1px solid #eef2f7;
  background: #fcfdff;
}

.qtz-step-dot {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex: 0 0 auto;
  color: #94a3b8;
  font-size: 0.82rem;
  font-weight: 600;
  transition: color 200ms ease;
}

.qtz-step-dot i.num {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #eef2f7;
  color: #64748b;
  font-style: normal;
  font-size: 0.82rem;
  font-weight: 700;
  transition: all 200ms ease;
}

.qtz-step-dot.is-active { color: #4f46e5; }
.qtz-step-dot.is-active i.num { background: #4f46e5; color: #fff; box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.16); }
.qtz-step-dot.is-done { color: #059669; }
.qtz-step-dot.is-done i.num { background: #d1fae5; color: #059669; }

.qtz-step-line {
  flex: 1 1 auto;
  height: 2px;
  min-width: 12px;
  background: #eef2f7;
  border-radius: 2px;
}
.qtz-step-line.is-done { background: #a7f3d0; }

/* ---------- cuerpo ---------- */
.qtz-body { padding: 2rem 1.75rem 0.5rem; }

.qtz-step { display: none; animation: qtzIn 260ms ease; }
.qtz-step.is-active { display: block; }

@keyframes qtzIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.qtz-step-title {
  margin: 0 0 0.35rem;
  font-size: 1.28rem;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.01em;
}

.qtz-step-sub {
  margin: 0 0 1.6rem;
  color: #64748b;
  font-size: 0.9rem;
}

/* ---------- campos ---------- */
.qtz-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1rem 1.1rem;
}

.qtz-field { display: flex; flex-direction: column; gap: 0.4rem; }
.qtz-field.full { grid-column: 1 / -1; }

.qtz-field label {
  font-size: 0.82rem;
  font-weight: 700;
  color: #334155;
  letter-spacing: 0.01em;
}

.qtz-field label .req { color: #e11d48; margin-left: 2px; }

.qtz-field input[type="text"],
.qtz-field input[type="email"],
.qtz-field input[type="tel"],
.qtz-field input[type="url"],
.qtz-field select,
.qtz-field textarea {
  width: 100%;
  padding: 0.72rem 0.9rem;
  border: 1.5px solid #e2e8f0;
  border-radius: 11px;
  background: #fff;
  color: #0f172a;
  font-size: 0.92rem;
  font-family: inherit;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.qtz-field textarea { min-height: 120px; resize: vertical; line-height: 1.6; }

.qtz-field input:focus,
.qtz-field select:focus,
.qtz-field textarea:focus {
  outline: none;
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.qtz-field input.qtz-error,
.qtz-field textarea.qtz-error,
.qtz-field select.qtz-error {
  border-color: #f43f5e;
  box-shadow: 0 0 0 3px rgba(244, 63, 94, 0.12);
}

.qtz-hint { font-size: 0.76rem; color: #94a3b8; }
.qtz-err { font-size: 0.78rem; color: #e11d48; font-weight: 600; display: none; }
.qtz-err.show { display: block; }

/* ---------- tarjetas de opción ---------- */
.qtz-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(215px, 1fr));
  gap: 0.85rem;
  margin-bottom: 1.5rem;
}

.qtz-option {
  position: relative;
  display: block;
  padding: 1.05rem 1rem;
  border: 1.5px solid #e2e8f0;
  border-radius: 14px;
  background: #fff;
  cursor: pointer;
  transition: all 180ms ease;
}

.qtz-option input { position: absolute; opacity: 0; pointer-events: none; }

.qtz-option i {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: #eeedfe;
  color: #4f46e5;
  font-size: 0.9rem;
  margin-bottom: 0.6rem;
  transition: all 180ms ease;
}

.qtz-option strong { display: block; font-size: 0.9rem; font-weight: 700; color: #0f172a; margin-bottom: 0.15rem; }
.qtz-option span { display: block; font-size: 0.78rem; color: #64748b; line-height: 1.45; }

.qtz-option:hover { border-color: rgba(99, 102, 241, 0.45); transform: translateY(-2px); }

.qtz-option:has(input:checked) {
  border-color: #6366f1;
  background: #f7f6ff;
  box-shadow: 0 8px 24px rgba(99, 102, 241, 0.16);
}

.qtz-option:has(input:checked) i { background: #4f46e5; color: #fff; }

/* ---------- chips de funcionalidades ---------- */
.qtz-chips { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1.6rem; }

.qtz-chip {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.9rem;
  border: 1.5px solid #e2e8f0;
  border-radius: 999px;
  background: #fff;
  font-size: 0.83rem;
  font-weight: 600;
  color: #475569;
  cursor: pointer;
  transition: all 160ms ease;
  user-select: none;
}

.qtz-chip input { position: absolute; opacity: 0; pointer-events: none; }
.qtz-chip:hover { border-color: rgba(99, 102, 241, 0.5); color: #4338ca; }

.qtz-chip:has(input:checked) {
  background: #4f46e5;
  border-color: #4f46e5;
  color: #fff;
  box-shadow: 0 6px 16px rgba(79, 70, 229, 0.25);
}

/* ---------- zona de archivos ---------- */
.qtz-drop {
  position: relative;
  border: 2px dashed rgba(99, 102, 241, 0.35);
  border-radius: 16px;
  background: #fafaff;
  padding: 2rem 1.25rem;
  text-align: center;
  cursor: pointer;
  transition: all 180ms ease;
}

.qtz-drop:hover,
.qtz-drop.is-drag {
  border-color: #6366f1;
  background: #f2f0ff;
}

.qtz-drop i.big {
  font-size: 1.9rem;
  color: #6366f1;
  margin-bottom: 0.6rem;
  display: block;
}

.qtz-drop strong { display: block; font-size: 0.95rem; color: #0f172a; margin-bottom: 0.25rem; }
.qtz-drop span { display: block; font-size: 0.8rem; color: #64748b; }
.qtz-drop input[type="file"] { display: none; }

.qtz-files { display: grid; gap: 0.5rem; margin-top: 0.9rem; }

.qtz-file {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.6rem 0.85rem;
  border: 1px solid #e2e8f0;
  border-radius: 11px;
  background: #fff;
  font-size: 0.84rem;
}

.qtz-file img { width: 34px; height: 34px; object-fit: cover; border-radius: 7px; flex: 0 0 auto; }
.qtz-file i.ico { color: #6366f1; font-size: 1rem; width: 34px; text-align: center; flex: 0 0 auto; }
.qtz-file .name { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #0f172a; font-weight: 600; }
.qtz-file .size { color: #94a3b8; font-size: 0.76rem; flex: 0 0 auto; }
.qtz-file button {
  border: 0; background: #fee2e2; color: #b91c1c; width: 26px; height: 26px;
  border-radius: 8px; cursor: pointer; flex: 0 0 auto; font-size: 0.78rem;
  display: grid; place-items: center;
}
.qtz-file button:hover { background: #fecaca; }

/* ---------- resumen ---------- */
.qtz-summary {
  display: grid;
  gap: 0.55rem;
  padding: 1.25rem 1.35rem;
  border-radius: 14px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  margin-bottom: 1.4rem;
}

.qtz-summary-row { display: flex; gap: 0.75rem; font-size: 0.87rem; }
.qtz-summary-row .k { flex: 0 0 132px; color: #64748b; font-weight: 600; }
.qtz-summary-row .v { flex: 1 1 auto; color: #0f172a; font-weight: 600; word-break: break-word; }

.qtz-consent {
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
  font-size: 0.83rem;
  color: #475569;
  line-height: 1.55;
  margin-bottom: 1.25rem;
}
.qtz-consent input { margin-top: 0.2rem; width: 16px; height: 16px; accent-color: #4f46e5; }

/* ---------- estimador de precio en vivo ---------- */
.qtz-estimate {
  position: sticky;
  bottom: 10px;
  z-index: 5;
  margin: 1.4rem 0 0.4rem;
  padding: 1.1rem 1.25rem;
  border-radius: 16px;
  background: linear-gradient(120deg, #eef2ff 0%, #f5f3ff 55%, #fdf4ff 100%);
  border: 1.5px solid rgba(99, 102, 241, 0.28);
  box-shadow: 0 14px 34px rgba(99, 102, 241, 0.16);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1.25rem;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.qtz-estimate.is-pop {
  transform: scale(1.012);
  box-shadow: 0 18px 42px rgba(99, 102, 241, 0.26);
}

.qtz-estimate-label {
  flex: 0 0 auto;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #4f46e5;
}

.qtz-estimate-main {
  flex: 1 1 auto;
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.qtz-estimate-value {
  font-size: 1.45rem;
  font-weight: 800;
  color: #1e1b4b;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.qtz-estimate-usd {
  font-size: 0.88rem;
  font-weight: 700;
  color: #6d28d9;
  background: rgba(255, 255, 255, 0.75);
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
}

.qtz-estimate-range {
  flex: 1 1 100%;
  font-size: 0.79rem;
  color: #4b5563;
  font-weight: 600;
}

.qtz-estimate-note {
  flex: 1 1 100%;
  font-size: 0.73rem;
  color: #6b7280;
  line-height: 1.45;
}

.qtz-estimate-note strong { color: #4338ca; }

body.dark-theme .qtz-estimate {
  background: linear-gradient(120deg, #1a2138 0%, #1e1b3a 55%, #241a38 100%);
  border-color: rgba(129, 140, 248, 0.4);
}
body.dark-theme .qtz-estimate-label { color: #a5b4fc; }
body.dark-theme .qtz-estimate-value { color: #f1f5f9; }
body.dark-theme .qtz-estimate-usd { background: rgba(99, 102, 241, 0.25); color: #ddd6fe; }
body.dark-theme .qtz-estimate-range { color: #cbd5e1; }
body.dark-theme .qtz-estimate-note { color: #94a3b8; }
body.dark-theme .qtz-estimate-note strong { color: #c7d2fe; }

@media (max-width: 575.98px) {
  .qtz-estimate { padding: 0.9rem 1rem; }
  .qtz-estimate-value { font-size: 1.22rem; }
}

/* ---------- navegación ---------- */
.qtz-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  padding: 1.35rem 1.75rem 1.6rem;
  border-top: 1px solid #eef2f7;
  background: #fcfdff;
}

.qtz-nav-right { display: flex; gap: 0.6rem; margin-left: auto; }

.qtz-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.72rem 1.35rem;
  border-radius: 11px;
  border: 1.5px solid transparent;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  transition: all 180ms ease;
  font-family: inherit;
}

.qtz-btn--primary {
  background: linear-gradient(120deg, #6366f1 0%, #764ba2 55%, #d946ef 100%);
  color: #fff;
  box-shadow: 0 10px 26px rgba(99, 102, 241, 0.28);
}
.qtz-btn--primary:hover { transform: translateY(-2px); box-shadow: 0 14px 32px rgba(99, 102, 241, 0.34); color: #fff; }

.qtz-btn--ghost { background: #fff; border-color: #e2e8f0; color: #475569; }
.qtz-btn--ghost:hover { border-color: #cbd5e1; color: #0f172a; }

.qtz-btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none !important; }

.qtz-progress-text { font-size: 0.8rem; color: #94a3b8; font-weight: 600; }

/* ---------- resultado ---------- */
.qtz-result { display: none; padding: 3rem 1.75rem; text-align: center; }
.qtz-result.is-visible { display: block; }

.qtz-result i.ok {
  display: grid;
  place-items: center;
  width: 76px;
  height: 76px;
  margin: 0 auto 1.2rem;
  border-radius: 50%;
  background: #d1fae5;
  color: #059669;
  font-size: 2rem;
}

.qtz-result h2 { margin: 0 0 0.6rem; font-size: 1.5rem; font-weight: 800; color: #0f172a; }
.qtz-result p { margin: 0 auto 1.5rem; max-width: 46ch; color: #475569; line-height: 1.65; }

/* ---------- modo oscuro ---------- */
body.dark-theme .qtz-hero {
  background: linear-gradient(160deg, #0f172a 0%, #171f36 55%, #1b1533 100%);
  border-bottom-color: rgba(148, 163, 184, 0.15);
}
body.dark-theme .qtz-hero h1 { color: #f1f5f9; }
body.dark-theme .qtz-hero p { color: #94a3b8; }
body.dark-theme .qtz-badge { background: rgba(99, 102, 241, 0.2); color: #c7d2fe; }
body.dark-theme .qtz-hero-meta { color: #a5b4fc; }

body.dark-theme .qtz-wrap { background: #0b1120; }
body.dark-theme .qtz-card { background: #131a2c; border-color: rgba(148, 163, 184, 0.18); }
body.dark-theme .qtz-steps { background: #111827; border-bottom-color: #1e2942; }
body.dark-theme .qtz-step-dot { color: #64748b; }
body.dark-theme .qtz-step-dot i.num { background: #1e2942; color: #94a3b8; }
body.dark-theme .qtz-step-dot.is-active { color: #a5b4fc; }
body.dark-theme .qtz-step-dot.is-active i.num { background: #4f46e5; color: #fff; }
body.dark-theme .qtz-step-dot.is-done { color: #34d399; }
body.dark-theme .qtz-step-dot.is-done i.num { background: rgba(16, 185, 129, 0.2); color: #34d399; }
body.dark-theme .qtz-step-line { background: #1e2942; }
body.dark-theme .qtz-step-line.is-done { background: rgba(16, 185, 129, 0.45); }

body.dark-theme .qtz-step-title,
body.dark-theme .qtz-field label,
body.dark-theme .qtz-summary-row .v { color: #e2e8f0; }
body.dark-theme .qtz-step-sub,
body.dark-theme .qtz-summary-row .k { color: #94a3b8; }

body.dark-theme .qtz-field input,
body.dark-theme .qtz-field select,
body.dark-theme .qtz-field textarea {
  background: #182034;
  border-color: #2a3550;
  color: #e2e8f0;
}
body.dark-theme .qtz-field input:focus,
body.dark-theme .qtz-field select:focus,
body.dark-theme .qtz-field textarea:focus { border-color: #6366f1; }

body.dark-theme .qtz-option { background: #182034; border-color: #2a3550; }
body.dark-theme .qtz-option strong { color: #e2e8f0; }
body.dark-theme .qtz-option span { color: #94a3b8; }
body.dark-theme .qtz-option:has(input:checked) { background: rgba(99, 102, 241, 0.16); border-color: #6366f1; }
body.dark-theme .qtz-option i { background: rgba(99, 102, 241, 0.22); color: #c7d2fe; }

body.dark-theme .qtz-chip { background: #182034; border-color: #2a3550; color: #94a3b8; }
body.dark-theme .qtz-chip:has(input:checked) { background: #4f46e5; border-color: #4f46e5; color: #fff; }

body.dark-theme .qtz-drop { background: #182034; border-color: rgba(99, 102, 241, 0.4); }
body.dark-theme .qtz-drop strong { color: #e2e8f0; }
body.dark-theme .qtz-drop span { color: #94a3b8; }

body.dark-theme .qtz-file { background: #182034; border-color: #2a3550; }
body.dark-theme .qtz-file .name { color: #e2e8f0; }

body.dark-theme .qtz-summary { background: #182034; border-color: #2a3550; }
body.dark-theme .qtz-consent { color: #94a3b8; }
body.dark-theme .qtz-nav { background: #111827; border-top-color: #1e2942; }
body.dark-theme .qtz-btn--ghost { background: #182034; border-color: #2a3550; color: #cbd5e1; }
body.dark-theme .qtz-result h2 { color: #f1f5f9; }
body.dark-theme .qtz-result p { color: #94a3b8; }

/* ---------- responsive ---------- */
@media (max-width: 767.98px) {
  .qtz-steps { padding: 1.1rem 1rem; gap: 0.2rem; }
  .qtz-step-dot span.txt { display: none; }
  .qtz-body { padding: 1.5rem 1.1rem 0.5rem; }
  .qtz-nav { padding: 1.1rem; flex-wrap: wrap; }
  .qtz-progress-text { width: 100%; order: 3; text-align: center; margin-top: 0.4rem; }
  .qtz-summary-row { flex-direction: column; gap: 0.1rem; }
  .qtz-summary-row .k { flex: none; }
}
