/* onboarding.css — Beta design system (Playfair + Inter, mobile-first) */

:root {
  --bg: #FAFAF7;
  --text: #1A1A1A;
  --text-muted: #6B7280;
  --accent: #1A3A5C;
  --accent-soft: #2E86AB;
  --border: #E5E7EB;
  --border-focus: #1A3A5C;
  --card-bg: #FFFFFF;
  --card-shadow: 0 1px 3px rgba(0,0,0,0.04), 0 1px 2px rgba(0,0,0,0.03);
  --card-shadow-hover: 0 4px 12px rgba(0,0,0,0.06);
  --radius: 8px;
  --radius-card: 12px;
  --space-1: 8px;
  --space-2: 16px;
  --space-3: 24px;
  --space-4: 32px;
  --space-5: 48px;
  --space-6: 64px;
  --font-heading: 'Playfair Display', Georgia, serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.6;
  min-height: 100vh;
}

/* Progress bar */
.ob-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--border);
  z-index: 100;
}

.ob-progress-bar {
  height: 100%;
  background: var(--accent);
  transition: width 0.4s ease;
}

/* Stepper text */
.ob-stepper {
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 500;
  letter-spacing: 0.02em;
  padding: var(--space-3) var(--space-2) 0;
}

/* Main container */
.ob-container {
  max-width: 560px;
  margin: 0 auto;
  padding: var(--space-2) var(--space-2) var(--space-6);
}

@media (min-width: 768px) {
  .ob-container {
    padding: var(--space-4) var(--space-3) var(--space-6);
  }
  html { font-size: 17px; }
}

/* Back button */
.ob-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 14px;
  cursor: pointer;
  padding: var(--space-1) 0;
  margin-bottom: var(--space-2);
  transition: color 0.2s;
}
.ob-back:hover { color: var(--accent); }
.ob-back svg { width: 16px; height: 16px; }

/* Headings */
.ob-heading {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1.75rem;
  line-height: 1.3;
  color: var(--text);
  margin-bottom: var(--space-1);
}

.ob-subtitle {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: var(--space-4);
  line-height: 1.5;
}

/* Form groups */
.ob-field {
  margin-bottom: var(--space-3);
}

.ob-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 6px;
}

.ob-helper {
  display: block;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 4px;
  line-height: 1.4;
}

.ob-hint {
  display: none;
  font-size: 0.8rem;
  color: #DC2626;
  margin-top: 4px;
}
.ob-hint.visible { display: block; }

/* Inputs */
.ob-input,
.ob-textarea,
.ob-select {
  width: 100%;
  padding: 12px 14px;
  font-family: var(--font-body);
  font-size: 0.9375rem;
  color: var(--text);
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.ob-input:focus,
.ob-textarea:focus,
.ob-select:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(26,58,92,0.08);
}

.ob-textarea {
  resize: vertical;
  min-height: 80px;
}

.ob-input::placeholder,
.ob-textarea::placeholder {
  color: #9CA3AF;
}

/* Subdomain suffix */
.ob-subdomain-wrap {
  display: flex;
  align-items: center;
  gap: 0;
}
.ob-subdomain-wrap .ob-input {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
  flex: 1;
}
.ob-subdomain-suffix {
  padding: 12px 14px;
  background: #F3F4F6;
  border: 1px solid var(--border);
  border-left: none;
  border-radius: 0 var(--radius) var(--radius) 0;
  font-size: 0.875rem;
  color: var(--text-muted);
  white-space: nowrap;
}

/* Radio cards */
.ob-radio-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin-bottom: var(--space-3);
}

.ob-radio-card {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: var(--space-2) var(--space-2);
  background: var(--card-bg);
  border: 2px solid var(--border);
  border-radius: var(--radius-card);
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s;
  box-shadow: var(--card-shadow);
}

.ob-radio-card:hover {
  border-color: var(--accent-soft);
  box-shadow: var(--card-shadow-hover);
}

.ob-radio-card.selected {
  border-color: var(--accent);
  background: rgba(26,58,92,0.02);
}

.ob-radio-card input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.ob-radio-dot {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  border: 2px solid var(--border);
  border-radius: 50%;
  margin-top: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.2s;
}
.ob-radio-card.selected .ob-radio-dot {
  border-color: var(--accent);
}
.ob-radio-card.selected .ob-radio-dot::after {
  content: '';
  width: 10px;
  height: 10px;
  background: var(--accent);
  border-radius: 50%;
}

