/* Loading / skeletons -see docs/strategy/design-system/27-loading.md */

.sk {
  border-radius: 6px;
  /* allowed exception: shimmer is a functional loading affordance, not a decorative color wash */
  background: linear-gradient(
    90deg,
    var(--surface-soft) 25%,
    var(--divider) 50%,
    var(--surface-soft) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s linear infinite;
}

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

/* Skeleton list card -mirrors .card-list structure */
.skel-card {
  background: var(--surface);
  border: 1px solid var(--divider);
  border-radius: var(--radius);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.skel-row {
  display: flex;
  gap: 10px;
  align-items: center;
}

.skel-circle {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-md);
  flex-shrink: 0;
}

.skel-lines {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.skel-line {
  height: 10px;
  border-radius: 4px;
}

/* Skeleton KPI -preserves .kpi geometry incl. 3px top strip */
.skel-kpi {
  background: var(--surface);
  border: 1px solid var(--divider);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: relative;
  overflow: hidden;
}

.skel-kpi::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--divider);
}

/* Skeleton table -mirrors .table structure */
.skel-table {
  background: var(--surface);
  border: 1px solid var(--divider);
  border-radius: var(--radius);
  overflow: hidden;
}

.skel-th,
.skel-tr {
  display: flex;
  gap: 10px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--divider);
}

.skel-tr:last-child {
  border-bottom: 0;
}

/* Respect users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
  .sk {
    animation: none;
    background: var(--surface-soft);
  }
}
