/**
 * Performance Optimizations for Grid and List Views
 * 
 * Additional CSS optimizations to maximize loading speed:
 * - GPU acceleration hints for hover effects
 * - Content-visibility for off-screen cards
 * - Contain property for layout optimization
 * 
 * @package ExpiredAuctions
 * @since   1.0.0
 */

/* ═══════════════════════════════════════════════════════════════════════════
   GRID VIEW PERFORMANCE OPTIMIZATIONS
   ═══════════════════════════════════════════════════════════════════════════ */

/* Optimized: Use contain property to isolate card layout calculations */
.ea-domain-card {
    contain: layout style paint;
}

/* Optimized: GPU acceleration for hover transform (only effect preserved) */
.ea-domain-card:hover {
    will-change: transform;
}

/* Optimized: Remove will-change after hover completes to free GPU resources */
.ea-domain-card:not(:hover) {
    will-change: auto;
}

/* Optimized: Use content-visibility for off-screen cards (experimental but safe fallback) */
@supports (content-visibility: auto) {
    .ea-domain-card {
        content-visibility: auto;
        contain-intrinsic-size: 0 400px; /* Estimated card height */
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   LIST VIEW PERFORMANCE OPTIMIZATIONS
   ═══════════════════════════════════════════════════════════════════════════ */

/* Optimized: Contain table rows for better paint performance */
.ea-list-view table tbody tr {
    contain: layout style paint;
}

/* Optimized: Reduce repaints on hover by limiting affected properties */
.ea-list-view table tbody tr:hover {
    contain: layout style;
}

/* ═══════════════════════════════════════════════════════════════════════════
   GENERAL PERFORMANCE HINTS
   ═══════════════════════════════════════════════════════════════════════════ */

/* Optimized: Hint browser to optimize for speed over quality on images */
.ea-domain-card img,
.ea-list-view img {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

/* Optimized: Prevent layout shifts from lazy-loaded images */
.ea-domain-card img {
    aspect-ratio: attr(width) / attr(height);
}

/* Optimized: Use font-display swap for faster text rendering */
@font-face {
    font-display: swap;
}
