
@keyframes fadeIn { 
    from { opacity: 0; }
    to { opacity: 1; }
}

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

.filter-gallery {
    .gallery-content {
        &.grid {
            --grid-columns: auto-fill;
            display: grid;
            justify-items: center;
            margin: 0;
            padding: 0;

            figure {
                font-size: 1.2rem;
                width: 100%;
                text-align: center;
                
                .gallery-img {
                    width: 100%;
                    height: 100%;
                    object-fit: cover;
                    transition: opacity 0.25s ease-in-out;
                }
            }
        }

        figure {
            display: block;
            float: left;
            position:relative;
            will-change: opacity;
            animation: fadeIn 0.8s ease-in-out;

            .caption-fixed {
                position: absolute;
                border-style: solid;
                border-width: 1px 1px 1px 1px;
                font-size: 1rem;
                width: max-content;
                max-width: calc(100% - var(--caption-fixed-margin-left) - var(--caption-fixed-margin-right));
                text-align: center;
                padding: 10px 30px; 
                z-index: 2;
                opacity: 1;
                transition: all 0.3s ease-in;

                &.caption-fixed--top {
                    top: 0;
                }
        
                &.caption-fixed--middle {
                    transform: translateY(-50%);
                    top: calc(50% - var(--caption-fixed-margin-top));
        
                    &.caption-fixed--center {
                        transform: translateX(-50%) translateY(-50%);
                    }
                }
                
                &.caption-fixed--bottom {
                    bottom: 0;
                }
        
                &.caption-fixed--left {
                    left: 0;
                }
        
                &.caption-fixed--center {
                    transform: translateX(-50%);
                    left: calc(50% - var(--caption-fixed-margin-left));
                }
        
                &.caption-fixed--right {
                    right: 0;
                }
            }

            img {
                filter:brightness( calc( var( --brightness ) / 100 ));
            }

            &.hidden {
                display: none;
            }

            &.filtered {
                display: none;
            }

            .full-link {
                display: block;
                width: 100%;
                height: 100%;
            }
            .full-link-lightbox {
                display: block;
                width: 100%;
                height: 100%;
            }

            .color-overlay {
                position: absolute;
                height: 100%;
                width: 100%;
                z-index: 1;
            }

            .full-link-overlay {
                position: absolute;
                height: 100%;
                width: 100%;
                z-index: 2;
            }
        }
    }

    .filter-list {
        padding: 0;
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
        justify-content: center;
        list-style: none; 
    
        li {
            text-align: center;
            overflow:hidden;
            position: relative;
        }

        a {
            display: block;
        }

        a.active {
            background-color: var(--e-global-color-secondary);
            color: white;
        }
    }

    .filter {
        display: flex;
        flex-direction: column;
    }

    .filter-text {
        display:none;
        text-align: center;
        align-self: center;
    
        &.active {
            display: block;
        }

        &.left {
           align-self: flex-start;
        }

        &.right {
            align-self: flex-end;
        }
    }

    .icon-link {
        color: var(--e-global-color-secondary);
    }

    .image-description p {
        margin-bottom: 0px;
    }

    .fa-stack {
        vertical-align: middle;
    }

    .filter-list li {
        &.loading::after {
            content: "";
            position: absolute;
            top: 50%;
            left: 50%;
            width: 18px;
            height: 18px;
            margin: -9px 0 0 -9px;
            border: 2px solid rgba(255, 255, 255, 0.5);
            border-top-color: black;
            border-radius: 50%;
            animation: spin 0.8s linear infinite;
        }
    }
}
    
#glightbox-body{
    .gslide-description {
        background: transparent !important; 
        text-align: center;
    }
    
    .gslide-title {
        color: #fff !important;
        font-weight: bold !important;
        font-size: 18px;
        margin-bottom: 5px;            
    }
    button {
        border-width: 0px;
    }
    .glightbox-button-hidden {
        visibility: hidden;
    }

    .gdesc-inner {
        display: flex;
        justify-content: center;
    }

    @media (min-width: 769px) {
        .gslide-image img {
            padding-top: 30px;
        }
    }

    /* Prevent Styles overwriting Glightbox Styles */
    .gbtn {
            padding: 0;
    }
    button {
            padding: 0;
            color:white;
            background: 0;
    }
    input {
            background: 0;
    }

}
