/**
 * Performance CSS - Reduces Forced Reflows
 * Bu CSS dosyası DOM manipülasyonlarını optimize eder
 */

/* Optimize CSS transitions to use GPU acceleration - selective approach */
/* Only apply to elements that need animation optimization */
.performance-optimized {
    /* Enable hardware acceleration for better performance */
    transform: translateZ(0);
    backface-visibility: hidden;
}

/* Optimize animations to use transform instead of position changes */
.optimized-animation {
    will-change: transform, opacity;
    transform: translateZ(0);
}

/* Reduce repaints for smooth scrolling */
body {
    /* Enable smooth scrolling with better performance */
    scroll-behavior: smooth;
}

/* Optimize hover effects */
.optimized-hover {
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.optimized-hover:hover {
    transform: translateY(-2px);
    opacity: 0.9;
}

/* Optimize layout calculations */
.optimized-layout {
    /* Use contain for better performance */
    contain: layout style paint;
}

/* Optimize images and media */
img, video {
    /* Prevent layout shifts */
    height: auto;
    max-width: 100%;
}

/* Optimize text rendering */
body, input, textarea, select {
    /* Improve text rendering performance */
    text-rendering: optimizeSpeed;
    font-smooth: always;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Optimize focus styles */
input:focus, textarea:focus, select:focus {
    /* Reduce reflows on focus */
    outline: 2px solid #007bff;
    outline-offset: 2px;
}

/* Optimize loader animations */
.loader {
    /* Use transform for better performance */
    transform: translateZ(0);
    will-change: transform;
}

.lds-hourglass {
    /* Optimize spinner animation */
    animation: hourglass 1.2s infinite;
    transform: translateZ(0);
}

@keyframes hourglass {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
