/* Screenshot thumbnail styles */

.screenshot-thumb {
    border-radius: 4px;
    border: 1px solid #e0e0e0;
    object-fit: cover;
    transition: all 0.2s ease;
    cursor: pointer;
}

.screenshot-thumb:hover {
    border-color: #007bff;
    box-shadow: 0 2px 4px rgba(0,123,255,0.1);
    transform: translateY(-1px);
}

.screenshot-thumb[data-placeholder="true"] {
    opacity: 0.7;
    border-color: #ffc107;
}

/* Size-specific styles */
.screenshot-thumb[data-size="micro"] {
    width: 40px;
    height: 28px;
    border-radius: 2px;
}

.screenshot-thumb[data-size="small"] {
    width: 80px;
    height: 56px;
    border-radius: 3px;
}

.screenshot-thumb[data-size="normal"] {
    width: 200px;
    height: 140px;
    border-radius: 4px;
}

/* Placeholder styles */
.screenshot-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f8f9fa;
    border: 1px dashed #dee2e6;
    border-radius: 4px;
    color: #6c757d;
    font-size: 11px;
    text-align: center;
}

.screenshot-placeholder[data-size="micro"] {
    width: 40px;
    height: 28px;
    font-size: 8px;
}

.screenshot-placeholder[data-size="small"] {
    width: 80px;
    height: 56px;
    font-size: 10px;
}

.screenshot-placeholder[data-size="normal"] {
    width: 200px;
    height: 140px;
    font-size: 12px;
}

.screenshot-placeholder-text {
    display: block;
    word-break: break-word;
    line-height: 1.2;
}

/* Compact list view styles */
.list-view-compact .screenshot-thumb {
    margin-right: 8px;
    flex-shrink: 0;
}

.list-view-compact .item-row {
    display: flex;
    align-items: center;
    padding: 4px 0;
    border-bottom: 1px solid #f0f0f0;
}

.list-view-compact .item-content {
    flex: 1;
    min-width: 0; /* Allows text truncation */
}

.list-view-compact .item-title {
    font-size: 14px;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.list-view-compact .item-url {
    font-size: 12px;
    color: #6c757d;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin: 0;
}

/* Grid view styles */
.list-view-grid .screenshot-thumb {
    width: 100%;
    height: auto;
    aspect-ratio: 200/140;
    margin-bottom: 8px;
}

/* Loading state */
.screenshot-thumb.loading {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Responsive adjustments */
@media (max-width: 576px) {
    .screenshot-thumb[data-size="normal"] {
        width: 160px;
        height: 112px;
    }
    
    .list-view-compact .screenshot-thumb[data-size="small"] {
        width: 60px;
        height: 42px;
    }
    
    .list-view-compact .screenshot-thumb[data-size="micro"] {
        width: 32px;
        height: 22px;
    }
}
