
/* Overlay-Grundlagen */
.loader {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(2px);
  color: #fff;
  z-index: 9999;
  opacity: 1;
  visibility: visible;
  transition: opacity 200ms ease, visibility 200ms ease;
}

/* Ausblenden-Zustand */
.loader.is-hidden {
  opacity: 0;
  visibility: hidden;
}

/* Spinner */
.loader__spinner {
  width: 48px;
  height: 48px;
  border: 4px solid rgba(255,255,255,0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 900ms linear infinite;
  margin-inline: auto;
  margin-bottom: 12px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Text unter dem Spinner */
.loader__text {
  margin: 0;
  font: 500 14px/1.3 system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, 'Noto Sans', Arial, sans-serif;
}

/* Bewegungen reduzieren */
@media (prefers-reduced-motion: reduce) {
  .loader, .loader.is-hidden {
    transition: none;
  }
  .loader__spinner {
    animation: none;
    border-top-color: rgba(255,255,255,0.8);
  }
}
