/* Survey Modal — Harmonious Trust Card Design System
   Uses exact site tokens:
   - Font: "Wix Madefor Display", system-ui, sans-serif
   - Primary Blue: #0500ff
   - Navy Title: #102048
   - Muted Slate: #4f628f / #666
   - Surface: #ffffff with subtle radial blue tint & soft shadow
*/

.sv-overlay {
  position: fixed;
  inset: 0;
  z-index: 10002;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(16, 24, 40, 0.42);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.24s ease, visibility 0.24s ease;
}

.sv-overlay[data-open="true"] {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* Single unified card surface — no nested card-in-card boxes */
.sv-modal {
  position: relative;
  width: min(480px, 100%);
  max-height: min(90vh, 720px);
  display: flex;
  flex-direction: column;
  border-radius: 28px;
  border: 1px solid rgba(5, 0, 255, 0.1);
  background:
    radial-gradient(circle at 0% 0%, rgba(5, 0, 255, 0.06), transparent 40%),
    radial-gradient(circle at 100% 100%, rgba(76, 162, 255, 0.08), transparent 40%),
    linear-gradient(180deg, #ffffff 0%, #f8faff 100%);
  box-shadow:
    0 24px 64px rgba(5, 0, 255, 0.12),
    0 4px 16px rgba(16, 24, 40, 0.05);
  color: #102048;
  font-family: "Wix Madefor Display", system-ui, -apple-system, sans-serif;
  overflow: hidden;
  transform: translateY(10px) scale(0.985);
  transition: transform 0.26s cubic-bezier(0.2, 0.9, 0.3, 1);
}

.sv-overlay[data-open="true"] .sv-modal {
  transform: translateY(0) scale(1);
}

/* ---- Top Header Bar ---- */
.sv-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 22px 26px 16px;
  flex-shrink: 0;
}

.sv-header-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sv-back {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 1px solid rgba(5, 0, 255, 0.14);
  background: #ffffff;
  color: #102048;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  transition: border-color 0.18s ease, background 0.18s ease, color 0.18s ease, transform 0.12s ease;
}

.sv-back:hover {
  border-color: rgba(5, 0, 255, 0.35);
  color: #0500ff;
  background: #f5f7ff;
}

.sv-back:active {
  transform: scale(0.95);
}

.sv-back[hidden] {
  display: none;
}

/* Kicker badge matching HowItWorks_kicker */
.sv-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(5, 0, 255, 0.06);
  border: 1px solid rgba(5, 0, 255, 0.12);
  color: #0500ff;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  line-height: 1;
}

.sv-badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #0500ff;
}

.sv-header-right {
  display: flex;
  align-items: center;
  gap: 14px;
}

/* Step progress pills matching CardsPage_dots */
.sv-dots {
  display: flex;
  align-items: center;
  gap: 6px;
}

.sv-dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: rgba(16, 32, 72, 0.18);
  transition: width 0.24s ease, background 0.24s ease;
}

.sv-dot[data-active="true"] {
  width: 22px;
  background: #0500ff;
}

.sv-dot[data-done="true"] {
  background: rgba(5, 0, 255, 0.45);
}

.sv-close {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 1px solid rgba(16, 32, 72, 0.1);
  background: #ffffff;
  color: #4f628f;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  transition: border-color 0.18s ease, color 0.18s ease, background 0.18s ease;
}

.sv-close:hover {
  border-color: rgba(5, 0, 255, 0.3);
  color: #0500ff;
  background: #f5f7ff;
}

/* ---- Body ---- */
.sv-body {
  padding: 4px 26px 26px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
}

.sv-step {
  display: none;
}

.sv-step[data-active="true"] {
  display: block;
  animation: sv-fade 0.24s ease;
}

@keyframes sv-fade {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ---- Typography ---- */
.sv-title {
  margin: 0 0 8px;
  font-size: 26px;
  font-weight: 800;
  line-height: 1.18;
  letter-spacing: -0.025em;
  color: #102048;
}

.sv-subtitle {
  margin: 0 0 20px;
  font-size: 14.5px;
  line-height: 1.55;
  color: #4f628f;
}

/* ---- Option Cards (vertical stack, generous breathing room) ---- */
.sv-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sv-option {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 15px 16px;
  border-radius: 20px;
  border: 1px solid rgba(5, 0, 255, 0.1);
  background: #ffffff;
  box-shadow: 0 8px 22px rgba(16, 24, 40, 0.04);
  text-align: left;
  font-family: inherit;
  color: #102048;
  cursor: pointer;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.12s ease, background 0.18s ease;
}

.sv-option:hover {
  border-color: rgba(5, 0, 255, 0.42);
  background: #fbfcff;
  box-shadow: 0 12px 28px rgba(5, 0, 255, 0.09);
  transform: translateY(-1px);
}

.sv-option:active {
  transform: translateY(0) scale(0.992);
}

.sv-option-icon {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: rgba(5, 0, 255, 0.07);
  border: 1px solid rgba(5, 0, 255, 0.12);
  color: #0500ff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.18s ease, color 0.18s ease;
}

.sv-option:hover .sv-option-icon {
  background: #0500ff;
  color: #ffffff;
}

.sv-option-icon svg {
  width: 20px;
  height: 20px;
}

.sv-option-content {
  flex: 1;
  min-width: 0;
}

.sv-option-title {
  display: block;
  font-size: 15.5px;
  font-weight: 700;
  line-height: 1.3;
  color: #102048;
  margin-bottom: 3px;
}

.sv-option-desc {
  display: block;
  font-size: 13px;
  line-height: 1.45;
  color: #5c6f9d;
}

.sv-option-chevron {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: #f4f7ff;
  color: #0500ff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform 0.18s ease, background 0.18s ease, color 0.18s ease;
}

.sv-option:hover .sv-option-chevron {
  background: rgba(5, 0, 255, 0.12);
  transform: translateX(2px);
}

.sv-option-chevron svg {
  width: 15px;
  height: 15px;
}

/* ---- Intermediate "Great!" Confirmation Screen ---- */
.sv-great {
  text-align: center;
  padding: 10px 4px 2px;
}

.sv-great-badge {
  width: 64px;
  height: 64px;
  margin: 0 auto 16px;
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(5, 0, 255, 0.12), rgba(47, 123, 255, 0.18));
  border: 1px solid rgba(5, 0, 255, 0.18);
  color: #0500ff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 14px 32px rgba(5, 0, 255, 0.12);
}

