.loader {
   position: absolute;
   inset: 0;
   display: flex;
   align-items: center;
   justify-content: center;
   opacity: 0;
   visibility: hidden;
   transition: 0.3s;
   background: rgba(255, 255, 255, 0.7);
   z-index: 10;
}

.loader.active {
   opacity: 1;
   visibility: visible;
}
