/* BAB-835: Warten und Laden (Regeln L1 bis L5, README.md im Repo minily-prototyp). Ein Baustein für alle Webseiten von minily,
   dieselbe Datei wie cloud/public/partner/warten.css dort; hier für Produktseite und Ratgeber. Dazu gehört warten.js.

   .kreisel    Ladering (BAB-832): Spur 30 % der Schriftfarbe, Viertel in voller Farbe, dreht sich in 800 ms.
   [data-wartet][aria-busy="true"]   Knopf oder Link, der wartet: Inhalt unsichtbar, Ring in der Mitte, Fläche und Größe
               bleiben (L1, kein blasser Knopf). warten.js setzt aria-busy erst nach 0,3 s.
   .skelett    Platzhalter in Form des Inhalts (L2): Fläche atmet zwischen Leinen und Linie, bis das Foto da ist.
   .warten-nochmal   „Nochmal“ hinter dem Satz, was nicht ging (L4).
   Bei „Bewegung reduzieren“ dreht der Ring langsamer und das Skelett steht still. */
.kreisel { display: none; position: absolute; left: 50%; top: 50%; width: var(--kreisel, 22px); height: var(--kreisel, 22px);
  margin: calc(var(--kreisel, 22px) / -2) 0 0 calc(var(--kreisel, 22px) / -2); box-sizing: border-box; border-radius: 9999px;
  border: 2.5px solid color-mix(in srgb, currentColor 30%, transparent); border-top-color: currentColor;
  animation: warten-drehen 800ms linear infinite; pointer-events: none; }
.kreisel-gross { --kreisel: 36px; border-width: 3px; }
[aria-busy="true"] > .kreisel { display: block; }
[data-wartet] { cursor: progress; }
[data-wartet][aria-busy="true"] { color: transparent !important; }
[data-wartet][aria-busy="true"] > :not(.kreisel) { opacity: 0; }

.skelett { background-color: #F3EEE6; animation: warten-atmen 900ms ease-in-out infinite alternate; }

.warten-nochmal { display: inline-flex; align-items: center; min-height: 44px; margin: 0 0 0 4px; padding: 0 4px; border: 0;
  background: none; font: inherit; font-weight: 800; color: #4F6249; text-decoration: underline; text-underline-offset: 3px;
  cursor: pointer; }
.warten-ansage { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

@keyframes warten-drehen { to { transform: rotate(360deg); } }
@keyframes warten-atmen { from { background-color: #F3EEE6; } to { background-color: #E2DACD; } }

@media (prefers-reduced-motion: reduce) {
  .kreisel { animation-duration: 1600ms; }
  .skelett { animation: none; }
}
@media (prefers-color-scheme: dark) {
  /* Nur die Bestellseiten (book.js) haben ein dunkles Aussehen; dort atmet das Skelett in deren dunklen Flächen. */
  .dunkel-moeglich .skelett { background-color: #262320; animation-name: warten-atmen-dunkel; }
  .dunkel-moeglich .warten-nochmal { color: #A9BFA0; }
}
@keyframes warten-atmen-dunkel { from { background-color: #262320; } to { background-color: #3B3732; } }
