/* Shared list page state styles: loading skeleton + empty + error. */

.cache-banner {
  flex-shrink: 0;
  padding: var(--space-1) var(--space-3);
  background: var(--color-muted);
  border-bottom: 1rpx solid var(--color-border-subtle);
  text-align: center;
}

.cache-banner--fresh {
  background: var(--color-success-muted);
  border-bottom-color: var(--color-success-muted);
}

.cache-banner--stale {
  background: var(--color-warning-muted);
  border-bottom-color: var(--color-warning-muted);
}

.cache-banner__text {
  font-size: var(--text-xs);
  color: var(--color-muted-fg);
  line-height: 1.6;
}

.cache-banner--fresh .cache-banner__text {
  color: var(--color-success-fg);
  font-weight: var(--font-medium);
}

.cache-banner--stale .cache-banner__text {
  color: var(--color-warning-fg);
  font-weight: var(--font-medium);
}

.cache-banner__action {
  display: inline-block;
  margin-left: var(--space-2);
  font-size: var(--text-xs);
  color: var(--color-warning-fg);
  padding: 6rpx 14rpx;
  border: 1rpx solid var(--color-warning);
  border-radius: var(--radius-sm);
  line-height: 1.4;
  vertical-align: middle;
}

.cache-banner__action--hover {
  background: var(--color-warning);
  color: var(--color-warning-fg);
}

.refresh-error-banner {
  flex-shrink: 0;
  padding: var(--space-2) var(--space-3);
  background: var(--color-warning-muted);
  border-bottom: 1rpx solid var(--color-warning);
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
}

.refresh-error-banner__text {
  flex: 1;
  min-width: 0;
  font-size: var(--text-sm);
  color: var(--color-warning-fg);
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.refresh-error-banner__actions {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: var(--space-2);
  flex-shrink: 0;
}

.refresh-error-banner__btn {
  font-size: var(--text-sm);
  color: var(--color-warning-fg);
  padding: 6rpx 12rpx;
  line-height: 1.4;
}

.refresh-error-banner__btn--primary {
  color: var(--color-warning-fg);
  background: var(--color-warning);
  border-radius: var(--radius-sm);
  padding: var(--space-1) 20rpx;
}

.list-state {
  flex: 1;
  min-height: 0;
  padding: var(--space-6) var(--space-4);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: var(--space-2);
}

.list-state--centered {
  justify-content: center;
  padding: 96rpx var(--space-4);
}

.list-state__icon {
  margin-bottom: var(--space-1);
}

.list-state__title {
  font-size: var(--text-lg);
  color: var(--color-fg);
  font-weight: var(--font-medium);
  text-align: center;
}

.list-state__text {
  font-size: 26rpx;
  color: var(--color-muted-fg);
  text-align: center;
  line-height: 1.6;
  max-width: 480rpx;
}

.list-state__actions {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  margin-top: var(--space-2);
}

.list-state__cta {
  margin-top: var(--space-2);
}

/* Skeleton rows: reuse list row layout but replace body with shimmer bars. */
.skeleton-list {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  gap: 0;
  width: 100%;
  padding: 0;
  box-sizing: border-box;
}

.skeleton-row {
  display: flex;
  flex-direction: row;
  align-items: center;
  min-height: 88rpx;
  padding: var(--space-2) var(--space-4);
  background: var(--color-bg);
  gap: var(--space-3);
  box-sizing: border-box;
}

.skeleton-row__icon {
  width: 48rpx;
  height: 48rpx;
  border-radius: var(--radius-pill);
  background: var(--color-muted);
  flex-shrink: 0;
}

.skeleton-row__body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 10rpx;
}

.skeleton-row__title {
  height: var(--text-base);
  border-radius: var(--radius-sm);
  background: var(--color-muted);
}

.skeleton-row__preview {
  height: var(--text-sm);
  border-radius: var(--radius-sm);
  background: var(--color-border-subtle);
}

.skeleton-row__meta {
  width: 72rpx;
  height: var(--text-sm);
  border-radius: var(--radius-sm);
  background: var(--color-border-subtle);
  flex-shrink: 0;
}

@keyframes list-state-shimmer {
  0% {
    opacity: 0.6;
  }
  50% {
    opacity: 1;
  }
  100% {
    opacity: 0.6;
  }
}

.skeleton-row__icon,
.skeleton-row__title,
.skeleton-row__preview,
.skeleton-row__meta {
  animation: list-state-shimmer 1.2s ease-in-out infinite;
}
