/* ================================================================
   Video Carousel Pro — Frontend Styles v1.1
   ================================================================ */

.vcp-carousel-wrapper *,
.vcp-carousel-wrapper *::before,
.vcp-carousel-wrapper *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* ── Wrapper ── */
.vcp-carousel-wrapper {
    position: relative;
    width: 100%;
    padding: 0 0 32px;
    font-family: inherit;
}

/* ── Container — position:relative so arrows sit OVER the track ── */
.vcp-carousel-container {
    position: relative;
    overflow: hidden;         /* clips track, no arrows push layout */
}

/* ── Track ── */
.vcp-track {
    display: flex;
    gap: 16px;
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    will-change: transform;
}

/* ── Slide: exactly 1/3 of track per view ── */
.vcp-slide {
    flex: 0 0 calc(33.333% - 11px);
    min-width: 0;
    cursor: pointer;
}

/* ── Slide Inner ── */
.vcp-slide-inner {
    border-radius: 6px;
    overflow: hidden;
    background: #000;
    box-shadow: 0 2px 12px rgba(0,0,0,.12);
    transition: box-shadow 0.25s, transform 0.25s;
}
.vcp-slide-inner:hover {
    box-shadow: 0 10px 32px rgba(0,0,0,.22);
    transform: translateY(-3px);
}

/* ── Thumbnail — strict 16:9, all identical ── */
.vcp-thumb-container {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: #111;
}
.vcp-thumb-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    transition: transform 0.38s ease, opacity 0.25s;
}
.vcp-slide-inner:hover .vcp-thumb-img {
    transform: scale(1.06);
    opacity: 0.72;
}

/* ── Play Overlay ── */
.vcp-play-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,.10);
    transition: background 0.25s;
}
.vcp-slide-inner:hover .vcp-play-overlay { background: rgba(0,0,0,.32); }

.vcp-play-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(255,255,255,.88);
    border: 2px solid rgba(255,255,255,.6);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.22s, background 0.22s;
    box-shadow: 0 4px 20px rgba(0,0,0,.3);
}
.vcp-slide-inner:hover .vcp-play-btn {
    transform: scale(1.14);
    background: #fff;
}
.vcp-play-btn svg {
    width: 22px;
    height: 22px;
    color: #111;
    margin-left: 3px;
    display: block;
}

/* ── No video title shown on slides ── */
.vcp-slide-title { display: none; }

/* ══════════════════════════════════════════════════════════════
   ARROWS — overlaid on left/right edges, visible on wrapper hover
══════════════════════════════════════════════════════════════ */
.vcp-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 20;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: rgba(255,255,255,.92);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 14px rgba(0,0,0,.18);
    /* hidden by default, fade in on wrapper hover */
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.22s, background 0.18s, transform 0.18s;
    color: #111;
}
.vcp-carousel-wrapper:hover .vcp-arrow {
    opacity: 1;
    pointer-events: auto;
}
.vcp-arrow-left  { left: 12px; }
.vcp-arrow-right { right: 12px; }

.vcp-arrow:hover {
    background: #fff;
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 4px 20px rgba(0,0,0,.26);
}
.vcp-arrow:active { transform: translateY(-50%) scale(0.95); }
.vcp-arrow svg { width: 20px; height: 20px; }

/* ══════════════════════════════════════════════════════════════
   DOTS — small circles, not buttons with borders
══════════════════════════════════════════════════════════════ */
.vcp-dots {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 9px;
    margin-top: 18px;
}

.vcp-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ccc;
    border: none;
    padding: 0;
    cursor: pointer;
    transition: background 0.22s, transform 0.22s, width 0.22s;
    display: block;
    flex-shrink: 0;
}
.vcp-dot.active {
    background: #333;
    width: 22px;           /* active dot becomes a pill */
    border-radius: 4px;
}
.vcp-dot:hover:not(.active) { background: #888; transform: scale(1.2); }

/* ══════════════════════════════════════════════════════════════
   LIGHTBOX
══════════════════════════════════════════════════════════════ */
.vcp-lightbox {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 999999;
    align-items: center;
    justify-content: center;
}
.vcp-lightbox.vcp-lb-open { display: flex; }

.vcp-lightbox-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,.9);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

