/* ============================================================
   Video Wall Slider – Frontend Styles
   ============================================================ */

.vws-wall {
  --vws-cols:     4;
  --vws-cols-tab: 2;
  --vws-cols-mob: 1;
  --vws-gap:      12px;
  --vws-radius:   12px;
  --vws-tile-h:   480px;
  --vws-wall-h:   540px;

  position: relative;
  width: 100%;
  height: var(--vws-wall-h);
  overflow: hidden;
  background: #0d0f14;
  border-radius: 16px;
  touch-action: pan-y;
  user-select: none;
  cursor: grab;
}

.vws-wall:active { cursor: grabbing; }

/* ── Track (the scrollable layer) ─────────────────────────── */
.vws-wall__track {
  display: grid;
  grid-template-columns: repeat(var(--vws-cols), 1fr);
  gap: var(--vws-gap);
  padding: var(--vws-gap);
  width: 100%;
  will-change: transform;
  position: relative;
}

/* ── Individual tile ───────────────────────────────────────── */
.vws-tile {
  position: relative;
  height: var(--vws-tile-h);
  border-radius: var(--vws-radius);
  overflow: hidden;
  background: #161920;
  flex-shrink: 0;
}

.vws-tile__inner {
  position: relative;
  width: 100%;
  height: 100%;
}

/* ── iframe ────────────────────────────────────────────────── */
.vws-tile__iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

/* ── Thumbnail (lazy placeholder) ─────────────────────────── */
.vws-tile__thumb {
  position: absolute;
  inset: 0;
  background-color: #161920;
  background-size: cover;
  background-position: center;
  transition: opacity .4s ease;
  cursor: pointer;
}

.vws-tile__thumb.is-loaded {
  pointer-events: none;
  opacity: 0;
}

.vws-tile__play-btn {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,.85);
  text-shadow: 0 2px 12px rgba(0,0,0,.6);
  transition: color .15s, transform .15s;
}

.vws-tile__thumb:hover .vws-tile__play-btn {
  color: #fff;
  transform: scale(1.1);
}

/* ── Caption ───────────────────────────────────────────────── */
.vws-tile__caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 32px 12px 12px;
  background: linear-gradient(transparent, rgba(0,0,0,.7));
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  pointer-events: none;
  font-family: system-ui, sans-serif;
}

/* ── Hover effects ─────────────────────────────────────────── */
.vws-tile--hover-zoom .vws-tile__inner {
  transition: transform .3s cubic-bezier(.34,1.56,.64,1);
}
.vws-tile--hover-zoom:hover .vws-tile__inner {
  transform: scale(1.04);
}

.vws-tile--hover-brighten .vws-tile__inner::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0);
  transition: background .25s;
  pointer-events: none;
}
.vws-tile--hover-brighten:hover .vws-tile__inner::after {
  background: rgba(255,255,255,.08);
}

/* ── Scroll hint ───────────────────────────────────────────── */
.vws-wall__hint {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0,0,0,.55);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 20px;
  padding: 5px 14px;
  font-size: 11px;
  color: rgba(255,255,255,.7);
  font-family: system-ui, sans-serif;
  pointer-events: none;
  letter-spacing: .5px;
  animation: vws-hint-pulse 2s ease-in-out infinite;
  transition: opacity .4s;
  z-index: 10;
}

.vws-wall.is-scrolling .vws-wall__hint,
.vws-wall.hint-hidden .vws-wall__hint {
  opacity: 0;
}

@keyframes vws-hint-pulse {
  0%, 100% { opacity: .8; transform: translateX(-50%) translateY(0); }
  50%       { opacity: 1;  transform: translateX(-50%) translateY(-3px); }
}

/* ── Snap ──────────────────────────────────────────────────── */
/* Snap is handled in JS; no CSS scroll-snap to maintain inertia */

/* ── Empty state ───────────────────────────────────────────── */
.vws-wall__empty {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 300px;
  color: rgba(255,255,255,.35);
  font-family: system-ui, sans-serif;
  font-size: 14px;
}

/* ── Scrollbar hidden ──────────────────────────────────────── */
.vws-wall { scrollbar-width: none; }
.vws-wall::-webkit-scrollbar { display: none; }

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .vws-wall__track {
    grid-template-columns: repeat(var(--vws-cols-tab), 1fr);
  }
}

@media (max-width: 640px) {
  .vws-wall__track {
    grid-template-columns: repeat(var(--vws-cols-mob), 1fr);
  }
  .vws-wall {
    border-radius: 0;
  }
}

/* ── Loading shimmer on tiles ──────────────────────────────── */
.vws-tile.is-loading .vws-tile__inner {
  background: linear-gradient(
    90deg,
    #161920 25%,
    #1e2230 50%,
    #161920 75%
  );
  background-size: 200% 100%;
  animation: vws-shimmer 1.5s infinite;
}

@keyframes vws-shimmer {
  0%   { background-position: -200% 0; }
  100% { background-position:  200% 0; }
}
