/*
 * ux-p0.css — Sprint UX P0 additions (2026-05-29)
 * Covers: 3-step onboarding wizard, account-erasure UI.
 * Loaded only from pages/core/app.html and pages/auth/register.html (banner).
 */

/* ── Onboarding wizard overlay ─────────────────────────────────────────────── */

.onboarding-backdrop {
  /* Full-screen, above everything, dark overlay */
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9000;
  padding: env(safe-area-inset-top, 0) env(safe-area-inset-right, 0)
           env(safe-area-inset-bottom, 0) env(safe-area-inset-left, 0);
}

.onboarding-wizard {
  background: var(--surface, #13192b);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.6);
  width: min(520px, calc(100vw - 32px));
  max-height: calc(100dvh - 48px);
  overflow-y: auto;
  padding: 28px 32px 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Progress bar */
.ob-progress {
  height: 4px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.1);
  overflow: hidden;
}

.ob-progress-fill {
  height: 100%;
  background: var(--accent, #6c63ff);
  border-radius: 2px;
  transition: width 0.35s ease;
}

.ob-step-label {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.45);
  letter-spacing: 0.04em;
}

.ob-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--text, #e2e8f0);
  margin: 0;
}

.ob-subtitle {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.6);
  margin: 0;
}

/* Body slot */
.ob-body {
  min-height: 120px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Step 1 — language select */
.ob-lang-select {
  width: 100%;
  max-width: 280px;
  font-size: 15px;
}

/* Step 2 — genre grid */
.ob-genre-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ob-genre-hint {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.5);
}

/* Step 3 — follows list */
.ob-follows-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ob-follow-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.ob-follow-row:last-child {
  border-bottom: none;
}

.ob-follow-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.ob-follow-avatar--fallback {
  background: var(--accent, #6c63ff);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}

.ob-follow-info {
  flex: 1;
  min-width: 0;
}

.ob-follow-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text, #e2e8f0);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ob-follow-handle {
  font-size: 12px;
}

.ob-follow-btn {
  flex-shrink: 0;
  min-width: 80px;
  min-height: 36px;
  font-size: 13px;
  padding: 6px 14px;
}

.ob-follow-btn--active {
  opacity: 0.65;
  cursor: default;
}

.ob-no-follows {
  text-align: center;
  padding: 24px 0;
}

/* Footer buttons */
.ob-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.ob-btn-skip {
  background: transparent;
  color: rgba(255, 255, 255, 0.5);
  border: none;
  font-size: 14px;
  min-height: 44px;
  padding: 10px 16px;
}

.ob-btn-skip:hover {
  color: rgba(255, 255, 255, 0.8);
}

.ob-btn-next {
  min-height: 44px;
  padding: 10px 24px;
  font-size: 14px;
  font-weight: 600;
}

/* ── Account erasure ────────────────────────────────────────────────────────── */

/* Persistent banner */
.account-erasure-banner {
  background: #7f1d1d;
  color: #fca5a5;
  font-size: 13px;
  font-weight: 500;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  /* safe-area top for notch phones */
  padding-top: calc(10px + env(safe-area-inset-top, 0px));
  position: sticky;
  top: 0;
  z-index: 4000;
}

.account-erasure-banner-link {
  color: #fca5a5;
  font-weight: 700;
  text-decoration: underline;
  margin-left: auto;
  white-space: nowrap;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

/* Settings card danger variant */
.settings-card--danger {
  border-color: rgba(248, 113, 113, 0.2);
}

.settings-card--danger h3 {
  color: #f87171;
}

/* Danger button */
.btn-danger {
  background: #dc2626;
  color: #fff;
  border-color: transparent;
}

.btn-danger:hover,
.btn-danger:focus-visible {
  background: #b91c1c;
  outline: 2px solid #fca5a5;
  outline-offset: 2px;
}

.btn-danger:disabled {
  background: #7f1d1d;
  color: rgba(255, 255, 255, 0.45);
  cursor: not-allowed;
}

/* Erasure status area */
.erasure-status-area {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-top: 8px;
}

.erasure-request-btn {
  align-self: flex-start;
  min-height: 44px;
}

.erasure-scheduled-msg {
  font-size: 14px;
  color: #fca5a5;
  background: rgba(127, 29, 29, 0.3);
  border: 1px solid rgba(248, 113, 113, 0.25);
  border-radius: 8px;
  padding: 10px 14px;
  margin: 0;
}

.erasure-cancel-btn {
  align-self: flex-start;
  min-height: 44px;
}

/* Confirm modal */
.erasure-confirm-modal {
  max-width: 440px;
}

.erasure-modal-warning {
  font-size: 15px;
  line-height: 1.5;
  color: var(--text, #e2e8f0);
  margin: 0;
}

.erasure-modal-gdpr {
  margin: 0;
  font-size: 13px;
}

.erasure-checkbox-row {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  padding: 4px 0;
  min-height: 44px;
}

.erasure-checkbox {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  accent-color: #f87171;
}

.erasure-confirm-label {
  display: block;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 4px;
}

.erasure-confirm-input {
  width: 100%;
  font-family: monospace;
  letter-spacing: 0.06em;
  font-size: 15px;
  border-color: rgba(248, 113, 113, 0.3);
}

.erasure-confirm-input:focus {
  border-color: #f87171;
  outline: 2px solid rgba(248, 113, 113, 0.3);
  outline-offset: 1px;
}

.erasure-modal-error {
  color: #fca5a5;
  font-size: 13px;
}

/* Mobile adjustments */
@media (max-width: 480px) {
  .onboarding-wizard {
    padding: 20px 18px 18px;
    border-radius: 16px;
  }

  .ob-footer {
    flex-wrap: wrap;
  }

  .ob-btn-next {
    flex: 1;
  }
}
