/**
 * Brand Live — view bundle loading skeleton (ensureView).
 */
.blg-view.is-blg-view-loading {
  position: relative;
  min-height: min(52vh, 520px);
}

.blg-view-loading-skeleton {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: var(--blg-pad-y, 32px) var(--blg-pad-x, 24px);
  box-sizing: border-box;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(238, 241, 246, 0.97) 0%, rgba(238, 241, 246, 0.88) 100%);
  opacity: 1;
  transition: opacity 0.22s ease;
}

.blg-view-loading-skeleton.is-skeleton-leaving {
  opacity: 0;
}

.blg-view-loading-skeleton-bar {
  display: block;
  height: 14px;
  border-radius: 8px;
  background: linear-gradient(
    90deg,
    rgba(14, 23, 42, 0.06) 0%,
    rgba(14, 23, 42, 0.12) 45%,
    rgba(14, 23, 42, 0.06) 90%
  );
  background-size: 200% 100%;
  animation: blg-view-skel-shimmer 1.1s ease-in-out infinite;
  animation-delay: calc(var(--blg-skel-i, 0) * 80ms);
}

.blg-view-loading-skeleton-bar:nth-child(1) {
  width: 42%;
  height: 22px;
}

.blg-view-loading-skeleton-bar:nth-child(2) {
  width: 88%;
}

.blg-view-loading-skeleton-bar:nth-child(3) {
  width: 72%;
}

.blg-view-loading-skeleton-bar:nth-child(4) {
  width: 64%;
}

.blg-view-loading-skeleton-bar:nth-child(5) {
  width: 56%;
}

.blg-view-loading-skeleton-bar:nth-child(6) {
  width: 48%;
}

/* Inspiration / toolbox card-grid skeleton */
.blg-view-loading-skeleton--inspiration,
.blg-view-loading-skeleton--toolbox {
  gap: 18px;
}

.blg-view-skel-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.blg-view-skel-chip {
  display: block;
  width: 72px;
  height: 32px;
  border-radius: 999px;
  background: linear-gradient(
    90deg,
    rgba(14, 23, 42, 0.05) 0%,
    rgba(14, 23, 42, 0.1) 45%,
    rgba(14, 23, 42, 0.05) 90%
  );
  background-size: 200% 100%;
  animation: blg-view-skel-shimmer 1.1s ease-in-out infinite;
}

.blg-view-skel-chip:nth-child(2) { animation-delay: 60ms; width: 88px; }
.blg-view-skel-chip:nth-child(3) { animation-delay: 120ms; width: 64px; }
.blg-view-skel-chip:nth-child(4) { animation-delay: 180ms; width: 96px; }

.blg-view-skel-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

@media (min-width: 640px) {
  .blg-view-skel-card-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.blg-view-skel-card {
  display: block;
  aspect-ratio: 4 / 5;
  border-radius: 14px;
  background: linear-gradient(
    90deg,
    rgba(14, 23, 42, 0.05) 0%,
    rgba(14, 23, 42, 0.11) 45%,
    rgba(14, 23, 42, 0.05) 90%
  );
  background-size: 200% 100%;
  animation: blg-view-skel-shimmer 1.1s ease-in-out infinite;
  animation-delay: calc(var(--blg-skel-i, 0) * 70ms);
}

/* Inspiration in-view switch skeleton */
.blg-insp-switch-skeleton {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: var(--blg-pad-y, 24px) var(--blg-pad-x, 20px);
  box-sizing: border-box;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(238, 241, 246, 0.98) 0%, rgba(238, 241, 246, 0.92) 100%);
}

#brandLiveInspirationRoot {
  position: relative;
}

#brandLiveInspirationRoot.is-insp-switching {
  min-height: min(48vh, 480px);
}

#brandLiveInspirationRoot.is-insp-switching > :not(.blg-insp-switch-skeleton) {
  opacity: 0.35;
  filter: blur(1px);
  transition: opacity 0.16s ease, filter 0.16s ease;
}

