/* 04 — AR Mirror: 3-screen carousel + slide-level entrance.
   The animation is applied to .slide itself (a wrapper this build adds,
   not a Figma-authored node), not to individual converted elements --
   several of those carry their own Tailwind transform utilities
   (-translate-x-1/2 etc. for centering), and animating `transform` on
   them directly would silently replace that transform instead of
   composing with it (a real bug caught and fixed in templates 02/03). */

.canvas {
  position: relative;
}

.slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
}

.slide.active {
  opacity: 1;
  visibility: visible;
  animation: slide-in 0.6s ease both;
}

@keyframes slide-in {
  from { opacity: 0; transform: scale(0.98); }
  to { opacity: 1; transform: scale(1); }
}

.carousel-btn {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(6px);
  color: #fff;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.15s ease;
}
.carousel-btn:hover {
  background: rgba(255, 255, 255, 0.28);
  transform: translateY(-1px);
}
.carousel-btn:active {
  transform: translateY(0);
}

.carousel-dots {
  display: flex;
  gap: 8px;
}
.carousel-dots button {
  width: 8px;
  height: 8px;
  border-radius: 99px;
  border: none;
  background: rgba(255, 255, 255, 0.35);
  cursor: pointer;
  padding: 0;
  transition: background 0.2s ease, width 0.2s ease;
}
.carousel-dots button.active {
  background: #fff;
  width: 20px;
}

/* Screen 03's theme is white/light; the fixed light-on-dark controls
   would be low-contrast against it, so nudge them when that slide is
   active (mirrors the same adaptation made for template 03's controls). */
.canvas:has(.slide[data-slide-index="2"].active) .carousel-btn {
  border-color: rgba(0, 0, 0, 0.25);
  background: rgba(0, 0, 0, 0.08);
  color: #23282a;
}
.canvas:has(.slide[data-slide-index="2"].active) .carousel-dots button {
  background: rgba(0, 0, 0, 0.25);
}
.canvas:has(.slide[data-slide-index="2"].active) .carousel-dots button.active {
  background: #23282a;
}
