.single-post .post-content .wp-block-image > img {
    cursor: zoom-in;
}

.single-post .post-content .wp-block-image > img:focus-visible {
    outline: 3px solid #7003a9;
    outline-offset: 4px;
}

body.ginger-lightbox-open {
    overflow: hidden;
}

.ginger-image-lightbox {
    box-sizing: border-box;
    margin: auto;
    border: 0;
    border-radius: 12px;
    background: #fff;
    padding: 56px 16px 16px;
    width: calc(100vw - 24px);
    max-width: none;
    max-height: calc(100vh - 24px);
    max-height: calc(100dvh - 24px);
    overflow: hidden;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
}

.ginger-image-lightbox:not([open]) {
    display: none;
}

.ginger-image-lightbox::backdrop {
    background: rgba(15, 8, 20, 0.9);
    backdrop-filter: blur(3px);
}

.ginger-image-lightbox__viewport {
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    width: 100%;
    max-height: calc(100vh - 96px);
    max-height: calc(100dvh - 96px);
    overflow: hidden;
    cursor: zoom-in;
    touch-action: manipulation;
    user-select: none;
}

.ginger-image-lightbox__viewport.is-zoomed {
    cursor: grab;
    touch-action: none;
}

.ginger-image-lightbox__viewport.is-dragging {
    cursor: grabbing;
}

.ginger-image-lightbox__image {
    display: block;
    border-radius: 4px;
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: calc(100vh - 96px);
    max-height: calc(100dvh - 96px);
    object-fit: contain;
    pointer-events: none;
    transition: transform 180ms ease-out;
    will-change: transform;
}

.ginger-image-lightbox__viewport.is-dragging .ginger-image-lightbox__image {
    transition: none;
}

.ginger-image-lightbox__close,
.ginger-image-lightbox__zoom-button {
    display: flex;
    align-items: center;
    justify-content: center;
    appearance: none;
    margin: 0;
    border: 0;
    background: #7003a9;
    padding: 0;
    color: #fff;
    font-family: Arial, sans-serif;
    cursor: pointer;
}

.ginger-image-lightbox__close {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 2;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 32px;
    line-height: 1;
}

.ginger-image-lightbox__controls {
    display: flex;
    position: absolute;
    top: 8px;
    left: 50%;
    align-items: center;
    z-index: 2;
    transform: translateX(-50%);
    border-radius: 20px;
    background: #7003a9;
    overflow: hidden;
}

.ginger-image-lightbox__zoom-button {
    width: 40px;
    height: 40px;
    font-size: 26px;
    line-height: 1;
}

.ginger-image-lightbox__zoom-level {
    min-width: 54px;
    color: #fff;
    font: 600 13px/1 Arial, sans-serif;
    text-align: center;
}

.ginger-image-lightbox__close:hover,
.ginger-image-lightbox__close:focus-visible,
.ginger-image-lightbox__zoom-button:hover,
.ginger-image-lightbox__zoom-button:focus-visible {
    background: #fbac5c;
    color: #1f1f1f;
}

.ginger-image-lightbox__close:focus-visible,
.ginger-image-lightbox__zoom-button:focus-visible {
    outline: 3px solid #1f1f1f;
    outline-offset: -3px;
}

.ginger-image-lightbox__zoom-button:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

@media (min-width: 768px) {
    .ginger-image-lightbox {
        padding: 64px 24px 24px;
        width: calc(100vw - 48px);
        max-height: calc(100vh - 48px);
        max-height: calc(100dvh - 48px);
    }

    .ginger-image-lightbox__close {
        top: 12px;
        right: 12px;
        width: 44px;
        height: 44px;
    }

    .ginger-image-lightbox__controls {
        top: 12px;
        border-radius: 22px;
    }

    .ginger-image-lightbox__zoom-button {
        width: 44px;
        height: 44px;
    }

    .ginger-image-lightbox__viewport,
    .ginger-image-lightbox__image {
        max-height: calc(100vh - 136px);
        max-height: calc(100dvh - 136px);
    }
}

@media (prefers-reduced-motion: reduce) {
    .ginger-image-lightbox__image {
        transition: none;
    }
}
