/* css/loader.css */
.loader {
  position: fixed;
  inset: 0;
  background-color: var(--bg-main, #ffffff);
  z-index: 9999;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  font-family: var(--font-main, 'Outfit', sans-serif);
  color: var(--text-primary, #0f172a);
}

.loader__roof-tiles {
  position: absolute;
  inset: 0;
  display: flex;
  flex-wrap: wrap;
  align-content: flex-end; /* build from bottom */
  opacity: 1; /* Full opacity container */
  pointer-events: none;
}

.roof-tile {
  background-color: rgba(14, 165, 233, 0.12); /* Much more visible blue tint */
  border: 1px solid rgba(14, 165, 233, 0.25); /* Stronger, crisper architectural outlines */
  box-sizing: border-box;
  opacity: 0;
  transform: translateY(20px) scale(0.85); /* Slightly exaggerated start position */
}

.loader__content {
  position: relative;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 500px;
  padding: 0 2rem;
  gap: 3rem; 
}

/* Logo seamlessly merged with the background */
.loader__logo-box {
  width: 100%;
  max-width: 420px;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 1rem;
}

.loader__logo-wrapper {
  position: relative;
  width: 100%;
}

.loader__logo-img {
  opacity: 0;
  width: 100%;
  height: auto;
  display: block;
}

#logoGrid {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-wrap: wrap;
  /* Tight, strong shadow hugging the logo exactly so white text is readable on white background without any boxes */
  filter: drop-shadow(0px 1px 3px rgba(2, 6, 23, 0.85)) drop-shadow(0px 0px 15px rgba(14, 165, 233, 0.2));
}

.logo-pzl {
  background-repeat: no-repeat;
  box-sizing: border-box;
}

.loader__metrics {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

.loader__roof-progress {
  width: 70px;
  height: 70px;
  margin-bottom: 0.5rem;
}

.loader__roof-svg {
  width: 100%;
  height: 100%;
  overflow: visible;
  filter: drop-shadow(0 4px 10px rgba(14, 165, 233, 0.4));
}

.loader__text {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 4px;
  color: var(--text-primary, #0f172a);
  font-weight: 700;
  text-align: center;
  animation: pulseText 2s infinite alternate;
}

@keyframes pulseText {
  from { opacity: 0.6; }
  to { opacity: 1; text-shadow: 0 0 10px rgba(14, 165, 233, 0.3); }
}
