/**
 * VIME Product Gallery Widget Styles
 */

/* ==========================================================================
   Base Gallery Styles
   ========================================================================== */

.vime-product-gallery {
    position: relative;
    width: 100%;
}

.vime-product-gallery img {
    max-width: 100%;
    height: auto;
    display: block;
    width: 100%;
}

.vime-product-gallery a {
    display: block;
    position: relative;
    cursor: pointer;
}

/* ==========================================================================
   Slider Layout
   ========================================================================== */

.vime-gallery-slider-wrapper {
    position: relative;
    width: 100%;
}

.vime-gallery-main {
    position: relative;
    width: 100%;
    overflow: hidden;
}

.vime-gallery-main-image {
    position: relative;
    width: 100%;
    overflow: hidden;
    background: #f5f5f5;
}

.vime-gallery-slide {
    display: none;
    width: 100%;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

.vime-gallery-slide.active {
    display: block;
    opacity: 1;
}

.vime-gallery-slide img {
    width: 100%;
    height: auto;
}

/* Navigation Arrows */
.vime-gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: all 0.3s ease;
}

.vime-gallery-nav:hover {
    transform: translateY(-50%) scale(1.1);
}

.vime-gallery-nav.vime-gallery-prev {
    left: 10px;
}

.vime-gallery-nav.vime-gallery-next {
    right: 10px;
}

.vime-gallery-nav i,
.vime-gallery-nav svg {
    font-size: 20px;
    width: 20px;
    height: 20px;
}

.vime-gallery-nav svg {
    fill: currentColor;
}

.vime-gallery-nav svg path {
    fill: currentColor;
}

/* Pagination Dots */
.vime-gallery-pagination {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
}

.vime-pagination-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
}

.vime-pagination-dot.active,
.vime-pagination-dot:hover {
    background: rgba(255, 255, 255, 1);
    transform: scale(1.2);
}

/* Thumbnails */
.vime-gallery-thumbnails {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 0, 0, 0.2) transparent;
}

.vime-gallery-thumbnails::-webkit-scrollbar {
    height: 6px;
    width: 6px;
}

.vime-gallery-thumbnails::-webkit-scrollbar-track {
    background: transparent;
}

.vime-gallery-thumbnails::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 3px;
}

.vime-gallery-thumbnail {
    flex: 0 0 auto;
    width: 80px;
    height: 80px;
    border: 2px solid transparent;
    border-radius: 4px;
    overflow: hidden;
    cursor: pointer;
    opacity: 0.6;
    transition: all 0.3s ease;
}

.vime-gallery-thumbnail:hover {
    opacity: 0.8;
}

.vime-gallery-thumbnail.active {
    opacity: 1;
    border-color: #333;
}

.vime-gallery-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* External Thumbnails Widget */
.vime-gallery-thumbnails-external-wrapper {
    width: 100%;
}

.vime-gallery-thumbnails-external {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

/* External thumbnails inherit styles from source gallery */
.vime-gallery-thumbnails-external .vime-gallery-thumbnail {
    flex: 0 0 auto;
    cursor: pointer;
    transition: all 0.3s ease;
    overflow: hidden;
    position: relative;
}

.vime-gallery-thumbnails-external .vime-gallery-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Video thumbnail styles for external widget */
.vime-gallery-thumbnails-external .vime-gallery-thumbnail-video .vime-video-thumbnail-wrapper {
    position: relative !important;
    width: 100% !important;
    height: 100% !important;
    display: block !important;
}

.vime-gallery-thumbnails-external .vime-video-thumbnail-wrapper > img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block !important;
}

.vime-gallery-thumbnails-external .vime-gallery-thumbnail-video .vime-video-thumbnail-icon {
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    pointer-events: none !important;
    z-index: 2 !important;
    transition: all 0.3s ease;
}

.vime-gallery-thumbnails-external .vime-gallery-thumbnail-video:hover .vime-video-thumbnail-icon {
    transform: translate(-50%, -50%) scale(1.1) !important;
}

.vime-gallery-thumbnails-external .vime-video-thumbnail-icon i,
.vime-gallery-thumbnails-external .vime-video-thumbnail-icon > svg {
    background: none !important;
    display: block !important;
    width: 30px !important;
    height: 30px !important;
    flex-shrink: 0;
}

.vime-gallery-thumbnails-external .vime-video-thumbnail-icon > svg path {
    fill: currentColor !important;
}

.vime-gallery-thumbnails-external .vime-video-thumbnail-icon > i {
    font-size: 30px;
}

