/* PODtomatic Blog Image Lightbox System */
/* Reusable image modal/popup functionality for all blog posts */

/* Make images clickable with pointer cursor */
.clickable-image {
    cursor: pointer !important;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.clickable-image:hover {
    opacity: 0.9;
    transform: scale(1.02);
}

/* Lightbox Modal Overlay */
.lightbox-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 9999;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.3s ease;
    justify-content: center;
    align-items: center;
}

.lightbox-overlay.show {
    display: flex !important;
    opacity: 1;
}

/* Lightbox Content Container */
.lightbox-content {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
    padding: 20px;
    box-sizing: border-box;
    cursor: default;
}

/* Lightbox Image */
.lightbox-image {
    max-width: 90%;
    max-height: 90%;
    width: auto;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    cursor: default;
    transition: transform 0.3s ease;
}

/* Close Button */
.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: #ffffff;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    z-index: 10000;
    transition: color 0.2s ease;
    user-select: none;
    line-height: 1;
}

.lightbox-close:hover {
    color: #1DAA9A;
}

/* Loading Spinner */
.lightbox-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #ffffff;
    font-size: 18px;
    z-index: 10001;
}

.lightbox-spinner {
    display: inline-block;
    width: 30px;
    height: 30px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #1DAA9A;
    animation: spin 1s linear infinite;
    margin-right: 10px;
}

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

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .lightbox-content {
        padding: 10px;
    }
    
    .lightbox-image {
        max-width: 95%;
        max-height: 85%;
    }
    
    .lightbox-close {
        top: 10px;
        right: 15px;
        font-size: 30px;
    }
}

/* Accessibility */
.lightbox-overlay:focus {
    outline: 2px solid #1DAA9A;
    outline-offset: -2px;
}

.lightbox-close:focus {
    outline: 2px solid #1DAA9A;
    outline-offset: 2px;
    border-radius: 4px;
}

/* Animation for image entrance */
.lightbox-image.fade-in {
    animation: fadeInScale 0.3s ease-out;
}

@keyframes fadeInScale {
    0% {
        opacity: 0;
        transform: scale(0.8);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* Hide scrollbar when lightbox is open */
body.lightbox-open {
    overflow: hidden;
}