/**
 * Bali Slider Styles
 * Based on Figma designs for mobile and desktop
 */

/* Reset and base styles */
.bali-slider-container {
    position: relative;
    width: 100%;
    margin: 0 auto;
    direction: rtl; /* RTL for Arabic/Persian content */
}

.bali-slider-wrapper {
    position: relative;
    width: 100%;
    overflow: hidden;
}

.bali-slider-track {
    position: relative;
    display: flex;
    transition: transform 0.5s ease-in-out;
    will-change: transform;
}

.bali-slider-slide {
    position: relative;
    flex: 0 0 100%;
    width: 100%;
    min-height: 204px;
    overflow: hidden;
    display: none;
    border-radius: 20px;
}

.bali-slider-slide.active {
    display: block;
}

.bali-slider-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    pointer-events: none;
}

.bali-slider-link {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 3;
    text-decoration: none;
}

/* Pagination dots - matches Figma design */
.bali-slider-pagination {
    position: absolute;
    bottom: 50px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
    align-items: center;
    justify-content: center;
    z-index: 10;
    background: rgba(0, 0, 0, 0.18);
    padding: 6px 6px 0 6px;
    border-radius: 48px;
}

.bali-slider-dot {
    background: transparent;
    border: none;
    padding: 0;
    cursor: pointer;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    position: relative;
    display: block;
}

.bali-slider-dot::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    transition: background 0.3s ease;
}

.bali-slider-dot.active::before {
    background: rgba(255, 255, 255, 1);
}

.bali-slider-dot:hover::before {
    background: rgba(255, 255, 255, 0.8);
}

.bali-slider-dot:focus {
    outline: 2px solid rgba(255, 255, 255, 0.5);
    outline-offset: 2px;
}

.bali-slider-dot-inner {
    display: none;
}

/* Mobile styles (default - matches Figma mobile design) */
@media screen and (max-width: 767px) {
    .bali-slider-container {
        max-width: 364px;
        margin: 0 auto;
    }
    
    .bali-slider-slide {
        min-height: 204px;
    }
    
    .bali-slider-pagination {
        bottom: 50px;
    }
}

/* Desktop styles (matches Figma desktop design) */
@media screen and (min-width: 768px) {
    .bali-slider-container {
        max-width: 1128px;
    }
    
    .bali-slider-slide {
        min-height: 240px;
    }
    
    .bali-slider-pagination {
        bottom: 50px;
    }
}

/* Tablet styles */
@media screen and (min-width: 768px) and (max-width: 1023px) {
    .bali-slider-container {
        max-width: 100%;
        padding: 0 20px;
    }
    
    .bali-slider-slide {
        min-height: 220px;
    }
}

/* Large desktop */
@media screen and (min-width: 1024px) {
    .bali-slider-container {
        max-width: 1128px;
    }
}

/* Fade transition effect */
.bali-slider-slide {
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

.bali-slider-slide.active {
    opacity: 1;
}

/* Loading state */
.bali-slider-container.loading {
    min-height: 204px;
    background: #f0f0f0;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.bali-slider-container.loading::after {
    content: '';
    width: 40px;
    height: 40px;
    border: 3px solid #e0e0e0;
    border-top-color: #006b63;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

