/**
 * Preview chrome - tab anchored to the left viewport edge, halfway down.
 * Flat left, rounded right. Back chevron icon. Slides out slightly on hover.
 * Matches the Marbl secondary-button pattern (transparent-ish bg, ember on hover).
 *
 * Per feedback_brand_kit_is_law: library chrome follows Brand Kit + UI Items.
 */

/* Wider-than-visible tab: extra 4px hides off the left edge at rest.
   On hover the tab slides 4px right, so the left edge stays flush with
   the viewport (no gap appears behind it). */
.preview-back {
  position: fixed;
  top: 50%;
  left: -4px;
  transform: translateY(-50%);
  width: 48px;
  height: 52px;
  padding-left: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--marbl-charcoal-light, #1d1a1b);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-left: none;
  border-radius: 0 6px 6px 0;
  color: #FFFFFF;
  text-decoration: none;
  z-index: 500;
  transition: left 0.4s cubic-bezier(0.32, 0.72, 0, 1),
              color 0.2s ease,
              background 0.2s ease,
              border-color 0.2s ease;
}

.preview-back:hover,
.preview-back:focus-visible {
  color: var(--marbl-ember, #F35226);
  background: var(--marbl-charcoal-lighter, #232021);
  border-color: rgba(243, 82, 38, 0.5);
  left: 0;
  outline: none;
}

.preview-back__icon {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.preview-stage {
  min-height: 100vh;
  box-sizing: border-box;
  padding-top: var(--gap-xl, 80px);
}

/* Centred mode for short-content previews (snapshots, demo pages).
   Content sits vertically centred in the viewport, never glued to the top. */
.preview-stage--centered {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--gap-xl, 80px) var(--gap-md, 40px);
}
