/* ============================================================
   Video Lightbox for Elementor — video-lightbox.css
   ============================================================ */

/* ── Wrapper ── */
.vlb-wrapper {
    position: relative;
    display: block;
    width: 100%;
    overflow: hidden;
    cursor: pointer;
    -webkit-user-select: none;
    user-select: none;
    /* border-radius controlled by Elementor controls */
}

/* ── Thumbnail ── */
.vlb-thumbnail {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transition: transform 0.45s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.vlb-thumbnail-empty {
    background-color: #1a1a1a;
}

.vlb-wrapper:hover .vlb-thumbnail {
    transform: scale(1.04);
}

/* ── Overlay ── */
.vlb-overlay {
    position: absolute;
    inset: 0;
    transition: background 0.3s ease, opacity 0.3s ease;
    pointer-events: none;
}

/* ── Play Icon — base ── */
.vlb-play-icon {
    position: absolute;
    z-index: 10;
    line-height: 0;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease;
}

/* center (default) */
.vlb-pos-center .vlb-play-icon {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}
.vlb-pos-center .vlb-wrapper:hover .vlb-play-icon,
.vlb-pos-center:hover .vlb-play-icon {
    transform: translate(-50%, -50%) scale(1.12);
}

/* bottom-left */
.vlb-pos-bottom-left .vlb-play-icon {
    bottom: 20px;
    left: 20px;
}
.vlb-pos-bottom-left:hover .vlb-play-icon {
    transform: scale(1.12);
}

/* bottom-right */
.vlb-pos-bottom-right .vlb-play-icon {
    bottom: 20px;
    right: 20px;
}
.vlb-pos-bottom-right:hover .vlb-play-icon {
    transform: scale(1.12);
}

/* pulse animation variant */
.vlb-icon-animate svg,
.vlb-icon-animate img {
    filter: drop-shadow(0 0 0px rgba(255,255,255,0));
    transition: filter 0.3s ease, transform 0.3s ease;
}
.vlb-wrapper:hover .vlb-icon-animate svg,
.vlb-wrapper:hover .vlb-icon-animate img {
    filter: drop-shadow(0 0 16px rgba(255,255,255,0.5));
}

/* custom icon */
.vlb-custom-icon {
    display: block;
    height: auto;
}


/* ============================================================
   LIGHTBOX MODAL
   ============================================================ */

.vlb-lightbox-backdrop {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.vlb-lightbox-backdrop.vlb-is-open {
    opacity: 1;
    pointer-events: all;
}

.vlb-lightbox-inner {
    position: relative;
    width: 100%;
    /* max-width set inline from settings */
    transform: scale(0.88) translateY(20px);
    transition: transform 0.35s cubic-bezier(0.34, 1.2, 0.64, 1);
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 30px 80px rgba(0,0,0,0.7);
}

.vlb-lightbox-backdrop.vlb-is-open .vlb-lightbox-inner {
    transform: scale(1) translateY(0);
}

/* 16:9 ratio container */
.vlb-video-ratio {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    height: 0;
    background: #000;
}

.vlb-video-ratio iframe,
.vlb-video-ratio video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* Close button */
.vlb-close-btn {
    position: absolute;
    top: -44px;
    right: 0;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    line-height: 0;
    opacity: 0.85;
    transition: opacity 0.2s, transform 0.2s;
    z-index: 10;
}

.vlb-close-btn:hover {
    opacity: 1;
    transform: scale(1.1) rotate(90deg);
}

/* keyboard focus */
.vlb-wrapper:focus-visible {
    outline: 3px solid #fff;
    outline-offset: 3px;
}

/* Prevent body scroll when open */
body.vlb-open {
    overflow: hidden;
}

/* ── Responsive ── */
@media (max-width: 768px) {
    .vlb-lightbox-backdrop {
        padding: 12px;
    }
    .vlb-close-btn {
        top: -40px;
    }
}

/* ============================================================
   CLEAN YOUTUBE MODE
   ============================================================ */

/* Wrapper inside ratio container */
.vlb-clean-wrap {
    position: absolute;
    inset: 0;
    background: #000;
}

/* The actual YT iframe fills the wrap */
.vlb-clean-wrap iframe {
    position: absolute;
    /* Extend iframe to hide YouTube UI bars top/bottom */
    top: -60px;
    left: 0;
    width: 100%;
    height: calc(100% + 120px);
    border: none;
    pointer-events: none; /* let blocker pass clicks through to our controls */
}

/* Transparent blocker covers the iframe so YT UI is non-interactive */
.vlb-yt-blocker {
    position: absolute;
    inset: 0;
    z-index: 2;
    cursor: default;
}

/* ─── Custom Controls Bar ─── */
.vlb-controls {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: linear-gradient(to top, rgba(0,0,0,0.75) 0%, rgba(0,0,0,0) 100%);

    /* Hidden by default — only show on hover */
    opacity: 0;
    transform: translateY(6px);
    transition: opacity 0.25s ease, transform 0.25s ease;
    pointer-events: none;
}

/* Show controls when mouse is over the lightbox inner area */
.vlb-lightbox-inner:hover .vlb-controls {
    opacity: 1;
    transform: translateY(0);
    pointer-events: all;
}

/* Also keep visible when mouse is directly over controls */
.vlb-controls:hover {
    opacity: 1;
    transform: translateY(0);
    pointer-events: all;
}

/* ─── Control buttons ─── */
.vlb-ctrl-btn {
    background: none;
    border: none;
    padding: 4px;
    cursor: pointer;
    line-height: 0;
    flex-shrink: 0;
    opacity: 0.85;
    transition: opacity 0.15s, transform 0.15s;
}
.vlb-ctrl-btn:hover {
    opacity: 1;
    transform: scale(1.12);
}

/* ─── Time display ─── */
.vlb-ctrl-time {
    font-family: 'SF Mono', 'Fira Mono', monospace;
    font-size: 12px;
    color: var(--vlb-c, #fff);
    white-space: nowrap;
    opacity: 0.85;
    flex-shrink: 0;
    user-select: none;
}

/* ─── Progress bar ─── */
.vlb-ctrl-progress {
    flex: 1;
    display: flex;
    align-items: center;
    min-width: 0;
    cursor: pointer;
}
.vlb-ctrl-track {
    position: relative;
    width: 100%;
    height: 4px;
    background: rgba(255,255,255,0.25);
    border-radius: 2px;
    transition: height 0.15s;
}
.vlb-ctrl-progress:hover .vlb-ctrl-track {
    height: 6px;
}
.vlb-ctrl-fill {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 0%;
    background: var(--vlb-c, #fff);
    border-radius: 2px;
    pointer-events: none;
    transition: width 0.4s linear;
}
.vlb-ctrl-handle {
    position: absolute;
    top: 50%;
    left: 0%;
    width: 12px;
    height: 12px;
    background: var(--vlb-c, #fff);
    border-radius: 50%;
    transform: translate(-50%, -50%) scale(0);
    transition: transform 0.15s, left 0.4s linear;
    pointer-events: none;
}
.vlb-ctrl-progress:hover .vlb-ctrl-handle {
    transform: translate(-50%, -50%) scale(1);
}

/* ─── Volume slider ─── */
.vlb-ctrl-vslide {
    -webkit-appearance: none;
    appearance: none;
    width: 70px;
    height: 4px;
    background: rgba(255,255,255,0.3);
    border-radius: 2px;
    outline: none;
    cursor: pointer;
    flex-shrink: 0;
}
.vlb-ctrl-vslide::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 12px;
    height: 12px;
    background: var(--vlb-c, #fff);
    border-radius: 50%;
    cursor: pointer;
}
.vlb-ctrl-vslide::-moz-range-thumb {
    width: 12px;
    height: 12px;
    background: var(--vlb-c, #fff);
    border-radius: 50%;
    border: none;
    cursor: pointer;
}

/* ─── Mobile: hide volume slider ─── */
@media (max-width: 480px) {
    .vlb-ctrl-vslide { display: none; }
    .vlb-ctrl-time   { font-size: 11px; }
}
