/**
 * ⚡ SKELETON SCREENS - Performance-Optimierung
 * Zeigt Platzhalter während des Ladens statt leerer Flächen
 * Verbessert die wahrgenommene Geschwindigkeit
 * 
 * Version: v0.01.008
 * Erstellt: 24.11.2025, 18:30:00 Uhr durch Auto
 */

/* Skeleton-Animation */
@keyframes skeleton-pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

@keyframes skeleton-shimmer {
  0% {
    background-position: -1000px 0;
  }
  100% {
    background-position: 1000px 0;
  }
}

/* Basis-Skeleton-Element */
.skeleton {
  background: linear-gradient(
    90deg,
    rgba(200, 200, 200, 0.2) 0%,
    rgba(200, 200, 200, 0.4) 50%,
    rgba(200, 200, 200, 0.2) 100%
  );
  background-size: 1000px 100%;
  animation: skeleton-shimmer 2s infinite;
  border-radius: 4px;
  display: inline-block;
}

/* Dark Mode Anpassung */
body.dark-mode .skeleton {
  background: linear-gradient(
    90deg,
    rgba(100, 100, 100, 0.2) 0%,
    rgba(100, 100, 100, 0.4) 50%,
    rgba(100, 100, 100, 0.2) 100%
  );
  background-size: 1000px 100%;
}

/* Skeleton für Tabellenzeilen */
.skeleton-table-row {
  display: table-row;
}

.skeleton-table-row td {
  padding: 12px 8px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

body.dark-mode .skeleton-table-row td {
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.skeleton-table-row .skeleton {
  height: 16px;
  width: 100%;
  margin: 2px 0;
}

/* Verschiedene Breiten für realistische Darstellung */
.skeleton-table-row .skeleton.skeleton-short {
  width: 60%;
}

.skeleton-table-row .skeleton.skeleton-medium {
  width: 80%;
}

.skeleton-table-row .skeleton.skeleton-long {
  width: 100%;
}

/* Skeleton für Artikel-Details */
.skeleton-article-details {
  padding: 20px;
}

.skeleton-article-details .skeleton {
  height: 20px;
  margin-bottom: 12px;
  border-radius: 4px;
}

.skeleton-article-details .skeleton.skeleton-title {
  height: 28px;
  width: 70%;
  margin-bottom: 16px;
}

.skeleton-article-details .skeleton.skeleton-price {
  height: 36px;
  width: 40%;
  margin-bottom: 20px;
}

/* Skeleton für Filter-Buttons */
.skeleton-filter-button {
  display: inline-block;
  padding: 8px 16px;
  margin: 4px;
  border-radius: 4px;
}

.skeleton-filter-button .skeleton {
  height: 20px;
  width: 80px;
}

/* Skeleton-Container für Tabellen */
.skeleton-table-container {
  position: relative;
  min-height: 400px;
}

.skeleton-table-container.loading {
  pointer-events: none;
  opacity: 0.7;
}

/* Skeleton für Pagination */
.skeleton-pagination {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 12px;
  justify-content: center;
}

.skeleton-pagination .skeleton {
  height: 32px;
  width: 100px;
  border-radius: 4px;
}

/* Skeleton für Badges */
.skeleton-badge {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 12px;
  margin: 2px;
}

.skeleton-badge .skeleton {
  height: 16px;
  width: 40px;
  border-radius: 12px;
}

/* Skeleton für A4-Schild */
.skeleton-a4-container {
  width: 210mm;
  height: 297mm;
  background: white;
  border: 1px solid #ddd;
  position: relative;
  margin: 20px auto;
  padding: 20mm;
}

.skeleton-a4-container .skeleton {
  height: 20px;
  margin-bottom: 12px;
  border-radius: 4px;
}

.skeleton-a4-container .skeleton.skeleton-header {
  height: 40px;
  width: 60%;
  margin-bottom: 30px;
}

.skeleton-a4-container .skeleton.skeleton-price-large {
  height: 60px;
  width: 50%;
  margin: 30px 0;
}

/* Smooth Transition beim Wechsel von Skeleton zu Inhalt */
.skeleton-fade-out {
  animation: skeleton-fade-out 0.3s ease-out forwards;
}

@keyframes skeleton-fade-out {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
    display: none;
  }
}

/* Utility-Klassen */
.skeleton-hidden {
  display: none !important;
}

.skeleton-visible {
  display: block !important;
}












