/* Quote Wizard — gamified one-question-at-a-time UX */

.wiz-overlay {
  position: fixed;
  inset: 0;
  background: linear-gradient(160deg, rgba(12,27,58,0.92), rgba(30,64,175,0.85));
  backdrop-filter: blur(8px);
  z-index: 200;
  display: none;
  align-items: stretch;
  justify-content: stretch;
  overflow: hidden;
  animation: wiz-fade 0.3s ease-out;
}
.wiz-overlay.open { display: flex; }
@keyframes wiz-fade { from { opacity: 0; } to { opacity: 1; } }

.wiz-modal {
  background: var(--white);
  width: 100%;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

/* ─── HEADER ───────────────────────────────────────────────── */

.wiz-header {
  background: linear-gradient(135deg, var(--blue-900), var(--blue-700));
  color: var(--white);
  padding: 18px 24px 16px;
  position: relative;
  flex-shrink: 0;
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}
.wiz-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.wiz-section-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: var(--radius-pill);
  padding: 5px 14px;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--blue-200);
  letter-spacing: 0.04em;
}
.wiz-close {
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  color: var(--white);
  width: 34px;
  height: 34px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  flex-shrink: 0;
}
.wiz-close:hover { background: rgba(255,255,255,0.2); transform: rotate(90deg); }

/* XP bar — gamification core */
.wiz-xp-bar {
  height: 10px;
  background: rgba(255,255,255,0.12);
  border-radius: 5px;
  overflow: hidden;
  position: relative;
  margin-bottom: 8px;
}
.wiz-xp-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--blue-300), #FBBF24, #34D399);
  background-size: 200% 100%;
  border-radius: 5px;
  width: 0%;
  transition: width 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
  box-shadow: 0 0 12px rgba(96, 165, 250, 0.6);
  animation: wiz-shimmer 3s linear infinite;
}
@keyframes wiz-shimmer { 0% { background-position: 0% 0; } 100% { background-position: 200% 0; } }

.wiz-xp-stats {
  display: flex;
  justify-content: space-between;
  font-size: 0.74rem;
  color: rgba(255,255,255,0.7);
  font-weight: 600;
  letter-spacing: 0.03em;
}

/* ─── BODY ──────────────────────────────────────────────────── */

.wiz-body {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px 24px;
  position: relative;
}

.wiz-screen {
  width: 100%;
  max-width: 540px;
  animation: wiz-slide-in 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes wiz-slide-in {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

.wiz-q-number {
  font-family: 'Quicksand', sans-serif;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--blue-500);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 12px;
}

.wiz-q-title {
  font-family: 'Quicksand', sans-serif;
  font-size: clamp(1.5rem, 3.5vw, 2rem);
  font-weight: 700;
  color: var(--blue-800);
  line-height: 1.25;
  margin-bottom: 8px;
}
.wiz-q-help {
  font-size: 0.95rem;
  color: var(--text-light);
  margin-bottom: 28px;
  font-weight: 500;
}

/* ─── INPUTS — large, mobile-friendly ──────────────────────── */

.wiz-input,
.wiz-select,
.wiz-textarea {
  width: 100%;
  padding: 18px 22px;
  border-radius: var(--radius);
  border: 2px solid var(--blue-100);
  background: var(--white);
  color: var(--text);
  font-family: 'Nunito', sans-serif;
  font-size: 1.15rem;
  outline: none;
  transition: all 0.25s;
}
.wiz-input:focus,
.wiz-select:focus,
.wiz-textarea:focus {
  border-color: var(--blue-500);
  box-shadow: 0 0 0 4px rgba(96, 165, 250, 0.15);
  transform: translateY(-1px);
}
.wiz-textarea { resize: vertical; min-height: 100px; font-size: 1rem; padding: 16px 20px; }

.wiz-paired {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.wiz-paired-3 { grid-template-columns: 1fr 1fr 1fr; }
.wiz-paired .wiz-sub-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-light);
  margin-bottom: 6px;
  display: block;
}

/* Big tappable yes/no */
.wiz-radio-group {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
}
.wiz-radio-option {
  padding: 22px 18px;
  border-radius: var(--radius);
  border: 2px solid var(--blue-100);
  background: var(--white);
  cursor: pointer;
  text-align: center;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text);
  transition: all 0.2s;
  position: relative;
  overflow: hidden;
}
.wiz-radio-option:hover {
  border-color: var(--blue-400);
  background: var(--blue-50);
  transform: translateY(-2px);
}
.wiz-radio-option.selected {
  border-color: var(--blue-600);
  background: linear-gradient(135deg, var(--blue-100), var(--blue-200));
  color: var(--blue-800);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.18);
}
.wiz-radio-option.selected::after {
  content: '✓';
  position: absolute;
  top: 6px;
  right: 10px;
  font-size: 0.95rem;
  color: var(--blue-600);
}

