/* ============================================================
   CumbreLab — Encuesta de calificación (modal)
   Reusa los tokens de styles.css (--night, --green, etc.)
============================================================ */

.qz-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(8, 11, 16, .72);
  backdrop-filter: blur(8px) saturate(140%);
  -webkit-backdrop-filter: blur(8px) saturate(140%);
  opacity: 0;
  pointer-events: none;
  transition: opacity 280ms var(--ease);
}
.qz-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

.qz-card {
  position: relative;
  width: min(560px, 100%);
  max-height: min(90vh, 760px);
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(ellipse 90% 60% at 50% -10%, rgba(168,255,176,.07), transparent 60%),
    var(--night-2);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: 0 40px 120px -20px rgba(0,0,0,.7), 0 0 0 1px rgba(168,255,176,.04);
  overflow: hidden;
  transform: translateY(14px) scale(.985);
  transition: transform 320ms var(--ease);
}
.qz-overlay.is-open .qz-card { transform: translateY(0) scale(1); }

/* ─── header ─────────────────────────────────────────────── */
.qz-head {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 20px 22px 16px;
  border-bottom: 1px solid var(--border-soft);
}
.qz-brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
}
.qz-brand svg { width: 18px; height: 18px; color: var(--pearl); }
.qz-brand-word {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 14px;
  color: var(--white);
  letter-spacing: -0.01em;
}
.qz-step-count {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--graphite);
  letter-spacing: 0.04em;
}
.qz-close {
  width: 30px; height: 30px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--pearl);
  cursor: pointer;
  transition: all var(--dur) var(--ease);
  flex-shrink: 0;
}
.qz-close:hover { border-color: var(--green); color: var(--green); }
.qz-close svg { width: 14px; height: 14px; }

/* ─── progress ───────────────────────────────────────────── */
.qz-progress {
  height: 3px;
  background: rgba(255,255,255,.06);
  position: relative;
  overflow: hidden;
}
.qz-progress-fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0%;
  background: linear-gradient(90deg, var(--green), #BFFFC6);
  border-radius: 0 var(--r-pill) var(--r-pill) 0;
  transition: width 420ms var(--ease);
}

/* ─── body / steps ───────────────────────────────────────── */
.qz-body {
  padding: 28px 26px 8px;
  overflow-y: auto;
  flex: 1;
  scrollbar-width: thin;
  scrollbar-color: var(--slate) transparent;
}
.qz-body::-webkit-scrollbar { width: 7px; }
.qz-body::-webkit-scrollbar-thumb { background: var(--slate); border-radius: 10px; }

.qz-step { display: none; }
.qz-step.is-active {
  display: block;
  animation: qzIn 360ms var(--ease);
}
@keyframes qzIn {
  from { opacity: 0; transform: translateX(12px); }
  to   { opacity: 1; transform: translateX(0); }
}

.qz-kicker {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--green);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.qz-kicker::before {
  content: '';
  width: 18px; height: 1px;
  background: linear-gradient(90deg, var(--green), transparent);
}
.qz-q {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(21px, 3.4vw, 26px);
  line-height: 1.18;
  letter-spacing: -0.015em;
  color: var(--white);
  text-wrap: balance;
  margin-bottom: 6px;
}
.qz-help {
  font-size: 13.5px;
  color: var(--graphite);
  line-height: 1.5;
  margin-bottom: 22px;
}

/* ─── options ────────────────────────────────────────────── */
.qz-options { display: flex; flex-direction: column; gap: 10px; }
.qz-opt {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  text-align: left;
  padding: 16px 18px;
  background: rgba(255,255,255,.02);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  color: var(--pearl);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.35;
  cursor: pointer;
  transition: all 180ms var(--ease);
}
.qz-opt:hover {
  background: rgba(255,255,255,.045);
  border-color: rgba(255,255,255,.16);
  transform: translateX(3px);
}
.qz-opt-tick {
  width: 22px; height: 22px;
  flex-shrink: 0;
  border-radius: 50%;
  border: 1.5px solid var(--graphite);
  display: grid;
  place-items: center;
  transition: all 180ms var(--ease);
}
.qz-opt-tick svg { width: 12px; height: 12px; opacity: 0; transform: scale(.6); transition: all 180ms var(--ease); color: var(--night); }
.qz-opt.is-sel {
  background: rgba(168,255,176,.06);
  border-color: var(--green);
  color: var(--white);
}
.qz-opt.is-sel .qz-opt-tick { background: var(--green); border-color: var(--green); }
.qz-opt.is-sel .qz-opt-tick svg { opacity: 1; transform: scale(1); }

