/* Lightbox Styles */
.scdev-sb-v2-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 99999;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.scdev-sb-v2-lightbox.show {
    display: block;
    opacity: 1;
}

.scdev-sb-v2-lightbox-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    cursor: pointer;
}

.scdev-sb-v2-lightbox-content {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 80px;
}

.scdev-sb-v2-lightbox-image-wrap {
    max-width: 100%;
    max-height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.scdev-sb-v2-lightbox-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

/* Close Button */
.scdev-sb-v2-lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.1) !important;
    border: 2px solid rgba(255, 255, 255, 0.3) !important;
    border-radius: 50%;
    color: #fff !important;
    font-size: 36px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    z-index: 10;
}

.scdev-sb-v2-lightbox-close:hover {
    background: rgba(255, 255, 255, 0.2) !important;
    border-color: rgba(255, 255, 255, 0.5) !important;
    transform: rotate(90deg);
}

/* Navigation Buttons */
.scdev-sb-v2-lightbox-prev,
.scdev-sb-v2-lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.1) !important;
    border: 2px solid rgba(255, 255, 255, 0.3) !important;
    border-radius: 50%;
    color: #fff !important;
    font-size: 36px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    z-index: 10;
}

.scdev-sb-v2-lightbox-prev {
    left: 20px;
}

.scdev-sb-v2-lightbox-next {
    right: 20px;
}

.scdev-sb-v2-lightbox-prev:hover,
.scdev-sb-v2-lightbox-next:hover {
    background: rgba(255, 255, 255, 0.2) !important;
    border-color: rgba(255, 255, 255, 0.5) !important;
}

/* Counter */
.scdev-sb-v2-lightbox-counter {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    z-index: 10;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .scdev-sb-v2-lightbox-content {
        padding: 60px 20px;
    }
    
    .scdev-sb-v2-lightbox-close {
        top: 10px;
        right: 10px;
        width: 40px;
        height: 40px;
        font-size: 28px;
    }
    
    .scdev-sb-v2-lightbox-prev,
    .scdev-sb-v2-lightbox-next {
        width: 40px;
        height: 40px;
        font-size: 28px;
    }
    
    .scdev-sb-v2-lightbox-prev {
        left: 10px;
    }
    
    .scdev-sb-v2-lightbox-next {
        right: 10px;
    }
    
    .scdev-sb-v2-lightbox-counter {
        bottom: 10px;
        font-size: 12px;
        padding: 6px 12px;
    }
}

/* ── Content Lightbox (groups, pages, blog posts) ── */
.scdev-sb-v2-clb {
    position: fixed;
    inset: 0;
    z-index: 99998;
    display: none;
    align-items: center;
    justify-content: center;
}

.scdev-sb-v2-clb.show {
    display: flex;
}

.scdev-sb-v2-clb-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.7);
    cursor: pointer;
}

.scdev-sb-v2-clb-dialog {
    position: relative;
    background: #fff;
    border-radius: 14px;
    width: 92%;
    max-width: 640px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0,0,0,0.35);
    overflow: hidden;
}

body.night-mode .scdev-sb-v2-clb-dialog {
    background: #1e1e1e;
    color: #e0e0e0;
}

.scdev-sb-v2-clb-close {
    position: absolute;
    top: 12px;
    right: 14px;
    z-index: 10;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: none !important;
    background: rgba(0,0,0,0.15) !important;
    color: #fff !important;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.scdev-sb-v2-clb-close:hover {
    background: rgba(0,0,0,0.35) !important;
}

.scdev-sb-v2-clb-body {
    overflow-y: auto;
    flex: 1;
}

.scdev-sb-v2-clb-loading {
    padding: 40px;
    text-align: center;
    color: #999;
    font-size: 15px;
}

/* Entity (group/page) lightbox content */
.scdev-sb-ilb-banner {
    width: 100%;
    height: 160px;
    background-size: cover;
    background-position: center;
    background-color: #667eea;
}

.scdev-sb-ilb-body {
    padding: 20px;
}

.scdev-sb-ilb-title {
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 6px;
    color: inherit;
}

.scdev-sb-ilb-meta {
    display: flex;
    gap: 14px;
    font-size: 13px;
    color: #888;
    margin-bottom: 10px;
}

.scdev-sb-ilb-desc {
    font-size: 14px;
    color: #666;
    margin: 0 0 16px;
    line-height: 1.5;
}

body.night-mode .scdev-sb-ilb-desc {
    color: #aaa;
}

.scdev-sb-ilb-posts-label {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .5px;
    color: #999;
    margin: 0 0 10px;
}

.scdev-sb-ilb-posts {
    border-top: 1px solid #eee;
    padding-top: 14px;
    margin-bottom: 16px;
}

body.night-mode .scdev-sb-ilb-posts {
    border-top-color: #333;
}

.scdev-sb-ilb-post-item {
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
}

body.night-mode .scdev-sb-ilb-post-item {
    border-bottom-color: #2a2a2a;
}

.scdev-sb-ilb-post-item:last-child {
    border-bottom: none;
}

.scdev-sb-ilb-post-author {
    font-size: 12px;
    font-weight: 600;
    color: #888;
    margin-bottom: 4px;
}

.scdev-sb-ilb-post-img {
    width: 100%;
    max-height: 180px;
    object-fit: cover;
    border-radius: 6px;
    margin-bottom: 6px;
}

.scdev-sb-ilb-post-text {
    font-size: 14px;
    line-height: 1.4;
    color: inherit;
}

.scdev-sb-ilb-open-link {
    display: inline-block;
    margin-top: 4px;
    padding: 9px 18px;
    background: #667eea;
    color: #fff !important;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none !important;
}

.scdev-sb-ilb-open-link:hover {
    background: #5a6fd6;
}

/* Blog post lightbox content */
.scdev-sb-ilb-blog .scdev-sb-ilb-content {
    font-size: 15px;
    line-height: 1.7;
    color: inherit;
    margin-bottom: 16px;
}

.scdev-sb-ilb-blog .scdev-sb-ilb-content img {
    max-width: 100%;
    border-radius: 6px;
}
