/* ==========================================================================
   9wickets — "লাইভ অ্যাকটিভিটি" (Live Activity) section — PREMIUM AUTOPLAY
   SLIDER (loads LAST, after vk-quotes-v3)
   --------------------------------------------------------------------------
   Replaces the static two-column .vk-live__feed grid with a genuine
   autoplay carousel, built the same way as the "প্লেয়ার ভয়েস" Premium
   Multi-Card Rail (player-voice-v3.css): a native CSS scroll-snap track so
   touch swipe / trackpad / mouse-wheel all work with real browser momentum,
   plus prev/next chips, dots, and a light "clean console" card face that
   matches the LIVE ACTIVITY FEED — clean console rows retrofit already
   shipped in wickets-home.css (white rows on cream, colored accent bar +
   tag per activity kind).

   Scoped entirely under .vk-lac-* (Live ACtivity carousel) so it never
   collides with the legacy .vk-live__feed / .vk-live__item selectors in
   wickets-home.css or with wickets-home.js's setupLiveFeed() content
   rotator (which no-ops once it can't find .vk-live__feed in the DOM).
   The section wrapper/eyebrow/heading/lead/foot note keep their original
   .vk-live / .vk-live__aura / .vk-live__head-premium / .vk-live__foot
   classes and styling — untouched.

   Markup: claudedocs/build/build_live_slider.php (post 11, widget located
   by content match on "vk-live__feed", the pre-slider marker).
   Behaviour: live-activity-slider.js
   ========================================================================== */

body.vk .vk-lac {
    position: relative;
    /* matches the same "premium rail" convention's head-to-track gap as the
       Player Voice rail (.vk-pv3-slider: margin-top 44px desktop / 32px
       mobile) — was 8px, which read cramped right under the section head
       compared to every other rail/grid on the page. Spacing-only fix. */
    margin-top: 44px;
}

body.vk .vk-lac-row {
    position: relative;
}