.vime-gallery-thumbnails-external .vime-video-thumbnail-icon > img.vime-video-thumbnail-svg-upload {
    display: block !important;
    object-fit: contain !important;
    max-width: 60% !important;
    max-height: 60% !important;
}

/* Prevent WordPress emoji from being applied in external thumbnails */
.vime-gallery-thumbnails-external .vime-video-thumbnail-icon img.emoji {
    display: none !important;
}

/* Hide original thumbnails when external widget is present */
.vime-gallery-has-external-thumbnails .vime-gallery-thumbnails {
    display: none !important;
}

/* Thumbnail Positions */
.vime-gallery-slider-wrapper.vime-thumbnails-left,
.vime-gallery-slider-wrapper.vime-thumbnails-right {
    display: flex;
    gap: 20px;
}

.vime-gallery-slider-wrapper.vime-thumbnails-left {
    flex-direction: row-reverse;
}

.vime-gallery-slider-wrapper.vime-thumbnails-left .vime-gallery-thumbnails,
.vime-gallery-slider-wrapper.vime-thumbnails-right .vime-gallery-thumbnails {
    flex-direction: column;
    margin-top: 0;
    width: 100px;
    max-height: 500px;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
}

.vime-gallery-slider-wrapper.vime-thumbnails-left .vime-gallery-thumbnails::-webkit-scrollbar,
.vime-gallery-slider-wrapper.vime-thumbnails-right .vime-gallery-thumbnails::-webkit-scrollbar {
    display: none; /* Chrome, Safari and Opera */
}

.vime-gallery-slider-wrapper.vime-thumbnails-top .vime-gallery-thumbnails {
    order: -1;
    margin-top: 0;
}

.vime-gallery-slider-wrapper.vime-thumbnails-left,
.vime-gallery-slider-wrapper.vime-thumbnails-right {
    align-items: flex-start;
}

/* ==========================================================================
   Grid Layout
   ========================================================================== */

.vime-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 10px;
}

.vime-gallery-grid .vime-gallery-item {
    position: relative;
    overflow: hidden;
    background: #f5f5f5;
}

.vime-gallery-grid .vime-gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

/* ==========================================================================
   Masonry Layout
   ========================================================================== */

.vime-gallery-masonry {
    column-count: 3;
    column-gap: 10px;
}

.vime-gallery-masonry .vime-gallery-item {
    break-inside: avoid;
    margin-bottom: 10px;
    position: relative;
    overflow: hidden;
    background: #f5f5f5;
}

.vime-gallery-masonry .vime-gallery-item img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.3s ease;
}

/* ==========================================================================
   Carousel Layout
   ========================================================================== */

.vime-gallery-carousel-wrapper {
    position: relative;
    width: 100%;
    overflow: hidden;
}

.vime-gallery-carousel {
    display: flex;
    gap: 15px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 0, 0, 0.2) transparent;
    padding: 10px 0;
}

.vime-gallery-carousel::-webkit-scrollbar {
    height: 6px;
}

.vime-gallery-carousel::-webkit-scrollbar-track {
    background: transparent;
}

.vime-gallery-carousel::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 3px;
}

.vime-gallery-carousel .vime-gallery-item {
    flex: 0 0 auto;
    width: 300px;
    position: relative;
    overflow: hidden;
    background: #f5f5f5;
}

.vime-gallery-carousel .vime-gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

/* ==========================================================================
   Stacked Layout
   ========================================================================== */

.vime-gallery-stacked {
    display: flex;
    flex-direction: column;
}

.vime-gallery-stacked .vime-gallery-item {
    width: 100%;
    margin-bottom: 15px;
    position: relative;
    overflow: hidden;
    background: #f5f5f5;
}

.vime-gallery-stacked .vime-gallery-item:last-child {
    margin-bottom: 0;
}

.vime-gallery-stacked .vime-gallery-item img {
    width: 100%;
    height: auto;
    transition: transform 0.3s ease;
}

/* ==========================================================================
   Hover Effects
   ========================================================================== */

/* Zoom In */
.vime-gallery-hover-zoom .vime-gallery-item:hover img,
.vime-gallery-hover-zoom .vime-gallery-main-image:hover img {
    transform: scale(1.1);
}

/* Zoom Out */
.vime-gallery-hover-zoom-out .vime-gallery-item img,
.vime-gallery-hover-zoom-out .vime-gallery-main-image img {
    transform: scale(1.1);
}

.vime-gallery-hover-zoom-out .vime-gallery-item:hover img,
.vime-gallery-hover-zoom-out .vime-gallery-main-image:hover img {
    transform: scale(1);
}

