/* ══���══════════════════════════════��═════════════════════════
   V3 — Swipe Deck / Flipbook Styles
   Tinder-style card swiping with particle effects, ported from V2
   ════════════���══════════════════════════════════════════════ */

/* ─── Deck container ───────────────────────────────────── */
.swipe-deck {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 90vw;
  max-width: 380px;
  height: 74vh;
  max-height: 620px;
}

.swipe-empty {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  color: var(--muted);
}

.swipe-done {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  color: var(--text);
  width: 260px;
}

.swipe-restart {
  margin-top: 16px;
  padding: 10px 20px;
  border-radius: 10px;
  border: none;
  background: var(--accent);
  color: #0b0d10;
  font-weight: 700;
  cursor: pointer;
  font-size: 14px;
}

.swipe-restart:active {
  transform: scale(0.97);
}

/* ─── Card ─────────────────────────────────────────────── */
.swipe-card {
  position: absolute;
  inset: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 22px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 12px 40px rgba(0, 0, 0, .55);
  transition: transform .35s cubic-bezier(.4, .0, .2, 1), opacity .35s;
  touch-action: pan-y;
  will-change: transform;
  -webkit-user-select: none;
  user-select: none;
}

.swipe-card.gone-left {
  transform: translateX(-120%) rotate(-15deg);
  opacity: 0;
  pointer-events: none;
  transition: transform .45s cubic-bezier(.4, .0, .2, 1), opacity .4s;
}

.swipe-card.gone-right {
  transform: translateX(120%) rotate(15deg);
  opacity: 0;
  pointer-events: none;
  transition: transform .45s cubic-bezier(.4, .0, .2, 1), opacity .4s;
}

/* ─── Next card reveal ─────────────────────────────────── */
.swipe-card.waiting {
  filter: blur(4px);
  opacity: 0.7;
  transition: transform .5s cubic-bezier(.22, 1, .36, 1), opacity .4s, filter .5s !important;
}

.swipe-card.revealing {
  filter: blur(0);
  opacity: 1;
  transition: transform .5s cubic-bezier(.22, 1, .36, 1), opacity .4s ease-out, filter .5s ease-out !important;
}

/* ─── Swipe glow feedback ──────────────────────────────── */
.swipe-glow {
  position: absolute;
  inset: -2px;
  border-radius: 24px;
  pointer-events: none;
  z-index: 20;
  opacity: 0;
  transition: opacity .2s;
}

.swipe-glow-go {
  box-shadow: inset 0 0 40px rgba(74, 222, 128, .2), 0 0 30px rgba(74, 222, 128, .15);
  border: 2px solid rgba(74, 222, 128, .25);
}

.swipe-glow-no {
  box-shadow: inset 0 0 40px rgba(248, 113, 113, .18), 0 0 30px rgba(248, 113, 113, .12);
  border: 2px solid rgba(248, 113, 113, .2);
}

.swipe-card.swiping-right .swipe-glow-go { opacity: 1; }
.swipe-card.swiping-left .swipe-glow-no { opacity: 1; }

/* ─── Sparkle particles ────────────────────────────────── */
.swipe-particles {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 30;
  overflow: visible;
  border-radius: 22px;
}

.swipe-particles .sp {
  position: absolute;
  border-radius: 50%;
  opacity: 0;
  will-change: transform, opacity;
}

@keyframes sparkOut {
  0% { transform: translate(0, 0) scale(1); opacity: 1; }
  60% { opacity: .8; }
  100% { transform: translate(var(--sx), var(--sy)) scale(0); opacity: 0; }
}

.swipe-particles .sp.go {
  animation: sparkOut .7s cubic-bezier(.15, .8, .3, 1) forwards;
}

/* ─── Full-screen vote burst overlay ───────────────────── */
.vote-burst-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  overflow: hidden;
}

.vote-burst-overlay .vb-flash {
  position: absolute;
  inset: 0;
  opacity: 0;
  animation: vbFlash .7s cubic-bezier(.2, .8, .3, 1) forwards;
}

@keyframes vbFlash {
  0% { opacity: .4; }
  40% { opacity: .15; }
  100% { opacity: 0; }
}

.vote-burst-overlay .vb-ring {
  position: absolute;
  border-radius: 50%;
  opacity: 0;
  will-change: transform, opacity;
  animation: vbRing var(--dur, .9s) cubic-bezier(.2, .8, .3, 1) forwards;
  animation-delay: var(--del, 0s);
}

@keyframes vbRing {
  0% { transform: translate(-50%, -50%) scale(0); opacity: .55; }
  50% { opacity: .25; }
  100% { transform: translate(-50%, -50%) scale(1); opacity: 0; }
}

.vote-burst-overlay .vb-p {
  position: absolute;
  border-radius: 50%;
  will-change: transform, opacity, filter;
  animation: vbSparkle var(--dur) cubic-bezier(.2, .8, .3, 1) forwards;
  animation-delay: var(--del);
}

