/* Lightbox styles for screenshot display */

.screenshot-thumbnail {
    width: 200px;
    height: 140px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid #dee2e6;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.screenshot-thumbnail:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.screenshot-placeholder {
    width: 200px;
    height: 140px;
    background: #f8f9fa;
    border: 1px dashed #dee2e6;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6c757d;
    font-size: 12px;
    text-align: center;
    line-height: 1.2;
}

/* Lightbox overlay */
.screenshot-lightbox {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    cursor: pointer;
}

.screenshot-lightbox.active {
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.screenshot-lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    margin: auto;
    cursor: default;
}

.screenshot-lightbox-image {
    max-width: 100%;
    max-height: 100%;
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    object-fit: contain;
}

.screenshot-lightbox-close {
    position: absolute;
    top: -40px;
    right: 0;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    color: #333;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease;
}

.screenshot-lightbox-close:hover {
    background: rgba(255, 255, 255, 1);
}

.screenshot-lightbox-info {
    position: absolute;
    bottom: -40px;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 12px;
    text-align: center;
    word-break: break-all;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .screenshot-thumbnail {
        width: 160px;
        height: 112px;
    }
    
    .screenshot-placeholder {
        width: 160px;
        height: 112px;
        font-size: 11px;
    }
    
    .screenshot-lightbox-content {
        max-width: 95%;
        max-height: 95%;
    }
    
    .screenshot-lightbox-close {
        top: -35px;
        width: 28px;
        height: 28px;
        font-size: 14px;
    }
    
    .screenshot-lightbox-info {
        font-size: 11px;
        padding: 6px 10px;
    }
}

/* Loading state */
.screenshot-loading {
    position: relative;
    opacity: 0.7;
}

.screenshot-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Screenshot container in list items */
.item-screenshot {
    margin-bottom: 12px;
    flex-shrink: 0;
}

.item-content-with-screenshot {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.item-main-content {
    flex: 1;
    min-width: 0; /* Allow content to shrink */
}

@media (max-width: 576px) {
    .item-content-with-screenshot {
        flex-direction: column;
        gap: 12px;
    }
    
    .item-screenshot {
        align-self: center;
    }
}
