/* ============================================================
   Residential virtual staging: "where it helps" cards with a
   live staging window on top of each card.
   ============================================================ */

.staging-live {
  --sl-pad: clamp(24px, 3vw, 32px);
  --sl-gold: #f3c66d;
}

.staging-live .virtual-staging-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: var(--sl-pad);
  overflow: hidden;
}

/* ---------- Photo window ---------- */

.sl-stage {
  position: relative;
  align-self: stretch;
  aspect-ratio: 3 / 2;
  margin: calc(var(--sl-pad) * -1) calc(var(--sl-pad) * -1) 22px;
  overflow: hidden;
  background: #e9e4da;
  isolation: isolate;
}

.virtual-staging-card--dark .sl-stage {
  background: #0b1a0a;
}

.sl-slide {
  position: absolute;
  inset: 0;
  margin: 0;
  opacity: 0;
}

.sl-slide:first-child {
  opacity: 1;
}

.sl-slide img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.sl-after {
  clip-path: inset(0 100% 0 0);
  transform-origin: 55% 60%;
}

/* Gold staging sweep that rides the reveal edge. */
.sl-sweep {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 3;
  width: 3px;
  margin-left: -1.5px;
  background: linear-gradient(180deg, rgba(243, 198, 109, 0) 0%, var(--sl-gold) 18%, #fff4d6 50%, var(--sl-gold) 82%, rgba(243, 198, 109, 0) 100%);
  box-shadow: 0 0 18px 4px rgba(243, 198, 109, 0.55);
  opacity: 0;
  pointer-events: none;
}

.sl-sweep::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  right: 3px;
  width: 64px;
  background: linear-gradient(90deg, rgba(255, 244, 214, 0) 0%, rgba(255, 244, 214, 0.22) 100%);
}

/* Status chip, top left of the photo. */
.virtual-staging-card .sl-chip {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 4;
  min-height: 0;
  padding: 6px 11px;
  border-radius: 999px;
  background: rgba(10, 22, 8, 0.72);
  color: #fffaf0;
  font-size: 0.66rem;
  letter-spacing: 0.12em;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(6px);
  transition: background-color 320ms ease, color 320ms ease;
}

.virtual-staging-card .sl-chip.is-staged {
  background: var(--sl-gold);
  color: #10210d;
}

/* ---------- Bedroom scale overlay ---------- */

.sl-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}

.sl-overlay svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.sl-line {
  fill: none;
  stroke: var(--sl-gold);
  stroke-width: 5;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  filter: drop-shadow(0 0 6px rgba(16, 33, 13, 0.55));
}

.sl-fill {
  fill: rgba(243, 198, 109, 0.16);
  stroke: none;
  opacity: 0;
}

.virtual-staging-card .sl-tag {
  position: absolute;
  z-index: 3;
  min-height: 0;
  padding: 4px 9px;
  border-radius: 999px;
  border: 1px solid rgba(255, 250, 240, 0.55);
  background: var(--sl-gold);
  color: #10210d;
  font-size: 0.58rem;
  letter-spacing: 0.1em;
  white-space: nowrap;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.28);
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.88);
}

/* ---------- Pause control ---------- */

.sl-toggle {
  grid-column: 1 / -1;
  justify-self: center;
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 18px auto 0;
  padding: 8px 16px;
  border: 1px solid rgba(16, 33, 13, 0.14);
  border-radius: 999px;
  background: #fffdf8;
  color: #435042;
  font: 700 0.74rem/1 var(--font-heading);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: border-color 200ms ease, color 200ms ease;
}

.sl-toggle:hover,
.sl-toggle:focus-visible {
  border-color: var(--gold);
  color: #10210d;
}

.sl-toggle:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

.sl-toggle i {
  position: relative;
  width: 10px;
  height: 10px;
  border-left: 3px solid currentColor;
  border-right: 3px solid currentColor;
}

.sl-toggle[aria-pressed="true"] i {
  border: 0;
  border-left: 9px solid currentColor;
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
}

@media (prefers-reduced-motion: reduce) {
  .virtual-staging-card .sl-chip {
    transition: none;
  }
}
