.bud-preview-loading-row,
.bud-preview-state-row { display: none; }

.bud-preview-loading-row[hidden],
.bud-preview-state-row[hidden] { display: none !important; }

html.nv-cloudflare-preview-auth .dash-header__center,
html.nv-cloudflare-preview-auth .bud-toolbar,
html.nv-cloudflare-preview-auth .bud-chart-card,
html.nv-cloudflare-preview-auth .bud-aside,
html.nv-cloudflare-preview-auth .bud-add-cat,
html.nv-cloudflare-preview-auth .bud-drawer {
  display: none !important;
}

html.nv-cloudflare-preview-auth .bud-layout {
  grid-template-columns: minmax(0, 1fr);
}

html.nv-cloudflare-preview-auth body:not([data-nucleus-budgets-state]) .bud-summary,
html.nv-cloudflare-preview-auth body[data-nucleus-budgets-state="loading"] .bud-summary {
  visibility: hidden;
}

html.nv-cloudflare-preview-auth .bud-table tbody > tr:not(.bud-preview-row):not(.bud-preview-loading-row):not(.bud-preview-state-row) {
  display: none !important;
}

html.nv-cloudflare-preview-auth .bud-preview-loading-row:not([hidden]),
html.nv-cloudflare-preview-auth .bud-preview-state-row:not([hidden]) {
  display: table-row;
}

html.nv-cloudflare-preview-auth .bud-table thead th:last-child,
html.nv-cloudflare-preview-auth .bud-table tbody td:last-child {
  display: none;
}

html.nv-cloudflare-preview-auth .bud-table { min-width: 720px; }
html.nv-cloudflare-preview-auth .bud-preview-row { cursor: default; }

.bud-preview-skeleton { display: grid; }

.bud-preview-skeleton span {
  display: block;
  height: 72px;
  border-bottom: 1px solid var(--dash-border);
  background: linear-gradient(90deg, transparent 0%, var(--dash-surface-hover) 50%, transparent 100%);
  background-size: 220% 100%;
  animation: bud-preview-loading 1.35s ease-in-out infinite;
}

.bud-preview-skeleton span:last-child { border-bottom: 0; }

.bud-preview-state {
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 56px 24px;
  text-align: center;
}

.bud-preview-state__title,
.bud-preview-state__copy { margin: 0; }
.bud-preview-state__title { color: var(--dash-text); font-weight: 600; }
.bud-preview-state__copy { max-width: 520px; color: var(--dash-text-subtle); }

.bud-preview-row .bud-cat__icon {
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 600;
}

@keyframes bud-preview-loading {
  from { background-position: 100% 0; }
  to { background-position: -100% 0; }
}

@media (prefers-reduced-motion: reduce) {
  .bud-preview-skeleton span { animation: none; }
}
