/* bag.css: the bag rail. Its settings are at the top of css/pages/archives.css. */

/* Bags snap in the centre, like the coats; the worn one then slides into the model's hand.
   The rail only covers the bags' band, so above it you still swipe the coats. */
.try-on-rail-bags {
  top: var(--bag-top);
  height: calc(100% - var(--bag-top));
  /* Puts the bags either side at --bag-spread from the centre (1cqw = 1% of the width). */
  gap: calc(var(--bag-spread) - var(--bag-width));
  padding-inline: 50%;
}

.try-on-bag {
  --faded-drop: var(--bag-faded-drop);
  width: calc(var(--bag-width) * var(--scale, 1)); /* --scale comes from each bag in js/data/bags.js */
}

/* Only the picture (img or canvas) slides into the hand: the button stays centred, where the rail snaps it. */
.try-on-bag[aria-pressed='true'] > * {
  transform: translateX(var(--bag-hand-x));
}

@media (prefers-reduced-motion: no-preference) {
  .try-on-bag > * {
    transition: transform var(--motion-snap) cubic-bezier(0.3, 1.4, 0.5, 1);
  }
}
