/* Guide slideshow styles for HAEO documentation */

/* Slideshow container */
.guide-slideshow {
  margin: 1.5em 0;
  border: 1px solid var(--md-default-fg-color--lightest);
  border-radius: 0.2rem;
  overflow: hidden;
  background: var(--md-default-bg-color);
}

.guide-slideshow:focus {
  outline: 2px solid var(--md-accent-fg-color);
  outline-offset: -2px;
}

/* Slides container — aspect-ratio set by JS from data attributes */
.guide-slides {
  position: relative;
  width: 100%;
  background: var(--md-default-bg-color);
}

/* Individual slide */
.guide-slide {
  display: none;
}

.guide-slide[data-active="true"] {
  display: block;
  position: relative;
}

/* Loading spinner overlay */
.guide-slide[data-loading]::after {
  content: "";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--md-default-bg-color);
}

.guide-slide[data-loading]::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 2rem;
  height: 2rem;
  margin: -1rem 0 0 -1rem;
  border: 3px solid var(--md-default-fg-color--lightest);
  border-top-color: var(--md-accent-fg-color);
  border-radius: 50%;
  animation: guide-spin 0.8s linear infinite;
  z-index: 1;
}

@keyframes guide-spin {
  to {
    transform: rotate(360deg);
  }
}

/* Screenshot image */
.guide-slide-img {
  display: block;
  width: 100%;
  height: auto;
}

/* Navigation controls */
.guide-controls {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0.75rem;
  border-top: 1px solid var(--md-default-fg-color--lightest);
  background: var(--md-code-bg-color);
  font-size: 0.8rem;
  user-select: none;
}

/* Nav buttons */
.guide-prev,
.guide-next {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border: 1px solid var(--md-default-fg-color--lightest);
  border-radius: 0.2rem;
  background: var(--md-default-bg-color);
  color: var(--md-default-fg-color);
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
  transition:
    background 0.15s,
    border-color 0.15s;
}

.guide-prev:hover:not(:disabled),
.guide-next:hover:not(:disabled) {
  background: var(--md-accent-fg-color--transparent);
  border-color: var(--md-accent-fg-color);
}

.guide-prev:disabled,
.guide-next:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

/* Step counter */
.guide-counter {
  color: var(--md-default-fg-color--light);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  min-width: 3.5em;
  text-align: center;
}

/* Step label */
.guide-label {
  flex: 1;
  color: var(--md-default-fg-color--light);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Placeholder when screenshots aren't available */
.guide-placeholder {
  margin: 1.5em 0;
  padding: 1em 1.5em;
  border: 1px dashed var(--md-default-fg-color--lightest);
  border-radius: 0.2rem;
  background: var(--md-code-bg-color);
}

.guide-placeholder p {
  margin: 0 0 0.5em;
  color: var(--md-default-fg-color--light);
}

.guide-placeholder details {
  margin: 0;
}

.guide-placeholder summary {
  cursor: pointer;
  color: var(--md-default-fg-color--light);
  font-size: 0.85rem;
}

.guide-placeholder pre {
  margin: 0.5em 0 0;
  font-size: 0.8rem;
}
