/* ══ ONBOARDING OVERLAY ══ */

#onboarding-overlay {
  position: fixed;
  inset: 0;
  background: #fff;
  z-index: 9000;
  display: flex;
  flex-direction: column;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
#onboarding-overlay.open {
  opacity: 1;
  pointer-events: all;
}

/* Progress bar */
#ob-progress {
  height: 3px;
  background: rgba(0, 80, 160, 0.1);
  flex-shrink: 0;
}
#ob-progress-fill {
  height: 100%;
  background: var(--blue-main);
  transition: width 0.4s cubic-bezier(0.22, 1, 0.36, 1);
  border-radius: 0 2px 2px 0;
}

/* Header row */
#ob-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px 0;
  flex-shrink: 0;
}
#ob-logo {
  display: flex;
  align-items: center;
  gap: 8px;
}
#ob-logo img { width: 28px; height: 28px; border-radius: 7px; }
#ob-logo span { font-size: 13px; font-weight: 700; color: var(--text); }
#ob-counter {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-light);
  letter-spacing: 0.04em;
}
#ob-dismiss {
  background: none;
  border: none;
  font-size: 16px;
  color: var(--text-light);
  cursor: pointer;
  padding: 4px;
  line-height: 1;
  font-family: inherit;
  -webkit-tap-highlight-color: transparent;
}

/* Main scrollable area */
#ob-body {
  flex: 1;
  overflow: hidden;
  position: relative;
  padding: 0 24px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
#ob-content {
  position: relative;
  overflow: hidden;
}

/* Step */
.ob-step {
  transition: transform 0.22s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.22s ease;
}
.ob-step.slide-out-left  { transform: translateX(-40px); opacity: 0; }
.ob-step.slide-out-right { transform: translateX(40px);  opacity: 0; }
.ob-step.slide-in-right  { transform: translateX(40px);  opacity: 0; transition: none; }
.ob-step.slide-in-left   { transform: translateX(-40px); opacity: 0; transition: none; }

.ob-title {
  font-size: 26px;
  font-weight: 800;
  color: var(--text);
  line-height: 1.2;
  margin: 0 0 8px;
}
.ob-subtitle {
  font-size: 14px;
  color: var(--text-light);
  font-weight: 500;
  margin: 0 0 28px;
  line-height: 1.5;
}

/* Text / Number input */
.ob-text-input {
  width: 100%;
  border: 2px solid rgba(0, 80, 160, 0.15);
  border-radius: 14px;
  padding: 14px 18px;
  font-size: 16px;
  font-family: inherit;
  font-weight: 600;
  color: var(--text);
  background: #f8fafc;
  outline: none;
  box-sizing: border-box;
  transition: border-color 0.15s, background 0.15s;
  -webkit-appearance: none;
}
.ob-text-input:focus {
  border-color: var(--blue-main);
  background: #fff;
}
.ob-text-input::placeholder { color: var(--text-light); font-weight: 500; }

/* Chip options */
.ob-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 4px;
}
.ob-chip {
  padding: 11px 18px;
  border: 2px solid rgba(0, 80, 160, 0.15);
  border-radius: 50px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  background: #f8fafc;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
  -webkit-tap-highlight-color: transparent;
  font-family: inherit;
}
.ob-chip:active  { transform: scale(0.97); }
.ob-chip.selected {
  border-color: var(--blue-main);
  background: var(--blue-main);
  color: #fff;
}

/* Persona cards */
.ob-persona-cards {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 4px;
}
.ob-persona-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  border: 2px solid rgba(0, 80, 160, 0.15);
  border-radius: 16px;
  background: #f8fafc;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  transition: border-color 0.15s, background 0.15s, transform 0.12s;
  -webkit-tap-highlight-color: transparent;
  width: 100%;
}
.ob-persona-card:active { transform: scale(0.98); }
.ob-persona-card.selected {
  border-color: var(--blue-main);
  background: #EEF9FF;
}
.ob-persona-icon {
  font-size: 28px;
  flex-shrink: 0;
  width: 36px;
  text-align: center;
}
.ob-persona-label {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  display: block;
  line-height: 1;
  margin-bottom: 4px;
}
.ob-persona-desc {
  font-size: 12px;
  color: var(--text-light);
  font-weight: 500;
  display: block;
}
.ob-persona-card.selected .ob-persona-label { color: var(--blue-main); }

/* Bottom action bar */
#ob-actions {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 24px calc(16px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid rgba(0, 60, 120, 0.07);
  background: #fff;
}
#ob-back {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid rgba(0, 80, 160, 0.15);
  background: transparent;
  font-size: 18px;
  color: var(--text-light);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: border-color 0.15s, color 0.15s;
  -webkit-tap-highlight-color: transparent;
  font-family: inherit;
}
#ob-back:active { border-color: var(--blue-main); color: var(--blue-main); }

#ob-skip {
  flex: 1;
  height: 44px;
  border: none;
  background: transparent;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-light);
  cursor: pointer;
  font-family: inherit;
  -webkit-tap-highlight-color: transparent;
}

#ob-next {
  flex: 2;
  height: 50px;
  border-radius: 14px;
  background: var(--blue-main);
  border: none;
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s, transform 0.12s;
  -webkit-tap-highlight-color: transparent;
}
#ob-next:active   { transform: scale(0.97); }
#ob-next:disabled { background: #ccc; cursor: default; }

/* Input wrap spacing */
.ob-input-wrap { margin-top: 0; }
