/* Feature tour: animated Command Center scenes (template-parts/showcase-tour.php) */

.sp-tour__tabs {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.sp-tour__group {
  margin: 0.75rem 0 0.25rem 1rem;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--sp-muted-foreground);
  opacity: 0.8;
}

.sp-tour__group:first-child {
  margin-top: 0;
}

.sp-tour__tab {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  width: 100%;
  padding: 0.5rem 0.75rem;
  text-align: left;
  color: var(--sp-foreground);
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--sp-radius);
  cursor: pointer;
  overflow: hidden;
  transition: background 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.sp-tour__tab:hover {
  background: hsla(240, 10%, 10%, 0.8);
  border-color: hsla(240, 10%, 22%, 0.8);
}

.sp-tour__tab:focus-visible {
  outline: 2px solid var(--sp-primary);
  outline-offset: 2px;
}

.sp-tour__tab.is-active {
  background: hsla(190, 100%, 50%, 0.06);
  border-color: hsla(190, 100%, 50%, 0.25);
  box-shadow: 0 8px 30px -12px hsla(190, 100%, 50%, 0.25);
}

.sp-tour__icon {
  flex-shrink: 0;
  width: 2.125rem;
  height: 2.125rem;
  margin-top: 0;
  color: var(--sp-muted-foreground);
  transition: color 0.25s ease, background 0.25s ease;
}

.sp-tour__tab.is-active .sp-tour__icon {
  background: hsla(190, 100%, 50%, 0.15);
  color: var(--sp-primary);
}

.sp-tour__tab-text {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
  min-width: 0;
}

.sp-tour__tab-title {
  font-weight: 600;
  font-size: 0.9rem;
  line-height: 1.3;
}

.sp-tour__tab.is-active .sp-tour__tab-title {
  font-weight: 700;
}

/* The one-line summary expands only under the selected scene so twelve tabs stay scannable. */
.sp-tour__tab-summary {
  display: none;
  font-size: 0.8125rem;
  line-height: 1.45;
  color: var(--sp-muted-foreground);
}

.sp-tour__tab.is-active .sp-tour__tab-summary {
  display: block;
}

/* Auto-rotate countdown under the active tab. */
.sp-tour__progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: var(--sp-primary);
  transform: scaleX(0);
  transform-origin: left center;
  opacity: 0;
}

.sp-tour.is-rotating .sp-tour__tab.is-active .sp-tour__progress {
  opacity: 0.8;
  animation: sp-tour-progress var(--sp-tour-interval, 9s) linear forwards;
}

.sp-tour.is-paused .sp-tour__tab.is-active .sp-tour__progress {
  animation-play-state: paused;
}

@keyframes sp-tour-progress {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

.sp-tour__panel:focus-visible {
  outline: 2px solid var(--sp-primary);
  outline-offset: 4px;
  border-radius: 1rem;
}

.sp-tour__frame {
  transform: none;
}

.sp-tour__scene {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1200 / 720;
  background: hsl(240, 10%, 4%);
}

.sp-tour__caption {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 1rem 2rem;
  margin-top: 1.25rem;
  padding: 1rem 1.25rem;
  background: hsla(240, 10%, 7%, 0.6);
  border: 1px solid var(--sp-border);
  border-radius: var(--sp-radius);
}

.sp-tour__outcome {
  flex: 1 1 18rem;
  margin: 0;
  font-weight: 600;
  color: var(--sp-foreground);
  line-height: 1.5;
}

.sp-tour__points {
  flex: 1 1 18rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin: 0;
}

.sp-tour__points li {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--sp-muted-foreground);
}

.sp-tour__points li i {
  flex-shrink: 0;
  margin-top: 0.125rem;
}

@media (max-width: 991.98px) {
  .sp-tour__tabs {
    flex-direction: row;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 0.5rem;
    padding-bottom: 0.5rem;
    margin-bottom: 0.5rem;
    -webkit-overflow-scrolling: touch;
  }

  .sp-tour__group {
    display: none;
  }

  .sp-tour__tab {
    flex: 0 0 13rem;
    scroll-snap-align: start;
  }

  .sp-tour__tab.is-active .sp-tour__tab-summary {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .sp-tour__tab,
  .sp-tour__icon {
    transition: none;
  }

  .sp-tour.is-rotating .sp-tour__tab.is-active .sp-tour__progress {
    animation: none;
    opacity: 0;
  }
}
