/* The 3D barrel of outfit inspiration (dress-barrel.js). --w and --r are measured from the space
   available: the panel's width and the radius that leaves the six panels just clear of each other. */

.ev-barrel {
  --w: 150px;
  --r: 138px;
  grid-column: 1 / -1;
  min-width: 0;
  overflow-x: clip;
  padding: 8px 0 2px;
}
.ev-barrel__stage {
  position: relative;
  height: calc(var(--w) * 4 / 3);
  perspective: var(--p, 1200px);
  cursor: grab;
  touch-action: pan-y; /* vertical scrolling stays with the page */
  user-select: none;
  -webkit-user-select: none;
}
.ev-barrel__stage.is-turning { cursor: grabbing; }
.ev-barrel__drum { position: absolute; inset: 0; transform-style: preserve-3d; will-change: transform; }
.ev-barrel__panel {
  position: absolute;
  top: 0;
  left: 50%;
  isolation: isolate;
  box-sizing: border-box;
  width: var(--w);
  height: 100%;
  margin-left: calc(var(--w) / -2);
  overflow: hidden;
  /* no ground of its own: the cut-out outfits stand straight on the page */
  transform: rotateY(var(--a)) translateZ(var(--r));
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}
.ev-barrel__img { display: block; width: 100%; height: 100%; object-fit: contain; pointer-events: none; }

.ev-barrel__bar { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 16px; }
.ev-barrel__count { min-width: 56px; font: 500 11px/1 "Archivo", system-ui, sans-serif; letter-spacing: .22em; text-align: center; color: var(--ev-ink); opacity: .8; }
.ev-barrel__btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  width: 32px;
  height: 32px;
  margin: 0;
  padding: 0;
  border: 1px solid color-mix(in srgb, var(--ev-accent) 45%, transparent);
  border-radius: 50%;
  background: color-mix(in srgb, var(--ev-ground) 38%, transparent);
  color: var(--ev-ink);
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: background-color .3s ease, border-color .3s ease;
}
.ev-barrel__btn svg { width: 15px; height: 15px; }
.ev-barrel__btn::after { content: ""; position: absolute; inset: -7px; border-radius: 50%; } /* a 44px touch area */
.ev-barrel__btn:hover { background: color-mix(in srgb, var(--ev-accent) 18%, var(--ev-ground)); border-color: var(--ev-accent); }
.ev-barrel__btn:focus-visible { outline: 1px solid var(--ev-accent); outline-offset: 3px; }
/* The Feast's count in its own light gold, as its other labels have it. */
.ev--gala-dinner .ev-barrel__count { color: var(--gl-gold-light); }

/* Phones: edge to edge past the page's 18px margins, so the side images run off the screen. */
@media (max-width: 720px) {
  .ev-barrel { margin: 0 -18px; padding: 0; }
  .ev-barrel__bar { margin-top: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  .ev-barrel__btn { transition: none; }
}
