/* Raidbase "story" tutorial — Instagram/Snapchat-style screenshot slideshow */
.rb-story-trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.85rem;
}

.rb-story-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  z-index: 160;
  display: grid;
  place-items: center;
  padding: 1rem;
}

.rb-story-overlay[hidden] {
  display: none !important;
}

.rb-story-shell {
  position: relative;
  display: flex;
  flex-direction: column;
  width: min(1280px, 94vw);
  aspect-ratio: 16 / 10;
  max-height: 92vh;
  border-radius: 16px;
  overflow: hidden;
  background: #0f0f0f;
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.55);
}

.rb-story-media-wrap {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
}

.rb-story-bars {
  position: absolute;
  top: 0.6rem;
  left: 0.6rem;
  right: 0.6rem;
  display: flex;
  gap: 0.3rem;
  z-index: 4;
}

.rb-story-bar {
  flex: 1 1 0;
  height: 3px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.28);
  overflow: hidden;
}

.rb-story-bar__fill {
  height: 100%;
  width: 0%;
  background: var(--gold, #c9a227);
  border-radius: 3px;
}

.rb-story-bar.is-done .rb-story-bar__fill {
  width: 100%;
}

.rb-story-bar.is-active .rb-story-bar__fill {
  transition: width linear;
}

.rb-story-close {
  position: absolute;
  top: 1.1rem;
  right: 1rem;
  z-index: 5;
  width: 2.7rem;
  height: 2.7rem;
  border-radius: 999px;
  border: none;
  background: rgba(0, 0, 0, 0.5);
  color: #f4f4f4;
  display: grid;
  place-items: center;
  cursor: pointer;
  font-size: 1.3rem;
}

.rb-story-close:hover {
  background: rgba(0, 0, 0, 0.75);
}

.rb-story-media {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: linear-gradient(160deg, #1c1a14, #0f0f0f);
}

.rb-story-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.rb-story-media.is-placeholder {
  color: rgba(240, 240, 240, 0.7);
}

.rb-story-media.is-placeholder i {
  font-size: 5rem;
  color: var(--gold, #c9a227);
  opacity: 0.85;
}

.rb-story-nav {
  position: absolute;
  inset: 0;
  display: flex;
  z-index: 3;
}

.rb-story-nav button {
  flex: 1 1 50%;
  background: transparent;
  border: none;
  cursor: pointer;
}

.rb-story-caption {
  position: relative;
  flex: 0 0 auto;
  padding: 1.1rem 1.6rem 1.3rem;
  background: #141414;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.rb-story-caption__step {
  margin: 0 0 0.3rem;
  font-size: 0.9rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gold, #c9a227);
  font-weight: 700;
}

.rb-story-caption h4 {
  margin: 0 0 0.4rem;
  font-size: 1.55rem;
  color: #f4f4f4;
}

.rb-story-caption p {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.45;
  color: rgba(240, 240, 240, 0.9);
  max-width: 46rem;
}

.rb-story-arrows {
  position: absolute;
  top: 50%;
  left: 0.5rem;
  right: 0.5rem;
  transform: translateY(-50%);
  display: flex;
  justify-content: space-between;
  z-index: 5;
  pointer-events: none;
}

.rb-story-arrow {
  pointer-events: auto;
  width: 3rem;
  height: 3rem;
  border-radius: 999px;
  border: none;
  background: rgba(0, 0, 0, 0.4);
  color: #fff;
  font-size: 1.1rem;
  display: grid;
  place-items: center;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.15s ease;
}

.rb-story-shell:hover .rb-story-arrow {
  opacity: 1;
}

.rb-story-arrow:disabled {
  visibility: hidden;
}

@media (max-width: 640px) {
  .rb-story-shell {
    aspect-ratio: 9 / 14;
  }
}
