/**
 * @AI_GUIDE: Wizard-Styles — Welcome-Modal + Inline-Tooltips.
 *
 * Designed mit mobile-app-ui-design Skill (Mo 2026-06-14):
 *   - Soft shadows (3-layered), nie pure black/gray
 *   - 8-Point Grid Spacing
 *   - Max 2 Font-Weights (400 + 600/700)
 *   - Backdrop blur statt hartem dark scrim
 *   - Pulse-Animation am Spotlight, Auto-Flip Tooltip bei Kollision
 *
 * Iteration 16d.
 */

:root {
  --wiz-accent: #ff9800;
  --wiz-accent-glow: rgba(255, 152, 0, 0.4);
  --wiz-text: rgba(15, 15, 20, 1);
  --wiz-text-secondary: rgba(15, 15, 20, 0.68);
  --wiz-text-muted: rgba(15, 15, 20, 0.5);
  --wiz-scrim: rgba(15, 15, 20, 0.35);
  --wiz-success: rgba(34, 197, 94, 0.55);
}

/* ═══════════════════════ WELCOME-MODAL ═══════════════════════ */

.wizard-welcome-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 15, 20, 0.25);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: grid;
  place-items: center;
  padding: 24px;
  animation: wiz-bd-in 200ms ease-out;
}

@keyframes wiz-bd-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.wizard-welcome-card {
  background: #fff;
  border-radius: 24px;
  padding: 32px 24px 16px;
  max-width: 320px;
  width: 100%;
  text-align: center;
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.04),
    0 24px 48px rgba(15, 15, 20, 0.12),
    0 4px 12px rgba(15, 15, 20, 0.08);
  animation: wiz-card-in 320ms cubic-bezier(0.2, 0.9, 0.3, 1) 50ms backwards;
}

@keyframes wiz-card-in {
  from { opacity: 0; transform: scale(0.95) translateY(8px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.wizard-welcome-avatar {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 16px;
  display: block;
  box-shadow:
    0 4px 16px rgba(255, 152, 0, 0.18),
    0 0 0 4px rgba(255, 152, 0, 0.08);
  animation: wiz-avatar-in 400ms cubic-bezier(0.2, 0.9, 0.3, 1) 150ms backwards;
}

@keyframes wiz-avatar-in {
  from { opacity: 0; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1); }
}

.wizard-welcome-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--wiz-text);
  margin: 0 0 8px;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.wizard-welcome-body {
  font-size: 15px;
  line-height: 1.5;
  color: var(--wiz-text-secondary);
  margin: 0 0 24px;
}

.wizard-welcome-cta {
  display: block;
  width: 100%;
  padding: 16px;
  background: var(--wiz-accent);
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.2),
    0 2px 8px rgba(255, 152, 0, 0.32);
  transition: transform 120ms ease-out, box-shadow 120ms ease-out;
  margin-bottom: 4px;
  font-family: inherit;
}

.wizard-welcome-cta:hover {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.2),
    0 4px 12px rgba(255, 152, 0, 0.42);
}

.wizard-welcome-cta:active {
  transform: scale(0.98);
}

.wizard-welcome-skip {
  display: block;
  margin: 0 auto;
  padding: 12px 16px;
  background: transparent;
  color: var(--wiz-text-muted);
  font-size: 14px;
  font-weight: 500;
  border: none;
  cursor: pointer;
  font-family: inherit;
}

.wizard-welcome-skip:hover {
  color: rgba(15, 15, 20, 0.75);
}

/* ═══════════════════════ TOOLTIP-LAYER ═══════════════════════ */

.wizard-tooltip-backdrop {
  position: fixed;
  inset: 0;
  background: var(--wiz-scrim);
  animation: wiz-bd-in 200ms ease-out;
  pointer-events: auto;
}

/* Iteration 16p (Mo 2026-06-15): Spotlight Option B —
 * weißer Inner-Ring (3px) + orange Outer-Glow (8px). Doppel-Kontrast macht
 * das Element klar erkennbar gegen dunkles Scrim.
 * box-shadow inside-out:
 *   inset 0 0 0 3px white  → weißer Ring am Element-Rand (innen)
 *   0 0 0 3px white        → weißer Ring außen am Element (Verstärkung)
 *   0 0 0 7px orange       → orange Glow drumherum
 *   0 0 0 9999px scrim     → cutout-Trick fürs Scrim
 */
.wizard-spotlight-ring {
  position: fixed;
  border-radius: 12px;
  pointer-events: none;
  box-shadow:
    inset 0 0 0 3px rgba(255, 255, 255, 0.95),
    0 0 0 3px rgba(255, 255, 255, 0.95),
    0 0 0 7px rgba(255, 152, 0, 0.55),
    0 0 0 9999px var(--wiz-scrim);
  animation: wiz-pulse 1.8s ease-in-out infinite;
  transition: top 300ms ease-out, left 300ms ease-out, width 300ms ease-out, height 300ms ease-out;
}

