/* A tab on its way: pale outlines of the cards that are about to land, in the
   same white cards the tabs use. They fade in only after a moment, so a quick
   load never flashes them. */
.tab-loading {
  display: grid;
  gap: 0.85rem;
  animation: tab-loading-in 0.35s ease-out 0.2s both;
}

.tab-loading-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 1rem;
  padding: 1.15rem 1.25rem;
  border: 1px solid rgba(16, 40, 90, 0.06);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 18px 44px rgba(18, 48, 96, 0.08);
}

.tab-loading-dot,
.tab-loading-line {
  background: linear-gradient(90deg, #e8eef9 0%, #e8eef9 35%, #f6f9fe 50%, #e8eef9 65%, #e8eef9 100%);
  background-size: 300% 100%;
  animation: tab-loading-glint 1.6s ease-in-out infinite;
}

.tab-loading-dot {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
}

.tab-loading-lines {
  display: grid;
  gap: 0.6rem;
}

.tab-loading-line {
  height: 0.8rem;
  border-radius: 999px;
}

.tab-loading-line:first-child {
  width: 46%;
  height: 0.95rem;
}

.tab-loading-line:last-child {
  width: 78%;
}

.tab-loading-card:nth-child(2) .tab-loading-line:last-child {
  width: 64%;
}

.tab-loading-card:nth-child(3) .tab-loading-line:last-child {
  width: 52%;
}

@keyframes tab-loading-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

@keyframes tab-loading-glint {
  from { background-position: 100% 0; }
  to { background-position: 0 0; }
}

/* A tab that could not load says so in the tabs' own card, with another try. */
.tab-failed {
  display: grid;
  justify-items: center;
  gap: 1rem;
  padding: 1.6rem 1.4rem;
  border: 1px solid rgba(16, 40, 90, 0.06);
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 18px 44px rgba(18, 48, 96, 0.1);
  text-align: center;
}

.tab-failed-text {
  margin: 0;
  max-width: 32rem;
  color: #56638c;
}

.tab-failed .btn-primary {
  width: auto;
  min-width: 11rem;
  padding-inline: 2rem;
}

@media (prefers-reduced-motion: reduce) {
  .tab-loading {
    animation: none;
  }

  .tab-loading-dot,
  .tab-loading-line {
    animation: none;
    background: #e8eef9;
  }
}
