/* Desktop-only slogan typing cursor (Money / Dinero rotator) */
.slogan-rotator {
  display: inline-block;
  white-space: nowrap;
  vertical-align: baseline;
  text-align: left;
  min-width: 0;
}

.slogan-rotator__word {
  display: inline;
  vertical-align: baseline;
}

.slogan-rotator__cursor {
  display: none;
  margin-left: 0;
  font-weight: 700;
  speak: never;
}

@media screen and (min-width: 992px) {
  /* Keep the full slogan on one line while the rotator runs */
  .heading-1.landing-section-header:has(.slogan-rotator.is-active),
  .heading-1.landing-section-header:has(.slogan-rotator.is-active) .bold-text-4 {
    white-space: nowrap;
  }

  /* Reserve width on the whole slot so "_" stays flush after remaining letters / "your " */
  .slogan-rotator.is-active {
    min-width: var(--slogan-min-width, 9ch);
  }

  /* Cursor during delete + empty gap only (not while a finished word is held) */
  .slogan-rotator.is-active.is-cursor .slogan-rotator__cursor {
    display: inline;
    animation: slogan-cursor-blink 0.85s steps(1, end) infinite;
  }
}

@keyframes slogan-cursor-blink {
  0%,
  49% {
    opacity: 1;
  }
  50%,
  100% {
    opacity: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .slogan-rotator.is-active .slogan-rotator__cursor {
    display: none;
    animation: none;
  }
}
