/* tutorial.css - Geführte Tour (Spotlight + Sprechblase) und Willkommensfenster.
   Baut auf den Tokens aus styles.css auf. Liegt über allen Modals und Info-Fenstern (z-index 10050+). */

/* ── Button im Kopf ── */
.tour-btn {
  width:34px; height:34px; border-radius:50%;
  border:1.5px solid rgba(255,255,255,.24); background:transparent; color:#fff;
  font-family:inherit; font-size:16px; font-weight:700; line-height:1;
  cursor:pointer; display:flex; align-items:center; justify-content:center;
  transition:background .15s, border-color .15s;
}
.tour-btn:hover { background:rgba(255,255,255,.10); border-color:rgba(255,255,255,.40); }
.tour-btn:focus-visible { outline:2px solid var(--accent); outline-offset:2px; }

/* ── Klickschutz: während der Tour bleibt die Seite unberührt ── */
.tour-blocker { position:fixed; inset:0; z-index:10050; background:transparent; }
.tour-blocker.ohne-ziel { background:rgba(16,28,40,.55); }

/* ── Spotlight: Loch in der Abdunklung um das Zielelement ── */
.tour-spot {
  position:fixed; z-index:10051; pointer-events:none;
  border-radius:12px;
  box-shadow:0 0 0 3px var(--accent), 0 0 0 9999px rgba(16,28,40,.55);
  transition:top .32s ease, left .32s ease, width .32s ease, height .32s ease, opacity .2s;
}
.tour-spot::after {
  content:''; position:absolute; inset:-3px; border-radius:inherit;
  border:3px solid var(--accent); opacity:0;
  animation:tour-puls 1.8s ease-out infinite;
}
@keyframes tour-puls {
  0%   { transform:scale(1);    opacity:.75; }
  100% { transform:scale(1.06); opacity:0; }
}
.tour-spot.versteckt { opacity:0; }

/* ── Sprechblase ── */
.tour-pop {
  position:fixed; z-index:10052;
  width:min(360px, calc(100vw - 32px));
  background:#fff; color:var(--text);
  border-radius:var(--radius); box-shadow:0 12px 40px rgba(0,0,0,.28);
  padding:16px 18px 14px;
  opacity:0; transform:translateY(6px);
  transition:opacity .2s ease, transform .2s ease;
}
.tour-pop.sichtbar { opacity:1; transform:none; }
.tour-pop-pfeil {
  position:absolute; width:14px; height:14px; background:#fff; transform:rotate(45deg);
}
.tour-pop[data-seite="bottom"] .tour-pop-pfeil { top:-7px; }
.tour-pop[data-seite="top"]    .tour-pop-pfeil { bottom:-7px; }
.tour-pop[data-seite="right"]  .tour-pop-pfeil { left:-7px; }
.tour-pop[data-seite="left"]   .tour-pop-pfeil { right:-7px; }
.tour-pop[data-seite="mitte"]  .tour-pop-pfeil { display:none; }

.tour-kopf { display:flex; align-items:center; justify-content:space-between; gap:10px; margin-bottom:6px; }
.tour-kapitel {
  font-size:11px; font-weight:700; text-transform:uppercase; letter-spacing:.6px; color:var(--accent);
}
.tour-zu {
  border:none; background:transparent; color:var(--muted); font-size:16px; line-height:1;
  width:28px; height:28px; border-radius:50%; cursor:pointer; flex-shrink:0;
}
.tour-zu:hover { background:var(--bg); color:var(--text); }
.tour-titel { font-size:16px; font-weight:700; line-height:1.3; margin-bottom:6px; }
.tour-text { font-size:14px; line-height:1.5; color:#34404f; }
.tour-text strong { color:var(--text); }

.tour-fortschritt { height:4px; background:var(--bg); border-radius:2px; margin:14px 0 12px; overflow:hidden; }
.tour-fortschritt span { display:block; height:100%; background:var(--accent); border-radius:2px; transition:width .3s ease; }

.tour-fuss { display:flex; align-items:center; justify-content:space-between; gap:10px; }
.tour-zaehler { font-size:12px; color:var(--muted); font-family:'DM Mono',monospace; }
.tour-knoepfe { display:flex; gap:8px; }
.tour-knoepfe .btn { height:34px; padding:0 14px; font-size:13px; }

/* ── Willkommensfenster ── */
.tour-willkommen {
  position:fixed; inset:0; z-index:10053; background:rgba(16,28,40,.55);
  display:flex; align-items:center; justify-content:center; padding:16px;
}
.tour-willkommen-box {
  background:#fff; border-radius:var(--radius); box-shadow:0 12px 40px rgba(0,0,0,.28);
  width:min(480px, 100%); padding:24px 24px 20px;
}
.tour-willkommen-box h2 { font-size:19px; font-weight:700; margin-bottom:8px; }
.tour-willkommen-box > p { font-size:14px; line-height:1.5; color:#34404f; margin-bottom:16px; }
.tour-kapitelwahl { display:flex; flex-direction:column; gap:8px; margin-bottom:18px; }
.tour-kapitel-btn {
  display:flex; align-items:center; gap:12px; text-align:left;
  border:1.5px solid var(--border); border-radius:var(--radius-sm); background:#fff;
  padding:10px 12px; font-family:inherit; cursor:pointer; transition:border-color .15s, background .15s;
}
.tour-kapitel-btn:hover { border-color:var(--accent); background:var(--accent-light); }
.tour-kapitel-btn:focus-visible { outline:2px solid var(--accent); outline-offset:2px; }
.tour-kapitel-btn .ico { font-size:20px; width:28px; text-align:center; flex-shrink:0; }
.tour-kapitel-btn b { display:block; font-size:14px; color:var(--text); }
.tour-kapitel-btn small { display:block; font-size:12px; color:var(--muted); line-height:1.35; }
.tour-kapitel-btn.haupt { border-color:var(--accent); background:var(--accent-light); }
.tour-willkommen-fuss { display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap; }
.tour-willkommen-fuss .tour-link {
  border:none; background:none; font-family:inherit; font-size:13px; color:var(--muted);
  cursor:pointer; text-decoration:underline; padding:4px 0;
}
.tour-willkommen-fuss .tour-link:hover { color:var(--text); }

/* ── Schmale Bildschirme: Sprechblase unten angedockt ── */
@media (max-width:640px) {
  .tour-pop.angedockt .tour-pop-pfeil { display:none; }
}

@media (prefers-reduced-motion: reduce) {
  .tour-spot, .tour-pop, .tour-fortschritt span { transition:none; }
  .tour-spot::after { animation:none; }
}
