.dm-footer {
  position: relative;
}

.dm-christmas-garland {
  position: absolute;
  inset: 0 0 auto;
  height: 42px;
  pointer-events: none;
}

/* The first row is the lit garland. The other three dim its bulbs in turn. */
.dm-christmas-garland,
.dm-christmas-garland > i {
  background-image: url("../../img/footer-christmas-garland.webp");
  background-size: auto 400%;
  background-repeat: repeat-x;
  background-position: center top;
}

.dm-christmas-garland > i {
  display: none;
  position: absolute;
  inset: 0;
}

@media (prefers-reduced-motion: no-preference) {
  .dm-christmas-garland > i {
    display: block;
    background-position-y: 33.333333%;
    animation: dm-garland-bulb-dimming 3.6s ease-in-out infinite;
  }
  .dm-christmas-garland > i:nth-child(2) {
    background-position-y: 66.666667%;
    animation-delay: -1.2s;
  }
  .dm-christmas-garland > i:nth-child(3) {
    background-position-y: 100%;
    animation-delay: -2.4s;
  }
}

@keyframes dm-garland-bulb-dimming {
  0%, 20%, 100% { opacity: 0; }
  52%, 62% { opacity: .96; }
}

@media (max-width: 767.98px) {
  .dm-footer > .dm-christmas-garland { height: 36px; }
  .dm-footer > .dm-christmas-garland + .container { margin-block-start: 1rem; }
}

#mainNav > .dm-christmas-garland {
  display: none;
}

@media (min-width: 992px) and (hover: hover) and (pointer: fine) {
  /* Include the strand in the fixed navbar's measured height. */
  #mainNav.dm-christmas-nav {
    --garland-height: 28px;
    border-bottom: var(--garland-height) solid transparent;
  }
  #mainNav > .dm-christmas-garland {
    display: block;
    top: 100%;
    height: var(--garland-height);
  }
}