@keyframes vbSparkle {
  0% { transform: translate(0, 0) scale(.6); opacity: 0; filter: blur(0px); }
  12% { transform: translate(calc(var(--sx) * .08), calc(var(--sy) * .08)) scale(1.1); opacity: 1; }
  50% { opacity: .85; filter: blur(0.5px); }
  100% { transform: translate(var(--sx), var(--sy)) scale(.15); opacity: 0; filter: blur(2px); }
}

.vote-burst-overlay .vb-star {
  position: absolute;
  will-change: transform, opacity, filter;
  animation: vbStar var(--dur) cubic-bezier(.22, 1, .36, 1) forwards;
  animation-delay: var(--del);
}

@keyframes vbStar {
  0% { transform: translate(0, 0) scale(0) rotate(0deg); opacity: 0; filter: blur(0px); }
  15% { transform: translate(calc(var(--sx) * .1), calc(var(--sy) * .1)) scale(1.3) rotate(30deg); opacity: 1; }
  50% { opacity: .8; filter: blur(0.3px); }
  100% { transform: translate(var(--sx), var(--sy)) scale(.2) rotate(180deg); opacity: 0; filter: blur(1.5px); }
}

.vote-burst-overlay .vb-bloom {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  will-change: transform, opacity;
  animation: vbBloom var(--dur, 1s) cubic-bezier(.2, .8, .3, 1) forwards;
  animation-delay: var(--del, 0s);
}

@keyframes vbBloom {
  0% { transform: translate(-50%, -50%) scale(.3); opacity: .5; }
  30% { opacity: .35; }
  100% { transform: translate(-50%, -50%) scale(1); opacity: 0; }
}

/* ─── Card content ─────────────────────────────────────── */
.swipe-card-img {
  height: 200px;
  background: var(--surface2) center/cover no-repeat;
  position: relative;
}

.swipe-card-img .swipe-type {
  position: absolute;
  top: 12px;
  left: 12px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  padding: 3px 10px;
  border-radius: 6px;
  background: rgba(0, 0, 0, .6);
  backdrop-filter: blur(4px);
}

.swipe-card-body {
  flex: 1;
  padding: 16px 20px 8px;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.swipe-card-title {
  font-size: 20px;
  font-weight: 800;
  margin-bottom: 6px;
  line-height: 1.2;
}

.swipe-card-meta {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 5px;
}

.swipe-card-loc {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 5px;
}

.swipe-card-loc svg {
  flex-shrink: 0;
}

.swipe-card-desc {
  font-size: 13px;
  color: #b0b8c9;
  line-height: 1.5;
  margin-bottom: 10px;
}

/* ─── Who's going chips ────────────────────────────────── */
.swipe-going {
  margin-top: auto;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}

.swipe-going-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--muted);
  margin-bottom: 6px;
}

.swipe-going-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.swipe-going-chip {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 20px;
  background: rgba(74, 222, 128, .12);
  color: #4ade80;
  border: 1px solid rgba(74, 222, 128, .2);
}

.swipe-going-chip.vote-y {
  background: rgba(250, 204, 21, .12);
  color: #facc15;
  border-color: rgba(250, 204, 21, .2);
}

.swipe-going-chip.vote-r {
  background: rgba(248, 113, 113, .1);
  color: #f87171;
  border-color: rgba(248, 113, 113, .2);
}

/* ─── Action buttons ──────��────────────────────────────── */
.swipe-actions {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 14px;
  padding: 10px 20px 14px;
  background: var(--surface);
  flex-shrink: 0;
  position: relative;
}

.swipe-actions button {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 2px solid var(--border);
  background: var(--surface2);
  cursor: pointer;
  transition: transform .12s, border-color .12s, background .12s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.swipe-actions button svg {
  width: 22px;
  height: 22px;
}

.swipe-actions button:active {
  transform: scale(1.15);
}

.swipe-actions .sa-nope {
  border-color: #f87171;
  color: #f87171;
}

.swipe-actions .sa-nope:active {
  border-color: #ff3b3b;
  background: rgba(248, 113, 113, .1);
}

.swipe-actions .sa-going {
  border-color: #4ade80;
  color: #4ade80;
}

.swipe-actions .sa-going:active {
  border-color: #22ff66;
  background: rgba(74, 222, 128, .1);
}

.swipe-actions .sa-in {
  border-color: #facc15;
  color: #facc15;
}

.swipe-actions .sa-in:active {
  border-color: #ffdd00;
  background: rgba(250, 204, 21, .1);
}

.swipe-actions .sa-undo {
  width: 40px;
  height: 40px;
  border-color: rgba(255, 255, 255, .2);
  color: rgba(255, 255, 255, .5);
  position: absolute;
  left: 16px;
  bottom: 52px;
}

.swipe-actions .sa-undo svg {
  width: 18px;
  height: 18px;
}

.swipe-actions .sa-undo:active {
  border-color: rgba(255, 255, 255, .5);
  color: #fff;
  background: rgba(255, 255, 255, .08);
}

.swipe-actions .sa-undo[disabled] {
  opacity: 0.2;
  pointer-events: none;
}

/* ─── Counter ────���──────────────────────────────��──────── */
.swipe-counter {
  text-align: center;
  font-size: 11px;
  color: var(--muted);
  margin-top: 4px;
  flex-shrink: 0;
}
