/* ── Tour overlay — ranní školení v CCNA Kadetu ── */

/* Kořenový kontejner — vytvořen dynamicky v tour.js */
#tour-root {
  position: fixed;
  inset: 0;
  z-index: 200;
  pointer-events: none;
}

/* Blokační divy — 4 obdélníky kolem cíle vytvářejí „rám", který chytá
   kliky mimo cíl. Klik na samotný cíl projde, protože blockery tam nejsou.
   U info kroků jeden z blockerů pokryje celou obrazovku (žádná díra). */
.tour-blocker {
  position: absolute;
  pointer-events: auto;
  z-index: 200;
}

/* Spotlight — světlé "okno" v ztmaveném pozadí, kolem cílového prvku.
   Tmavé pozadí je realizováno přes box-shadow s velkým rádiusem. */
.tour-spotlight {
  position: absolute;
  border-radius: 10px;
  box-shadow: 0 0 0 9999px rgba(15, 20, 40, 0.55);
  pointer-events: none;
  transition: top 0.35s cubic-bezier(0.4, 0, 0.2, 1),
              left 0.35s cubic-bezier(0.4, 0, 0.2, 1),
              width 0.35s cubic-bezier(0.4, 0, 0.2, 1),
              height 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 201;
}

/* Bublina eduxo */
.tour-bubble {
  position: absolute;
  background: #ffffff;
  border: 1px solid #c7d2fe;
  border-radius: 12px;
  box-shadow: 0 10px 36px rgba(0, 0, 0, 0.22);
  padding: 0.85rem 1rem;
  max-width: 340px;
  z-index: 202;
  pointer-events: auto;
  transition: opacity 0.2s, top 0.3s ease, left 0.3s ease;
}
/* Širší bublina pro kroky s delším textem */
.tour-bubble.tour-bubble-wide { max-width: 440px; }

.tour-bubble-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.4rem;
}
.tour-bubble-avatar {
  width: 28px; height: 28px; border-radius: 50%;
  display: block; object-fit: cover;
}
.tour-bubble-avatar.fallback {
  background: #1a56c4;
  display: flex; align-items: center; justify-content: center;
  color: #ffffff; font-weight: 800; font-size: 0.72rem;
  font-style: italic; font-family: system-ui, sans-serif;
}
.tour-bubble-name {
  font-size: 0.7rem; font-weight: 800; letter-spacing: 0.04em;
  text-transform: uppercase; color: #1a3a8f;
}
.tour-bubble .name-eduxo { text-transform: none; }

.tour-bubble-text {
  font-size: 0.88rem; line-height: 1.55; color: #1a1a2e;
  margin-bottom: 0.7rem;
}
.tour-bubble-text strong { font-weight: 700; }

.tour-bubble-footer {
  display: flex; align-items: center; justify-content: space-between;
  gap: 0.5rem;
}
.tour-counter {
  font-size: 0.72rem; color: #757575; font-weight: 600;
  white-space: nowrap;
}
.tour-btns { display: flex; gap: 0.4rem; }

.tour-skip, .tour-next {
  background: none; border: 1px solid #dde1eb;
  border-radius: 6px; padding: 0.35rem 0.75rem;
  font-size: 0.78rem; cursor: pointer; font-family: inherit;
  color: #555; transition: all 0.15s;
}
.tour-skip:hover { border-color: #555; color: #1a1a2e; }
.tour-next {
  background: #1a56c4; border-color: #1a56c4; color: #ffffff;
  font-weight: 600;
}
.tour-next:hover { background: #1a3a8f; border-color: #1a3a8f; }

/* Stav čekání na akci uživatele (interaktivní krok) */
.tour-await {
  font-size: 0.78rem; color: #1a56c4; font-weight: 600;
  display: flex; align-items: center; gap: 0.4rem;
}
.tour-await::before {
  content: ''; width: 7px; height: 7px; border-radius: 50%;
  background: #1a56c4;
  animation: tourPulse 1.4s ease-in-out infinite;
}
@keyframes tourPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.35; transform: scale(0.6); }
}

/* Šipka bubliny k cílovému prvku */
.tour-bubble-arrow {
  position: absolute;
  width: 0; height: 0;
  border: 8px solid transparent;
}
.tour-bubble[data-pos="top"] .tour-bubble-arrow {
  bottom: -16px; left: 24px; border-top-color: #ffffff;
}
.tour-bubble[data-pos="bottom"] .tour-bubble-arrow {
  top: -16px; left: 24px; border-bottom-color: #ffffff;
}
.tour-bubble[data-pos="left"] .tour-bubble-arrow {
  right: -16px; top: 20px; border-left-color: #ffffff;
}
.tour-bubble[data-pos="right"] .tour-bubble-arrow {
  left: -16px; top: 20px; border-right-color: #ffffff;
}

/* Vstupní animace */
@keyframes tourBubbleIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.tour-bubble.tour-bubble-in {
  animation: tourBubbleIn 0.28s ease-out;
}

/* Tlačítko "Spustit ranní školení znovu" — nad seznamem kapitol */
.tour-reset-btn {
  display: block; width: 100%;
  background: #f0f4ff; border: 1px dashed #c7d2fe;
  color: #1a56c4; border-radius: 6px;
  padding: 0.5rem 0.75rem; margin-bottom: 0.75rem;
  font-size: 0.78rem; cursor: pointer; font-family: inherit;
  text-align: center; transition: all 0.15s;
}
.tour-reset-btn:hover {
  background: #e0e8ff; border-color: #1a56c4; border-style: solid;
}

/* Mobilní zařízení — tour nezobrazovat */
@media (max-width: 767px) {
  #tour-root, .tour-reset-btn { display: none !important; }
}
