/* 
 * Silver Feather Media - Global Image Viewer/Lightbox
 * Click on any image to view it full-screen with information
 */

/* Lightbox Overlay */
.sfm-lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.92);
    z-index: 2147483646;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.sfm-lightbox-overlay.active {
    display: flex;
    opacity: 1;
}

/* Lightbox Content Container */
.sfm-lightbox-content {
    position: relative;
    max-width: 95vw;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    animation: sfmLightboxIn 0.3s ease;
}

@keyframes sfmLightboxIn {
    from {
        transform: scale(0.9);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* Lightbox Image - reduced height so info panel is visible */
.sfm-lightbox-image {
    width: auto;
    height: auto;
    max-width: 95vw;
    max-height: 64vh;
    border-radius: 12px;
    object-fit: scale-down;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    border: 2px solid rgba(255, 255, 255, 0.1);
    display: block;
}

/* Lightbox Info Panel */
.sfm-lightbox-info {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    padding: 16px 24px;
    margin-top: 14px;
    max-width: 600px;
    width: 100%;
    text-align: center;
    flex-shrink: 0;
}

.sfm-lightbox-title {
    font-size: 18px;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 4px;
    line-height: 1.3;
}

.sfm-lightbox-description {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.5;
    margin-bottom: 6px;
}

.sfm-lightbox-category {
    display: inline-block;
    padding: 3px 10px;
    background: rgba(184, 134, 11, 0.3);
    border: 1px solid rgba(184, 134, 11, 0.4);
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #ffd700;
}

.sfm-lightbox-meta {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
    margin-top: 4px;
}

/* Close Button */
.sfm-lightbox-close {
    position: fixed;
    top: 20px;
    right: 24px;
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    color: #ffffff;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 2147483647;
    transition: all 0.2s ease;
}

.sfm-lightbox-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

/* Navigation Arrows */
.sfm-lightbox-nav {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    color: #ffffff;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 2147483647;
    transition: all 0.2s ease;
    opacity: 0.7;
}

.sfm-lightbox-nav:hover {
    background: rgba(255, 255, 255, 0.2);
    opacity: 1;
    transform: translateY(-50%) scale(1.1);
}

.sfm-lightbox-nav.prev {
    left: 20px;
}

.sfm-lightbox-nav.next {
    right: 20px;
}

/* Counter */
.sfm-lightbox-counter {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.5);
    font-size: 13px;
    font-weight: 500;
    z-index: 2147483647;
    background: rgba(0, 0, 0, 0.5);
    padding: 6px 16px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Mobile Responsive */
@media (max-width: 767px) {
    .sfm-lightbox-content {
        max-width: 95vw;
    }

    .sfm-lightbox-image {
        max-width: 95vw;
        max-height: 65vh;
        border-radius: 8px;
    }

    .sfm-lightbox-info {
        padding: 12px 16px;
        margin-top: 10px;
        max-width: 95vw;
    }

    .sfm-lightbox-title {
        font-size: 15px;
    }

    .sfm-lightbox-description {
        font-size: 12px;
    }

    .sfm-lightbox-close {
        top: 12px;
        right: 14px;
        width: 38px;
        height: 38px;
        font-size: 16px;
    }

    .sfm-lightbox-nav {
        width: 36px;
        height: 36px;
        font-size: 14px;
    }

    .sfm-lightbox-nav.prev {
        left: 10px;
    }

    .sfm-lightbox-nav.next {
        right: 10px;
    }

    .sfm-lightbox-counter {
        font-size: 11px;
        padding: 4px 12px;
        bottom: 16px;
    }
}

/* Short viewports */
@media (max-height: 700px) {
    .sfm-lightbox-image {
        max-height: 65vh;
    }

    .sfm-lightbox-info {
        padding: 10px 14px;
        margin-top: 8px;
    }

    .sfm-lightbox-title {
        font-size: 14px;
    }

    .sfm-lightbox-description {
        font-size: 12px;
        margin-bottom: 4px;
    }
}

/* Very short viewports (e.g., landscape mobile) */
@media (max-height: 500px) {
    .sfm-lightbox-image {
        max-height: 50vh;
    }

    .sfm-lightbox-info {
        padding: 8px 12px;
        margin-top: 6px;
    }

    .sfm-lightbox-title {
        font-size: 12px;
        margin-bottom: 2px;
    }

    .sfm-lightbox-description {
        font-size: 11px;
        margin-bottom: 2px;
    }

    .sfm-lightbox-meta {
        font-size: 10px;
        margin-top: 2px;
    }

    .sfm-lightbox-close {
        top: 6px;
        right: 8px;
        width: 30px;
        height: 30px;
        font-size: 13px;
    }

    .sfm-lightbox-nav {
        width: 30px;
        height: 30px;
        font-size: 12px;
    }

    .sfm-lightbox-counter {
        font-size: 10px;
        padding: 3px 10px;
        bottom: 8px;
    }
}