.loader {
  width: 4vw;
  aspect-ratio: 1;
  color: rgb(255, 255, 255);
  position: relative;
  background:
    conic-gradient(from 134deg at top, currentColor 92deg, #0000 0) top,
    conic-gradient(from -46deg at bottom, currentColor 92deg, #0000 0) bottom;
  background-size: 100% 50%;
  background-repeat: no-repeat;
  border-radius: 2vw;  
}

.loader:before {
  content: '';
  position: absolute;
  inset: 0;
  --g: currentColor 1.45vw, #0000 0 calc(100% - 1.45vw), currentColor 0;
  background:
    linear-gradient(45deg, var(--g)),
    linear-gradient(-45deg, var(--g));
  animation: l7 0.9s infinite ease-in-out;
  border-radius: 1vw;
}

@keyframes l7 {
  33% {
    inset: -1vw;
    transform: rotate(0deg);
  }
  66% {
    inset: -1vw;
    transform: rotate(90deg);
  }
  100% {
    inset: 0;
    transform: rotate(90deg);
  }
}
.loader-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.65); 
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9998;
  transition: opacity 0.3s ease;
}
