/**
 * Custom PhotoSwipe Vertical Gallery
 * @version 1.3.0
 */

/* Hide default PSWp slider when custom mode is active */
.pswp--custom-active .pswp__container,
.pswp--custom-active .pswp__button--arrow--left,
.pswp--custom-active .pswp__button--arrow--right {
    display: none !important;
}

/* Top bar */
.pswp--custom-active .pswp__top-bar {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 44px;
    display: flex;
    align-items: center;
    padding: 0 12px;
    background: rgba(0, 0, 0, 0.80);
    z-index: 20;
    box-sizing: border-box;
}

.pswp--custom-active .pswp__counter {
    margin-right: auto;
    color: #fff;
    font-size: 13px;
    opacity: 0.75;
}

/* UI layer becomes a flex column */
.pswp--custom-active .pswp__ui {
    position: absolute;
    top: 0; right: 0; bottom: 0; left: 0;
    display: flex !important;
    flex-direction: column;
    opacity: 1 !important;
    visibility: visible !important;
}

/* Main layout */
.pswp__custom-layout {
    display: none;
    flex: 1;
    flex-direction: row;
    margin-top: 44px;
    overflow: hidden;
    background: #111;
}

.pswp--custom-active .pswp__custom-layout {
    display: flex;
}

/* LEFT: thumbnail strip */
.pswp__thumb-strip {
    width: 80px;
    min-width: 80px;
    height: 100%;
    padding: 10px 6px;
    background: rgba(0, 0, 0, 0.88);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
    box-sizing: border-box;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.3) transparent;
}

.pswp__thumb-strip::-webkit-scrollbar       { width: 4px; }
.pswp__thumb-strip::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.3); border-radius: 4px; }

.pswp__thumb-item {
    width: 68px;
    height: 68px;
    border: 2px solid transparent;
    border-radius: 4px;
    overflow: hidden;
    cursor: pointer;
    opacity: 0.55;
    transition: opacity 0.2s, border-color 0.2s;
    box-sizing: border-box;
    background: none;
    padding: 0;
    flex-shrink: 0;
}

.pswp__thumb-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    pointer-events: none;
}

.pswp__thumb-item:hover,
.pswp__thumb-item:focus-visible {
    opacity: 0.9;
    border-color: rgba(255, 255, 255, 0.6);
    outline: none;
}

.pswp__thumb-item.is-active {
    opacity: 1;
    border-color: #fff;
}

/* RIGHT: vertical full-size gallery */
.pswp__vertical-gallery {
    flex: 1;
    height: 100%;
    overflow-y: auto;
    overflow-x: hidden;
    box-sizing: border-box;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}

.pswp__vertical-gallery::-webkit-scrollbar       { width: 8px; }
.pswp__vertical-gallery::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.2); border-radius: 8px; }

/* Each image takes full width of the gallery column, natural height */
.pswp__gallery-item {
    width: 100%;
    display: block;
    cursor: zoom-in;
}

.pswp__gallery-item img {
    width: 100%;
    height: auto;
    display: block;
    user-select: none;
    -webkit-user-drag: none;
}

/* Zoom-to-natural state */
.pswp__gallery-item.is-zoomed {
    cursor: grab;
    overflow: hidden;
}

.pswp__gallery-item.is-zoomed.is-panning {
    cursor: grabbing;
}

.pswp__gallery-item.is-zoomed img {
    width: auto;
    max-width: none;
    transform-origin: 0 0;
}

/* Mobile */
@media (max-width: 600px) {
    .pswp__thumb-strip {
        width: 52px;
        min-width: 52px;
        padding: 8px 3px;
        gap: 5px;
    }
    .pswp__thumb-item {
        width: 46px;
        height: 46px;
    }
}