.ob-radio-content {
  flex: 1;
}
.ob-radio-title {
  font-weight: 500;
  font-size: 0.9375rem;
  color: var(--text);
  margin-bottom: 2px;
}
.ob-radio-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.ob-badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 2px 8px;
  background: rgba(26,58,92,0.08);
  color: var(--accent);
  border-radius: 4px;
  margin-left: 8px;
  vertical-align: middle;
}

/* Checkbox cards */
.ob-checkbox-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-2);
  margin-bottom: var(--space-3);
}

@media (max-width: 480px) {
  .ob-checkbox-group {
    grid-template-columns: 1fr;
  }
}

.ob-checkbox-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: var(--card-bg);
  border: 2px solid var(--border);
  border-radius: var(--radius-card);
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s;
  box-shadow: var(--card-shadow);
  font-size: 0.875rem;
  font-weight: 500;
}
.ob-checkbox-card:hover {
  border-color: var(--accent-soft);
}
.ob-checkbox-card.selected {
  border-color: var(--accent);
  background: rgba(26,58,92,0.02);
}

.ob-checkbox-box {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  border: 2px solid var(--border);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.2s, background 0.2s;
}
.ob-checkbox-card.selected .ob-checkbox-box {
  border-color: var(--accent);
  background: var(--accent);
}
.ob-checkbox-card.selected .ob-checkbox-box::after {
  content: '';
  width: 10px;
  height: 8px;
  border-left: 2px solid white;
  border-bottom: 2px solid white;
  transform: rotate(-45deg) translate(1px, -1px);
}

/* Color picker */
.ob-color-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.ob-color-swatch {
  width: 40px;
  height: 40px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  padding: 0;
  overflow: hidden;
}
.ob-color-swatch input[type="color"] {
  width: 56px;
  height: 56px;
  border: none;
  cursor: pointer;
  margin: -8px;
}
.ob-color-row .ob-input {
  max-width: 140px;
}

/* Font preview radio */
.ob-font-option {
  padding: 12px 14px;
  background: var(--card-bg);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  margin-bottom: var(--space-1);
  transition: border-color 0.2s;
  display: flex;
  align-items: center;
  gap: 10px;
}
.ob-font-option:hover { border-color: var(--accent-soft); }
.ob-font-option.selected { border-color: var(--accent); }
.ob-font-preview {
  font-size: 1.1rem;
  flex: 1;
}

/* File upload */
.ob-upload-area {
  border: 2px dashed var(--border);
  border-radius: var(--radius-card);
  padding: var(--space-4) var(--space-2);
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  background: var(--card-bg);
}
.ob-upload-area:hover,
.ob-upload-area.dragover {
  border-color: var(--accent);
  background: rgba(26,58,92,0.02);
}
.ob-upload-area p {
  color: var(--text-muted);
  font-size: 0.875rem;
}
.ob-upload-area .ob-upload-cta {
  color: var(--accent);
  font-weight: 500;
  text-decoration: underline;
}
.ob-upload-preview {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2);
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-top: var(--space-1);
}
.ob-upload-preview img {
  width: 48px;
  height: 48px;
  object-fit: contain;
  border-radius: 4px;
  background: #F3F4F6;
}
.ob-upload-preview .ob-upload-name {
  flex: 1;
  font-size: 0.875rem;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ob-upload-remove {
  background: none;
  border: none;
  color: #DC2626;
  font-size: 0.8rem;
  cursor: pointer;
  padding: 4px 8px;
}

/* Doctor card block */
.ob-doctor-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: var(--space-2);
  margin-bottom: var(--space-2);
  box-shadow: var(--card-shadow);
}
.ob-doctor-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-2);
}
.ob-doctor-card-title {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--accent);
}
.ob-doctor-remove {
  background: none;
  border: none;
  color: #DC2626;
  font-size: 0.8rem;
  cursor: pointer;
}

/* States multi-select */
.ob-states-toggle {
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 8px 12px;
  font-size: 0.8rem;
  color: var(--accent);
  cursor: pointer;
  width: 100%;
  text-align: left;
}
.ob-states-grid {
  display: none;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  margin-top: var(--space-1);
  max-height: 200px;
  overflow-y: auto;
  padding: var(--space-1);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card-bg);
}
.ob-states-grid.open { display: grid; }
.ob-state-item {
  font-size: 0.75rem;
  padding: 4px 6px;
  border: 1px solid var(--border);
  border-radius: 4px;
  cursor: pointer;
  text-align: center;
  transition: background 0.15s;
  user-select: none;
}
.ob-state-item.selected {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}

