/* ── Image Console ─────────────────────────────────────────────────────────── */
.wpanim-ic-outer { width: 100%; }
.wpanim-ic-wrap  { position: relative; overflow: hidden; display: block; cursor: pointer; }
.wpanim-ic-wrap img { width: 100%; height: 100%; object-fit: cover; display: block; transition: none; }
.wpanim-ic-img   { width: 100%; height: 100%; }

/* Glitch keyframes */
@keyframes wpanim-ic-glitch {
  0%,100% { transform: none; }
  20% { transform: translate(-3px,0) skew(2deg); filter: hue-rotate(90deg); }
  40% { transform: translate(3px,0) skew(-2deg); filter: hue-rotate(-90deg); }
  60% { transform: translate(-2px,1px); }
  80% { transform: translate(2px,-1px); }
}
.wpanim-glitch-active { animation: wpanim-ic-glitch 0.5s ease; }

/* Before/After */
.wpanim-ba-wrap { position: relative; overflow: hidden; user-select: none; display: block; }
.wpanim-ba-wrap > img { width: 100%; display: block; }
.wpanim-ba-after-wrap { position: absolute; inset: 0; overflow: hidden; }
.wpanim-ba-after-wrap img { width: 100%; height: 100%; object-fit: cover; }
.wpanim-ba-handle { position: absolute; top: 0; bottom: 0; cursor: ew-resize; z-index: 10; display: flex; align-items: center; justify-content: center; }
.wpanim-ba-line { position: absolute; top: 0; bottom: 0; width: 2px; background: #fff; box-shadow: 0 0 8px rgba(0,0,0,0.4); }
.wpanim-ba-btn { width: 44px; height: 44px; border-radius: 50%; background: #fff; display: flex; align-items: center; justify-content: center; font-size: 18px; box-shadow: 0 2px 16px rgba(0,0,0,0.25); position: relative; z-index: 1; transition: transform 0.2s; }
.wpanim-ba-btn:hover { transform: scale(1.1); }
.wpanim-ba-label { position: absolute; top: 12px; padding: 4px 12px; background: rgba(0,0,0,0.55); color: #fff; font-size: 13px; font-weight: 600; border-radius: 4px; pointer-events: none; }
.wpanim-ba-label-before { left: 12px; }
.wpanim-ba-label-after  { right: 12px; }

/* Gallery */
.wpanim-gallery-grid { display: grid; gap: 12px; }
.wpanim-gallery-item { position: relative; overflow: hidden; border-radius: 8px; cursor: pointer; aspect-ratio: 1; }
.wpanim-gallery-item img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.4s ease; }
.wpanim-gallery-item:hover img { transform: scale(1.06); }
.wpanim-gallery-caption { position: absolute; bottom: 0; left: 0; right: 0; padding: 8px 12px; background: linear-gradient(transparent, rgba(0,0,0,0.7)); color: #fff; font-size: 13px; }

/* Lightbox */
.wpanim-lightbox { position: fixed; inset: 0; z-index: 99999; align-items: center; justify-content: center; }
.wpanim-lb-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,0.9); }
.wpanim-lb-inner { position: relative; max-width: 90vw; max-height: 90vh; z-index: 1; }
.wpanim-lb-img { max-width: 100%; max-height: 80vh; display: block; border-radius: 8px; }
.wpanim-lb-caption { text-align: center; color: #fff; padding: 12px 0; font-size: 14px; }
.wpanim-lb-close, .wpanim-lb-prev, .wpanim-lb-next { position: absolute; background: rgba(255,255,255,0.15); border: none; color: #fff; font-size: 24px; border-radius: 50%; width: 44px; height: 44px; cursor: pointer; display: flex; align-items: center; justify-content: center; backdrop-filter: blur(4px); transition: background 0.2s; }
.wpanim-lb-close:hover, .wpanim-lb-prev:hover, .wpanim-lb-next:hover { background: rgba(255,255,255,0.3); }
.wpanim-lb-close { top: -20px; right: -20px; }
.wpanim-lb-prev  { left: -56px; top: 50%; transform: translateY(-50%); }
.wpanim-lb-next  { right: -56px; top: 50%; transform: translateY(-50%); }

/* HUE spin */
@keyframes wpanim-hue-spin { 0% { filter: hue-rotate(0deg); } 100% { filter: hue-rotate(360deg); } }

@media (max-width: 768px) {
  .wpanim-lb-prev  { left: 4px; }
  .wpanim-lb-next  { right: 4px; }
  .wpanim-lb-close { top: 4px; right: 4px; }
}