#brandLiveInspirationRoot.is-insp-entering > .blg-hero,
#brandLiveInspirationRoot.is-insp-entering > section,
#brandLiveInspirationRoot.is-insp-entering > article {
  animation: blg-insp-content-enter 0.32s cubic-bezier(0.22, 1, 0.36, 1) both;
}

#brandLiveInspirationRoot.is-insp-entering > section,
#brandLiveInspirationRoot.is-insp-entering > article {
  animation-delay: 0.04s;
}

.blg-insp-skel-hero {
  display: block;
  width: 58%;
  height: 28px;
  border-radius: 10px;
  background: linear-gradient(90deg, rgba(14, 23, 42, 0.06) 0%, rgba(14, 23, 42, 0.12) 45%, rgba(14, 23, 42, 0.06) 90%);
  background-size: 200% 100%;
  animation: blg-view-skel-shimmer 1.1s ease-in-out infinite;
}

.blg-insp-skel-line {
  display: block;
  width: 72%;
  height: 12px;
  border-radius: 8px;
  background: linear-gradient(90deg, rgba(14, 23, 42, 0.05) 0%, rgba(14, 23, 42, 0.1) 45%, rgba(14, 23, 42, 0.05) 90%);
  background-size: 200% 100%;
  animation: blg-view-skel-shimmer 1.1s ease-in-out infinite;
  animation-delay: 80ms;
}

.blg-insp-skel-line--wide { width: 92%; height: 14px; }

.blg-insp-skel-block {
  display: block;
  width: 100%;
  height: 120px;
  border-radius: 14px;
  background: linear-gradient(90deg, rgba(14, 23, 42, 0.05) 0%, rgba(14, 23, 42, 0.1) 45%, rgba(14, 23, 42, 0.05) 90%);
  background-size: 200% 100%;
  animation: blg-view-skel-shimmer 1.1s ease-in-out infinite;
  animation-delay: 120ms;
}

.blg-insp-skel-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.blg-insp-skel-chips > span {
  display: block;
  width: 72px;
  height: 30px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(14, 23, 42, 0.05) 0%, rgba(14, 23, 42, 0.1) 45%, rgba(14, 23, 42, 0.05) 90%);
  background-size: 200% 100%;
  animation: blg-view-skel-shimmer 1.1s ease-in-out infinite;
}

.blg-insp-skel-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.blg-insp-skel-grid--cards {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.blg-insp-skel-grid > span {
  display: block;
  aspect-ratio: 4 / 5;
  border-radius: 12px;
  background: linear-gradient(90deg, rgba(14, 23, 42, 0.05) 0%, rgba(14, 23, 42, 0.1) 45%, rgba(14, 23, 42, 0.05) 90%);
  background-size: 200% 100%;
  animation: blg-view-skel-shimmer 1.1s ease-in-out infinite;
}

.blg-insp-skel-grid > span:nth-child(2) { animation-delay: 70ms; }
.blg-insp-skel-grid > span:nth-child(3) { animation-delay: 140ms; }
.blg-insp-skel-grid > span:nth-child(4) { animation-delay: 210ms; }

@keyframes blg-view-skel-shimmer {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}

@keyframes blg-insp-content-enter {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.blg-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;
}

.blg-boot-error-banner {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 12000;
  padding: 14px 18px;
  border-radius: 12px;
  background: #7f1d1d;
  color: #fff;
  font-size: 14px;
  line-height: 1.45;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.28);
}

@media (prefers-reduced-motion: reduce) {
  .blg-view-loading-skeleton-bar,
  .blg-view-skel-chip,
  .blg-view-skel-card,
  .blg-insp-skel-hero,
  .blg-insp-skel-line,
  .blg-insp-skel-block,
  .blg-insp-skel-chips > span,
  .blg-insp-skel-grid > span {
    animation: none;
    background: rgba(14, 23, 42, 0.08);
  }

  #brandLiveInspirationRoot.is-insp-switching > :not(.blg-insp-switch-skeleton) {
    opacity: 0.6;
    filter: none;
  }

  #brandLiveInspirationRoot.is-insp-entering > .blg-hero,
  #brandLiveInspirationRoot.is-insp-entering > section,
  #brandLiveInspirationRoot.is-insp-entering > article {
    animation: none;
  }
}
