/* shared/onboarding-tour.css — C13 First-Run-Onboarding
   Namespace: .pfb-onb-*  +  .pfb-fab-pulse
   Deps: shared/base.css CSS vars (--amber, --amber-hi, --cream, --black)
   z-index: 10002 (above reward overlay 10000, chat panel 9999)
*/

/* ─── Backdrop ─────────────────────────────────────────────────────────── */
.pfb-onb-overlay {
  position: fixed;
  inset: 0;
  z-index: 10002;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px calc(24px + env(safe-area-inset-bottom, 0px));
  background:
    radial-gradient(ellipse at center, rgba(245, 176, 48, 0.22), rgba(6, 4, 0, 0.94) 70%),
    rgba(6, 4, 0, 0.90);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease;
}
.pfb-onb-overlay.pfb-onb-visible {
  opacity: 1;
  pointer-events: auto;
}

/* ─── Card ─────────────────────────────────────────────────────────────── */
.pfb-onb-card {
  position: relative;
  width: 100%;
  max-width: 460px;
  max-height: calc(100vh - 48px - env(safe-area-inset-bottom, 0px));
  overflow-y: auto;
  background: linear-gradient(180deg, #1a0f02 0%, #060400 100%);
  border: 3px solid var(--amber, #D4920A);
  border-radius: 20px;
  color: var(--cream, #FFF3D0);
  padding: 28px 22px 22px;
  box-shadow:
    0 0 70px rgba(245, 176, 48, 0.50),
    inset 0 0 32px rgba(245, 176, 48, 0.10);
  transform: translateY(24px) scale(0.9);
  opacity: 0;
  transition: transform 0.24s cubic-bezier(.2, 1.4, .4, 1), opacity 0.22s ease;
  -webkit-overflow-scrolling: touch;
  text-align: center;
}
.pfb-onb-overlay.pfb-onb-visible .pfb-onb-card {
  transform: translateY(0) scale(1);
  opacity: 1;
}

/* ─── Close (× top-right) ──────────────────────────────────────────────── */
.pfb-onb-close {
  position: absolute;
  top: 8px;
  right: 10px;
  width: 36px;
  height: 36px;
  background: transparent;
  border: none;
  color: rgba(255, 243, 208, 0.55);
  font-size: 1.8rem;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}
.pfb-onb-close:hover,
.pfb-onb-close:focus-visible {
  color: var(--amber-hi, #F5B030);
  outline: none;
}

/* ─── Step counter (top) ───────────────────────────────────────────────── */
.pfb-onb-step-counter {
  font-family: 'DM Mono', monospace;
  font-size: 0.68rem;
  letter-spacing: 0.22em;
  color: rgba(255, 243, 208, 0.55);
  text-transform: uppercase;
  margin-bottom: 10px;
}

/* ─── Emmy avatar ──────────────────────────────────────────────────────── */
.pfb-onb-emmy {
  position: relative;
  width: 110px;
  height: 110px;
  margin: 0 auto 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.pfb-onb-emmy-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  border: 3px solid var(--amber-hi, #F5B030);
  box-shadow: 0 0 28px rgba(245, 176, 48, 0.55);
  background: #2a1803;
}
.pfb-onb-emmy-crown {
  position: absolute;
  top: -14px;
  right: -4px;
  font-size: 2rem;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.55));
  animation: pfb-onb-crown-bob 3.2s ease-in-out infinite;
}
.pfb-onb-emmy-crown-xl {
  font-size: 5rem;
  line-height: 1;
  filter: drop-shadow(0 4px 10px rgba(245, 176, 48, 0.6));
  animation: pfb-onb-crown-bob 3.2s ease-in-out infinite;
}
@keyframes pfb-onb-crown-bob {
  0%, 100% { transform: translateY(0) rotate(-4deg); }
  50%      { transform: translateY(-4px) rotate(4deg); }
}

/* ─── Eyebrow / Title / Body ───────────────────────────────────────────── */
.pfb-onb-eyebrow {
  font-family: 'DM Mono', monospace;
  font-size: 0.72rem;
  letter-spacing: 0.24em;
  color: var(--amber-hi, #F5B030);
  text-transform: uppercase;
}
.pfb-onb-title {
  font-family: 'Anton', sans-serif;
  font-size: 2.0rem;
  line-height: 1.05;
  letter-spacing: 0.04em;
  color: var(--cream, #FFF3D0);
  text-transform: uppercase;
  text-align: center;
  margin: 6px 0 14px;
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.55);
}
.pfb-onb-body {
  font-family: 'DM Mono', monospace;
  font-size: 0.95rem;
  line-height: 1.55;
  color: rgba(255, 243, 208, 0.92);
  margin: 0 0 20px;
  text-align: center;
}
.pfb-onb-fade-in {
  animation: pfb-onb-fade-in 0.26s ease both;
}
@keyframes pfb-onb-fade-in {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ─── Dots (progress) ──────────────────────────────────────────────────── */
.pfb-onb-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 18px;
}
.pfb-onb-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 243, 208, 0.18);
  border: 1px solid rgba(245, 176, 48, 0.35);
  transition: background 0.2s ease, transform 0.2s ease;
}
.pfb-onb-dot-done {
  background: rgba(245, 176, 48, 0.55);
}
.pfb-onb-dot-active {
  background: var(--amber-hi, #F5B030);
  transform: scale(1.2);
  box-shadow: 0 0 10px rgba(245, 176, 48, 0.6);
}

/* ─── Hans audio button ─────────────────────────────────────────────────── */
.pfb-onb-audio-btn {
  display: block;
  margin: 0 auto 16px;
  padding: 9px 22px;
  background: transparent;
  color: var(--amber-hi, #F5B030);
  border: 1px solid rgba(245, 176, 48, 0.5);
  border-radius: 8px;
  font-family: 'DM Mono', monospace;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.15s ease, color 0.15s ease;
}
.pfb-onb-audio-btn:hover,
.pfb-onb-audio-btn:focus-visible {
  background: rgba(245, 176, 48, 0.12);
  outline: none;
}

/* ─── Actions row ──────────────────────────────────────────────────────── */
.pfb-onb-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 6px;
}
/* When skip is present, push CTA to the right */
.pfb-onb-actions .pfb-onb-skip + .pfb-onb-cta {
  margin-left: auto;
}
.pfb-onb-skip {
  font-family: 'DM Mono', monospace;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  color: rgba(255, 243, 208, 0.50);
  background: transparent;
  border: none;
  text-transform: uppercase;
  cursor: pointer;
  padding: 8px 6px;
  text-decoration: underline;
  -webkit-tap-highlight-color: transparent;
}
.pfb-onb-skip:hover,
.pfb-onb-skip:focus-visible {
  color: var(--cream, #FFF3D0);
  outline: none;
}
.pfb-onb-cta {
  min-width: 150px;
  min-height: 46px;
  padding: 10px 28px;
  background: var(--amber, #D4920A);
  color: var(--black, #060400);
  border: 2px solid var(--cream, #FFF3D0);
  border-radius: 10px;
  font-family: 'Anton', sans-serif;
  font-size: 1.15rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  box-shadow: 0 4px 0 rgba(0, 0, 0, 0.5);
  transition: background .15s ease, transform .1s ease;
}
.pfb-onb-cta:hover,
.pfb-onb-cta:focus-visible {
  background: var(--amber-hi, #F5B030);
  outline: none;
}
.pfb-onb-cta:active {
  transform: translateY(2px);
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.5);
}

/* ─── FAB pulse (📸 beweis button, 10s after overlay close) ───────────── */
@keyframes pfb-fab-pulse-anim {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(245, 176, 48, 0.75),
                0 4px 16px rgba(0, 0, 0, 0.35);
  }
  50% {
    transform: scale(1.12);
    box-shadow: 0 0 0 12px rgba(245, 176, 48, 0),
                0 0 36px 8px rgba(245, 176, 48, 0.55),
                0 4px 16px rgba(0, 0, 0, 0.35);
  }
}
.pfb-fab-pulse {
  animation: pfb-fab-pulse-anim 1.2s ease-in-out infinite;
  border-color: var(--amber-hi, #F5B030) !important;
  z-index: 1;
}

/* ─── Small screens ────────────────────────────────────────────────────── */
@media (max-width: 480px) {
  .pfb-onb-card    { padding: 24px 18px 18px; }
  .pfb-onb-title   { font-size: 1.65rem; }
  .pfb-onb-body    { font-size: 0.9rem; }
  .pfb-onb-emmy    { width: 92px; height: 92px; }
  .pfb-onb-cta     { font-size: 1rem; min-width: 132px; }
}

/* ─── Reduced motion ───────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .pfb-onb-card,
  .pfb-onb-overlay,
  .pfb-onb-emmy-crown,
  .pfb-onb-emmy-crown-xl,
  .pfb-onb-fade-in,
  .pfb-fab-pulse {
    animation: none !important;
    transition: opacity 0.1s ease !important;
  }
  .pfb-fab-pulse {
    box-shadow: 0 0 0 4px rgba(245, 176, 48, 0.55),
                0 4px 16px rgba(0, 0, 0, 0.35) !important;
  }
}