@keyframes wiz-pulse {
  0%, 100% {
    box-shadow:
      inset 0 0 0 3px rgba(255, 255, 255, 0.95),
      0 0 0 3px rgba(255, 255, 255, 0.95),
      0 0 0 7px rgba(255, 152, 0, 0.55),
      0 0 0 9999px var(--wiz-scrim);
  }
  50% {
    box-shadow:
      inset 0 0 0 3px rgba(255, 255, 255, 0.95),
      0 0 0 3px rgba(255, 255, 255, 0.95),
      0 0 0 12px rgba(255, 152, 0, 0.30),
      0 0 0 9999px var(--wiz-scrim);
  }
}

.wizard-spotlight-ring.complete {
  animation: wiz-complete 600ms ease-out;
}

@keyframes wiz-complete {
  0% {
    transform: scale(1);
    box-shadow:
      inset 0 0 0 3px rgba(255, 255, 255, 0.95),
      0 0 0 3px rgba(255, 255, 255, 0.95),
      0 0 0 7px var(--wiz-success),
      0 0 0 9999px var(--wiz-scrim);
  }
  40% {
    transform: scale(1.08);
    box-shadow:
      inset 0 0 0 3px rgba(255, 255, 255, 0.95),
      0 0 0 3px rgba(255, 255, 255, 0.95),
      0 0 0 10px var(--wiz-success),
      0 0 0 9999px var(--wiz-scrim);
  }
  100% {
    transform: scale(1);
    box-shadow:
      inset 0 0 0 3px rgba(255, 255, 255, 0.95),
      0 0 0 3px rgba(255, 255, 255, 0.95),
      0 0 0 7px var(--wiz-success),
      0 0 0 9999px var(--wiz-scrim);
  }
}

/* ═══════════════════════ TOOLTIP-CARD ═══════════════════════ */

.wizard-tooltip {
  position: fixed;
  bottom: 24px;
  left: 16px;
  right: 16px;
  background: #fff;
  border-radius: 20px;
  padding: 20px;
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.04),
    0 16px 40px rgba(15, 15, 20, 0.18),
    0 4px 12px rgba(15, 15, 20, 0.08);
  animation: wiz-tip-in 320ms cubic-bezier(0.2, 0.9, 0.3, 1);
  max-width: 360px;
  margin: 0 auto;
}

.wizard-tooltip[data-position="top"] {
  bottom: auto;
  top: 24px;
  animation: wiz-tip-in-top 320ms cubic-bezier(0.2, 0.9, 0.3, 1);
}

@keyframes wiz-tip-in {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes wiz-tip-in-top {
  from { opacity: 0; transform: translateY(-16px); }
  to { opacity: 1; transform: translateY(0); }
}

.wizard-tooltip-progress {
  display: flex;
  gap: 6px;
  margin-bottom: 12px;
}

.wizard-tooltip-progress .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(15, 15, 20, 0.12);
  transition: background 200ms ease-out, transform 200ms ease-out, border-radius 200ms ease-out;
}

.wizard-tooltip-progress .dot.done {
  background: rgba(255, 152, 0, 0.45);
}

.wizard-tooltip-progress .dot.current {
  background: var(--wiz-accent);
  transform: scaleX(2.5);
  transform-origin: left;
  border-radius: 3px;
}

.wizard-tooltip-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  background: rgba(15, 15, 20, 0.04);
  border: none;
  border-radius: 50%;
  color: rgba(15, 15, 20, 0.6);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  transition: background 120ms ease-out;
  font-family: inherit;
  padding: 0;
}

.wizard-tooltip-close:hover {
  background: rgba(15, 15, 20, 0.08);
}

.wizard-tooltip-content {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 16px;
  padding-right: 32px;
}

.wizard-tooltip-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  flex-shrink: 0;
  object-fit: cover;
  box-shadow: 0 0 0 2px rgba(255, 152, 0, 0.15);
}

.wizard-tooltip-text {
  font-size: 14px;
  line-height: 1.5;
  color: rgba(15, 15, 20, 0.85);
  margin: 0;
  padding-top: 4px;
}

.wizard-tooltip-text b,
.wizard-tooltip-text strong {
  color: var(--wiz-text);
  font-weight: 600;
}

.wizard-tooltip-next {
  display: block;
  width: 100%;
  padding: 14px;
  background: var(--wiz-accent);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.2),
    0 2px 8px rgba(255, 152, 0, 0.28);
  transition: transform 120ms ease-out;
  font-family: inherit;
}

.wizard-tooltip-next:active {
  transform: scale(0.98);
}

/* ═══════════════════════ A11Y / REDUCED-MOTION ═══════════════════════ */

@media (prefers-reduced-motion: reduce) {
  .wizard-welcome-backdrop,
  .wizard-welcome-card,
  .wizard-welcome-avatar,
  .wizard-tooltip-backdrop,
  .wizard-tooltip {
    animation-duration: 0.01ms !important;
  }
  .wizard-spotlight-ring {
    animation: none !important;
  }
}
