/**
 * Client Logo Scroller Widget Styles
 * File: logo-scroller-widget.css
 */

/* Container Styles */
.logo-scroller-wrapper {
    width: 100%;
    overflow: hidden;
    position: relative;
    box-sizing: border-box;
}

.logo-scroller-container {
    display: flex;
    align-items: center;
    width: 100%;
    min-height: 120px;
    overflow: hidden;
    position: relative;
    background-color: #ffffff;
    box-sizing: border-box;
}

/* Scroller Track */
.logo-scroller-track {
    display: flex;
    align-items: center;
    white-space: nowrap;
    will-change: transform;
    animation-timing-function: linear;
    animation-iteration-count: infinite;
    min-width: 100%;
}

/* Animation for Left to Right scroll */
.logo-scroller-wrapper[data-direction="left"] .logo-scroller-track {
    animation-name: scrollLeft;
}

/* Animation for Right to Left scroll */
.logo-scroller-wrapper[data-direction="right"] .logo-scroller-track {
    animation-name: scrollRight;
}

/* Pause animation on hover */
.logo-scroller-wrapper.pause-on-hover:hover .logo-scroller-track {
    animation-play-state: paused;
}

/* Logo Item Styles */
.logo-item {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-right: 30px;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.logo-item:last-child {
    margin-right: 30px; /* Keep margin for seamless loop */
}

.logo-item a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    outline: none;
}

.logo-item img {
    max-width: 100%;
    height: auto;
    max-height: 120px;
    width: auto;
    object-fit: contain;
    transition: all 0.3s ease;
    display: block;
    opacity: 0.7;
}

.logo-item:hover img {
    opacity: 1;
    transform: scale(1.05);
}

/* Grayscale Effect (when enabled) */
.logo-scroller-wrapper .logo-item img.grayscale {
    filter: grayscale(1);
}

.logo-scroller-wrapper .logo-item:hover img.grayscale {
    filter: grayscale(0);
}

/* Keyframe Animations */
@keyframes scrollLeft {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(0%);
    }
}

@keyframes scrollRight {
    0% {
        transform: translateX(0%);
    }
    100% {
        transform: translateX(-100%);
    }
}

/* No Clients Found Message */
.no-clients-found {
    text-align: center;
    padding: 40px 20px;
    color: #666;
    font-style: italic;
    background: #f9f9f9;
    border: 1px dashed #ddd;
    border-radius: 4px;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .logo-item {
        margin-right: 25px;
    }
    
    .logo-item img {
        max-height: 100px;
    }
}

@media (max-width: 768px) {
    .logo-item {
        margin-right: 20px;
    }
    
    .logo-item img {
        max-height: 80px;
    }
    
    .logo-scroller-container {
        min-height: 80px;
    }
}

@media (max-width: 480px) {
    .logo-item {
        margin-right: 15px;
    }
    
    .logo-item img {
        max-height: 60px;
    }
    
    .logo-scroller-container {
        min-height: 60px;
    }
}

/* Accessibility */
.logo-item a:focus {
    outline: 2px solid #0073aa;
    outline-offset: 2px;
    border-radius: 4px;
}

/* Performance Optimizations */
.logo-scroller-track {
    backface-visibility: hidden;
    perspective: 1000px;
}

.logo-item img {
    backface-visibility: hidden;
}

/* Loading State */
.logo-scroller-wrapper.loading .logo-scroller-track {
    animation-play-state: paused;
}

.logo-scroller-wrapper.loading::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    z-index: 10;
}

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

/* Custom Scrollbar (if needed for debugging) */
.logo-scroller-container::-webkit-scrollbar {
    display: none;
}

.logo-scroller-container {
    -ms-overflow-style: none;
    scrollbar-width: none;
}