/* Route loading skeletons — shared across dashboard, site, and auth */

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

  100% {
    background-position: -200% 0;
  }
}

.app-skeleton {
  display: block;
  border-radius: 8px;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.05) 0%,
    rgba(255, 255, 255, 0.12) 50%,
    rgba(255, 255, 255, 0.05) 100%
  );
  background-size: 200% 100%;
  animation: app-skeleton-shimmer 1.35s ease-in-out infinite;
}

.app-route-loading {
  min-height: 12rem;
}

.app-route-loading__head {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.app-route-loading__head-text {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  flex: 1;
  min-width: 0;
}

.app-skeleton--icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  flex-shrink: 0;
}

.app-skeleton--eyebrow {
  width: 7rem;
  height: 0.75rem;
}

.app-skeleton--title {
  width: min(18rem, 70%);
  height: 1.35rem;
}

.app-skeleton--subtitle {
  width: min(24rem, 90%);
  height: 0.85rem;
}

.app-route-loading__stats {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-bottom: 1.25rem;
}

.app-route-loading__stats--inline {
  margin-bottom: 0;
}

.app-route-loading__stat {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 4.5rem;
}

.app-skeleton--stat-value {
  width: 2.5rem;
  height: 1.4rem;
}

.app-skeleton--stat-label {
  width: 4.5rem;
  height: 0.7rem;
}

.app-route-loading__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.app-route-loading__card {
  padding: 1.25rem 1.35rem;
}

.app-skeleton--card-title {
  width: 9rem;
  height: 1rem;
  margin-bottom: 1rem;
}

.app-route-loading__rows {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.app-skeleton--row {
  width: 100%;
  height: 2.25rem;
}

.app-route-loading__panel {
  padding: 1.25rem 1.35rem 1.1rem;
}

.app-route-loading__panel-head {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding-bottom: 1rem;
  margin-bottom: 0.35rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.app-skeleton--toolbar {
  width: 100%;
  height: 42px;
  border-radius: 10px;
}

.app-route-loading__service-rows {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.app-route-loading__service-row {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) auto auto;
  gap: 1rem;
  align-items: center;
  padding: 0.35rem 0;
}

.app-route-loading__service-primary {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}

.app-skeleton--thumb {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  flex-shrink: 0;
}

.app-route-loading__service-copy {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  flex: 1;
  min-width: 0;
}

.app-skeleton--line {
  width: 100%;
  height: 0.8rem;
}

.app-skeleton--line-short {
  width: 65%;
}

.app-skeleton--address {
  width: 100%;
  height: 2rem;
  border-radius: 8px;
}

.app-skeleton--pills {
  width: 7rem;
  height: 1.5rem;
  border-radius: 999px;
}

.app-skeleton--expire {
  width: 5.5rem;
  height: 0.8rem;
}

.app-route-loading__hero {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: center;
  margin-bottom: 1.1rem;
}

.app-skeleton--hero-thumb {
  width: 56px;
  height: 56px;
  border-radius: 12px;
}

.app-route-loading__hero-copy {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.app-skeleton--hero-ip {
  width: 12rem;
  height: 2rem;
  border-radius: 8px;
}

.app-route-loading__hero-actions {
  display: flex;
  gap: 0.5rem;
}

.app-skeleton--btn {
  width: 4.5rem;
  height: 2rem;
  border-radius: 8px;
}

.app-route-loading__tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.app-skeleton--tab {
  width: 5.5rem;
  height: 2rem;
  border-radius: 8px;
}

.app-skeleton--console {
  width: 100%;
  height: 16rem;
  border-radius: 12px;
}

.app-skeleton--segment {
  width: 100%;
  height: 2.5rem;
  border-radius: 10px;
  margin: 1rem 0;
}

.app-route-loading__table {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.app-skeleton--table-head {
  width: 100%;
  height: 2rem;
}

.app-skeleton--table-row {
  width: 100%;
  height: 2.75rem;
}

.app-route-loading__panel-toolbar {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  margin-bottom: 1rem;
}

.app-route-loading__panel-toolbar .app-skeleton--toolbar {
  flex: 1;
}

/* Auth */
.app-route-loading--auth {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  width: min(100%, 24rem);
}

.app-skeleton--auth-title {
  width: 70%;
  height: 1.5rem;
  margin-bottom: 0.35rem;
}

.app-skeleton--auth-line {
  width: 90%;
  height: 0.8rem;
}

.app-skeleton--auth-field {
  width: 100%;
  height: 2.75rem;
  border-radius: 10px;
}

.app-skeleton--auth-submit {
  width: 100%;
  height: 2.75rem;
  border-radius: 10px;
  margin-top: 0.35rem;
}

/* Site */
.app-route-loading--site {
  padding: 2.5rem 1.25rem 3rem;
  max-width: 72rem;
  margin: 0 auto;
}

.app-route-loading__site-hero {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin-bottom: 2rem;
}

.app-skeleton--site-title {
  width: min(20rem, 80%);
  height: 2rem;
}

.app-skeleton--site-lead {
  width: min(32rem, 100%);
  height: 0.9rem;
}

.app-route-loading__site-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.app-route-loading__site-card {
  padding: 1.25rem;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.02);
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.app-skeleton--site-card-title {
  width: 60%;
  height: 1rem;
}

.app-skeleton--site-card-line {
  width: 100%;
  height: 0.75rem;
}

@media (max-width: 991.98px) {
  .app-route-loading__grid,
  .app-route-loading__site-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .app-route-loading__service-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .app-route-loading__hero {
    grid-template-columns: minmax(0, 1fr);
  }

  .app-route-loading__hero-actions {
    justify-content: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  .app-skeleton {
    animation: none;
    background: rgba(255, 255, 255, 0.08);
  }
}
