/* Shared skeleton primitives for loading shells in menu and analysis. */

.vk-skeleton {
  display: block;
  position: relative;
  overflow: hidden;
  border-radius: var(--vk-skeleton-radius, var(--vk-paper-control-radius));
  background: var(--vk-skeleton-bg);
}

.vk-skeleton::after {
  content: "";
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(
    90deg,
    transparent,
    var(--vk-skeleton-shimmer),
    transparent
  );
  animation: vk-skeleton-shimmer 1300ms ease-in-out infinite;
}

.vk-skeleton--line {
  width: var(--vk-skeleton-line-width, 100%);
  height: var(--vk-skeleton-line-height, 12px);
  border-radius: 999px;
}

.vk-skeleton--line-short {
  --vk-skeleton-line-width: 42%;
}

.vk-skeleton--line-medium {
  --vk-skeleton-line-width: 68%;
}

.vk-skeleton--line-title {
  --vk-skeleton-line-width: 76%;
  --vk-skeleton-line-height: 18px;
}

.vk-skeleton--button {
  min-height: var(--vk-skeleton-button-height, var(--vk-paper-control-height));
  border-radius: var(--vk-skeleton-button-radius, var(--vk-paper-control-radius));
  box-shadow: var(--vk-skeleton-button-shadow, var(--vk-shadow-paper-hover));
}

.vk-skeleton--row {
  height: var(--vk-skeleton-row-height, var(--vk-paper-row-height));
  min-height: var(--vk-skeleton-row-height, var(--vk-paper-row-height));
  border-radius: var(--vk-skeleton-row-radius, var(--vk-paper-row-radius));
  box-shadow: var(--vk-skeleton-row-shadow, var(--vk-shadow-paper-hover));
}

.vk-skeleton--preview {
  border-radius: var(--vk-skeleton-preview-radius, var(--vk-radius-shell));
  box-shadow: var(--vk-skeleton-preview-shadow, var(--vk-preview-shadow));
}

.vk-skeleton--icon {
  width: var(--vk-skeleton-icon-size, 18px);
  height: var(--vk-skeleton-icon-size, 18px);
  border-radius: var(--vk-skeleton-icon-radius, var(--vk-radius-meta-tile));
}

.vk-skeleton-card {
  box-sizing: border-box;
  overflow: hidden;
  border-radius: var(--vk-skeleton-card-radius, var(--vk-paper-catalog-card-radius));
  background: var(--vk-skeleton-card-bg, var(--vk-paper-lift-button-bg));
  box-shadow: var(--vk-skeleton-card-shadow, var(--vk-shadow-paper-raised));
}

.vk-skeleton-panel {
  box-sizing: border-box;
  overflow: hidden;
  border-radius: var(--vk-skeleton-panel-radius, var(--vk-analysis-list-radius, var(--vk-module-card-radius)));
  background: var(--vk-skeleton-panel-bg, var(--vk-app-surface-panel));
}

.vk-skeleton-list {
  box-sizing: border-box;
  overflow: hidden;
  padding: var(--vk-skeleton-list-padding, var(--vk-analysis-list-padding, 0));
  border-radius: var(--vk-skeleton-list-radius, var(--vk-analysis-list-radius, var(--vk-module-card-radius)));
  background: var(--vk-skeleton-list-bg, var(--vk-app-surface-panel));
}

@keyframes vk-skeleton-shimmer {
  100% {
    transform: translateX(100%);
  }
}