/* Honeypot */
.wiz-honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.wiz-error {
  background: #FEE2E2;
  border: 1px solid #FCA5A5;
  color: #991B1B;
  padding: 12px 16px;
  border-radius: var(--radius);
  font-size: 0.9rem;
  margin-bottom: 16px;
  text-align: left;
}

.wiz-press-hint {
  font-size: 0.78rem;
  color: var(--gray-400);
  margin-top: 14px;
  text-align: center;
  font-weight: 600;
  letter-spacing: 0.04em;
}
.wiz-press-hint kbd {
  background: var(--gray-100);
  padding: 2px 8px;
  border-radius: 4px;
  font-family: 'Nunito', sans-serif;
  border-bottom: 2px solid var(--gray-200);
  font-weight: 700;
  color: var(--blue-800);
  font-size: 0.75rem;
}

/* ─── FOOTER ────────────────────────────────────────────────── */

.wiz-footer {
  flex-shrink: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
  background: var(--blue-25);
  border-top: 1px solid var(--gray-100);
  gap: 12px;
}
.wiz-time-left {
  font-size: 0.82rem;
  color: var(--text-light);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
}
.wiz-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--radius-pill);
  font-family: 'Nunito', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  border: none;
  cursor: pointer;
  transition: all 0.25s;
}
.wiz-btn-back {
  background: transparent;
  color: var(--text-light);
}
.wiz-btn-back:hover { color: var(--blue-700); transform: translateX(-2px); }
.wiz-btn-back:disabled { opacity: 0; pointer-events: none; }
.wiz-btn-next {
  background: linear-gradient(135deg, var(--blue-600), var(--blue-500));
  color: var(--white);
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.3);
}
.wiz-btn-next:hover { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(37, 99, 235, 0.4); }
.wiz-btn-next:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

/* ─── MILESTONE TOAST ──────────────────────────────────────── */

.wiz-toast {
  position: fixed;
  top: 80px;
  left: 50%;
  transform: translate(-50%, -20px);
  background: linear-gradient(135deg, #FBBF24, #F59E0B);
  color: var(--white);
  padding: 14px 24px;
  border-radius: var(--radius-pill);
  font-weight: 700;
  font-size: 0.95rem;
  box-shadow: 0 12px 32px rgba(245, 158, 11, 0.35);
  z-index: 250;
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  pointer-events: none;
  display: flex;
  align-items: center;
  gap: 10px;
}
.wiz-toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}
.wiz-toast-icon { font-size: 1.3rem; }

/* ─── SUCCESS / RESUME / CONFETTI ──────────────────────────── */

.wiz-success {
  text-align: center;
  padding: 80px 32px 60px;
  position: relative;
  overflow: hidden;
}
.wiz-success-icon {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: linear-gradient(135deg, #34D399, #10B981);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  margin: 0 auto 24px;
  box-shadow: 0 12px 32px rgba(16, 185, 129, 0.35);
  animation: wiz-pop 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes wiz-pop {
  0% { transform: scale(0); opacity: 0; }
  60% { transform: scale(1.2); }
  100% { transform: scale(1); opacity: 1; }
}
.wiz-success h2 {
  font-family: 'Quicksand', sans-serif;
  font-size: 2rem;
  color: var(--blue-800);
  margin-bottom: 12px;
}
.wiz-success p {
  color: var(--text-light);
  font-size: 1.05rem;
  max-width: 460px;
  margin: 0 auto 28px;
}

.wiz-confetti {
  position: absolute;
  width: 10px;
  height: 18px;
  top: -20px;
  pointer-events: none;
}
@keyframes wiz-confetti-fall {
  0% { transform: translateY(0) rotate(0deg); opacity: 1; }
  100% { transform: translateY(110vh) rotate(720deg); opacity: 0; }
}

/* Resume modal */
.wiz-resume {
  text-align: center;
  padding: 60px 32px;
}
.wiz-resume-icon {
  font-size: 3rem;
  margin-bottom: 16px;
}
.wiz-resume h2 {
  font-family: 'Quicksand', sans-serif;
  font-size: 1.6rem;
  color: var(--blue-800);
  margin-bottom: 8px;
}
.wiz-resume p {
  color: var(--text-light);
  margin-bottom: 24px;
}
.wiz-resume-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ─── MOBILE TWEAKS ─────────────────────────────────────────── */

@media (max-width: 640px) {
  .wiz-body { padding: 24px 18px; min-height: calc(100dvh - 200px); }
  .wiz-header { padding: 14px 18px 14px; }
  .wiz-footer { padding: 14px 18px; }
  .wiz-q-title { font-size: 1.4rem; }
  .wiz-input, .wiz-select { font-size: 1.05rem; padding: 16px 18px; }
  .wiz-radio-option { padding: 18px 12px; font-size: 1rem; }
  .wiz-btn { padding: 12px 22px; font-size: 0.95rem; }
}
