.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  /* background: rgba(255, 255, 255, 0.9); */
  display: none;
  z-index: 1000000;
  backdrop-filter: blur(5px);
}

#loadingOverlay > .loading-spinner {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-width: 160px;
}

.loading-logo {
  display: none;
  width: min(220px, 52vw);
  max-height: 90px;
  object-fit: contain;
  margin: 0 auto 20px;
  opacity: 0;
  animation: loadingLogoFade 0.3s ease-out forwards;
}

.loading-overlay.has-loader-logo .loading-logo {
  display: block;
}

.loading-overlay.has-loader-logo .loader {
  display: none;
}

.table-loading-brand .loading-logo {
  display: none;
}

.table-loading-brand.has-loader-logo .loading-logo {
  display: block;
}

.table-loading-brand.has-loader-logo .table-loading-fallback {
  display: none;
}

.dcat-loading.whitelabel-dcat-loading {
  display: flex !important;
  align-items: center;
  justify-content: center;
  min-height: 72px;
}

.dcat-loading.whitelabel-dcat-loading > svg,
.dcat-loading.whitelabel-dcat-loading svg {
  display: none !important;
}

.dcat-loading .whitelabel-dcat-loading-logo {
  display: block;
  width: min(220px, 52vw);
  max-height: 90px;
  object-fit: contain;
  margin: 0 auto;
  animation: loadingLogoFade 0.3s ease-out forwards;
}

body.has-whitelabel-loader-logo #nprogress .spinner {
  display: none !important;
}

.loader {
  width: 40px;
  aspect-ratio: 1;
  color: #3498db;
  position: relative;
  margin: 0 auto 20px;
  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;
}

.loader:before {
  content: '';
  position: absolute;
  inset: 0;
  --g: currentColor 14.5px, #0000 0 calc(100% - 14.5px), currentColor 0;
  background: linear-gradient(45deg, var(--g)), linear-gradient(-45deg, var(--g));
  animation: l7 1.5s infinite cubic-bezier(0.3, 1, 0, 1);
}

@keyframes l7 {
  33% {
    inset: -10px;
    transform: rotate(0deg);
  }
  66% {
    inset: -10px;
    transform: rotate(90deg);
  }
  100% {
    inset: 0;
    transform: rotate(90deg);
  }
}

@keyframes loadingLogoFade {
  from {
    opacity: 0;
    transform: scale(0.96);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.loading-text {
  color: #2c3e50;
  font-size: 18px;
  font-weight: 500;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  margin-top: 15px;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
  opacity: 0;
  animation: fadeIn 0.3s ease-out forwards;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Mobile responsiveness */
@media (max-width: 768px) {
  .loader {
    width: 30px;
  }

  .loading-logo {
    width: min(180px, 64vw);
    max-height: 72px;
  }

  .loading-text {
    font-size: 16px;
  }
}