/* ─── contact step ───────────────────────────────────────── */
.qz-field { margin-bottom: 16px; }
.qz-label {
  display: block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 12.5px;
  color: var(--pearl);
  margin-bottom: 8px;
}
.qz-label span { color: var(--graphite); font-weight: 400; }
.qz-input {
  width: 100%;
  padding: 14px 16px;
  background: rgba(255,255,255,.03);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  color: var(--white);
  font-family: var(--font-body);
  font-size: 15px;
  transition: border-color var(--dur) var(--ease);
}
.qz-input::placeholder { color: var(--graphite); }
.qz-input:focus { outline: none; border-color: var(--green); }

/* ─── footer / nav ───────────────────────────────────────── */
.qz-foot {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 26px 22px;
  border-top: 1px solid var(--border-soft);
}
.qz-back {
  background: transparent;
  border: none;
  color: var(--graphite);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  padding: 8px 4px;
  transition: color var(--dur) var(--ease);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.qz-back:hover { color: var(--pearl); }
.qz-back[hidden] { display: none; }
.qz-back svg { width: 14px; height: 14px; }
.qz-foot-spacer { margin-left: auto; }
.qz-next {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.qz-next:disabled {
  opacity: .4;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}
.qz-hint {
  font-size: 11.5px;
  color: var(--graphite);
}

/* ============================================================
   RESULT SCREENS
============================================================ */
.qz-result { display: none; text-align: center; padding: 36px 30px 10px; }
.qz-result.is-active { display: block; animation: qzIn 420ms var(--ease); }

.qz-result-badge {
  width: 64px; height: 64px;
  margin: 0 auto 22px;
  border-radius: 50%;
  display: grid;
  place-items: center;
}
.qz-result-badge svg { width: 30px; height: 30px; }
.qz-result-badge.good {
  background: rgba(168,255,176,.12);
  border: 1px solid var(--border-bright);
  color: var(--green);
}
.qz-result-badge.soft {
  background: rgba(255,255,255,.04);
  border: 1px solid var(--border);
  color: var(--pearl);
}

.qz-result-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(23px, 3.6vw, 30px);
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--white);
  text-wrap: balance;
  margin-bottom: 14px;
}
.qz-result-text {
  font-size: 15px;
  line-height: 1.65;
  color: var(--pearl);
  max-width: 420px;
  margin: 0 auto 26px;
  text-wrap: pretty;
}
.qz-result-text strong { color: var(--white); font-weight: 600; }
.qz-result-text .hl { color: var(--green); }

.qz-summary {
  text-align: left;
  background: rgba(255,255,255,.02);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 16px 18px;
  max-width: 400px;
  margin: 0 auto 24px;
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.qz-summary-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  font-size: 13px;
  line-height: 1.4;
}
.qz-summary-row dt { color: var(--graphite); flex-shrink: 0; }
.qz-summary-row dd { color: var(--white); text-align: right; font-weight: 600; font-family: var(--font-display); }

.qz-result-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
  padding-bottom: 26px;
}
.qz-wa-btn {
  width: 100%;
  max-width: 360px;
  padding: 16px 24px;
  font-size: 15px;
}
.qz-alt-btn {
  width: 100%;
  max-width: 360px;
  padding: 14px 24px;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: rgba(255,255,255,.02);
  border: 1px solid var(--border);
  color: var(--pearl);
  border-radius: var(--r-pill);
  font-family: var(--font-display);
  font-weight: 700;
  text-decoration: none;
  transition: all var(--dur) var(--ease);
}
.qz-alt-btn svg { color: #25D366; flex-shrink: 0; }
.qz-alt-btn:hover { border-color: rgba(255,255,255,.2); background: rgba(255,255,255,.05); color: var(--white); }
.qz-yt-btn {
  width: 100%;
  max-width: 360px;
  padding: 14px 24px;
  font-size: 14.5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: rgba(255,255,255,.02);
  border: 1px solid var(--border);
  color: var(--pearl);
  border-radius: var(--r-pill);
  font-family: var(--font-display);
  font-weight: 700;
  text-decoration: none;
  transition: all var(--dur) var(--ease);
}
.qz-yt-btn svg { color: #FF3B30; flex-shrink: 0; transition: color var(--dur) var(--ease); }
.qz-yt-btn:hover { border-color: rgba(255,255,255,.2); background: rgba(255,255,255,.045); color: var(--white); }
.qz-result-micro {
  font-size: 11.5px;
  color: var(--graphite);
}
.qz-result-link {
  background: none;
  border: none;
  color: var(--graphite);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color var(--dur) var(--ease);
}
.qz-result-link:hover { color: var(--pearl); }

@media (max-width: 520px) {
  .qz-card { max-height: 92vh; }
  .qz-body { padding: 24px 20px 8px; }
  .qz-head, .qz-foot { padding-inline: 20px; }
  .qz-result { padding-inline: 22px; }
}
