/**
 * Seamless Carousel Widget Styles
 * All cursor issues fixed - no dragging, only hover effects
 */

/* Container */
.scw-container {
    width: 100%;
    overflow: hidden;
    position: relative;
}

/* Track Wrapper - handles the fade mask */
.scw-track-wrapper {
    overflow: hidden;
    width: 100%;
    position: relative;
}

/* Track - the moving element */
.scw-track {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    will-change: transform;
    /* Explicitly no user interaction for dragging */
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    /* Prevent any touch/drag behavior */
    touch-action: none;
    -webkit-touch-callout: none;
}

/* Individual slides */
.scw-slide {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1;
    /* Remove any default cursor styling */
    cursor: default;
    /* Ensure consistent behavior */
    user-select: none;
    -webkit-user-select: none;
}

/* Links inside slides - only these should be pointer */
.scw-slide a {
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    text-decoration: none;
    /* Ensure clickability */
    pointer-events: auto;
}

/* Images */
.scw-slide img {
    display: block;
    max-width: 100%;
    height: auto;
    /* Prevent image dragging */
    -webkit-user-drag: none;
    -khtml-user-drag: none;
    -moz-user-drag: none;
    -o-user-drag: none;
    user-drag: none;
    /* Don't inherit pointer from parent if no link */
    pointer-events: none;
    /* Ensure smooth rendering */
    image-rendering: -webkit-optimize-contrast;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

/* When inside a link, image should allow clicks to pass through to the link */
.scw-slide a img {
    pointer-events: none;
}

/* Hover state for slides with links */
.scw-slide a:hover {
    cursor: pointer;
}

/* Slides without links should have default cursor */
.scw-slide:not(:has(a)) {
    cursor: default;
}

/* Fallback for browsers not supporting :has() */
.scw-slide--no-link {
    cursor: default;
}

/* Hover effects - using z-index to bring hovered slide to front */
.scw-slide:hover {
    z-index: 10;
}

/* Empty state in editor */
.scw-empty-state {
    padding: 40px 20px;
    text-align: center;
    background: rgba(0, 0, 0, 0.05);
    border: 2px dashed rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    color: #666;
}

.scw-empty-state p {
    margin: 0;
    font-size: 14px;
}

/* Disable all Swiper-related styles if any conflict */
.scw-container .swiper-wrapper,
.scw-container .swiper {
    display: none !important;
}

/* Performance optimizations */
@media (prefers-reduced-motion: reduce) {
    .scw-track {
        animation: none !important;
    }
    .scw-slide {
        transition: none !important;
    }
}

/* Mobile optimizations */
@media (max-width: 768px) {
    .scw-track {
        /* Ensure smooth scrolling on mobile */
        -webkit-overflow-scrolling: touch;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .scw-slide img {
        filter: none !important;
    }
}
