.mlc-front-end-gallery {
    --mlc-gallery-accent: #f59a00;
    --mlc-gallery-control: rgba(10, 10, 10, 0.72);
    box-sizing: border-box;
    margin: 0 auto 1rem;
    max-width: 100%;
    width: 100%;
}

.mlc-front-end-gallery[hidden] {
    display: none;
}

.mlc-front-end-gallery__stage {
    aspect-ratio: 16 / 9;
    background: #151515;
    border-radius: 15px;
    overflow: hidden;
    position: relative;
    touch-action: pan-y;
    width: 100%;
}

.mlc-front-end-gallery__hero {
    border-radius: 15px;
    display: block;
    height: 100%;
    object-fit: cover;
    object-position: center;
    width: 100%;
}

.mlc-front-end-gallery__counter {
    background: var(--mlc-gallery-control);
    border-radius: 999px;
    bottom: 0.875rem;
    color: #fff;
    font-size: 0.875rem;
    line-height: 1;
    padding: 0.55rem 0.75rem;
    position: absolute;
    right: 0.875rem;
    z-index: 2;
}

.mlc-front-end-gallery__view-gallery {
    align-items: center;
    appearance: none;
    background: var(--mlc-gallery-control);
    border: 1px solid rgba(255, 255, 255, 0.7);
    border-radius: 6px;
    bottom: 0.875rem;
    color: #fff;
    cursor: pointer;
    display: flex;
    font: inherit;
    font-size: 0.875rem;
    gap: 0.45rem;
    left: 0.875rem;
    line-height: 1;
    padding: 0.65rem 0.8rem;
    position: absolute;
    z-index: 2;
}

.mlc-front-end-gallery__view-gallery:hover {
    background: rgba(10, 10, 10, 0.9);
}

.mlc-front-end-gallery__navigation {
    align-items: center;
    appearance: none;
    background: var(--mlc-gallery-control);
    border: 0;
    border-radius: 50%;
    color: #fff;
    cursor: pointer;
    display: flex;
    font: inherit;
    height: 3rem;
    justify-content: center;
    padding: 0;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    transition: background-color 150ms ease;
    width: 3rem;
    z-index: 2;
}

.mlc-front-end-gallery__navigation:hover {
    background: rgba(10, 10, 10, 0.9);
}

.mlc-front-end-gallery__navigation span {
    font-size: 2.25rem;
    line-height: 0.8;
    margin-top: -0.15rem;
}

.mlc-front-end-gallery__navigation--previous {
    left: 0.875rem;
}

.mlc-front-end-gallery__navigation--next {
    right: 0.875rem;
}

.mlc-front-end-gallery__thumbnails {
    display: flex;
    gap: 0.75rem;
    margin-top: 0.75rem;
    max-width: 100%;
    -ms-overflow-style: none;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    padding: 3px 2px 0.5rem;
    scrollbar-width: none;
}

.mlc-front-end-gallery__thumbnails::-webkit-scrollbar {
    display: none;
    height: 0;
    width: 0;
}

.mlc-front-end-gallery .mlc-front-end-gallery__thumbnails > button.mlc-front-end-gallery__thumbnail {
    appearance: none;
    aspect-ratio: 4 / 3;
    align-self: flex-start;
    background: transparent !important;
    border: 3px solid transparent !important;
    border-radius: 8px !important;
    box-sizing: border-box;
    box-shadow: none !important;
    cursor: pointer;
    display: block;
    flex: 0 0 150px;
    height: auto !important;
    line-height: 0 !important;
    margin: 0 !important;
    min-height: 0 !important;
    overflow: hidden;
    padding: 0 !important;
    transition: border-color 150ms ease, opacity 150ms ease;
}

.mlc-front-end-gallery .mlc-front-end-gallery__thumbnails > button.mlc-front-end-gallery__thumbnail > img {
    border-radius: 5px !important;
    display: block;
    height: 100% !important;
    max-height: none !important;
    object-fit: cover;
    vertical-align: top;
    width: 100%;
}

.mlc-front-end-gallery .mlc-front-end-gallery__thumbnails > button.mlc-front-end-gallery__thumbnail--active {
    border-color: var(--mlc-gallery-accent) !important;
}

.mlc-front-end-gallery__thumbnail--unavailable {
    cursor: not-allowed;
    opacity: 0.38;
}

.mlc-front-end-gallery__navigation:focus-visible,
.mlc-front-end-gallery__thumbnail:focus-visible,
.mlc-front-end-gallery__view-gallery:focus-visible,
.mlc-front-end-gallery__lightbox button:focus-visible {
    outline: 3px solid #fff;
    outline-offset: -6px;
}

.mlc-front-end-gallery__thumbnail:focus-visible {
    outline-color: #111;
    outline-offset: 2px;
}

.mlc-front-end-gallery__lightbox[hidden] {
    display: none;
}

.mlc-front-end-gallery__lightbox {
    --mlc-gallery-accent: #f59a00;
    background: rgba(7, 7, 7, 0.98);
    color: #fff;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    inset: 0;
    padding: 1rem;
    position: fixed;
    z-index: 100000;
}

.mlc-front-end-gallery__lightbox-topbar {
    align-items: center;
    display: flex;
    justify-content: space-between;
    min-height: 3rem;
}

