/* ── RaceRanger guided clickable walkthroughs ───────────────── */

.rr-walkthrough {
  max-width: 360px;
  margin: 1.6em auto;
  padding: 0.9rem 0.9rem 0.7rem;
  border: 1px solid var(--md-default-fg-color--lightest);
  border-radius: 12px;
  background: var(--md-default-bg-color--light, rgba(255, 255, 255, 0.03));
  text-align: center;
  outline: none;
}
.rr-walkthrough:focus-visible { border-color: var(--md-accent-fg-color); }

/* Before JS upgrades the block, just stack the raw images. */
.rr-walkthrough:not(.rr-wt) img {
  max-width: 240px;
  display: block;
  margin: 0.5rem auto;
}

/* Stage shrinks to the image so the hotspot can be positioned in %.
   overflow:hidden clips the hotspot's huge dimming box-shadow to the
   screenshot only (not the whole page). */
.rr-wt-stage {
  position: relative;
  display: inline-block;
  line-height: 0;
  overflow: hidden;
  border-radius: 10px;
}
.rr-wt-stage.has-hotspot { cursor: default; }

.rr-wt-img {
  width: auto;
  max-width: 100%;
  max-height: 64vh;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
  display: block;
}

/* The clickable, highlighted button region. */
.rr-wt-hotspot {
  position: absolute;
  display: none;
  margin: 0;
  padding: 0;
  border: 2px solid var(--md-accent-fg-color);
  border-radius: 10px;
  background: transparent;
  cursor: pointer;
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.32);   /* dim everything outside */
  animation: rr-wt-pulse 1.5s ease-out infinite;
}
.rr-wt-hotspot:focus-visible { outline: none; }

@keyframes rr-wt-pulse {
  0%   { box-shadow: 0 0 0 9999px rgba(0,0,0,0.32), 0 0 0 0 rgba(245,166,35,0.55); }
  70%  { box-shadow: 0 0 0 9999px rgba(0,0,0,0.32), 0 0 0 12px rgba(245,166,35,0); }
  100% { box-shadow: 0 0 0 9999px rgba(0,0,0,0.32), 0 0 0 0 rgba(245,166,35,0); }
}

.rr-wt-nudge { animation: rr-wt-shake 0.4s ease; }
@keyframes rr-wt-shake {
  0%,100% { transform: translateX(0); }
  20%,60% { transform: translateX(-5px); }
  40%,80% { transform: translateX(5px); }
}

.rr-wt-caption {
  min-height: 3.4em;
  margin: 0.7rem 0.2rem 0.4rem;
  font-size: 0.78rem;
  line-height: 1.45;
}
.rr-wt-step {
  display: block;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  font-size: 0.66rem;
  color: var(--md-accent-fg-color);
  margin-bottom: 0.25rem;
}
.rr-wt-text strong { color: var(--md-primary-fg-color--light, var(--md-primary-fg-color)); }

.rr-wt-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-top: 0.2rem;
}
.rr-wt-btn {
  flex: 0 0 auto;
  border: 0;
  cursor: pointer;
  border-radius: 999px;
  padding: 0.3rem 0.8rem;
  font-size: 0.74rem;
  font-weight: 600;
  color: #06120f;
  background: var(--md-primary-fg-color);
  transition: opacity 0.15s ease, background 0.15s ease;
}
.rr-wt-btn:hover { background: var(--md-primary-fg-color--light); }
.rr-wt-btn:disabled { opacity: 0.32; cursor: default; }

.rr-wt-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.34rem;
  flex: 0 0 auto;
}
.rr-wt-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--md-default-fg-color--lighter);
  transition: background 0.15s ease, transform 0.15s ease;
}
.rr-wt-dot.is-active { background: var(--md-primary-fg-color); transform: scale(1.25); }

.rr-wt-hint {
  flex: 1 1 auto;
  text-align: right;
  font-size: 0.62rem;
  opacity: 0.6;
  font-style: italic;
}
