/* Rainbow2000 Classic Lightbox Modal */
#rb-lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.65);
    z-index: 9999999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
    cursor: pointer;
    backdrop-filter: blur(2px);
}

#rb-lightbox-box {
    position: relative;
    display: inline-flex;
    flex-direction: column;
    background: #ffffff;
    padding: 10px 10px 12px 10px;
    border-radius: 6px;
    box-shadow: 0 10px 35px rgba(0, 0, 0, 0.6), 0 2px 8px rgba(0, 0, 0, 0.3);
    max-width: 90vw;
    max-height: 90vh;
    box-sizing: border-box;
    cursor: default;
    animation: rbFadeIn 0.2s ease-out;
}

@keyframes rbFadeIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

#rb-lightbox-img-wrap {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: #eaeaea;
    border-radius: 3px;
}

#rb-lightbox-img {
    max-width: 82vw;
    max-height: 75vh;
    width: auto;
    height: auto;
    display: block;
    object-fit: contain;
    user-select: none;
}

#rb-lightbox-caption-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 8px;
    padding: 0 4px;
    font-family: Arial, Tahoma, sans-serif;
    color: #333333;
    font-size: 13px;
    line-height: 1.4;
}

#rb-lightbox-caption {
    font-weight: bold;
    color: #222222;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 70%;
}

#rb-lightbox-counter {
    color: #777777;
    font-size: 12px;
    font-weight: normal;
    margin-left: 10px;
    white-space: nowrap;
}

/* Close Button - Attached directly to top-right corner */
#rb-lightbox-close {
    position: absolute;
    top: -14px;
    right: -14px;
    width: 32px;
    height: 32px;
    background: #d9381e;
    color: #ffffff;
    border: 2px solid #ffffff;
    border-radius: 50%;
    font-size: 20px;
    font-weight: bold;
    line-height: 26px;
    text-align: center;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
    transition: transform 0.15s, background-color 0.15s;
    z-index: 10;
    padding: 0;
}

#rb-lightbox-close:hover {
    background: #b0240e;
    transform: scale(1.1);
}

/* Navigation Arrows - Hovering directly on the photo container */
.rb-lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 48px;
    background: rgba(0, 0, 0, 0.4);
    color: #ffffff;
    border: none;
    border-radius: 4px;
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s, background-color 0.2s;
    user-select: none;
    z-index: 5;
    padding: 0;
}

.rb-lightbox-nav:hover {
    opacity: 1;
    background: rgba(217, 56, 30, 0.85);
}

#rb-lightbox-prev {
    left: 8px;
}

#rb-lightbox-next {
    right: 8px;
}

@media (max-width: 600px) {
    #rb-lightbox-box {
        padding: 6px 6px 8px 6px;
    }
    #rb-lightbox-close {
        top: -12px;
        right: -12px;
        width: 28px;
        height: 28px;
        font-size: 18px;
        line-height: 22px;
    }
    .rb-lightbox-nav {
        width: 36px;
        height: 40px;
        font-size: 20px;
        opacity: 0.85;
    }
}