/* Opacity */
.vime-gallery-hover-opacity .vime-gallery-item:hover img,
.vime-gallery-hover-opacity .vime-gallery-main-image:hover img {
    opacity: 0.8;
}

/* Lift */
.vime-gallery-hover-lift .vime-gallery-item {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.vime-gallery-hover-lift .vime-gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 1024px) {
    .vime-gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }

    .vime-gallery-masonry {
        column-count: 2;
    }

    .vime-gallery-carousel .vime-gallery-item {
        width: 250px;
    }

    .vime-gallery-slider-wrapper.vime-thumbnails-left,
    .vime-gallery-slider-wrapper.vime-thumbnails-right {
        flex-direction: column;
    }

    .vime-gallery-slider-wrapper.vime-thumbnails-left .vime-gallery-thumbnails,
    .vime-gallery-slider-wrapper.vime-thumbnails-right .vime-gallery-thumbnails {
        flex-direction: row;
        width: 100%;
        max-height: none;
        margin-top: 15px;
    }
}

@media (max-width: 768px) {
    .vime-gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .vime-gallery-masonry {
        column-count: 2;
    }

    .vime-gallery-carousel .vime-gallery-item {
        width: 200px;
    }

    .vime-gallery-nav {
        width: 35px;
        height: 35px;
    }

    .vime-gallery-nav i {
        font-size: 16px;
    }

    .vime-gallery-thumbnail {
        width: 60px;
        height: 60px;
    }

    /* Video player responsive - tablet */
    .vime-gallery-video-play-button {
        width: 64px;
        height: 64px;
    }

    .vime-gallery-video-play-button::after {
        border-width: 11px 0 11px 18px;
    }

    .vime-video-thumbnail-icon {
        width: 32px;
        height: 32px;
    }

    .vime-video-thumbnail-icon > svg {
        width: 14px !important;
        height: 14px !important;
    }
}

@media (max-width: 480px) {
    .vime-gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 5px;
    }

    .vime-gallery-masonry {
        column-count: 1;
        column-gap: 0;
    }

    .vime-gallery-carousel .vime-gallery-item {
        width: 150px;
    }

    .vime-gallery-nav {
        width: 30px;
        height: 30px;
    }

    .vime-gallery-nav i {
        font-size: 14px;
    }

    .vime-gallery-nav.vime-gallery-prev {
        left: 5px;
    }

    .vime-gallery-nav.vime-gallery-next {
        right: 5px;
    }

    .vime-gallery-thumbnail {
        width: 50px;
        height: 50px;
    }

    .vime-gallery-thumbnails {
        gap: 5px;
        margin-top: 10px;
    }

    /* Video player responsive */
    .vime-gallery-video-play-button {
        width: 56px;
        height: 56px;
    }

    .vime-gallery-video-play-button::after {
        border-width: 10px 0 10px 16px;
    }

    .vime-video-thumbnail-icon {
        width: 28px;
        height: 28px;
    }

    .vime-video-thumbnail-icon > svg {
        width: 12px !important;
        height: 12px !important;
    }

    .vime-video-thumbnail-icon > i {
        font-size: 12px;
    }
}

/* ==========================================================================
   Loading & Transitions
   ========================================================================== */

.vime-gallery-item,
.vime-gallery-slide,
.vime-gallery-thumbnail {
    position: relative;
}