/* ---- scroll-snap track ---- */
body.vk .vk-lac-track {
    display: flex;
    gap: 20px;
    margin: 0;
    padding: 6px 4px 26px;
    list-style: none;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
body.vk .vk-lac-track::-webkit-scrollbar { display: none; }

body.vk .vk-lac-slide {
    flex: 0 0 auto;
    scroll-snap-align: start;
    scroll-snap-stop: normal;
    box-sizing: border-box;
    /* desktop: 2 full cards visible, matching the original 2-col grid */
    width: calc((100% - 20px) / 2);
}

/* ---- premium "clean console" card ---- */
body.vk .vk-lac-card {
    position: relative;
    height: 100%;
    display: grid;
    grid-template-columns: 52px 1fr auto;
    align-items: center;
    gap: 18px;
    padding: 18px 22px;
    background: #FFFFFF;
    border: 1px solid rgba(26, 24, 19, 0.10);
    border-radius: 16px;
    overflow: hidden;
    isolation: isolate;
    box-shadow: 0 10px 26px -16px rgba(26, 24, 19, 0.30);
    transition: transform .35s cubic-bezier(.2, .7, .15, 1), box-shadow .35s ease, border-color .35s ease;
}
body.vk .vk-lac-card:hover,
body.vk .vk-lac-card:focus-within {
    transform: translateY(-3px);
    border-color: rgba(247, 181, 0, 0.50);
    box-shadow: 0 18px 34px -18px rgba(200, 134, 11, 0.42);
}
/* leading / most-in-view card gets a gentle premium glow */
body.vk .vk-lac-card.is-active {
    border-color: #C8860B;
    box-shadow:
        0 0 0 1px rgba(247, 181, 0, 0.35) inset,
        0 18px 40px -18px rgba(200, 134, 11, 0.45);
}

body.vk .vk-lac-card::before {
    content: "";
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 3px;
    opacity: .9;
}
body.vk .vk-lac-card--signup::before   { background: linear-gradient(180deg, #22D3EE, #0E7490); }
body.vk .vk-lac-card--win::before      { background: linear-gradient(180deg, #FFC72C, #C8860B); }
body.vk .vk-lac-card--bonus::before    { background: linear-gradient(180deg, #F472B6, #BE185D); }
body.vk .vk-lac-card--deposit::before  { background: linear-gradient(180deg, #34D399, #059669); }
body.vk .vk-lac-card--withdraw::before { background: linear-gradient(180deg, #60A5FA, #1D4ED8); }

body.vk .vk-lac-shine {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(115deg, transparent 30%, rgba(247, 181, 0, 0.10) 50%, transparent 70%);
    transform: translateX(-100%);
    transition: transform .9s ease;
}
body.vk .vk-lac-card:hover .vk-lac-shine { transform: translateX(100%); }

body.vk .vk-lac-avatar {
    position: relative;
    width: 52px; height: 52px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: linear-gradient(135deg, #FFD34D 0%, #F7B500 48%, #E8940A 100%);
    color: #1A1813;
    font-family: var(--vk-font-en, 'Inter', system-ui, sans-serif);
    font-weight: 800;
    font-size: 18px;
    box-shadow: 0 8px 18px -6px rgba(200, 134, 11, 0.55);
}
body.vk .vk-lac-avatar-ring {
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    border: 1px dashed rgba(200, 134, 11, 0.35);
    animation: vk-lac-spin 14s linear infinite;
}
@keyframes vk-lac-spin { to { transform: rotate(360deg); } }

body.vk .vk-lac-card--signup   .vk-lac-avatar { background: linear-gradient(135deg, #67E8F9, #0E7490); color: #052E33; }
body.vk .vk-lac-card--win      .vk-lac-avatar { background: linear-gradient(135deg, #FFD34D, #C8860B); }
body.vk .vk-lac-card--bonus    .vk-lac-avatar { background: linear-gradient(135deg, #F9A8D4, #BE185D); color: #4A0A26; }
body.vk .vk-lac-card--deposit  .vk-lac-avatar { background: linear-gradient(135deg, #6EE7B7, #059669); }
body.vk .vk-lac-card--withdraw .vk-lac-avatar { background: linear-gradient(135deg, #93C5FD, #1D4ED8); color: #0B1B4D; }

body.vk .vk-lac-body { min-width: 0; }
body.vk .vk-lac-who {
    margin: 0 0 6px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    flex-wrap: wrap;
}
body.vk .vk-lac-who strong {
    color: #1A1813;
    font-weight: 700;
    letter-spacing: .01em;
}
body.vk .vk-lac-sep {
    width: 3px; height: 3px;
    border-radius: 50%;
    background: rgba(26, 24, 19, .25);
}
body.vk .vk-lac-where {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: #6B6250;
}
body.vk .vk-lac-where svg { color: #C8860B; opacity: 1; flex: none; }

body.vk .vk-lac-what {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13.5px;
    color: #3A3320;
    line-height: 1.45;
}
body.vk .vk-lac-tag {
    flex: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px; height: 24px;
    border-radius: 8px;
}
body.vk .vk-lac-tag--signup   { background: rgba(8, 145, 178, 0.14);  border: 1px solid rgba(8, 145, 178, 0.34);   color: #0E7490; }
body.vk .vk-lac-tag--win      { background: rgba(247, 181, 0, 0.16);  border: 1px solid rgba(200, 134, 11, 0.40);  color: #9A6B00; }
body.vk .vk-lac-tag--bonus    { background: rgba(219, 39, 119, 0.14); border: 1px solid rgba(219, 39, 119, 0.34);  color: #BE185D; }
body.vk .vk-lac-tag--deposit  { background: rgba(5, 150, 105, 0.14);  border: 1px solid rgba(5, 150, 105, 0.34);   color: #0F7A4F; }
body.vk .vk-lac-tag--withdraw { background: rgba(37, 99, 235, 0.14);  border: 1px solid rgba(37, 99, 235, 0.34);   color: #1D4ED8; }

body.vk .vk-lac-time {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px;
    border-radius: 999px;
    background: rgba(26, 24, 19, 0.05);
    border: 1px solid rgba(26, 24, 19, 0.10);
    font-size: 11px;
    color: #6B6250;
    font-family: var(--vk-font-en, 'Inter', system-ui, sans-serif);
    letter-spacing: 0.04em;
    white-space: nowrap;
}
body.vk .vk-lac-time-dot {
    width: 6px; height: 6px;
    border-radius: 50%;
    background: #34D399;
    box-shadow: 0 0 8px rgba(52, 211, 153, 0.7);
    animation: vk-lac-pulse 1.6s ease-in-out infinite;
}
@keyframes vk-lac-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.55); }
    50%      { box-shadow: 0 0 0 6px rgba(52, 211, 153, 0); }
}

/* ---- prev/next arrow chips — same ink+gold chip language as the Player
        Voice rail. Positioned relative to .vk-lac-row (card row only, not
        the dots), so vertical centring always matches the card height. ---- */
body.vk .vk-lac-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    flex-shrink: 0;
    border-radius: 50%;
    background: #1A1813;
    color: #F7B500;
    border: 0;
    cursor: pointer;
    box-shadow: 0 6px 18px -4px rgba(26, 24, 19, 0.45);
    transition: color .3s ease, transform .3s ease;
}
body.vk .vk-lac-nav svg { width: 17px; height: 17px; flex-shrink: 0; stroke: currentColor; }
body.vk .vk-lac-nav:hover {
    background: linear-gradient(135deg, #FFD34D 0%, #F7B500 48%, #E8940A 100%);
    color: #1A1813;
    transform: translateY(-50%) scale(1.08);
}
body.vk .vk-lac-prev { left: -22px; }
body.vk .vk-lac-next { right: -22px; }

/* ---- dots (one per activity card) ---- */
body.vk .vk-lac-dots {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 4px;
}
body.vk .vk-lac-dot {
    width: 8px;
    height: 8px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.22);
    cursor: pointer;
    transition: width .3s ease, background .3s ease;
}
body.vk .vk-lac-dot.is-active {
    width: 26px;
    background: linear-gradient(135deg, #FFD34D 0%, #F7B500 48%, #E8940A 100%);
}

/* screen-reader-only live announcer for the current slide */
body.vk .vk-lac-sr {
    position: absolute;
    width: 1px; height: 1px;
    margin: -1px; padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ---- tablet: ~1.4 cards visible ---- */
@media (max-width: 1023px) {
    body.vk .vk-lac-slide { width: 68%; }
    body.vk .vk-lac-prev { left: 6px; }
    body.vk .vk-lac-next { right: 6px; }
    body.vk .vk-lac-nav { width: 40px; height: 40px; }
}

/* ---- mobile: ~1.08 cards visible (slight peek signals "swipeable");
        arrow chips hidden — peeking edge + native touch swipe + dots are
        the affordance, matching the Player Voice rail convention. ---- */
@media (max-width: 640px) {
    body.vk .vk-lac { margin-top: 32px; }
    body.vk .vk-lac-track { padding: 4px 2px 22px; gap: 14px; }
    body.vk .vk-lac-slide { width: 90%; }
    body.vk .vk-lac-card { grid-template-columns: 44px 1fr; padding: 14px 16px; gap: 14px; border-radius: 14px; }
    body.vk .vk-lac-avatar { width: 44px; height: 44px; font-size: 16px; }
    body.vk .vk-lac-time { grid-column: 2; justify-self: start; font-size: 10.5px; padding: 4px 8px; }
    body.vk .vk-lac-what { font-size: 12.5px; }
    body.vk .vk-lac-nav { display: none; }
}

/* ---- small phones: cards nearly full-width, same reasoning as the
        Player Voice rail's own <=480px step. ---- */
@media (max-width: 480px) {
    body.vk .vk-lac-track { padding: 3px 2px 20px; gap: 10px; }
    body.vk .vk-lac-slide { width: 94%; }
}

@media (prefers-reduced-motion: reduce) {
    body.vk .vk-lac-track { scroll-behavior: auto; }
    body.vk .vk-lac-card { transition: none; }
    body.vk .vk-lac-avatar-ring { animation: none; }
    body.vk .vk-lac-time-dot { animation: none; }
}