/* Buttons */
.ob-btn-primary {
  display: block;
  width: 100%;
  padding: 14px var(--space-3);
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  color: #FFFFFF;
  background: var(--accent);
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
  min-height: 48px;
}
.ob-btn-primary:hover { background: #15304D; }
.ob-btn-primary:active { transform: scale(0.99); }
.ob-btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.ob-btn-secondary {
  display: block;
  width: 100%;
  padding: 14px var(--space-3);
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 500;
  color: var(--accent);
  background: transparent;
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  cursor: pointer;
  transition: background 0.2s;
  min-height: 48px;
}
.ob-btn-secondary:hover { background: rgba(26,58,92,0.04); }

.ob-btn-add {
  background: none;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  padding: 10px;
  width: 100%;
  font-size: 0.875rem;
  color: var(--accent);
  cursor: pointer;
  transition: border-color 0.2s;
}
.ob-btn-add:hover { border-color: var(--accent); }

/* Skip link */
.ob-skip {
  display: block;
  text-align: center;
  margin-top: var(--space-2);
  font-size: 0.85rem;
  color: var(--text-muted);
  cursor: pointer;
  background: none;
  border: none;
  font-family: var(--font-body);
  text-decoration: none;
}
.ob-skip:hover { color: var(--accent); }

/* Conditional reveal animation */
.ob-reveal {
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transition: max-height 0.35s ease, opacity 0.25s ease, margin 0.25s ease;
  margin-top: 0;
}
.ob-reveal.open {
  max-height: 2000px;
  opacity: 1;
  margin-top: var(--space-2);
}

/* Review stage */
.ob-review-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  margin-bottom: var(--space-2);
  overflow: hidden;
  box-shadow: var(--card-shadow);
}
.ob-review-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px var(--space-2);
  cursor: pointer;
}
.ob-review-title {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--accent);
}
.ob-review-edit {
  background: none;
  border: none;
  color: var(--accent);
  font-size: 0.8rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
}
.ob-review-body {
  padding: 0 var(--space-2) var(--space-2);
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--text);
}
.ob-review-row {
  display: flex;
  gap: 8px;
  padding: 4px 0;
}
.ob-review-label {
  color: var(--text-muted);
  flex-shrink: 0;
  min-width: 120px;
}

/* TOS checkbox */
.ob-tos-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.875rem;
  line-height: 1.5;
  cursor: pointer;
  margin-bottom: var(--space-3);
}
.ob-tos-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  margin-top: 2px;
  accent-color: var(--accent);
}

/* Confirmation screen */
.ob-confirmation {
  text-align: center;
  padding: var(--space-5) var(--space-2);
}
.ob-confirmation-icon {
  width: 64px;
  height: 64px;
  background: rgba(26,58,92,0.08);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--space-3);
}
.ob-confirmation-icon svg {
  width: 32px;
  height: 32px;
  color: var(--accent);
}
.ob-ref-id {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: var(--space-2);
}

/* Error banner */
.ob-error {
  background: #FEF2F2;
  border: 1px solid #FECACA;
  border-radius: var(--radius);
  padding: 12px var(--space-2);
  color: #991B1B;
  font-size: 0.875rem;
  margin-bottom: var(--space-3);
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Draft resume banner */
.ob-resume-banner {
  background: var(--card-bg);
  border: 1px solid var(--accent);
  border-radius: var(--radius-card);
  padding: var(--space-3);
  margin-bottom: var(--space-3);
  text-align: center;
  box-shadow: var(--card-shadow);
}
.ob-resume-banner p {
  font-size: 0.9375rem;
  margin-bottom: var(--space-2);
  color: var(--text);
}
.ob-resume-actions {
  display: flex;
  gap: var(--space-2);
  justify-content: center;
}
.ob-resume-actions button {
  padding: 10px 20px;
  font-family: var(--font-body);
  font-size: 0.875rem;
  border-radius: var(--radius);
  cursor: pointer;
}

/* Spinner */
.ob-spinner {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: ob-spin 0.6s linear infinite;
  vertical-align: middle;
  margin-right: 8px;
}
@keyframes ob-spin {
  to { transform: rotate(360deg); }
}

/* Utility */
.ob-mt-1 { margin-top: var(--space-1); }
.ob-mt-2 { margin-top: var(--space-2); }
.ob-mt-3 { margin-top: var(--space-3); }
.ob-mt-4 { margin-top: var(--space-4); }
.ob-mb-3 { margin-bottom: var(--space-3); }
.ob-hidden { display: none !important; }
