/*
 * HET LAADSCHERM MET DE MILLY BUDDY (Ryan 13/11: "a preloader so users can see it's actually loading or refreshing,
 * maybe the milly buddy").
 *
 * Een los bestand en geen stijlblok in index.html: zo staat het er al vóór de app-bundel binnen is (het eerste wat je
 * ziet na het openen of na naar beneden trekken), en de CSP hoeft er niets voor toe te laten. Dezelfde klassen tekenen
 * het laadscherm ín de app (src/components/MillyLader.tsx), zodat de buddy op dezelfde plek blijft staan van het
 * openen tot het scherm klaar is.
 *
 * Alleen op de gsm (smal scherm) of als app op het beginscherm; op de computer blijft alles zoals het was
 * (.milly-lader verborgen, .milly-lader-alt, het oude laadscherm, zichtbaar).
 */
.milly-lader {
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #f6f6f6;
}
.dark .milly-lader { background: hsl(0 0% 9%); }
@media (max-width: 767px), (display-mode: standalone) {
  .milly-lader { display: flex; }
  .milly-lader-alt { display: none !important; }
}
.milly-lader-buddy {
  display: block;
  width: 88px;
  height: 88px;
  transform-origin: 50% 100%;
  animation: milly-lader-hop 1.1s ease-in-out infinite;
}
.milly-lader-schaduw {
  width: 54px;
  height: 9px;
  margin-top: 2px;
  border-radius: 50%;
  background: rgb(0 0 0 / 0.1);
  animation: milly-lader-schaduw 1.1s ease-in-out infinite;
}
.milly-lader-stippen { display: flex; gap: 7px; margin-top: 22px; }
.milly-lader-stippen i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #ff8a95;
  opacity: 0.25;
  animation: milly-lader-stip 1.1s ease-in-out infinite;
}
.milly-lader-stippen i:nth-child(2) { animation-delay: 0.18s; }
.milly-lader-stippen i:nth-child(3) { animation-delay: 0.36s; }

@keyframes milly-lader-hop {
  0%, 100% { transform: translateY(0) scale(1.07, 0.93); }
  15% { transform: translateY(0) scale(1, 1); }
  50% { transform: translateY(-24px) scale(0.97, 1.03); }
  85% { transform: translateY(0) scale(1, 1); }
}
@keyframes milly-lader-schaduw {
  0%, 15%, 85%, 100% { transform: scaleX(1); opacity: 1; }
  50% { transform: scaleX(0.6); opacity: 0.5; }
}
@keyframes milly-lader-stip {
  0%, 100% { opacity: 0.25; }
  40% { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .milly-lader-buddy, .milly-lader-schaduw { animation: none; }
}
