/* Shared public/admin gallery presentation. Image geometry never animates. */
.justified-gallery { width: 100%; }
.justified-gallery > .thumb-wrap,
.justified-gallery > .thumb-wrap > .image-link > .thumb-image {
    transition: none;
}
.justified-gallery > .thumb-wrap {
    visibility: hidden;
    opacity: 0;
    background: #282828;
}
.justified-gallery > .thumb-wrap.gallery-positioned {
    visibility: visible;
    opacity: 1;
}
.justified-gallery > .thumb-wrap > .image-link > .thumb-image {
    max-width: none;
    max-height: none;
    object-fit: cover;
    opacity: 0;
}
.justified-gallery > .thumb-wrap[data-gallery-state="ready"] > .image-link > .thumb-image {
    opacity: 1;
}
.justified-gallery > .thumb-wrap.gallery-appended > .image-link > .thumb-image {
    transition: opacity .18s ease-out;
}
.justified-gallery > .thumb-wrap.gallery-positioned[data-gallery-state="loading"]::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(100deg, transparent 25%, rgba(255, 255, 255, .09) 50%, transparent 75%);
    animation: gallery-loading-wave 1.6s ease-in-out infinite;
}
@keyframes gallery-loading-wave {
    from { transform: translateX(-100%); }
    to { transform: translateX(100%); }
}
.loadMore.gallery-page-loading {
    position: relative;
    color: transparent !important;
    text-shadow: none;
    pointer-events: none;
    transition: none;
}
.loadMore.gallery-page-loading::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 18px;
    height: 18px;
    margin: -9px 0 0 -9px;
    box-sizing: border-box;
    border: 2px solid rgba(255, 255, 255, .25);
    border-top-color: #fff;
    border-radius: 50%;
    animation: gallery-page-spin .7s linear infinite;
}
@keyframes gallery-page-spin {
    to { transform: rotate(360deg); }
}
@media (prefers-reduced-motion: reduce) {
    .justified-gallery > .thumb-wrap::before,
    .loadMore.gallery-page-loading::after { animation: none; }
    .justified-gallery > .thumb-wrap.gallery-appended > .image-link > .thumb-image {
        transition: none;
    }
}
