/* Shared one-at-a-time quiz session + lead modal */

.ds4k-quiz-session .problem.ds4k-session-hidden {
  display: none !important;
}

.ds4k-quiz-session .problem.ds4k-session-active {
  display: list-item;
  animation: ds4k-session-in 0.35s ease;
}

@keyframes ds4k-session-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.ds4k-session-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 12px 0 16px;
  padding: 10px 14px;
  background: #f1f5f9;
  border-radius: 14px;
}

.ds4k-session-badge {
  font-weight: 900;
  font-size: 14px;
  color: #334155;
  white-space: nowrap;
}

.ds4k-session-dots {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}

.ds4k-session-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #cbd5e1;
}

.ds4k-session-dot.cur {
  background: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.25);
}

.ds4k-session-dot.done {
  background: #10b981;
}

@media print {
  .ds4k-quiz-session .problem.ds4k-session-hidden {
    display: list-item !important;
  }
  .ds4k-session-bar,
  .ds4k-lead-backdrop {
    display: none !important;
  }
}

/* Lead modal */
.ds4k-lead-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(30, 58, 95, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.ds4k-lead-modal {
  background: #fff;
  border-radius: 24px;
  padding: 28px 22px;
  max-width: 440px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  text-align: center;
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.2);
  font-family: inherit;
}

.ds4k-lead-star {
  font-size: 3rem;
  margin: 0;
}

.ds4k-lead-modal h2 {
  margin: 4px 0 0;
  font-size: 1.4rem;
}

.ds4k-lead-score {
  font-size: 1.75rem;
  font-weight: 900;
  color: #0284c7;
  margin: 8px 0;
}

.ds4k-lead-step {
  display: inline-block;
  margin: 10px 0 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: #eef2ff;
  color: #4338ca;
  font-size: 11px;
  font-weight: 800;
}

.ds4k-lead-title {
  margin: 0 0 8px;
  font-size: 1.1rem;
  font-weight: 900;
  color: #1e1b4b;
  text-align: left;
}

.ds4k-lead-cta {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.55;
  margin: 0 0 14px;
  color: #64748b;
  text-align: left;
}

.ds4k-lead-form {
  text-align: left;
}

.ds4k-lead-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin-bottom: 8px;
}

@media (min-width: 420px) {
  .ds4k-lead-row {
    grid-template-columns: 1fr 1fr;
  }
}

.ds4k-lead-input {
  width: 100%;
  padding: 12px 14px;
  border: 2px solid #93c5fd;
  border-radius: 14px;
  font-size: 15px;
  font-family: inherit;
  min-height: 48px;
  box-sizing: border-box;
  background: #fff;
}

.ds4k-lead-submit {
  background: linear-gradient(135deg, #6366f1, #4f46e5);
  color: #fff;
  border: none;
  border-radius: 14px;
  font-weight: 800;
  font-size: 14px;
  font-family: inherit;
  min-height: 48px;
  width: 100%;
  cursor: pointer;
  padding: 12px 14px;
}

.ds4k-lead-submit:disabled {
  opacity: 0.65;
  cursor: wait;
}

.ds4k-lead-privacy {
  margin: 10px 0 0;
  font-size: 11px;
  line-height: 1.45;
  color: #94a3b8;
  text-align: left;
}

.ds4k-lead-done {
  margin: 0;
  padding: 16px 8px;
  font-size: 15px;
  font-weight: 800;
  color: #059669;
  text-align: center;
  line-height: 1.5;
}

.ds4k-lead-done-sub {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  font-weight: 600;
  color: #64748b;
}

.ds4k-lead-market {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 14px 0 0;
  padding: 13px 16px;
  border-radius: 12px;
  background: #fbbf24;
  color: #1e1b4b;
  font-weight: 900;
  font-size: 15px;
  text-align: center;
  text-decoration: none;
  font-family: inherit;
}
.ds4k-lead-market:hover {
  background: #f59e0b;
  color: #1e1b4b;
}

.ds4k-lead-error {
  margin: 8px 0 0;
  font-size: 13px;
  font-weight: 700;
  color: #dc2626;
}

.ds4k-lead-skip {
  margin-top: 12px;
  background: none;
  border: none;
  font-weight: 700;
  color: #94a3b8;
  cursor: pointer;
  font-family: inherit;
}

.ds4k-lead-continue {
  display: block;
  width: 100%;
  margin-top: 12px;
  padding: 12px 14px;
  border: none;
  border-radius: 14px;
  background: #e0e7ff;
  color: #4338ca;
  font-weight: 900;
  font-size: 14px;
  cursor: pointer;
  font-family: inherit;
}

/* Session complete modal */
.ds4k-complete-backdrop {
  position: fixed;
  inset: 0;
  z-index: 85;
  background: rgba(30, 58, 95, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.ds4k-complete-modal {
  background: #fff;
  border-radius: 24px;
  padding: 28px 22px 22px;
  max-width: 420px;
  width: 100%;
  text-align: center;
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.22);
  font-family: inherit;
}

.ds4k-complete-star {
  font-size: 3rem;
  margin: 0;
}

.ds4k-complete-modal h2 {
  margin: 6px 0 0;
  font-size: 1.35rem;
  font-weight: 900;
  color: #1e1b4b;
}

.ds4k-complete-score {
  font-size: 1.5rem;
  font-weight: 900;
  color: #0284c7;
  margin: 8px 0 4px;
}

.ds4k-complete-msg {
  margin: 8px 0 18px;
  font-size: 15px;
  font-weight: 700;
  color: #475569;
  line-height: 1.5;
}

.ds4k-complete-actions {
  display: grid;
  gap: 10px;
  margin-bottom: 14px;
}

.ds4k-complete-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px 16px;
  border-radius: 14px;
  font-weight: 900;
  font-size: 15px;
  text-decoration: none;
  font-family: inherit;
  border: none;
  cursor: pointer;
}

.ds4k-complete-btn.primary {
  background: linear-gradient(135deg, #6366f1, #4f46e5);
  color: #fff;
}

.ds4k-complete-btn.secondary {
  background: #fef3c7;
  color: #92400e;
}

.ds4k-complete-recs {
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
}

.ds4k-complete-rec {
  display: block;
  padding: 10px 12px;
  border-radius: 12px;
  background: #f1f5f9;
  color: #334155;
  font-weight: 800;
  font-size: 13px;
  text-decoration: none;
}

.ds4k-complete-rec:hover {
  background: #e2e8f0;
}

.ds4k-complete-close {
  background: none;
  border: none;
  font-weight: 700;
  color: #94a3b8;
  cursor: pointer;
  font-family: inherit;
  font-size: 13px;
  margin-top: 4px;
}

.ds4k-continue-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(12px);
  z-index: 90;
  background: #1e293b;
  color: #fff;
  padding: 12px 20px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 14px;
  opacity: 0;
  transition: opacity 0.3s ease, transform 0.3s ease;
  pointer-events: none;
  font-family: inherit;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.ds4k-continue-toast.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

@media print {
  .ds4k-complete-backdrop,
  .ds4k-continue-toast {
    display: none !important;
  }
}