.vime-gallery-item img,
.vime-gallery-slide img,
.vime-gallery-thumbnail img {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

/* Image loading skeleton */
.vime-gallery-item:empty,
.vime-gallery-slide:empty,
.vime-gallery-thumbnail:empty {
    background: linear-gradient(
        90deg,
        #f0f0f0 25%,
        #e0e0e0 50%,
        #f0f0f0 75%
    );
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

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

/* ==========================================================================
   Editor Preview Styles
   ========================================================================== */

.vime-product-gallery.elementor-preview {
    padding: 20px;
    background: #fff;
    border: 2px dashed #ddd;
    border-radius: 4px;
}

.vime-product-gallery.elementor-preview .vime-gallery-item img {
    opacity: 0.8;
}

/* ==========================================================================
   Video Styles - Modern Minimalist Player
   ========================================================================== */

.vime-gallery-video-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    background: linear-gradient(145deg, #1a1a2e 0%, #16213e 100%);
    border-radius: 8px;
    overflow: hidden;
}

.vime-gallery-video-embed {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
    border-radius: 8px;
}

.vime-gallery-video-embed iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
    border-radius: 8px;
}

/* Modern hosted video player */
.vime-gallery-video-hosted {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: transparent;
    border-radius: 8px;
}

/* Custom video controls styling */
.vime-gallery-video-hosted::-webkit-media-controls-panel {
    background: linear-gradient(0deg, rgba(0,0,0,0.7) 0%, transparent 100%);
    padding: 10px 15px;
}

.vime-gallery-video-hosted::-webkit-media-controls-play-button {
    background-color: rgba(255,255,255,0.1);
    border-radius: 50%;
    transition: background-color 0.2s ease;
}

.vime-gallery-video-hosted::-webkit-media-controls-play-button:hover {
    background-color: rgba(255,255,255,0.2);
}

.vime-gallery-video-hosted::-webkit-media-controls-timeline {
    background: rgba(255,255,255,0.2);
    border-radius: 10px;
    height: 4px;
}

.vime-gallery-video-hosted::-webkit-media-controls-current-time-display,
.vime-gallery-video-hosted::-webkit-media-controls-time-remaining-display {
    color: rgba(255,255,255,0.9);
    font-size: 12px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.vime-gallery-video-hosted::-webkit-media-controls-volume-slider {
    background: rgba(255,255,255,0.2);
    border-radius: 10px;
}

.vime-gallery-video-hosted::-webkit-media-controls-mute-button {
    background-color: transparent;
}

.vime-gallery-video-hosted::-webkit-media-controls-fullscreen-button {
    background-color: transparent;
}

/* Firefox video controls */
.vime-gallery-video-hosted::-moz-range-track {
    background: rgba(255,255,255,0.2);
    border-radius: 10px;
}

.vime-gallery-video-hosted::-moz-range-thumb {
    background: #fff;
    border: none;
    border-radius: 50%;
}

.vime-gallery-slide-video {
    background: linear-gradient(145deg, #1a1a2e 0%, #16213e 100%);
    border-radius: 8px;
    overflow: hidden;
}

/* Video thumbnail for thumbnails navigation */
.vime-gallery-thumbnail-video {
    position: relative;
}

/* Custom video thumbnail wrapper */
.vime-video-thumbnail-wrapper {
    position: relative !important;
    width: 100% !important;
    height: 100% !important;
    display: block !important;
}

.vime-video-thumbnail-wrapper > img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block !important;
}

/* Video thumbnail icon (play button overlay) - Modern Style */
.vime-video-thumbnail-icon {
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    pointer-events: none !important;
    z-index: 2 !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background-color: rgba(255, 255, 255, 0.95);
    color: #1a1a2e;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.2),
                0 0 0 0 rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

/* Remove any default background from icons */
.vime-video-thumbnail-icon i,
.vime-video-thumbnail-icon svg {
    background: none !important;
}

/* SVG icon styling */
.vime-video-thumbnail-icon > svg {
    display: block !important;
    width: 18px !important;
    height: 18px !important;
    flex-shrink: 0;
    margin-left: 2px; /* Optical centering for play triangle */
}

.vime-video-thumbnail-icon > svg path {
    fill: currentColor !important;
}

/* Font Awesome and other icon fonts */
.vime-video-thumbnail-icon > i {
    font-size: 18px;
    margin-left: 2px; /* Optical centering for play triangle */
}

/* Uploaded SVG image */
.vime-video-thumbnail-icon > img.vime-video-thumbnail-svg-upload {
    display: block !important;
    object-fit: contain !important;
    max-width: 60% !important;
    max-height: 60% !important;
}

/* Prevent WordPress emoji from being applied */
.vime-video-thumbnail-icon img.emoji {
    display: none !important;
}

.vime-gallery-thumbnail:hover .vime-video-thumbnail-icon {
    transform: translate(-50%, -50%) scale(1.1);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25),
                0 0 0 4px rgba(255, 255, 255, 0.2);
}

/* Fallback video thumbnail */
.vime-video-thumbnail-fallback {
    width: 100%;
    height: 100%;
    background: linear-gradient(145deg, #1a1a2e 0%, #16213e 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
}

/* Default play icon for thumbnails without custom settings (backwards compatibility) */
.vime-gallery-thumbnail-video:not(:has(.vime-video-thumbnail-wrapper))::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.vime-gallery-thumbnail-video:not(:has(.vime-video-thumbnail-wrapper))::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 52%;
    transform: translate(-50%, -50%);
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 7px 0 7px 12px;
    border-color: transparent transparent transparent #1a1a2e;
    z-index: 1;
    transition: border-color 0.3s ease;
}

.vime-gallery-thumbnail-video:not(:has(.vime-video-thumbnail-wrapper)):hover::after {
    transform: translate(-50%, -50%) scale(1.1);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25),
                0 0 0 4px rgba(255, 255, 255, 0.2);
}

/* Video overlay play button - Modern Style */
.vime-gallery-video-play-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(
        180deg,
        rgba(0, 0, 0, 0) 0%,
        rgba(0, 0, 0, 0.1) 50%,
        rgba(0, 0, 0, 0.4) 100%
    );
    cursor: pointer;
    z-index: 2;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 8px;
}

