/* Skeleton loading placeholders, shared by every dashboard and login form.
   The class is intentionally global so a module can drop a placeholder into any
   container without the page needing its own copy of these rules. */

.skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.2s ease-in-out infinite;
  border-radius: 4px;
}

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

.skeleton-hero { height: 260px; border-radius: 14px; }
.skeleton-card { height: 320px; border-radius: 10px; border: 1px solid #eaeaea; }
.skeleton-img { height: 150px; width: 100%; }
.skeleton-text { height: 16px; margin: 8px 0; }
.skeleton-title { height: 20px; width: 80%; margin: 8px 0; }
.skeleton-price { height: 18px; width: 60%; margin: 8px 0; }
.skeleton-row { height: 44px; width: 100%; margin: 6px 0; }
.skeleton-line { height: 14px; width: 100%; margin: 6px 0; }

@media (prefers-reduced-motion: reduce) {
  .skeleton {
    animation: none;
    background: #ececec;
  }
}

/* Full-panel loader used while a dashboard or login form waits on the network,
   so a slow round trip never leaves the user staring at an empty page. */
.ac-loading-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 42px 18px;
  color: #64748b;
  font: 14px/1.5 -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  text-align: center;
}

.ac-loading-panel .ac-spinner {
  width: 30px;
  height: 30px;
  border: 3px solid #e2e8f0;
  border-top-color: #2563eb;
  border-radius: 50%;
  animation: ac-spin 0.8s linear infinite;
}

@keyframes ac-spin {
  to { transform: rotate(360deg); }
}

.ac-skeleton-stack {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}
