.popupbox-overlay {
    --pb-backdrop-color: rgba(0, 0, 0, .95);
    --pb-chrome-bg: hsla(0, 0%, 9%, .8);
    --pb-chrome-text: hsla(0, 0%, 100%, .9);
    --pb-chrome-font-size: 15px;
    --pb-chrome-padding: 16px;
    --pb-chrome-border-radius: 48px;
    --pb-image-border-radius: 24px;
    --pb-image-padding: 40px;
    --pb-z-index: 999999;
    -webkit-tap-highlight-color: transparent;
    inset: 0;
    outline: none;
    overflow: hidden;
    position: fixed;
    touch-action: none;
    z-index: var(--pb-z-index)
}

.popupbox-backdrop {
    background: var(--pb-backdrop-color);
    cursor: pointer;
    inset: 0;
    position: absolute
}

.popupbox-strip {
    inset: 0;
    pointer-events: none;
    position: fixed;
    will-change: transform
}

.popupbox-slide {
    height: 100vh;
    pointer-events: none;
    position: absolute;
    top: 0;
    width: 100vw
}

.popupbox-image {
    max-width: 90vw;
    max-height: 90vh;
    width: auto;
    height: auto;
    object-fit: contain;
    transition: transform 0.3s ease, opacity 0.3s ease;
    cursor: zoom-in;
    border-radius: 15px;
}

.popupbox-spinner {
    animation: popupbox-spin .7s linear infinite;
    border: 3px solid hsla(0, 0%, 100%, .2);
    border-radius: 50%;
    border-top-color: hsla(0, 0%, 100%, .8);
    height: 32px;
    left: 50%;
    margin: -16px 0 0 -16px;
    position: absolute;
    top: 50%;
    width: 32px
}

@keyframes popupbox-spin {
    to {
        transform: rotate(1turn)
    }
}

.popupbox-chrome {
    align-items: center;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    background: var(--pb-chrome-bg);
    border-radius: var(--pb-chrome-border-radius);
    bottom: var(--pb-chrome-padding);
    box-shadow: inset 0 1px 0 hsla(0, 0%, 100%, .08);
    color: var(--pb-chrome-text);
    display: flex;
    font-size: var(--pb-chrome-font-size);
    font-weight: 500;
    gap: 12px;
    left: 0;
    right: 0;
    bottom: 50px;
    margin: auto;
    letter-spacing: .02em;
    line-height: 1;
    max-width: min(90vw, 600px);
    padding: 6px 6px 6px 18px;
    pointer-events: none;
    position: fixed;
    user-select: none;
    width: max-content;
    z-index: 1
}

.popupbox-chrome--minimal {
    padding: 6px
}

.popupbox-counter {
    color: hsla(0, 0%, 100%, .55);
    font-size: 14px;
    font-variant-numeric: tabular-nums;
    letter-spacing: .01em
}

.popupbox-caption {
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 10;
    color: hsla(0, 0%, 100%, .9);
    display: -webkit-box;
    flex: 1;
    line-height: 1.3;
    min-width: 0;
    overflow: hidden;
    pointer-events: auto
}

.popupbox-close {
    align-items: center;
    background: hsla(0, 0%, 100%, .08);
    border: none;
    border-radius: 50%;
    color: #fff;
    cursor: pointer;
    display: flex;
    flex-shrink: 0;
    height: 40px;
    justify-content: center;
    padding: 0;
    pointer-events: auto;
    transition: background .15s ease;
    width: 40px
}

.popupbox-close:hover {
    background: hsla(0, 0%, 100%, .16)
}

.popupbox-close:focus {
    outline: none
}

.popupbox-close:focus-visible {
    outline: 2px solid hsla(0, 0%, 100%, .8);
    outline-offset: 2px
}

.popupbox-close svg {
    height: 22px;
    opacity: .85;
    transition: opacity .15s ease;
    width: 22px
}

.popupbox-close:hover svg {
    opacity: 1
}

.popupbox-arrow {
    align-items: center;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    background: hsla(0, 0%, 100%, .1);
    border: none;
    border-radius: 50%;
    box-shadow: inset 0 1px 0 hsla(0, 0%, 100%, .08);
    color: #fff;
    cursor: pointer;
    display: flex;
    height: 48px;
    justify-content: center;
    padding: 0;
    pointer-events: auto;
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    transition: background .15s ease;
    width: 48px;
    z-index: 1
}

.popupbox-arrow:hover {
    background: hsla(0, 0%, 100%, .18);
    color: #fff;
}

.popupbox-arrow:focus {
    outline: none
}

.popupbox-arrow:focus-visible {
    outline: 2px solid hsla(0, 0%, 100%, .8);
    outline-offset: 2px
}

.popupbox-arrow svg {
    height: 28px;
    opacity: .7;
    transition: opacity .15s ease;
    width: 28px
}

.popupbox-arrow:hover svg {
    opacity: 1
}

.popupbox-arrow-prev {
    left: var(--pb-chrome-padding)
}

.popupbox-arrow-next {
    right: var(--pb-chrome-padding)
}

@media (max-width:600px) {
    .popupbox-overlay {
        --pb-image-border-radius: 16px;
        --pb-image-padding: 8px
    }

    .popupbox-arrow {
        display: none
    }

    .popupbox-chrome {
        --pb-chrome-padding: 12px;
        --pb-chrome-font-size: 14px;
        bottom: var(--pb-chrome-padding);
        font-size: var(--pb-chrome-font-size);
        gap: 10px;
        padding: 5px 5px 5px 14px
    }

    .popupbox-chrome--minimal {
        padding: 5px
    }

    .popupbox-close {
        height: 36px;
        width: 36px
    }

    .popupbox-close svg {
        height: 20px;
        width: 20px
    }
}

@media (prefers-reduced-motion:reduce) {
    .popupbox-backdrop,
    .popupbox-image,
    .popupbox-spinner {
        animation-duration: .01ms !important;
        transition-duration: .01ms !important
    }
}

.popupbox-content {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
}

.popupbox-image {
    max-width: 90%;
    max-height: 90%;
    transition: all 0.3s ease;
    cursor: zoom-in;
}


.popupbox-overlay {
    display: none;
}

.popupbox-overlay {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.popupbox-content {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
}