.pgia-gallery-grid {
    display: grid;
}

.pgia-gallery-grid img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pgia-gallery-placeholder {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pgia-gallery-lightbox-slide-caption {
    width: 250px;
    position: absolute;
    right: 20px;
    top: 20px;
    background-color: rgba(255, 255, 255, 0.8);
    padding: 20px 30px 10px;
}

.pgia-gallery-count {
    position: absolute;
    bottom: 30px;
}

.pgia-gallery-lightbox {
    background-color: rgba(0,0,0,0.8);
    position: fixed;
    top: 0px;
    left: 0px;
    right: 0px;
    bottom: 0px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 2;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
}

.pgia-gallery-lightbox-inline {
    position: relative;
    display: block;
}

.pgia-gallery-lightbox-slide {
    position: absolute;
    top: 80px;
    left: 80px;
    bottom: 80px;
    right: 80px;
}

@media (max-width:768px) {
    .pgia-gallery-lightbox-slide {
        top: 0;
        left: 0;
        bottom: 0;
        right: 0;
    }
}

.pgia-gallery-thumbnails {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 120px;
    white-space: nowrap;
    display: flex;
    overflow: hidden;
}

.pgia-gallery-thumbnails img {
    width: 200px;
    height: 100%;
    display: inline-block;
    object-fit: cover;
}

.pgia-gallery-lightbox-inline {
    z-index: auto;
    position: relative;
    height: 540px;
}

.pgia-gallery-loading {
    width: 90px;
    height: 40px;
    text-align: center;
    display: flex;
    flex-direction: row;
    justify-content: space-around;
    align-items: center;
}

.pgia-gallery-loading span {
    display: inline-block;
    width: 20px;
    height: 20px;
    border-radius: 10px;
    background-color: rgba(0, 0, 0, 0.2);
}


/* Custom CSS */
.gallery-lightbox .pgia-gallery-lightbox {
    z-index: 9999;
}

.gallery-lightbox .pgia-gallery-placeholder {
    object-fit: contain;
}

.gallery-lightbox .pgia-gallery-count {
    color: #fff;
}

.gallery-lightbox__close-btn {
    position: absolute;
    right: 30px;
    top: 30px;
}

.gallery-lightbox__close-btn svg {
    height: 40px;
    fill: currentcolor;
    color: #fff;
}

/* Controls */
.gallery-lightbox .pgia-control {
    color:#fff;
    display: inline-flex;
    width: 40px;
    height: 40px;
    line-height: 1;
    font-size: 20px;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    position: absolute;
    bottom: 50%;
    transform: translateY(50%);
}

.gallery-lightbox .pgia-control:hover,
.gallery-lightbox .pgia-control:focus {
    color: #fff;
    text-decoration: none;
}

.gallery-lightbox .pgia-control.prev {
    left: 30px;
}

.gallery-lightbox .pgia-control.next {
    right: 30px;
}

.gallery-lightbox .gallery-item {
    cursor: pointer;
}