/* Prevenire layout shifts durante il caricamento dei font */
html {
  font-display: swap;
}

body {
  font-family: var(--font-poppins), system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  font-display: swap;
}

/* Loader styles - CSS statico per evitare hydration mismatch */
#main-content {
  opacity: 1;
}

#initial-loader,
.page-loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  height: 100svh;
  background: #ffffff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 999999;
  transition: opacity 0.3s ease-out;
  contain: layout style paint;
  min-width: 100vw;
  min-height: 100vh;
  min-height: 100svh;
  box-sizing: border-box;
}

#initial-loader.hidden,
.page-loader.hidden {
  opacity: 0;
  pointer-events: none;
}

.logo {
  width: 240px;
  height: 24px;
  /* Logo esteso LDM */
  background-image: url("/ldm/logo-esteso.svg");
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  margin-bottom: 20px;
  flex-shrink: 0;
  min-width: 240px;
  min-height: 24px;
  box-sizing: content-box;
}

.spinner {
  width: 20px;
  height: 20px;
  border: 2px solid #f0f0f0;
  border-top: 2px solid #000000;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  min-width: 20px;
  min-height: 20px;
  flex-shrink: 0;
  box-sizing: content-box;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

