/* =============================================================================
   DPL announcement strip (redesign batch 2, H1)

   A dark strip, one line high (40px, never above 44px).
   990px and up: lines 1-3 side by side and still. No payment badges (owner, 2026-10-24).
   Below 990px: all lines scroll sideways in one CSS loop (~34s); the second copy is aria-hidden and only there
   to make the loop seamless. Reduced motion: no scrolling, line 1 alone, centred.
   Not sticky: it scrolls away, the pill below it stays.
   ============================================================================= */

.dpl-announce {
  background: var(--dpl-surface-dark);
  color: var(--dpl-on-dark);
}

.dpl-announce__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  box-sizing: border-box;
  max-width: calc(var(--dpl-page-width) + 2 * var(--dpl-gutter));
  height: 40px;
  margin: 0 auto;
  padding: 0 var(--dpl-gutter);
  overflow: hidden;
}

.dpl-announce .announcement-bar {
  display: block;
  flex: 1 1 auto;
  min-width: 0;
  width: auto;
  height: 40px;
  overflow: hidden;
  color: inherit;
}

.dpl-announce__marquee {
  display: flex;
  align-items: center;
  width: max-content;
  height: 100%;
  animation: dpl-announce-scroll 34s linear infinite;
}

.dpl-announce__track {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.dpl-announce__line {
  display: block;
  margin: 0;
  padding: 0;
  font-family: var(--dpl-font-body);
  font-size: 13px;
  font-weight: var(--dpl-weight-body);
  line-height: 20px;
  letter-spacing: 0;
  white-space: nowrap;
  color: var(--dpl-on-dark);
}

/* A dot between the lines, also at the join of the two copies, so the loop has even spacing */
.dpl-announce__line::after {
  content: '';
  display: inline-block;
  width: 4px;
  height: 4px;
  margin: 0 14px;
  border-radius: 50%;
  background: var(--dpl-accent);
  vertical-align: middle;
}

@keyframes dpl-announce-scroll {
  from {
    transform: translateX(0);
  }

  to {
    transform: translateX(-50%);
  }
}

.dpl-announce__marquee:hover {
  animation-play-state: paused;
}

@media screen and (min-width: 990px) {
  .dpl-announce__marquee {
    width: 100%;
    animation: none;
  }

  .dpl-announce__track {
    flex: 1 1 auto;
    justify-content: flex-start;
    min-width: 0;
  }

  .dpl-announce__copy,
  .dpl-announce__line--mobile-only {
    display: none;
  }

  .dpl-announce__line {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  /* Where the three don't fit (a long translation at 990px), line 1 keeps its free-shipping amount whole and
     line 3 gives way first, then line 2. */
  .dpl-announce__line:nth-child(1) {
    flex-shrink: 0;
  }

  .dpl-announce__line:nth-child(3) {
    flex-shrink: 4;
  }

  /* Side by side, no dot after the last one shown */
  .dpl-announce__line:nth-child(3)::after,
  .dpl-announce__line:last-child::after {
    display: none;
  }
}

/* Reduced motion: still. Below 990px only line 1 shows, centred. */
@media (prefers-reduced-motion: reduce) {
  .dpl-announce__marquee {
    animation: none;
  }

  .dpl-announce__marquee:hover {
    animation-play-state: running;
  }
}

@media (prefers-reduced-motion: reduce) and (max-width: 989px) {
  .dpl-announce .announcement-bar {
    display: flex;
    justify-content: center;
  }

  .dpl-announce__marquee {
    width: auto;
    max-width: 100%;
  }

  .dpl-announce__copy,
  .dpl-announce__line:not(:first-child) {
    display: none;
  }

  .dpl-announce__line:first-child {
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .dpl-announce__line::after {
    display: none;
  }
}
