/**
 * build/style.css
 */
.pjmgs-gallery-container {
    padding: 0;
    margin: 20px 0;
}
.pjmgs-gallery-container * {
    box-sizing: border-box; 
}
.pjmgs-masonry-grid {
    position: relative;
    width: 100%;
    transition: height 0.3s ease-out; 
}
.pjmgs-grid-item {
    position: absolute;
    width: var(--pjmgs-col-width); 
    margin-bottom: var(--pjmgs-gap-size); 
    cursor: pointer;
    overflow: hidden;
    break-inside: avoid;
    opacity: 0; 
    transition: opacity 0.5s ease-in-out; 
    will-change: transform, opacity; 
}
.pjmgs-grid-item img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
.pjmgs-grid-item {
    opacity: 0;
}
.pjmgs-grid-item .lazy-load-completed {
    opacity: 1; 
    transition: opacity 0.5s ease-in;
}
.pjmgs-grid-item[style*="translate3d"] {
    opacity: 1;
}
.pjmgs-load-more-wrapper {
    display: flex;
    width: 100%; 
    justify-content: center;
    margin-top: 20px; 
}
.pjmgs-load-more {
    display: block;
    width: 200px;
    margin: 20px auto; 
    cursor: pointer;
    text-align: center;
    font-size: 17px;
    padding: 12px 16px;
    background: #fff;
    border: 1px solid var(--theme-palette-color-1);
}
.pjmgs-load-more svg {
    margin-left: 10px;
    fill: #ff5033;
    transition: transform 0.2s ease;
}
.pjmgs-load-more:hover svg {
    fill: #fff;
    transform: rotate(90deg);
}
.pjmgs-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    max-width: 100% !important;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85); 
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    cursor: zoom-out; 
}
.pjmgs-modal-content {
    max-width: 90%;
    max-height: 90%;
}
.pjmgs-modal-content img {
    display: block;
    max-width: 100%;
    max-height: 100%;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
    border-radius: 4px;
    opacity: 0;
    transition: opacity 0.2s ease-in;
}
.pjmgs-modal-content img.loaded {
    opacity: 1;
}
.pjmgs-editor-image-list {
    list-style: none;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
    border: 1px solid #ddd;
    padding: 10px;
}
.pjmgs-editor-image-list li {
    width: 80px;
    height: 80px;
    overflow: hidden;
    border: 1px solid #ccc;
}
.pjmgs-editor-image-list img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.pjmgs-modal-close {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #fff;
    font-size: 30px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
    z-index: 10000;
    opacity: 0.8;
    line-height: 1;
    padding: 10px;
}
.pjmgs-modal-close:hover,
.pjmgs-modal-close:focus {
    opacity: 1;
    color: #ccc;
}
.pjmgs-modal-nav {
    cursor: pointer;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: auto;
    padding: 16px;
    color: white;
    font-weight: bold;
    font-size: 30px;
    transition: 0.6s ease;
    border-radius: 0 3px 3px 0;
    user-select: none;
    z-index: 10000;
    opacity: 0.5;
}
.pjmgs-prev {
    left: 0;
    border-radius: 3px 0 0 3px;
}
.pjmgs-next {
    right: 0;
}
.pjmgs-modal-nav:hover {
    opacity: 1;
}
@media (max-width: 768px) {
    .pjmgs-modal-nav {
        font-size: 24px;
        padding: 10px;
    }
}