.nff-text-loop {
  display: inline-block;
  position: relative;
  /* height: min(10vw, 150px); */
  height: calc(var(--text-9lg) * 1.2);
  width: 100%;
  margin-bottom: 16px;

  @media screen and (min-width: 768px) {
    margin-bottom: 24px;
  }

  @media screen and (min-width: 1024px) {
    margin-bottom: 32px;
  }
}

.nff-text-loop h2 {
  position: relative;
  margin-bottom: 0;
  height: 100%;
  /* margin-top: -1rem; */
  opacity: 1;
}
.nff-text-loop-word {
  opacity: 0;
  /* transform: translateY(0); */
  transition: opacity 0.65s;
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
}
.nff-text-loop-word.active {
  opacity: 1;
  /* transform: translateY(15px); */
}

/* Accessibility Controls */
.nff-slider-pause-btn {
  position: absolute;
  bottom: 48px;
  right: 48px;
  z-index: 1000;
  border-radius: 50%;
  height: 32px;
  width: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  background: white;
}

.nff-slider-pause-btn svg {
  width: 12px;
  max-height: 12px;
}

.nff-slider-pause-btn svg * {
  fill: black;
}

.nff-slider-pause-btn:hover,
.nff-slider-pause-btn:focus {
}

.nff-slider-pause-btn:focus-visible {
  outline: 2px solid blue;
  outline-offset: 2px;
}

.nff-slider-pause-btn:active {
}

/* Screen reader only text */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Ensure masthead has relative positioning for absolute button */
.masthead {
  position: relative;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .nff-slider-pause-btn {
  }

  .nff-slider-pause-btn:hover,
  .nff-slider-pause-btn:focus {
    opacity: 0.8;
  }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  .nff-slider-pause-btn {
    transition: none;
  }

  .nff-slider-pause-btn:hover,
  .nff-slider-pause-btn:focus {
    transform: none;
  }
}