.vime-gallery-video-play-overlay:hover {
    background: linear-gradient(
        180deg,
        rgba(0, 0, 0, 0.1) 0%,
        rgba(0, 0, 0, 0.2) 50%,
        rgba(0, 0, 0, 0.5) 100%
    );
}

.vime-gallery-video-play-button {
    width: 72px;
    height: 72px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3),
                0 0 0 0 rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.vime-gallery-video-play-overlay:hover .vime-gallery-video-play-button {
    transform: scale(1.08);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4),
                0 0 0 8px rgba(255, 255, 255, 0.15);
}

.vime-gallery-video-play-button::after {
    content: '';
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 12px 0 12px 20px;
    border-color: transparent transparent transparent #1a1a2e;
    margin-left: 4px;
    transition: border-color 0.3s ease;
}

.vime-gallery-video-play-overlay:hover .vime-gallery-video-play-button::after {
    border-color: transparent transparent transparent #000;
}

/* Pulse animation for play button */
@keyframes vime-pulse {
    0% {
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3),
                    0 0 0 0 rgba(255, 255, 255, 0.4);
    }
    70% {
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3),
                    0 0 0 15px rgba(255, 255, 255, 0);
    }
    100% {
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3),
                    0 0 0 0 rgba(255, 255, 255, 0);
    }
}

.vime-gallery-video-play-button.pulse {
    animation: vime-pulse 2s infinite;
}

/* Video loading state */
.vime-gallery-video-wrapper.loading .vime-gallery-video-play-button::after {
    border: none;
    width: 24px;
    height: 24px;
    margin: 0;
    border-radius: 50%;
    border: 3px solid rgba(26, 26, 46, 0.2);
    border-top-color: #1a1a2e;
    animation: vime-spin 0.8s linear infinite;
}

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

/* ==========================================================================
   Accessibility
   ========================================================================== */

.vime-gallery-nav:focus,
.vime-gallery-thumbnail:focus,
.vime-pagination-dot:focus {
    outline: 2px solid #0073aa;
    outline-offset: 2px;
}

.vime-gallery-nav:focus:not(:focus-visible),
.vime-gallery-thumbnail:focus:not(:focus-visible),
.vime-pagination-dot:focus:not(:focus-visible) {
    outline: none;
}

/* Screen reader only text */
.vime-gallery-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* ==========================================================================
   Lightbox Customization
   ========================================================================== */

/* Elementor Lightbox background color - General overlay */
.elementor-lightbox {
    background-color: var(--e-lightbox-background-color, rgba(0, 0, 0, 0.9)) !important;
}

/* Elementor Lightbox UI elements color */
.elementor-lightbox .elementor-swiper-button,
.elementor-lightbox .elementor-lightbox-close,
.elementor-lightbox .elementor-slideshow__counter {
    color: var(--e-lightbox-ui-color, #ffffff) !important;
}

.elementor-lightbox .elementor-swiper-button:hover,
.elementor-lightbox .elementor-lightbox-close:hover {
    color: var(--e-lightbox-ui-color-hover, #ffffff) !important;
    opacity: 0.8;
}

/* Lightbox image title/caption */
.elementor-lightbox .elementor-slideshow__title {
    color: var(--e-lightbox-ui-color, #ffffff);
}

/* All lightbox containers must be transparent */
.elementor-lightbox .swiper-slide,
.elementor-lightbox .swiper-wrapper,
.elementor-lightbox .swiper-slide-inner,
.elementor-lightbox .swiper-zoom-container,
.elementor-lightbox .elementor-slideshow,
.elementor-lightbox .elementor-slideshow__content,
.elementor-lightbox .elementor-slideshow__slide {
    background-color: transparent !important;
    background: transparent !important;
}

/* Lightbox slide centering */
.elementor-lightbox .swiper-slide {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

/* Lightbox image container centering */
.elementor-lightbox .swiper-slide-inner,
.elementor-lightbox .swiper-zoom-container {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Direct image styling in lightbox - background color applied here via widget */
.elementor-lightbox .elementor-lightbox-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    /* Background color and padding applied via widget selector */
}
