.overlay {
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.75);
    display: flex;
    align-items: center;
    justify-content: center;
    // A full-viewport lightbox needs to sit above WP admin's own chrome, not just the app's
    // own overlays — #wpadminbar is z-index 99999, the admin sidebar goes up to 100000.
    z-index: 100102;
    padding: 40px;
}

.imageWrap {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    // Below .toolbar/.close so a zoomed-in image can never paint over the controls.
    position: relative;
    z-index: 1;
}

.image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.35);
    border-radius: 4px;
    transition: transform 0.15s ease;
    user-select: none;
}

.toolbar {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 4px;
    background-color: rgba(20, 20, 20, 0.85);
    border-radius: 30px;
    padding: 8px 10px;

    button,
    a {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 32px;
        height: 32px;
        padding: 0;
        border: 0;
        border-radius: 50%;
        background-color: transparent;
        color: $white_color;
        cursor: pointer;
        transition: 0.2s ease all;

        svg {
            width: 15px;
            height: 15px;
        }

        &:hover {
            background-color: rgba(255, 255, 255, 0.15);
        }

        &:disabled {
            opacity: 0.35;
            cursor: default;
            &:hover {
                background-color: transparent;
            }
        }
    }

    .zoomLabel {
        min-width: 42px;
        text-align: center;
        font-size: 12px;
        color: $white_color;
    }

    .divider {
        width: 1px;
        height: 20px;
        background-color: rgba(255, 255, 255, 0.2);
        margin: 0 2px;
    }
}

.close {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 2;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.15);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.3s ease all;

    img {
        width: 14px;
        height: 14px;
        filter: invert(1);
    }

    &:hover {
        background-color: rgba(255, 255, 255, 0.3);
    }
}
