/* =============================================
   LEMAT.CLUB — Loader
   Pegar en Additional CSS del sitio
   ============================================= */

/* ─── CONTENEDOR PRINCIPAL ─── */
#lemat-loader {
  position: fixed;
  inset: 0;
  background: #fff;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: clamp(20px, 3vw, 32px) clamp(24px, 4vw, 48px);
  will-change: opacity;
}

#lemat-loader.is-hidden {
  pointer-events: none;
}

/* ─── LOGO CENTRADO ─── */
#lemat-loader-logo-wrap {
  position: absolute;
  /* Centrado inicial — JS lo mueve al destino final */
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(1);
  transform-origin: left top;

  display: flex;
  align-items: center;
  gap: 0;
  white-space: nowrap;
  z-index: 2;
  pointer-events: none;
  will-change: top, left, transform;
}

#lemat-loader-logo-wrap .lm-word {
  font-family: 'Maragsa', Georgia, serif;
  font-size: clamp(2.8rem, 5vw, 4rem);
  font-weight: 400;
  letter-spacing: -0.02em;
  color: #000;
  line-height: 1;
}

/* ─── MÁSCARA DE IMAGEN ─── */
/* Height fijo, solo el width se abre lateralmente */
#lemat-loader-mask {
  width: 0;
  height: clamp(140px, 18vw, 200px);
  overflow: hidden;
  position: relative;
  flex-shrink: 0;
  /* Sin transition aquí — se controla por JS */
}

/* Slides dentro de la máscara — object-fit:cover */
.lemat-loader-slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;  /* para <img> reales */
  opacity: 0;
  transition: opacity 0.2s cubic-bezier(0.37, 0, 0.63, 1);
}

.lemat-loader-slide.is-active {
  opacity: 1;
}

/* Para slides CSS (placeholders hasta tener imágenes reales) */
.lemat-loader-slide--css {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ─── BOTTOM BAR ─── */
#lemat-loader-bottom {
  position: absolute;
  bottom: clamp(20px, 3vw, 32px);
  left:   clamp(24px, 4vw, 48px);
  right:  clamp(24px, 4vw, 48px);
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  z-index: 2;
}

/* Label con fade cruzado */
.lemat-loader-label {
  position: relative;
  height: 1.2em;
  min-width: 160px;
}

.lemat-loader-label__text {
  position: absolute;
  left: 0;
  bottom: 0;
  font-family: 'General Sans', system-ui, sans-serif;
  font-size: clamp(0.75rem, 1vw, 0.875rem);
  font-weight: 400;
  color: #000;
  letter-spacing: -0.01em;
  white-space: nowrap;
  transition: opacity 0.45s cubic-bezier(0.37, 0, 0.63, 1);
}

.lemat-loader-label__text--bienvenido {
  opacity: 0;
}

/* Contador */
#lemat-loader-pct {
  font-family: 'General Sans', system-ui, sans-serif;
  font-size: clamp(0.75rem, 1vw, 0.875rem);
  font-weight: 400;
  color: #000;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}

/* ─── MOBILE ─── */
@media (max-width: 768px) {
  #lemat-loader-logo-wrap .lm-word {
    font-size: clamp(2rem, 10vw, 2.8rem);
  }

  #lemat-loader-mask {
    height: clamp(110px, 28vw, 160px);
  }
}
