﻿/* ==========================================================
   ANKAVO LIGHTBOX
========================================================== */

.ankavo-lightbox {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

    .ankavo-lightbox.active {
        display: flex;
    }

.ankavo-lightbox-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.86);
    backdrop-filter: blur(4px);
}

.ankavo-lightbox-dialog {
    position: relative;
    z-index: 1;
    width: min(1200px, 100%);
    max-height: calc(100vh - 48px);
    display: flex;
    align-items: center;
    justify-content: center;
}

.ankavo-lightbox-content {
    position: relative;
    width: 100%;
    max-height: calc(100vh - 48px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.ankavo-lightbox-image-wrapper {
    width: 100%;
    max-height: calc(100vh - 120px);
    display: none;
    align-items: center;
    justify-content: center;
}

    .ankavo-lightbox-image-wrapper.active {
        display: flex;
    }

.ankavo-lightbox-image {
    display: block;
    max-width: 100%;
    max-height: calc(100vh - 120px);
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 10px;
}

.ankavo-lightbox-video-wrapper {
    display: none;
    width: min(1100px, 100%);
    aspect-ratio: 16 / 9;
    background: #000;
    border-radius: 10px;
    overflow: hidden;
}

    .ankavo-lightbox-video-wrapper.active {
        display: block;
    }

.ankavo-lightbox-video {
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
}

.ankavo-lightbox-caption {
    margin-top: 14px;
    max-width: 900px;
    color: #fff;
    font-size: 15px;
    line-height: 1.6;
    text-align: center;
}

    .ankavo-lightbox-caption:empty {
        display: none;
    }

.ankavo-lightbox-close {
    position: absolute;
    top: -18px;
    right: -18px;
    z-index: 4;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

    .ankavo-lightbox-close:hover {
        background: rgba(255, 255, 255, 0.24);
        transform: rotate(90deg);
    }

    .ankavo-lightbox-close i {
        font-size: 30px;
    }

.ankavo-lightbox-nav {
    position: absolute;
    top: 50%;
    z-index: 4;
    width: 52px;
    height: 52px;
    border: 0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
    cursor: pointer;
    transform: translateY(-50%);
    transition: background-color 0.2s ease, transform 0.2s ease;
}

    .ankavo-lightbox-nav:hover {
        background: rgba(255, 255, 255, 0.24);
    }

    .ankavo-lightbox-nav i {
        font-size: 36px;
    }

.ankavo-lightbox-prev {
    left: -72px;
}

.ankavo-lightbox-next {
    right: -72px;
}

.ankavo-lightbox-nav.hidden {
    display: none;
}

body.ankavo-lightbox-open {
    overflow: hidden;
}

@media (max-width: 1280px) {

    .ankavo-lightbox-prev {
        left: 12px;
    }

    .ankavo-lightbox-next {
        right: 12px;
    }

    .ankavo-lightbox-close {
        top: 12px;
        right: 12px;
    }
}

@media (max-width: 768px) {

    .ankavo-lightbox {
        padding: 12px;
    }

    .ankavo-lightbox-dialog,
    .ankavo-lightbox-content {
        max-height: calc(100vh - 24px);
    }

    .ankavo-lightbox-image-wrapper {
        max-height: calc(100vh - 90px);
    }

    .ankavo-lightbox-image {
        max-height: calc(100vh - 90px);
        border-radius: 6px;
    }

    .ankavo-lightbox-video-wrapper {
        border-radius: 6px;
    }

    .ankavo-lightbox-nav {
        width: 42px;
        height: 42px;
    }

        .ankavo-lightbox-nav i {
            font-size: 30px;
        }

    .ankavo-lightbox-caption {
        margin-top: 10px;
        padding: 0 16px;
        font-size: 14px;
    }
}
