/* ══════════════════════════════════════════════════════════════════
   ONBOARDING WIZARD — First-Time Visitor Settlement Finder
   Slide-in overlay with 3-step wizard + results
   ══════════════════════════════════════════════════════════════════ */

/* ─── Overlay backdrop ──────────────────────────────────────────── */
.srwiz-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}
.srwiz-backdrop.srwiz-open {
  opacity: 1;
  visibility: visible;
}

/* ─── Modal card ────────────────────────────────────────────────── */
.srwiz-modal {
  background: #ffffff;
  border-radius: 20px;
  width: 100%;
  max-width: 540px;
  max-height: 90vh;
  overflow-y: auto;
  overflow-x: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2), 0 4px 16px rgba(0, 0, 0, 0.08);
  transform: translateY(24px) scale(0.97);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  scrollbar-width: thin;
  scrollbar-color: #e2e8f0 transparent;
}
.srwiz-backdrop.srwiz-open .srwiz-modal {
  transform: translateY(0) scale(1);
}
.srwiz-modal::-webkit-scrollbar { width: 4px; }
.srwiz-modal::-webkit-scrollbar-track { background: transparent; }
.srwiz-modal::-webkit-scrollbar-thumb { background: #e2e8f0; border-radius: 2px; }

/* ─── Close button ──────────────────────────────────────────────── */
.srwiz-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: #f1f5f9;
  color: #64748b;
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, color 0.2s;
  z-index: 2;
  line-height: 1;
}
.srwiz-close:hover { background: #e2e8f0; color: #0f172a; }

/* ─── Header area ───────────────────────────────────────────────── */
.srwiz-header {
  background: linear-gradient(135deg, #15803d 0%, #16a34a 50%, #22c55e 100%);
  padding: 2rem 2rem 1.5rem;
  text-align: center;
  border-radius: 20px 20px 0 0;
}
.srwiz-header-icon {
  width: 56px;
  height: 56px;
  background: rgba(255,255,255,0.2);
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  margin-bottom: 0.75rem;
}
.srwiz-header h2 {
  color: #ffffff;
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0 0 0.375rem;
  font-family: 'Space Grotesk', 'Inter', sans-serif;
}
.srwiz-header p {
  color: rgba(255,255,255,0.88);
  font-size: 0.875rem;
  margin: 0;
  line-height: 1.5;
}

/* ─── Progress bar ──────────────────────────────────────────────── */
.srwiz-progress {
  padding: 1.25rem 2rem 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.srwiz-progress-step {
  flex: 1;
  height: 4px;
  border-radius: 2px;
  background: #e2e8f0;
  transition: background 0.3s ease;
}
.srwiz-progress-step.srwiz-done { background: #16a34a; }
.srwiz-progress-step.srwiz-active { background: #16a34a; }
.srwiz-progress-label {
  font-size: 0.75rem;
  color: #64748b;
  font-weight: 500;
  padding: 0.5rem 2rem 0;
  text-align: center;
}

/* ─── Step container ────────────────────────────────────────────── */
.srwiz-steps {
  position: relative;
  overflow: hidden;
}
.srwiz-step {
  padding: 1.5rem 2rem 2rem;
  display: none;
  animation: srwiz-slide-in 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
.srwiz-step.srwiz-active-step {
  display: block;
}
@keyframes srwiz-slide-in {
  from { opacity: 0; transform: translateX(20px); }
  to   { opacity: 1; transform: translateX(0); }
}
.srwiz-step-title {
  font-size: 1rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 0.25rem;
}
.srwiz-step-subtitle {
  font-size: 0.8125rem;
  color: #64748b;
  margin: 0 0 1.25rem;
}

/* ─── Checkbox grid ─────────────────────────────────────────────── */
.srwiz-checks {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.625rem;
}
.srwiz-check-item {
  position: relative;
}
.srwiz-check-item input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}
.srwiz-check-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 0.75rem;
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  cursor: pointer;
  font-size: 0.8125rem;
  font-weight: 500;
  color: #334155;
  transition: border-color 0.2s, background 0.2s, color 0.2s;
  user-select: none;
  line-height: 1.3;
}
.srwiz-check-label .srwiz-check-icon {
  font-size: 1.05rem;
  flex-shrink: 0;
}
.srwiz-check-item input:checked + .srwiz-check-label {
  border-color: #16a34a;
  background: #f0fdf4;
  color: #15803d;
}
.srwiz-check-label:hover {
  border-color: #86efac;
  background: #f8fffe;
}

/* ─── Email step ────────────────────────────────────────────────── */
.srwiz-email-field {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.srwiz-email-field label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: #334155;
}
.srwiz-email-input {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  font-size: 1rem;
  font-family: inherit;
  color: #0f172a;
  background: #fff;
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
  box-sizing: border-box;
}
.srwiz-email-input:focus {
  border-color: #16a34a;
  box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.12);
}
.srwiz-email-input::placeholder { color: #94a3b8; }
.srwiz-privacy-note {
  font-size: 0.75rem;
  color: #94a3b8;
  line-height: 1.5;
}

/* ─── Navigation buttons ────────────────────────────────────────── */
.srwiz-nav {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1.5rem;
}
.srwiz-btn-next {
  flex: 1;
  padding: 0.75rem 1.5rem;
  background: #16a34a;
  color: #fff;
  font-size: 0.9375rem;
  font-weight: 700;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.2s, transform 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}
.srwiz-btn-next:hover { background: #15803d; transform: translateY(-1px); }
.srwiz-btn-next:active { transform: translateY(0); }
.srwiz-btn-next:disabled {
  background: #e2e8f0;
  color: #94a3b8;
  cursor: not-allowed;
  transform: none;
}
.srwiz-btn-back {
  padding: 0.75rem 1rem;
  background: transparent;
  color: #64748b;
  font-size: 0.875rem;
  font-weight: 500;
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  cursor: pointer;
  font-family: inherit;
  transition: border-color 0.2s, color 0.2s;
  white-space: nowrap;
}
.srwiz-btn-back:hover { border-color: #94a3b8; color: #334155; }
.srwiz-btn-skip {
  font-size: 0.8125rem;
  color: #94a3b8;
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  padding: 0.5rem;
  transition: color 0.2s;
  white-space: nowrap;
}
.srwiz-btn-skip:hover { color: #64748b; }

/* ─── Results panel ─────────────────────────────────────────────── */
.srwiz-results {
  padding: 1.5rem 2rem 2rem;
  display: none;
}
.srwiz-results.srwiz-show { display: block; }
.srwiz-results-header {
  text-align: center;
  margin-bottom: 1.25rem;
}
.srwiz-results-icon {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
  display: block;
}
.srwiz-results-header h3 {
  font-size: 1.2rem;
  font-weight: 800;
  color: #0f172a;
  margin: 0 0 0.25rem;
}
.srwiz-results-header p {
  font-size: 0.8125rem;
  color: #64748b;
  margin: 0;
}

/* ─── Settlement card in results ────────────────────────────────── */
.srwiz-settlement-list {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
  margin-bottom: 1.25rem;
}
.srwiz-settlement-card {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.875rem 1rem;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  text-decoration: none;
  background: #fff;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}
.srwiz-settlement-card:hover {
  border-color: #16a34a;
  background: #f0fdf4;
  box-shadow: 0 2px 8px rgba(22, 163, 74, 0.1);
}
.srwiz-settlement-badge {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: linear-gradient(135deg, #16a34a, #22c55e);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
  color: #fff;
}
.srwiz-settlement-info {
  flex: 1;
  min-width: 0;
}
.srwiz-settlement-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: #0f172a;
  margin: 0 0 0.2rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.srwiz-settlement-meta {
  font-size: 0.75rem;
  color: #64748b;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.srwiz-settlement-payout {
  color: #15803d;
  font-weight: 700;
  font-size: 0.8125rem;
}
.srwiz-settlement-arrow {
  color: #94a3b8;
  font-size: 0.875rem;
  flex-shrink: 0;
  align-self: center;
}

/* ─── Browse all button ─────────────────────────────────────────── */
.srwiz-btn-browse {
  display: block;
  width: 100%;
  padding: 0.8125rem 1.5rem;
  background: #16a34a;
  color: #fff;
  font-size: 0.9375rem;
  font-weight: 700;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  font-family: inherit;
  text-align: center;
  text-decoration: none;
  transition: background 0.2s;
  box-sizing: border-box;
}
.srwiz-btn-browse:hover { background: #15803d; }

/* ─── Loading state ─────────────────────────────────────────────── */
.srwiz-loading {
  text-align: center;
  padding: 2rem;
  display: none;
}
.srwiz-loading.srwiz-show { display: block; }
.srwiz-spinner {
  width: 36px;
  height: 36px;
  border: 3px solid #e2e8f0;
  border-top-color: #16a34a;
  border-radius: 50%;
  animation: srwiz-spin 0.7s linear infinite;
  margin: 0 auto 1rem;
}
@keyframes srwiz-spin {
  to { transform: rotate(360deg); }
}
.srwiz-loading p {
  font-size: 0.875rem;
  color: #64748b;
}

/* ─── Empty state ───────────────────────────────────────────────── */
.srwiz-empty {
  text-align: center;
  padding: 1.5rem 1rem;
  display: none;
}
.srwiz-empty.srwiz-show { display: block; }
.srwiz-empty p {
  font-size: 0.875rem;
  color: #64748b;
  margin: 0 0 1rem;
}

/* ─── Nav Prompt (for users who skipped) ───────────────────────── */
.srwiz-nav-prompt {
  display: none;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.875rem;
  background: #f0fdf4;
  border: 1.5px solid rgba(22, 163, 74, 0.25);
  border-radius: 20px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #15803d;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
  white-space: nowrap;
  text-decoration: none;
}
.srwiz-nav-prompt:hover {
  background: #dcfce7;
  border-color: rgba(22, 163, 74, 0.45);
}
.srwiz-nav-prompt.srwiz-prompt-visible {
  display: inline-flex;
}
.srwiz-nav-prompt-icon { font-size: 0.9rem; }

/* ─── Mobile adjustments ─────────────────────────────────────────  */
@media (max-width: 540px) {
  .srwiz-backdrop {
    align-items: flex-end;
    padding: 0;
  }
  .srwiz-modal {
    border-radius: 20px 20px 0 0;
    max-height: 92vh;
    transform: translateY(100%);
  }
  .srwiz-backdrop.srwiz-open .srwiz-modal {
    transform: translateY(0);
  }
  .srwiz-header {
    padding: 1.5rem 1.5rem 1.25rem;
    border-radius: 20px 20px 0 0;
  }
  .srwiz-step,
  .srwiz-results {
    padding: 1.25rem 1.5rem 1.75rem;
  }
  .srwiz-checks {
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
  }
  .srwiz-progress { padding: 1rem 1.5rem 0; }
  .srwiz-progress-label { padding: 0.375rem 1.5rem 0; }
}
@media (max-width: 360px) {
  .srwiz-checks { grid-template-columns: 1fr; }
}
