.loader {
  top: 40%;
  left: 160%;
  width: 70%;
  height: 10%;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.loader:before {
  content: "";
  position: absolute;
  border-radius: 50px;
  color: var(--color-primary-light);
  box-shadow: 0 0 0 3px var(--color-primary);
  animation: l3 0.75s infinite alternate;
}

/* deprecated loading anim but still used on some pages */

@keyframes l3 {
  0% {
    inset: 0 35% 0 0;
  }

  50% {
    inset: 0 0 0 0;
  }

  100% {
    inset: 0 0 0 35%;
  }
}

@keyframes shimmer {
  0% {
    background-position: -1000px 0;
  }

  100% {
    background-position: 1000px 0;
  }
}

/* new skeleton loading (unfinished), replacing our old loader */

.skeleton {
  display: block;
  background-color: color-mix(in srgb, var(--color-background), white 5%);
  background-image: linear-gradient(90deg,
      transparent 0%,
      color-mix(in srgb, var(--color-background), white 15%) 50%,
      transparent 100%);
  background-size: 1000px 100%;
  background-repeat: no-repeat;
  animation: shimmer 2s infinite linear;
  border-radius: 4px;
}

.skel-title {
  height: 2.5rem;
  width: 60%;
  margin-bottom: 1rem;
  border-radius: 8px;
}

.skel-text {
  height: 1.2rem;
  width: 100%;
  margin-bottom: 0.5rem;
}

.skel-text-short {
  width: 40%;
}

.skel-table-row {
  height: 50px;
  width: 100%;
  margin-bottom: 8px;
  border-radius: 8px;
}

.skel-video {
  width: 100%;
  aspect-ratio: 16 / 9;
  margin: 1rem 0;
  border-radius: 8px;
}

.skel-pill {
  height: 30px;
  width: 80px;
  border-radius: 15px;
  display: inline-block;
  margin-right: 10px;
}

@media (max-width: 768px) {
  .skeleton {
    animation-duration: 1.5s;
    background-size: 600px 100%;
  }

  .skel-title {
    width: 85%;
    height: 2rem;
    margin-bottom: 0.75rem;
  }

  .skel-text {
    height: 1rem;
    margin-bottom: 0.4rem;
  }

  .skel-video {
    margin: 0.5rem 0;
    max-height: 200px;
    object-fit: cover;
  }

  .skel-table-row {
    height: 40px;
  }
}