.portal-lightbox {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: none;
    background: rgba(10, 12, 18, 0.92);
    color: #fff;
}

.portal-lightbox.is-open {
    display: block;
}

.portal-lightbox-top {
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 18px;
    font-size: 1.08em;
    font-weight: 700;
}

.portal-lightbox-actions {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    z-index: 999999999;
}

.portal-lightbox-action,
.portal-lightbox-close {
    border: 0;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    width: 34px;
    height: 34px;
    border-radius: 6px;
    font-size: 1.4em;
    line-height: 1;
    cursor: pointer;
    opacity: 0.95;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.portal-lightbox-action svg {
    width: 17px;
    height: 17px;
    fill: currentColor;
}

.portal-lightbox-close {
    font-size: 1.9em;
}

.portal-lightbox-action:hover,
.portal-lightbox-close:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.2);
}

.portal-lightbox-stage {
    position: absolute;
    top: 56px;
    left: 0;
    right: 0;
    bottom: 96px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 64px;
}

.portal-lightbox-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 6px;
    user-select: none;
    transition: transform 0.18s ease;
    transform-origin: center center;
}

.portal-lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
    font-size: 2em;
    line-height: 1;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.portal-lightbox-nav:hover {
    background: rgba(255, 255, 255, 0.26);
}

.portal-lightbox-nav.is-prev {
    left: 12px;
}

.portal-lightbox-nav.is-next {
    right: 12px;
}

.portal-lightbox-thumbs {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 96px;
    padding: 10px 14px 14px;
    background: rgba(8, 10, 14, 0.82);
    display: flex;
    gap: 8px;
    overflow-x: auto;
    overflow-y: hidden;
}

.portal-lightbox-thumb {
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 5px;
    padding: 0;
    width: 76px;
    min-width: 76px;
    height: 56px;
    overflow: hidden;
    background: #10141c;
    cursor: pointer;
    opacity: 0.72;
}

.portal-lightbox-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.portal-lightbox-thumb.is-active {
    opacity: 1;
    border-color: #01a4c2;
}

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

@media (max-width: 900px) {
    .portal-lightbox-stage {
        padding: 0 44px;
        bottom: 88px;
    }

    .portal-lightbox-nav {
        width: 40px;
        height: 40px;
        font-size: 1.7em;
    }

    .portal-lightbox-top {
        padding: 0 12px;
        font-size: 1em;
    }

    .portal-lightbox-thumbs {
        height: 88px;
    }
}
