/**
 * Lightbox v2.2
 */

.rp-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.rp-lightbox.active {
    opacity: 1;
    visibility: visible;
}

.rp-lightbox-container {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.rp-lightbox-image {
    max-width: 100%;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.5);
}

.rp-lightbox-close {
    position: fixed;
    top: 25px;
    right: 25px;
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.15);
    border: none;
    border-radius: 50%;
    color: #fff;
    font-size: 28px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.rp-lightbox-close:hover {
    background: rgba(255, 255, 255, 0.25);
}

.rp-lightbox-prev,
.rp-lightbox-next {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    width: 55px;
    height: 55px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50%;
    color: #fff;
    font-size: 22px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.rp-lightbox-prev {
    left: 25px;
}

.rp-lightbox-next {
    right: 25px;
}

.rp-lightbox-prev:hover,
.rp-lightbox-next:hover {
    background: var(--rp-primary, #C9A227);
}

.rp-lightbox-caption {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    max-width: 600px;
    padding: 12px 25px;
    background: rgba(0, 0, 0, 0.7);
    border-radius: 8px;
    color: #fff;
    font-size: 14px;
    text-align: center;
}

.rp-lightbox-caption:empty {
    display: none;
}

.rp-lightbox-counter {
    position: fixed;
    top: 30px;
    left: 30px;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    background: rgba(0, 0, 0, 0.5);
    padding: 8px 16px;
    border-radius: 20px;
}

.rp-lightbox-loader {
    position: absolute;
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.2);
    border-top-color: var(--rp-primary, #C9A227);
    border-radius: 50%;
    animation: lbSpin 0.8s linear infinite;
}

@keyframes lbSpin {
    to {
        transform: rotate(360deg);
    }
}

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

.rp-lightbox-thumbs {
    position: fixed;
    bottom: 90px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    padding: 10px;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 10px;
    max-width: 90vw;
    overflow-x: auto;
}

.rp-lightbox-thumb {
    width: 60px;
    height: 45px;
    border-radius: 5px;
    overflow: hidden;
    cursor: pointer;
    opacity: 0.5;
    flex-shrink: 0;
    border: 2px solid transparent;
}

.rp-lightbox-thumb:hover,
.rp-lightbox-thumb.active {
    opacity: 1;
    border-color: var(--rp-primary, #C9A227);
}

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

@media (max-width: 768px) {

    .rp-lightbox-prev,
    .rp-lightbox-next {
        width: 45px;
        height: 45px;
        font-size: 18px;
    }

    .rp-lightbox-prev {
        left: 10px;
    }

    .rp-lightbox-next {
        right: 10px;
    }

    .rp-lightbox-close {
        top: 15px;
        right: 15px;
        width: 40px;
        height: 40px;
        font-size: 22px;
    }

    .rp-lightbox-counter {
        top: 15px;
        left: 15px;
        font-size: 12px;
    }

    .rp-lightbox-caption {
        bottom: 20px;
        font-size: 13px;
        max-width: 90%;
    }

    .rp-lightbox-thumbs {
        bottom: 70px;
    }

    .rp-lightbox-thumb {
        width: 50px;
        height: 38px;
    }
}