/* ── ShopReels WP — Reel Player (Lightbox) ────────────────────────────────── */

/* ── Backdrop ─────────────────────────────────────────────────────────────── */
.srwp-player-backdrop {
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: rgba(0, 0, 0, 0.92);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.srwp-player-backdrop.is-open {
    opacity: 1;
    pointer-events: all;
}

/* ── Stage — centres the phone-shaped player ──────────────────────────────── */
.srwp-player-stage {
    position: relative;
    display: flex;
    align-items: center;
    gap: 20px;
}

/* ── Phone shell ──────────────────────────────────────────────────────────── */
.srwp-player-shell {
    position: relative;
    width: min(360px, 90vw);
    height: min(640px, 88vh);
    border-radius: 28px;
    overflow: hidden;
    background: #000;
    box-shadow:
        0 0 0 1.5px rgba(255,255,255,0.08),
        0 32px 80px rgba(0,0,0,0.7);
    transform: scale(0.92) translateY(16px);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    flex-shrink: 0;
}

.srwp-player-backdrop.is-open .srwp-player-shell {
    transform: scale(1) translateY(0);
}

/* ── Video fill ───────────────────────────────────────────────────────────── */
.srwp-player-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    background: #111;
}

/* ── Swipe track — horizontal strip of reel slides ───────────────────────── */
.srwp-player-track {
    position: absolute;
    inset: 0;
    display: flex;
    transition: transform 0.38s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    will-change: transform;
}

.srwp-player-slide {
    position: relative;
    width: 100%;
    height: 100%;
    flex-shrink: 0;
    overflow: hidden;
    background: #111;
}

.srwp-player-slide video,
.srwp-player-slide img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ── Gradient overlays ────────────────────────────────────────────────────── */
.srwp-player-slide::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 80px;
    background: linear-gradient(to bottom, rgba(0,0,0,0.55), transparent);
    z-index: 2;
    pointer-events: none;
}

.srwp-player-slide::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 220px;
    background: linear-gradient(to top, rgba(0,0,0,0.82), transparent);
    z-index: 2;
    pointer-events: none;
}

/* ── Slide content (title, description, CTA) ──────────────────────────────── */
.srwp-slide-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 0 16px 28px;
    z-index: 10;
    color: #fff;
}

.srwp-slide-title {
    font-size: 16px;
    font-weight: 700;
    line-height: 1.3;
    margin: 0 0 6px;
    text-shadow: 0 1px 4px rgba(0,0,0,0.5);
    letter-spacing: -0.01em;
}

.srwp-slide-excerpt {
    font-size: 12px;
    line-height: 1.5;
    color: rgba(255,255,255,0.8);
    margin: 0 0 14px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.srwp-slide-cta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #fff;
    color: #1a1a2e;
    font-size: 13px;
    font-weight: 700;
    padding: 9px 18px;
    border-radius: 24px;
    text-decoration: none;
    letter-spacing: -0.01em;
    transition: transform 0.15s ease, background 0.15s ease;
}

.srwp-slide-cta:hover {
    background: #f0ebff;
    transform: scale(1.04);
    text-decoration: none;
    color: #1a1a2e;
}

.srwp-slide-cta svg {
    width: 14px;
    height: 14px;
}

/* ── Side action buttons ──────────────────────────────────────────────────── */
.srwp-slide-actions {
    position: absolute;
    right: 12px;
    bottom: 100px;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
}

.srwp-action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    color: #fff;
    text-shadow: 0 1px 4px rgba(0,0,0,0.5);
}

.srwp-action-btn .srwp-action-icon {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: rgba(255,255,255,0.12);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: background 0.15s, transform 0.15s;
    border: 1px solid rgba(255,255,255,0.15);
}

.srwp-action-btn:hover .srwp-action-icon {
    background: rgba(255,255,255,0.22);
    transform: scale(1.1);
}

.srwp-action-btn .srwp-action-label {
    font-size: 10px;
    font-weight: 600;
    color: rgba(255,255,255,0.85);
    letter-spacing: 0.02em;
}

/* mute button is top-right, not in side stack */
.srwp-player-mute {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 20;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(0,0,0,0.45);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,0.15);
    color: #fff;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s, transform 0.15s;
}

.srwp-player-mute:hover {
    background: rgba(0,0,0,0.7);
    transform: scale(1.08);
}

