/**
 * Promotional Ads Slider Styles with Swipe Support
 */

.wma-ads-slider {
    margin: 20px 0;
    border-radius: 12px;
    overflow: hidden;
    background: var(--wma-bg-secondary, #f8f9fa);
}

.wma-ads-container {
    position: relative;
    width: 100%;
    overflow: hidden;
    border-radius: 12px;
    touch-action: pan-y; /* Allow vertical scroll but enable horizontal swipe */
}

.wma-ads-track {
    display: flex;
    transition: transform 0.5s ease-in-out;
    will-change: transform; /* Optimize for animations */
}

.wma-ad-slide {
    min-width: 100%;
    position: relative;
    cursor: pointer;
    user-select: none; /* Prevent text selection during swipe */
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.wma-ad-slide img {
    width: 100%;
    height: auto;
    max-height: 800px;
    object-fit: contain;
    display: block;
    background: var(--wma-bg-primary, #ffffff);
    pointer-events: none; /* Prevent image drag */
    user-select: none;
    -webkit-user-drag: none;
}

.wma-ad-title {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.7), transparent);
    color: white;
    padding: 15px;
    font-size: 16px;
    font-weight: 600;
    pointer-events: none; /* Allow swipe through title */
}

.wma-ads-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    padding: 12px 0;
}

.wma-ad-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ccc;
    cursor: pointer;
    transition: all 0.3s ease;
}

.wma-ad-dot:hover {
    background: #999;
    transform: scale(1.2);
}

.wma-ad-dot.active {
    background: var(--wma-primary, #0a4d3c);
    width: 24px;
    border-radius: 4px;
}

/* Swipe indicator (optional visual feedback) */
.wma-ads-container::before,
.wma-ads-container::after {
    content: '';
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
    z-index: 10;
}

.wma-ads-container:hover::before,
.wma-ads-container:hover::after {
    opacity: 0.5;
}

.wma-ads-container::before {
    left: 10px;
    content: '‹';
    font-size: 24px;
    line-height: 40px;
    text-align: center;
}

.wma-ads-container::after {
    right: 10px;
    content: '›';
    font-size: 24px;
    line-height: 40px;
    text-align: center;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .wma-ad-slide img {
        max-height: 600px;
    }
    
    .wma-ad-title {
        font-size: 14px;
        padding: 10px;
    }
    
    /* Hide swipe indicators on mobile */
    .wma-ads-container::before,
    .wma-ads-container::after {
        display: none;
    }
}

@media (min-width: 769px) {
    .wma-ads-container {
        max-width: 540px;
        margin: 0 auto;
    }
}

/* Smooth transitions */
@media (prefers-reduced-motion: reduce) {
    .wma-ads-track {
        transition: none;
    }
}
