:root {
    --font-color: white;
}

.halg-lightgallery {
    min-height: 100dvh;
    width: 100vw;
    display: none;
    opacity: 0;

    &.is-active {
        display: block;
        opacity: 1;
    }
}

.halg-backdrop {
    position: fixed;
    top: 0;
    bottom: 0;
    right: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    background-color: rgba(0, 0, 0, .8);
}

.halg-inner {
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    height: 100dvh;
    padding: 0 16px;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1010;
    user-select: none;
}

.halg-toolbtn,
.halg-actions {
    a {
        height: 48px;
        width: 48px;
        display: inline-block;
        text-indent: -9999px;
        font: 0/0 a;
        color: transparent;
        filter: brightness(10);
        background-size: 24px;
        background-repeat: no-repeat;
        background-position: center;
        opacity: .6;

        &:hover {
            opacity: 1 !important;
        }

        &.halg-download {
            background-image: url('../images/SVG/icon_download.svg');
        }

        &.halg-close {
            background-image: url('../images/SVG/icon_cancel.svg');
        }

        &.halg-prev,
        &.halg-next {
            background-image: url('../images/SVG/icon_arrow-back.svg');
        }

    }
}

.halg-list {
    position: relative;
    flex: 1;
    max-height: calc(100dvh - 100px);

    ul {
        display: grid;
        width: 100%;
        height: 100%;
        margin: 0;
        padding: 0;
        list-style-type: none;
        text-align: center;

        li {
            grid-column: 1;
            grid-row: 1;
            width: 100%;
            height: 100%;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        img,
        video,
        iframe {
            max-width: 100%;
            max-height: calc(100dvh - 150px);
            margin: 0 auto;
        }

        .halg-item {
            opacity: 0;
            transition: transform .3s ease, opacity .2s ease;
        }

        .halg-item-prev {
            transform: translate3d(-100%, 0, 0);
        }

        .halg-item-next {
            transform: translate3d(100%, 0, 0);
        }

        .halg-item-current {
            opacity: 1;
            z-index: 1020;
            transform: translate3d(0%, 0, 0);
        }
    }

    .halg-prev,
    .halg-next {
        position: absolute;
        top: calc(50% - 24px);
        opacity: 0;
        transition: 200ms;
        background-size: 28px;
        background-color: rgba(0, 0, 0, .4);
        cursor: pointer;
        z-index: 1030;
    }

    .halg-prev {
        left: 0;
    }

    .halg-next {
        right: 0;
        transform: rotate(180deg);
    }

    &:hover {
        .halg-prev,
        .halg-next {
            opacity: .6;
        }

        .halg-next {
            right: 0;
        }
    }
}

.halg-toolgroup {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    color: var(--font-color);
}

.halg-description {
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--font-color);
}