/* Modern cross-document View Transitions & Reusable Skeleton Loaders */
@view-transition {
  navigation: auto;
}

::view-transition-old(root) {
  animation: cbFadeOut 150ms cubic-bezier(0.4, 0, 1, 1) both;
}
::view-transition-new(root) {
  animation: cbFadeIn 210ms cubic-bezier(0, 0, 0.2, 1) both;
}

@keyframes cbFadeOut {
  from { opacity: 1; transform: translateY(0); }
  to { opacity: 0; transform: translateY(-4px); }
}
@keyframes cbFadeIn {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  @view-transition { navigation: none; }
  ::view-transition-old(root),
  ::view-transition-new(root) {
    animation: none !important;
  }
}

/* Reusable Skeleton Shimmer Components (centras.php, biblioteka.php, async lists) */
.cb-skeleton-wrap {
  display: grid;
  gap: 12px;
  padding: 6px 0;
}
.cb-skeleton-card {
  border-radius: 14px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  display: grid;
  gap: 10px;
}
html.light-theme .cb-skeleton-card {
  border-color: rgba(24, 35, 48, 0.09);
  background: rgba(24, 35, 48, 0.03);
}
.cb-skeleton-line {
  height: 12px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(255,255,255,0.06) 25%, rgba(255,255,255,0.14) 50%, rgba(255,255,255,0.06) 75%);
  background-size: 200% 100%;
  animation: cbSkeletonShimmer 1.15s ease-in-out infinite;
}
html.light-theme .cb-skeleton-line {
  background: linear-gradient(90deg, rgba(24,35,48,0.06) 25%, rgba(24,35,48,0.14) 50%, rgba(24,35,48,0.06) 75%);
  background-size: 200% 100%;
}
.cb-skeleton-line.is-title { height: 16px; width: 58%; }
.cb-skeleton-line.is-short { width: 34%; }
.cb-skeleton-line.is-wide { width: 88%; }

.cb-is-loading-list {
  position: relative;
  min-height: 120px;
}
.cb-is-loading-list > *:not(.cb-skeleton-overlay) {
  opacity: 0.25;
  pointer-events: none;
  transition: opacity 0.15s ease;
}
.cb-skeleton-overlay {
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
  padding: 4px;
}

@keyframes cbSkeletonShimmer {
  from { background-position: 200% 0; }
  to { background-position: -200% 0; }
}

/* Smooth top navigation progress hairline for slower navigations */
.cb-nav-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0;
  height: 2.5px;
  z-index: 15000;
  background: linear-gradient(90deg, #f0da85, #43b581, #58a6ff);
  opacity: 0;
  pointer-events: none;
  transition: width 0.35s ease, opacity 0.2s ease;
}
.cb-nav-progress.is-active {
  opacity: 1;
  width: 78%;
}