/* ── Progress bar (top of shell) ──────────────────────────────────────────── */
.srwp-player-progress {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2.5px;
    background: rgba(255,255,255,0.18);
    z-index: 20;
    border-radius: 0 0 2px 2px;
}

.srwp-player-progress-fill {
    height: 100%;
    background: #fff;
    border-radius: 0 2px 2px 0;
    transition: width 0.25s linear;
    width: 0%;
}

/* ── Dot indicators (reel position) ───────────────────────────────────────── */
.srwp-player-dots {
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 4px;
    z-index: 20;
    max-width: calc(100% - 80px);
    justify-content: center;
    flex-wrap: nowrap;
    overflow: hidden;
}

.srwp-player-dot {
    height: 2.5px;
    border-radius: 2px;
    background: rgba(255,255,255,0.35);
    transition: background 0.2s, width 0.2s;
    flex-shrink: 0;
    min-width: 12px;
    max-width: 32px;
    flex: 1;
}

.srwp-player-dot.is-active {
    background: #fff;
}

.srwp-player-dot.is-done {
    background: rgba(255,255,255,0.65);
}

/* ── Close button ─────────────────────────────────────────────────────────── */
.srwp-player-close {
    position: absolute;
    top: -16px;
    right: -16px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255,255,255,0.12);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,0.2);
    color: #fff;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 30;
    transition: background 0.15s, transform 0.15s;
    line-height: 1;
}

.srwp-player-close:hover {
    background: rgba(255,255,255,0.22);
    transform: scale(1.1) rotate(90deg);
}

/* ── Prev / Next nav arrows (desktop, outside the shell) ──────────────────── */
.srwp-player-nav {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.18);
    color: #fff;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s, transform 0.15s;
    flex-shrink: 0;
    backdrop-filter: blur(8px);
}

.srwp-player-nav:hover {
    background: rgba(255,255,255,0.2);
    transform: scale(1.1);
}

.srwp-player-nav:disabled {
    opacity: 0.25;
    pointer-events: none;
}

/* ── Play/pause tap flash ─────────────────────────────────────────────────── */
.srwp-tap-flash {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    color: #fff;
    z-index: 15;
    pointer-events: none;
    transition: transform 0.12s ease, opacity 0.2s ease;
    opacity: 0;
}

.srwp-tap-flash.show {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
}

/* ── Loading spinner ──────────────────────────────────────────────────────── */
.srwp-slide-loader {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 12;
    background: rgba(0,0,0,0.3);
    opacity: 0;
    transition: opacity 0.2s;
    pointer-events: none;
}

.srwp-slide-loader.is-loading {
    opacity: 1;
}

.srwp-spinner {
    width: 32px;
    height: 32px;
    border: 2.5px solid rgba(255,255,255,0.25);
    border-top-color: #fff;
    border-radius: 50%;
    animation: srwp-spin 0.7s linear infinite;
}

@keyframes srwp-spin {
    to { transform: rotate(360deg); }
}

/* ── Swipe hint (first open only) ────────────────────────────────────────── */
.srwp-swipe-hint {
    position: absolute;
    bottom: 50%;
    left: 50%;
    transform: translateX(-50%) translateY(50%);
    background: rgba(0,0,0,0.55);
    color: rgba(255,255,255,0.9);
    font-size: 12px;
    font-weight: 600;
    padding: 8px 16px;
    border-radius: 24px;
    letter-spacing: 0.05em;
    pointer-events: none;
    z-index: 25;
    opacity: 1;
    transition: opacity 0.4s ease;
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.srwp-swipe-hint.hide {
    opacity: 0;
}

/* ── Mobile responsive ────────────────────────────────────────────────────── */
@media (max-width: 600px) {
    .srwp-player-shell {
        width: 100vw;
        height: 100dvh;
        border-radius: 0;
        box-shadow: none;
    }

    .srwp-player-backdrop {
        align-items: flex-end;
        background: #000;
        backdrop-filter: none;
    }

    .srwp-player-nav {
        display: none; /* swipe-only on mobile */
    }

    .srwp-player-close {
        top: 12px;
        right: 12px;
        position: fixed;
    }

    .srwp-player-stage {
        gap: 0;
    }
}

/* ── Keyboard focus styles ────────────────────────────────────────────────── */
.srwp-player-close:focus-visible,
.srwp-player-nav:focus-visible,
.srwp-player-mute:focus-visible,
.srwp-action-btn:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
}
