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

.tgc-lightbox {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 56px 72px;
    background: rgba(15, 23, 42, 0.92);
}

.tgc-lightbox[hidden] {
    display: none;
}

.tgc-lightbox__nav[hidden],
.tgc-lightbox__counter[hidden],
.tgc-lightbox__caption[hidden] {
    display: none;
}

.tgc-lightbox__figure {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    max-width: 100%;
    max-height: 100%;
    margin: 0;
}

.tgc-lightbox__image {
    display: block;
    max-width: min(1280px, 100%);
    max-height: calc(100vh - 160px);
    object-fit: contain;
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.45);
}

.tgc-lightbox__caption {
    max-width: 720px;
    color: #e2e8f0;
    font-size: 0.9rem;
    line-height: 1.4;
    text-align: center;
}

.tgc-lightbox__counter {
    position: absolute;
    bottom: 18px;
    left: 50%;
    transform: translateX(-50%);
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    color: #e2e8f0;
    font-size: 0.85rem;
}

.tgc-lightbox__close,
.tgc-lightbox__nav {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 50%;
    background: rgba(15, 23, 42, 0.6);
    color: #ffffff;
    line-height: 0;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.tgc-lightbox__close:hover,
.tgc-lightbox__nav:hover {
    background: rgba(37, 99, 235, 0.8);
    border-color: rgba(255, 255, 255, 0.5);
}

.tgc-lightbox__close:focus-visible,
.tgc-lightbox__nav:focus-visible {
    outline: 2px solid #93c5fd;
    outline-offset: 2px;
}

.tgc-lightbox__close {
    top: 16px;
    right: 16px;
}

.tgc-lightbox__close svg,
.tgc-lightbox__nav svg {
    display: block;
    width: 22px;
    height: 22px;
}

.tgc-lightbox__nav {
    top: 50%;
    transform: translateY(-50%);
}

.tgc-lightbox__nav--prev {
    left: 16px;
}

.tgc-lightbox__nav--next {
    right: 16px;
}

@media (max-width: 640px) {
    .tgc-lightbox {
        padding: 64px 12px 72px;
    }

    .tgc-lightbox__image {
        max-height: calc(100vh - 180px);
    }

    .tgc-lightbox__close {
        top: 10px;
        right: 10px;
    }

    .tgc-lightbox__nav {
        width: 38px;
        height: 38px;
    }

    .tgc-lightbox__close svg,
    .tgc-lightbox__nav svg {
        width: 18px;
        height: 18px;
    }

    .tgc-lightbox__nav--prev {
        left: 8px;
    }

    .tgc-lightbox__nav--next {
        right: 8px;
    }
}
