/* =========================================
   MAIN WIDGET
========================================= */

.mgpe-widget {
    width: 100%;
}


/* =========================================
   DROPDOWN
========================================= */

.mgpe-select {
    width: 100%;
    padding: 13px 15px;
    border: 1px solid #ccc;
    border-radius: 5px;
    background: #fff;
    font-size: 16px;
    margin-bottom: 20px;
    cursor: pointer;
}


/* =========================================
   TABS
========================================= */

.mgpe-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.mgpe-tab {
    padding: 10px 18px;
    border: 1px solid #ccc;
    background: #fff;
    border-radius: 5px;
    cursor: pointer;
}

.mgpe-tab.is-active {
    font-weight: 600;
}


/* =========================================
   PANELS
========================================= */

.mgpe-panel[hidden] {
    display: none !important;
}


/* =========================================
   GALLERY
========================================= */

.mgpe-grid {
    display: grid;

    grid-template-columns:
        repeat(
            var(--mgpe-columns),
            minmax(0, 1fr)
        );

    gap: 15px;
}


/* =========================================
   IMAGE
========================================= */

.mgpe-image {
    position: relative;
    display: block;
    overflow: hidden;
    border-radius: 5px;
    text-decoration: none;
}

.mgpe-image img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    transition: transform .3s ease;
}

.mgpe-image:hover img {
    transform: scale(1.04);
}


/* =========================================
   LIGHTBOX ICON
========================================= */

.mgpe-zoom {
    position: absolute;

    right: 10px;
    bottom: 10px;

    width: 36px;
    height: 36px;

    display: flex;

    align-items: center;
    justify-content: center;

    background: rgba(
        255,
        255,
        255,
        .92
    );

    color: #222;

    border-radius: 50%;

    font-size: 18px;
}


/* =========================================
   PDF
========================================= */

.mgpe-pdfs {
    display: flex;
    flex-wrap: wrap;

    gap: 10px;

    margin-top: 20px;
}

.mgpe-pdf {
    display: inline-flex;

    align-items: center;

    gap: 8px;

    padding: 10px 15px;

    border: 1px solid #ddd;

    border-radius: 5px;

    text-decoration: none;
}

.mgpe-pdf-icon {
    font-size: 11px;

    font-weight: 700;

    border: 1px solid currentColor;

    padding: 3px 5px;

    border-radius: 2px;
}


/* =========================================
   LIGHTBOX
========================================= */

.mgpe-lightbox {
    position: fixed;

    inset: 0;

    background:
        rgba(
            0,
            0,
            0,
            .88
        );

    z-index: 999999;

    display: flex;

    align-items: center;

    justify-content: center;

    padding: 30px;
}

.mgpe-lightbox img {
    max-width: 95vw;
    max-height: 90vh;

    width: auto;
    height: auto;
}


/* =========================================
   LIGHTBOX BUTTONS
========================================= */

.mgpe-close,
.mgpe-prev,
.mgpe-next {

    position: absolute;

    width: 40px;
    height: 40px;

    border: 0;

    border-radius: 50%;

    background: #fff;

    color: #222;

    cursor: pointer;

    display: flex;

    align-items: center;

    justify-content: center;

    font-size: 24px;
}

.mgpe-close {
    top: 20px;
    right: 20px;
}

.mgpe-prev {
    left: 20px;
}

.mgpe-next {
    right: 20px;
}


/* =========================================
   MOBILE
========================================= */

@media (max-width: 767px) {

    .mgpe-grid {

        grid-template-columns:
            repeat(
                2,
                minmax(0, 1fr)
            );
    }

    .mgpe-prev {
        left: 8px;
    }

    .mgpe-next {
        right: 8px;
    }
}