/* content = 70vw */
.vcp-lightbox-content {
    position: relative;
    z-index: 1;
    width: 70vw;
    max-width: 70vw;
    background: #000;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 32px 96px rgba(0,0,0,.7);
    animation: vcpLbIn 0.28s cubic-bezier(0.34,1.36,0.64,1) both;
}
@keyframes vcpLbIn {
    from { transform: scale(0.9); opacity: 0; }
    to   { transform: scale(1);   opacity: 1; }
}

/* No title bar — removed */
.vcp-lightbox-title-bar { display: none; }

/* Close button — top-right corner */
.vcp-lightbox-close {
    position: absolute;
    top: 10px;
    right: 12px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255,255,255,.12);
    border: none;
    cursor: pointer;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
    transition: background 0.2s, transform 0.15s;
}
.vcp-lightbox-close:hover {
    background: rgba(255,255,255,.28);
    transform: scale(1.12);
}
.vcp-lightbox-close svg { width: 18px; height: 18px; }

/* 16:9 player */
.vcp-lightbox-player {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
}
.vcp-player-inner { position: absolute; inset: 0; }
.vcp-player-inner iframe,
.vcp-player-inner video {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

/* ══════════════════════════════════════════════════════════════
   ADMIN CONTROLS (frontend edit, admins only)
══════════════════════════════════════════════════════════════ */
.vcp-admin-bar {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    margin-bottom: 10px;
}

.vcp-admin-btn {
    padding: 5px 14px;
    border-radius: 4px;
    border: 1px solid #ddd;
    background: #fff;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: background 0.15s, border-color 0.15s;
    text-decoration: none;
    color: #333;
    line-height: 1.5;
    letter-spacing: 0.02em;
}
.vcp-admin-btn:hover { background: #f0f0f0; border-color: #bbb; }
.vcp-admin-btn.vcp-btn-primary { background: #1a1a2e; color: #fff; border-color: #1a1a2e; }
.vcp-admin-btn.vcp-btn-primary:hover { background: #2d2d4e; }
.vcp-admin-btn.vcp-btn-danger  { background: #cc1818; color: #fff; border-color: #cc1818; }
.vcp-admin-btn.vcp-btn-danger:hover { background: #aa0000; }

/* Slide edit overlay (shows on hover when edit mode active) */
.vcp-slide-edit-overlay {
    position: absolute;
    inset: 0;
    background: rgba(26,26,46,.75);
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    z-index: 5;
}
.vcp-slide:hover .vcp-slide-edit-overlay.vcp-edit-mode { display: flex; }

/* Edit / Add modal */
.vcp-edit-modal-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1000000;
    background: rgba(0,0,0,.6);
    align-items: center;
    justify-content: center;
}
.vcp-edit-modal-backdrop.open { display: flex; }

.vcp-edit-modal {
    background: #fff;
    border-radius: 8px;
    width: 500px;
    max-width: 95vw;
    padding: 24px;
    box-shadow: 0 16px 60px rgba(0,0,0,.3);
}
.vcp-edit-modal h3 {
    margin: 0 0 18px;
    font-size: 16px;
    color: #1a1a2e;
    border-bottom: 1px solid #eee;
    padding-bottom: 12px;
}
.vcp-edit-field { margin-bottom: 14px; }
.vcp-edit-field label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 5px;
    color: #333;
}
.vcp-edit-field input {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}
.vcp-edit-field input:focus {
    outline: none;
    border-color: #1a1a2e;
    box-shadow: 0 0 0 2px rgba(26,26,46,.14);
}
.vcp-edit-modal-thumb-preview {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
    border-radius: 4px;
    margin-top: 8px;
    border: 1px solid #ddd;
    display: none;
}
.vcp-edit-modal-thumb-preview.visible { display: block; }
.vcp-edit-modal-footer {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid #eee;
}
.vcp-status-msg { font-size: 12px; color: #888; align-self: center; margin-right: auto; }
.vcp-status-msg.success { color: #2e7d32; }
.vcp-status-msg.error   { color: #cc1818; }

/* ── Responsive ── */
@media (max-width: 768px) {
    .vcp-slide { flex: 0 0 calc(50% - 8px); }
    .vcp-lightbox-content { width: 95vw; max-width: 95vw; }
}
@media (max-width: 480px) {
    .vcp-slide { flex: 0 0 100%; }
}
