/**
 * VEHYLY - Onboarding guiado (Rediseño F2, 2026-09-16)
 * Mismo lenguaje visual que registration.css (overlay oscuro + panel claro).
 */

/* Zona segura: este panel se abre JUSTO al terminar el registro, así que
   arrastraba el mismo defecto que registration.css — el 92vh centrado dejaba
   ~37 px arriba en un iPhone con Dynamic Island, donde la barra de estado
   ocupa ~59 px. Ver public/styles/MODALS.md. */
.onb-overlay {
  position: fixed;
  inset: 0;
  z-index: 999998; /* debajo del wizard de registro, encima del resto */
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(20px + env(safe-area-inset-top, 0px)) 20px
           calc(20px + env(safe-area-inset-bottom, 0px));
  animation: onbFadeIn 0.3s ease;
  overflow-y: auto;
}

.onb-panel {
  background: linear-gradient(145deg, #ffffff, #f0f0f0);
  border-radius: 24px;
  max-width: 560px;
  width: 100%;
  max-height: calc(100vh - 40px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
  max-height: calc(100dvh - 40px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
  overflow-y: auto;
  padding: 28px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
  animation: onbSlideUp 0.4s ease;
}

@keyframes onbFadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes onbSlideUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

.onb-header { text-align: center; margin-bottom: 20px; }
.onb-header h2 { margin: 0 0 8px 0; font-size: 24px; font-weight: 900; color: #111; }
.onb-header p { margin: 0 0 16px 0; font-size: 14px; color: #555; }

.onb-progress {
  height: 8px;
  background: #e5e5e5;
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 8px;
}
.onb-progress-fill {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, #2979FF, #1e5fd6);
  transition: width 0.3s ease;
}
.onb-progress-text { font-size: 13px; color: #666; font-weight: 600; }

.onb-steps { display: flex; flex-direction: column; gap: 12px; }

.onb-step {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: #fff;
  border: 1px solid #e5e5e5;
  border-radius: 16px;
}
.onb-step-done { opacity: 0.75; background: #f0fdf4; border-color: #bbf7d0; }

.onb-step-check {
  flex: 0 0 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 14px;
  background: #eef2ff;
  color: #2979FF;
}
.onb-step-done .onb-step-check { background: #22c55e; color: #fff; }

.onb-step-body { flex: 1; min-width: 0; }
.onb-step-title { font-weight: 800; font-size: 14px; color: #111; }
.onb-step-desc { font-size: 12px; color: #666; margin-top: 2px; }

.onb-cta {
  padding: 8px 14px;
  background: #2979FF;
  color: #fff;
  border: none;
  border-radius: 10px;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  white-space: nowrap;
}
.onb-cta:disabled { opacity: 0.6; cursor: default; }
.onb-cta-primary { width: 100%; margin-top: 12px; padding: 12px; font-size: 14px; }

.onb-bookable-note {
  margin-top: 4px;
  padding: 10px 14px;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 12px;
  font-size: 12px;
  color: #166534;
  font-weight: 600;
}

.onb-footer { margin-top: 18px; text-align: center; }
.onb-skip {
  background: none;
  border: none;
  color: #888;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
  padding: 8px;
}

.onb-done-card { text-align: center; padding: 24px 12px; }
.onb-done-emoji { font-size: 44px; margin-bottom: 10px; }
.onb-done-title { font-size: 20px; font-weight: 900; color: #111; margin-bottom: 6px; }
.onb-done-desc { font-size: 14px; color: #555; }

.onb-spec-picker {
  padding: 12px 16px;
  background: #fafafa;
  border: 1px dashed #d4d4d4;
  border-radius: 16px;
}
.onb-spec-grid { display: flex; gap: 10px; }
.onb-spec-card {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 12px 8px;
  background: #fff;
  border: 2px solid #e5e5e5;
  border-radius: 14px;
  cursor: pointer;
  transition: border-color 0.15s ease;
}
.onb-spec-card input { display: none; }
.onb-spec-card.selected { border-color: #2979FF; background: #eef4ff; }
.onb-spec-icon { font-size: 26px; }
.onb-spec-name { font-size: 12px; font-weight: 700; color: #333; text-align: center; }

/* Safe areas iOS */
@supports (padding: env(safe-area-inset-bottom)) {
  .onb-overlay { padding-bottom: calc(20px + env(safe-area-inset-bottom)); }
}
