:root {
  --fdc-loading-copy-color: var(--text-sub, var(--sub, #55697d));
  --fdc-loading-copy-strong: var(--text-main, var(--text, #1e293b));
  --fdc-loading-spinner-track: rgba(59, 130, 246, 0.16);
  --fdc-loading-spinner-color: var(--accent, var(--primary, #3b82f6));
  --fdc-loading-skeleton-base: #e6eef9;
  --fdc-loading-skeleton-highlight: rgba(255, 255, 255, 0.72);
  --fdc-loading-surface: rgba(255, 255, 255, 0.86);
  --fdc-loading-border: rgba(191, 219, 254, 0.68);
  --fdc-loading-shadow: 0 16px 34px rgba(15, 23, 42, 0.08);
}

:root[data-theme='dark'] {
  --fdc-loading-copy-color: var(--text-sub, var(--sub, #9fb0c7));
  --fdc-loading-copy-strong: var(--text-main, var(--text, #e5edf8));
  --fdc-loading-spinner-track: rgba(59, 130, 246, 0.18);
  --fdc-loading-skeleton-base: rgba(148, 163, 184, 0.2);
  --fdc-loading-skeleton-highlight: rgba(191, 219, 254, 0.16);
  --fdc-loading-surface: rgba(15, 23, 42, 0.78);
  --fdc-loading-border: rgba(59, 130, 246, 0.2);
  --fdc-loading-shadow: 0 20px 42px rgba(0, 0, 0, 0.24);
}

@keyframes fdc-shared-loading-spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes fdc-shared-loading-shimmer {
  100% {
    transform: translateX(100%);
  }
}

.fdc-loading-stack {
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 12px;
  text-align: center;
  color: var(--fdc-loading-copy-color);
}

.fdc-loading-stack--panel {
  min-height: 112px;
  padding: 18px 0 10px;
}

.fdc-loading-stack--overlay {
  min-height: 100%;
  padding: 20px;
}

.fdc-loading-stack--compact {
  min-height: auto;
}

.fdc-loading-copy-text {
  margin: 0;
  color: var(--fdc-loading-copy-color);
  font-size: 14px;
  font-weight: 800;
  line-height: 1.55;
  text-align: center;
  word-break: keep-all;
}

.fdc-loading-status-card {
  gap: 14px;
}

.fdc-loading-status-title {
  margin: 0;
  color: var(--fdc-loading-copy-strong);
  font-size: clamp(1.72rem, 2vw, 2.14rem);
  line-height: 1.14;
  letter-spacing: -0.04em;
}

.fdc-loading-status-card .fdc-loading-copy-text {
  max-width: 38ch;
}

.fdc-inline-state {
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 10px;
  color: var(--fdc-loading-copy-color);
  text-align: center;
}

.fdc-inline-state--boxed {
  min-height: clamp(180px, 32vh, 280px);
  padding: 28px 18px;
  border: 1px solid var(--fdc-loading-border);
  border-radius: 12px;
  background: var(--fdc-loading-surface);
}

.fdc-inline-state--bare {
  min-height: auto;
  padding: 0;
}

.fdc-inline-state-copy {
  margin: 0;
  max-width: 34ch;
  color: var(--fdc-loading-copy-color);
  font-size: 14px;
  font-weight: 800;
  line-height: 1.6;
  text-align: center;
  word-break: keep-all;
}

.fdc-empty-state {
  width: 100%;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 12px;
  text-align: center;
  color: var(--fdc-loading-copy-color);
}

.fdc-empty-state--panel {
  min-height: clamp(144px, 22vh, 180px);
  padding: 20px 16px;
  border: 1px solid var(--fdc-loading-border);
  border-radius: 14px;
  background: var(--fdc-loading-surface);
}

.fdc-empty-state--compact {
  min-height: 92px;
  padding: 14px 12px;
  border: 1px dashed color-mix(in srgb, var(--fdc-loading-border) 88%, transparent);
  border-radius: 12px;
  background: color-mix(in srgb, var(--fdc-loading-surface) 76%, transparent);
  gap: 8px;
}

.fdc-empty-state-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  color: var(--fdc-loading-spinner-color);
  font-size: 28px;
  line-height: 1;
}

.fdc-empty-state--compact .fdc-empty-state-icon {
  font-size: 24px;
}

.fdc-empty-state-copy-stack {
  display: grid;
  gap: 6px;
  justify-items: center;
}

.fdc-empty-state-title,
.fdc-empty-state-copy {
  margin: 0;
  word-break: keep-all;
}

.fdc-empty-state-title {
  max-width: 28ch;
  color: var(--fdc-loading-copy-strong);
  font-size: 16px;
  font-weight: 800;
  line-height: 1.4;
  letter-spacing: -0.02em;
}

.fdc-empty-state-copy {
  max-width: 34ch;
  color: var(--fdc-loading-copy-color);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.55;
}

.fdc-empty-state--compact .fdc-empty-state-title {
  font-size: 13px;
}

.fdc-empty-state--compact .fdc-empty-state-copy {
  font-size: 12px;
}

.fdc-loading-spinner,
.fdc-loading-stack .loader,
.fdc-loading-status-card .loader,
.empty-state.is-loading .loader,
.empty.is-loading .loader,
.fdc-loading-map-empty .loader,
.fdc-loading-state-box .loader,
.profile-loading-card .profile-loader,
.account-loading .loader,
.account-auth-loading .loader {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid var(--fdc-loading-spinner-track);
  border-top-color: var(--fdc-loading-spinner-color);
  border-radius: 999px;
  animation: fdc-shared-loading-spin 0.8s linear infinite;
  flex: 0 0 auto;
}

.account-auth-loading .loader {
  width: 24px;
  height: 24px;
}

.empty-state.is-loading,
.empty.is-loading,
.fdc-loading-grid-state {
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 14px;
  min-height: clamp(220px, 38vh, 340px);
  padding: 28px 18px;
  color: var(--fdc-loading-copy-color);
  text-align: center;
}

.card-grid.is-empty-grid > .empty-state.is-loading,
.pool-card-grid.is-empty-grid > .empty-state.is-loading,
.grid.is-empty-grid > .empty.is-loading {
  min-height: 100%;
}

.empty-state.is-loading .empty-loader-slot,
.empty.is-loading .empty-loader-slot,
.fdc-loading-grid-state .empty-loader-slot {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

.empty-state.is-loading .empty-state-copy,
.empty.is-loading .empty-state-copy,
.fdc-loading-grid-state .empty-state-copy {
  max-width: 34ch;
  color: var(--fdc-loading-copy-color);
  font-size: 14px;
  font-weight: 800;
  line-height: 1.55;
  text-align: center;
  word-break: keep-all;
}

.empty-state:not(.is-loading),
.empty:not(.is-loading),
.fdc-loading-grid-state:not(.is-loading) {
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 10px;
  min-height: clamp(180px, 32vh, 280px);
  padding: 28px 18px;
  color: var(--fdc-loading-copy-color);
  text-align: center;
}

.empty-state:not(.is-loading) .empty-state-copy,
.empty:not(.is-loading) .empty-state-copy,
.fdc-loading-grid-state:not(.is-loading) .empty-state-copy {
  max-width: 34ch;
  margin: 0;
  color: var(--fdc-loading-copy-color);
  font-size: 14px;
  font-weight: 800;
  line-height: 1.6;
  text-align: center;
  word-break: keep-all;
}

.fdc-loading-feed {
  display: grid;
  gap: 14px;
}

.fdc-loading-feed-card {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  gap: 16px;
  align-items: stretch;
  padding: 14px;
  border: 1px solid var(--fdc-loading-border);
  border-radius: 22px;
  background: var(--fdc-loading-surface);
  box-shadow: var(--fdc-loading-shadow);
  backdrop-filter: blur(10px);
}

.fdc-loading-feed-thumb,
.fdc-loading-feed-line,
.fdc-loading-list-heading,
.fdc-loading-row-icon,
.fdc-loading-row-line,
.fdc-loading-row-cta,
.fdc-loading-document-kicker,
.fdc-loading-document-title,
.fdc-loading-document-pill,
.fdc-loading-document-line {
  position: relative;
  overflow: hidden;
  background: var(--fdc-loading-skeleton-base);
}

.fdc-loading-feed-thumb::after,
.fdc-loading-feed-line::after,
.fdc-loading-list-heading::after,
.fdc-loading-row-icon::after,
.fdc-loading-row-line::after,
.fdc-loading-row-cta::after,
.fdc-loading-document-kicker::after,
.fdc-loading-document-title::after,
.fdc-loading-document-pill::after,
.fdc-loading-document-line::after {
  content: '';
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, var(--fdc-loading-skeleton-highlight), transparent);
  animation: fdc-shared-loading-shimmer 1.25s ease-in-out infinite;
}

.fdc-loading-feed-thumb {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 16px;
}

.fdc-loading-feed-copy {
  display: grid;
  align-content: center;
  gap: 10px;
}

.fdc-loading-feed-line {
  height: 13px;
  border-radius: 999px;
}

.fdc-loading-feed-line.is-title {
  width: min(320px, 82%);
  height: 16px;
}

.fdc-loading-feed-line.is-body {
  width: min(420px, 96%);
}

.fdc-loading-feed-line.is-meta {
  width: 126px;
  height: 12px;
}

.fdc-loading-list {
  max-width: 760px;
  margin: 0 auto;
  display: grid;
  gap: 24px;
}

.fdc-loading-list-group {
  display: grid;
  gap: 10px;
}

.fdc-loading-list-heading {
  width: 42px;
  height: 13px;
  border-radius: 999px;
}

.fdc-loading-row {
  min-height: 84px;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 64px;
  gap: 12px;
  align-items: center;
  padding: 16px;
  border: 1px solid var(--fdc-loading-border);
  border-radius: 16px;
  background: var(--fdc-loading-surface);
  box-shadow: var(--fdc-loading-shadow);
}

.fdc-loading-row-icon {
  width: 42px;
  height: 42px;
  border-radius: 14px;
}

.fdc-loading-row-copy {
  display: grid;
  gap: 8px;
}

.fdc-loading-row-line {
  height: 13px;
  border-radius: 999px;
}

.fdc-loading-row-line.is-title {
  width: min(320px, 82%);
  height: 15px;
}

.fdc-loading-row-line.is-body {
  width: min(420px, 94%);
}

.fdc-loading-row-line.is-meta {
  width: 118px;
  height: 12px;
}

.fdc-loading-row-cta {
  width: 56px;
  height: 12px;
  border-radius: 999px;
  justify-self: end;
}

.fdc-loading-document-card {
  position: relative;
  width: min(100%, 820px);
  margin: 0;
  padding: 30px 32px 34px;
  border: 1px solid var(--fdc-loading-border);
  border-radius: 18px;
  background: var(--fdc-loading-surface);
  box-shadow: var(--fdc-loading-shadow);
}

.fdc-loading-document-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.fdc-loading-document-kicker {
  width: 88px;
  height: 12px;
  border-radius: 999px;
}

.fdc-loading-document-title {
  width: min(320px, 72%);
  height: 34px;
  border-radius: 999px;
  margin-top: 18px;
}

.fdc-loading-document-meta {
  display: flex;
  gap: 10px;
  margin-top: 18px;
}

.fdc-loading-document-pill {
  width: 112px;
  height: 14px;
  border-radius: 999px;
}

.fdc-loading-document-line {
  height: 13px;
  border-radius: 999px;
  margin-top: 14px;
}

.fdc-loading-document-line.is-wide {
  width: 94%;
  margin-top: 28px;
}

.fdc-loading-document-line.is-short {
  width: 58%;
}

@media (max-width: 767px) {
  .fdc-empty-state--panel {
    min-height: 136px;
    padding: 18px 14px;
  }

  .fdc-loading-feed-card {
    grid-template-columns: 1fr;
  }

  .fdc-loading-row {
    min-height: 92px;
    grid-template-columns: 38px minmax(0, 1fr);
    padding: 14px;
  }

  .fdc-loading-row-icon {
    width: 38px;
    height: 38px;
    border-radius: 13px;
  }

  .fdc-loading-row-cta {
    grid-column: 2;
    justify-self: start;
  }

  .fdc-loading-document-card {
    padding: 24px 20px 28px;
  }
}