.mlc-front-end-gallery__lightbox-counter {
    background: rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    font-size: 0.9375rem;
    line-height: 1;
    padding: 0.6rem 0.8rem;
}

.mlc-front-end-gallery__lightbox-close {
    appearance: none;
    background: rgba(255, 255, 255, 0.12);
    border: 0;
    border-radius: 50%;
    color: #fff;
    cursor: pointer;
    height: 2.75rem;
    padding: 0;
    position: relative;
    width: 2.75rem;
}

.mlc-front-end-gallery__lightbox-close span::before,
.mlc-front-end-gallery__lightbox-close span::after {
    background: currentColor;
    content: '';
    height: 2px;
    left: 0.7rem;
    position: absolute;
    top: 1.3rem;
    width: 1.35rem;
}

.mlc-front-end-gallery__lightbox-close span::before {
    transform: rotate(45deg);
}

.mlc-front-end-gallery__lightbox-close span::after {
    transform: rotate(-45deg);
}

.mlc-front-end-gallery__lightbox-stage {
    align-items: center;
    display: flex;
    justify-content: center;
    min-height: 0;
    overflow: hidden;
    position: relative;
    touch-action: pan-y;
}

.mlc-front-end-gallery__lightbox-image {
    border-radius: 15px !important;
    display: block;
    max-height: 100%;
    max-width: calc(100% - 8rem);
    object-fit: contain;
}

.mlc-front-end-gallery__lightbox-navigation {
    align-items: center;
    appearance: none;
    background: rgba(255, 255, 255, 0.12);
    border: 0;
    border-radius: 50%;
    color: #fff;
    cursor: pointer;
    display: flex;
    height: 3.5rem;
    justify-content: center;
    padding: 0;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 3.5rem;
    z-index: 2;
}

.mlc-front-end-gallery__lightbox-navigation span {
    font-size: 2.75rem;
    line-height: 0.8;
    margin-top: -0.2rem;
}

.mlc-front-end-gallery__lightbox-navigation--previous {
    left: 0.75rem;
}

.mlc-front-end-gallery__lightbox-navigation--next {
    right: 0.75rem;
}

.mlc-front-end-gallery__lightbox-thumbnails {
    display: flex;
    gap: 0.625rem;
    justify-content: flex-start;
    margin: 0.75rem auto 0;
    max-width: 100%;
    -ms-overflow-style: none;
    overflow-x: auto;
    padding: 3px 2px 0.5rem;
    scrollbar-width: none;
}

.mlc-front-end-gallery__lightbox-thumbnails::-webkit-scrollbar {
    display: none;
    height: 0;
    width: 0;
}

.mlc-front-end-gallery__lightbox-thumbnails > button.mlc-front-end-gallery__lightbox-thumbnail {
    appearance: none;
    aspect-ratio: 4 / 3;
    align-self: flex-start;
    background: transparent;
    border: 3px solid transparent !important;
    border-radius: 8px !important;
    box-shadow: none !important;
    box-sizing: border-box;
    cursor: pointer;
    flex: 0 0 112px;
    height: auto !important;
    line-height: 0 !important;
    margin: 0 !important;
    min-height: 0 !important;
    overflow: hidden;
    padding: 0 !important;
}

.mlc-front-end-gallery__lightbox-thumbnails > button.mlc-front-end-gallery__lightbox-thumbnail > img {
    border-radius: 5px !important;
    display: block;
    height: 100% !important;
    max-height: none !important;
    object-fit: cover;
    vertical-align: top;
    width: 100%;
}

.mlc-front-end-gallery__lightbox-thumbnails > button.mlc-front-end-gallery__lightbox-thumbnail--active {
    border-color: var(--mlc-gallery-accent) !important;
}

body.mlc-gallery-lightbox-open {
    overflow: hidden;
}

@media (max-width: 767px) {
    .mlc-front-end-gallery__stage {
        aspect-ratio: 4 / 3;
    }

    .mlc-front-end-gallery__navigation {
        display: none;
    }

    .mlc-front-end-gallery__counter {
        bottom: 0.625rem;
        right: 0.625rem;
    }

    .mlc-front-end-gallery__view-gallery {
        bottom: 0.625rem;
        left: 0.625rem;
        padding: 0.55rem 0.65rem;
    }

    .mlc-front-end-gallery__thumbnails {
        gap: 0.5rem;
        margin-top: 0.5rem;
    }

    .mlc-front-end-gallery .mlc-front-end-gallery__thumbnails > button.mlc-front-end-gallery__thumbnail {
        flex-basis: 112px;
    }

    .mlc-front-end-gallery__lightbox {
        padding: 0.625rem;
    }

    .mlc-front-end-gallery__lightbox-image {
        max-width: 100%;
    }

    .mlc-front-end-gallery__lightbox-navigation {
        height: 2.75rem;
        width: 2.75rem;
    }

    .mlc-front-end-gallery__lightbox-navigation--previous {
        left: 0.25rem;
    }

    .mlc-front-end-gallery__lightbox-navigation--next {
        right: 0.25rem;
    }

    .mlc-front-end-gallery__lightbox-thumbnails > button.mlc-front-end-gallery__lightbox-thumbnail {
        flex-basis: 88px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .mlc-front-end-gallery__navigation,
    .mlc-front-end-gallery__thumbnail,
    .mlc-front-end-gallery__view-gallery {
        transition: none;
    }
}
