/* ───────────────────────────────────────────────────────────
   NOWFit Onboarding Forms — shared styles
   Multi-step wizard with progress bar, autosave, file uploads.
   Builds on the design tokens in css/style.css (:root vars).
   Prefix: ob-
   ─────────────────────────────────────────────────────────── */

/* Minimal top nav (logo only).
   Override the global fixed .nav so the logo scrolls away and the sticky
   progress bar can own the top edge without overlap. */
.ob-nav {
  position: absolute;
  top: 0; left: 0; right: 0;
  background: transparent;
}

/* Hero */
.ob-hero {
  padding: 120px 24px 24px;
  text-align: center;
  max-width: 760px;
  margin: 0 auto;
}
.ob-eyebrow {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--orange);
  padding: 8px 16px;
  border: 1px solid rgba(234, 141, 92, 0.3);
  border-radius: 999px;
  margin-bottom: 24px;
}
.ob-hero h1 {
  font-size: clamp(32px, 5vw, 50px);
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1.05;
  margin-bottom: 18px;
}
.ob-hero h1 .accent {
  background: linear-gradient(135deg, #EA8D5C 0%, #F2A97E 50%, #D25818 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.ob-hero p.lede {
  font-size: 17px;
  color: var(--text-secondary);
  line-height: 1.6;
  max-width: 600px;
  margin: 0 auto;
}

/* ───── Progress bar (sticky) ───── */
.ob-progress {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(7, 6, 11, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 16px 24px;
  margin-top: 32px;
}
.ob-progress-inner {
  max-width: 760px;
  margin: 0 auto;
}
.ob-progress-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  gap: 12px;
}
.ob-progress-step {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}
.ob-progress-step .ob-progress-num {
  color: var(--orange);
}
.ob-progress-saved {
  font-size: 12px;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.ob-progress-saved.visible { opacity: 1; }
.ob-progress-saved svg { width: 13px; height: 13px; color: #22c55e; }
.ob-progress-track {
  height: 6px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 999px;
  overflow: hidden;
}
.ob-progress-fill {
  height: 100%;
  background: linear-gradient(135deg, #EA8D5C 0%, #D25818 100%);
  border-radius: 999px;
  width: 0%;
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ───── Form + steps ───── */
.ob-form {
  max-width: 760px;
  margin: 0 auto;
  padding: 40px 24px 100px;
}

.ob-step { display: none; }
.ob-step.active {
  display: block;
  animation: obFade 0.35s ease;
}
@keyframes obFade {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.ob-step-header {
  margin-bottom: 28px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border);
}
.ob-step-num {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: var(--orange);
  text-transform: uppercase;
  margin-bottom: 8px;
}
.ob-step-header h2 {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin-bottom: 8px;
}
.ob-step-header .desc {
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.55;
}

/* Intro callout inside a step */
.ob-callout {
  margin-bottom: 28px;
  padding: 18px 22px;
  background: rgba(234, 141, 92, 0.05);
  border: 1px solid rgba(234, 141, 92, 0.18);
  border-left: 3px solid var(--orange);
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-secondary);
}
.ob-callout strong { color: var(--text-primary); font-weight: 600; }

/* ───── Questions ───── */
.ob-q { margin-bottom: 24px; }
.ob-q label.ob-label {
  display: block;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 6px;
  line-height: 1.5;
}
.ob-q .ob-optional {
  font-weight: 400;
  color: var(--text-muted);
  font-size: 13px;
}
.ob-q .ob-req { color: var(--orange); }
.ob-q .ob-hint {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 10px;
  line-height: 1.5;
}

/* Inputs */
.ob-input,
.ob-textarea,
.ob-select {
  width: 100%;
  padding: 13px 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  color: var(--text-primary);
  font-size: 15px;
  font-family: inherit;
  transition: border-color 0.2s, background 0.2s;
}
.ob-input::placeholder,
.ob-textarea::placeholder { color: rgba(255, 255, 255, 0.25); }
.ob-input:focus,
.ob-textarea:focus,
.ob-select:focus {
  outline: none;
  border-color: var(--orange);
  background: rgba(255, 255, 255, 0.05);
}
.ob-input.ob-invalid,
.ob-textarea.ob-invalid,
.ob-select.ob-invalid {
  border-color: #ef4444;
}
.ob-textarea {
  min-height: 92px;
  resize: vertical;
  line-height: 1.55;
}
.ob-textarea.ob-tall { min-height: 120px; }

/* Native select arrow */
.ob-select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none'><path d='M1 1.5L6 6.5L11 1.5' stroke='%23EA8D5C' stroke-width='2' stroke-linecap='round'/></svg>");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 40px;
  cursor: pointer;
}
.ob-select option { background: var(--bg-card); color: var(--text-primary); }

/* Two-column field row (e.g. email + phone) */
.ob-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.ob-row-3 { grid-template-columns: 1fr 1fr 1fr; }

/* Address block */
.ob-address { display: grid; gap: 12px; }
.ob-address .ob-address-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

/* Radio + checkbox shared pill style */
.ob-choice-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.ob-choice {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s;
}
.ob-choice:hover {
  border-color: rgba(234, 141, 92, 0.3);
  background: rgba(255, 255, 255, 0.05);
}
.ob-choice input[type="radio"],
.ob-choice input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 18px; height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  flex-shrink: 0;
  cursor: pointer;
  position: relative;
  transition: all 0.2s;
}
.ob-choice input[type="radio"] { border-radius: 50%; }
.ob-choice input[type="checkbox"] { border-radius: 5px; }
.ob-choice input[type="radio"]:checked {
  border-color: var(--orange);
  background: var(--orange);
  box-shadow: inset 0 0 0 3px var(--bg-darkest);
}
.ob-choice input[type="checkbox"]:checked {
  border-color: var(--orange);
  background: var(--orange);
}
.ob-choice input[type="checkbox"]:checked::after {
  content: '';
  position: absolute;
  left: 4px; top: 0px;
  width: 5px; height: 10px;
  border: solid var(--bg-darkest);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.ob-choice:has(input:checked) {
  background: rgba(234, 141, 92, 0.08);
  border-color: rgba(234, 141, 92, 0.4);
}
.ob-choice span {
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 1.4;
}
.ob-choice:has(input:checked) span { color: var(--text-primary); }

/* Conditional reveal */
.ob-conditional {
  margin-top: 12px;
  padding-left: 16px;
  border-left: 2px solid rgba(234, 141, 92, 0.3);
  display: none;
}
.ob-conditional.visible { display: block; }

/* ───── File upload widget ───── */
.ob-upload {
  border: 1.5px dashed rgba(234, 141, 92, 0.35);
  border-radius: 12px;
  background: rgba(234, 141, 92, 0.03);
  padding: 28px 20px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}
.ob-upload:hover,
.ob-upload.ob-dragover {
  border-color: var(--orange);
  background: rgba(234, 141, 92, 0.07);
}
.ob-upload input[type="file"] { display: none; }
.ob-upload-icon {
  width: 40px; height: 40px;
  margin: 0 auto 12px;
  color: var(--orange);
}
.ob-upload-text {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}
.ob-upload-sub {
  font-size: 13px;
  color: var(--text-muted);
}
/* Uploaded file list */
.ob-files {
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.ob-file {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
}
.ob-file-thumb {
  width: 40px; height: 40px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
}
.ob-file-thumb svg { width: 18px; height: 18px; }
.ob-file-info { flex: 1; min-width: 0; }
.ob-file-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ob-file-meta { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.ob-file-progress {
  height: 4px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  overflow: hidden;
  margin-top: 6px;
}
.ob-file-progress-fill {
  height: 100%;
  background: var(--orange);
  border-radius: 999px;
  width: 0%;
  transition: width 0.2s ease;
}
.ob-file-status {
  font-size: 11px;
  font-weight: 600;
  flex-shrink: 0;
}
.ob-file-status.done { color: #22c55e; }
.ob-file-status.error { color: #fca5a5; }
.ob-file-remove {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  flex-shrink: 0;
  border-radius: 6px;
  transition: color 0.2s, background 0.2s;
}
.ob-file-remove:hover { color: #fca5a5; background: rgba(239, 68, 68, 0.1); }
.ob-file-remove svg { width: 16px; height: 16px; display: block; }

/* ───── Repeating field group (FAQ pairs, domain ideas, etc.) ───── */
.ob-repeat-item {
  position: relative;
  padding: 18px 18px 18px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 12px;
  margin-bottom: 12px;
}
.ob-repeat-item .ob-repeat-remove {
  position: absolute;
  top: 12px; right: 12px;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  border-radius: 6px;
  transition: color 0.2s, background 0.2s;
}
.ob-repeat-item .ob-repeat-remove:hover { color: #fca5a5; background: rgba(239, 68, 68, 0.1); }
.ob-repeat-item .ob-repeat-remove svg { width: 16px; height: 16px; display: block; }
.ob-repeat-add {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 18px;
  background: rgba(234, 141, 92, 0.08);
  border: 1px solid rgba(234, 141, 92, 0.3);
  border-radius: 10px;
  color: var(--orange);
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s;
}
.ob-repeat-add:hover {
  background: rgba(234, 141, 92, 0.14);
  border-color: rgba(234, 141, 92, 0.5);
}
.ob-repeat-add svg { width: 16px; height: 16px; }

/* Editable lead-question list (Form 2 §6) */
.ob-editlist-item {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.ob-editlist-item .ob-input { flex: 1; }

/* ───── Step nav buttons ───── */
.ob-nav-buttons {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 40px;
  padding-top: 28px;
  border-top: 1px solid var(--border);
}
.ob-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  border-radius: 11px;
  font-size: 15px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s, border-color 0.2s;
  border: none;
}
.ob-btn svg { width: 17px; height: 17px; }
.ob-btn-next,
.ob-btn-submit {
  background: linear-gradient(135deg, #EA8D5C 0%, #D25818 100%);
  color: var(--bg-darkest);
}
.ob-btn-next:hover,
.ob-btn-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(234, 141, 92, 0.28);
}
.ob-btn-back {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-secondary);
}
.ob-btn-back:hover {
  background: rgba(255, 255, 255, 0.07);
  color: var(--text-primary);
}
.ob-btn:disabled { opacity: 0.55; cursor: default; transform: none; box-shadow: none; }
.ob-btn-back.ob-hidden { visibility: hidden; }

/* Error message */
.ob-error {
  display: none;
  margin-top: 16px;
  padding: 12px 16px;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: 8px;
  color: #fca5a5;
  font-size: 14px;
}
.ob-error.visible { display: block; }

/* Honeypot */
.ob-honeypot { position: absolute; left: -9999px; top: -9999px; }

/* ───── Success state ───── */
.ob-success {
  display: none;
  text-align: center;
  padding: 90px 24px;
  max-width: 600px;
  margin: 0 auto;
}
.ob-success.visible { display: block; }
.ob-success .ob-check {
  width: 80px; height: 80px;
  margin: 0 auto 24px;
  border-radius: 50%;
  background: rgba(234, 141, 92, 0.15);
  border: 2px solid var(--orange);
  display: flex;
  align-items: center;
  justify-content: center;
}
.ob-success .ob-check svg { width: 36px; height: 36px; color: var(--orange); }
.ob-success h2 {
  font-size: 32px;
  font-weight: 800;
  margin-bottom: 16px;
  letter-spacing: -0.02em;
}
.ob-success p {
  font-size: 17px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin: 0 auto;
  max-width: 480px;
}

/* Mobile */
@media (max-width: 600px) {
  .ob-hero { padding: 90px 20px 16px; }
  .ob-step-header h2 { font-size: 23px; }
  .ob-form { padding: 28px 16px 60px; }
  .ob-row, .ob-row-3, .ob-address .ob-address-2col { grid-template-columns: 1fr; }
  .ob-nav-buttons { gap: 10px; }
  .ob-btn { padding: 13px 20px; font-size: 14px; flex: 1; justify-content: center; }
}