.sv-great-badge svg {
  width: 30px;
  height: 30px;
}

.sv-great .sv-title {
  margin-bottom: 8px;
}

.sv-great .sv-subtitle {
  max-width: 380px;
  margin: 0 auto 18px;
}

.sv-note-box {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  padding: 14px 16px;
  border-radius: 18px;
  background: #eff5ff;
  border: 1px solid rgba(5, 0, 255, 0.1);
  color: #36507f;
  font-size: 13.5px;
  line-height: 1.5;
  text-align: left;
  margin-bottom: 20px;
}

.sv-note-icon {
  color: #0500ff;
  flex-shrink: 0;
  margin-top: 1px;
}

.sv-note-icon svg {
  width: 18px;
  height: 18px;
  display: block;
}

/* ---- Final Result Screen ---- */
.sv-result-hero {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px;
  border-radius: 20px;
  background: #ffffff;
  border: 1px solid rgba(5, 0, 255, 0.12);
  box-shadow: 0 10px 26px rgba(5, 0, 255, 0.07);
  margin-bottom: 16px;
}

.sv-result-img {
  width: 116px;
  height: auto;
  border-radius: 12px;
  flex-shrink: 0;
  box-shadow: 0 8px 20px rgba(16, 32, 72, 0.14);
  display: block;
}

.sv-result-meta {
  flex: 1;
  min-width: 0;
}

.sv-result-tag {
  display: inline-block;
  font-size: 11.5px;
  font-weight: 700;
  color: #5c6f9d;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 4px;
}

.sv-result-name {
  font-size: 22px;
  font-weight: 800;
  color: #102048;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
}

.sv-result-price {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 11px;
  border-radius: 999px;
  background: rgba(5, 0, 255, 0.08);
  color: #0500ff;
  font-size: 13px;
  font-weight: 700;
}

.sv-specs {
  border-radius: 18px;
  background: #ffffff;
  border: 1px solid rgba(16, 32, 72, 0.08);
  padding: 4px 16px;
  margin-bottom: 14px;
}

.sv-spec-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(16, 32, 72, 0.07);
  font-size: 13.5px;
}

.sv-spec-row:last-child {
  border-bottom: 0;
}

.sv-spec-label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #496086;
}

.sv-spec-check {
  width: 16px;
  height: 16px;
  color: #12b26c;
  flex-shrink: 0;
}

.sv-spec-val {
  font-weight: 700;
  color: #102048;
  text-align: right;
}

/* ---- Buttons ---- */
.sv-actions {
  display: flex;
  gap: 10px;
  margin-top: 6px;
}

.sv-btn-primary {
  flex: 1;
  min-height: 52px;
  padding: 0 24px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, #0500ff, #2f7bff);
  color: #ffffff;
  font-family: inherit;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 14px 30px rgba(5, 0, 255, 0.24);
  transition: opacity 0.18s ease, transform 0.12s ease;
}

.sv-btn-primary:hover {
  opacity: 0.93;
}

.sv-btn-primary:active {
  transform: scale(0.99);
}

.sv-btn-secondary {
  min-height: 52px;
  padding: 0 20px;
  border-radius: 999px;
  border: 1.5px solid rgba(5, 0, 255, 0.22);
  background: #ffffff;
  color: #0500ff;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.18s ease, background 0.18s ease;
}

.sv-btn-secondary:hover {
  border-color: #0500ff;
  background: #f5f7ff;
}

@media (max-width: 520px) {
  .sv-overlay {
    padding: 12px;
  }
  .sv-modal {
    border-radius: 24px;
    max-height: 94vh;
  }
  .sv-header {
    padding: 18px 18px 12px;
  }
  .sv-body {
    padding: 4px 18px 20px;
  }
  .sv-title {
    font-size: 22px;
  }
  .sv-result-hero {
    padding: 12px;
    gap: 12px;
  }
  .sv-result-img {
    width: 96px;
  }
  .sv-actions {
    flex-direction: column-reverse;
  }
  .sv-btn-secondary {
    width: 100%;
  }
}
