/* Nexal Loop Carousel Styles */

.nexal-loop-carousel-wrapper {
    position: relative;
    width: 100%;
    overflow: hidden;
}

.nexal-loop-carousel-wrapper .swiper {
    width: 100%;
    height: 100%;
}

.nexal-loop-carousel-wrapper .swiper-slide {
    display: flex;
    justify-content: center;
    align-items: center;
    background: #fff;
}

/* 占位符样式 */
.nexal-carousel-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 300px;
    background: #f5f5f5;
    color: #999;
    font-size: 16px;
    border-radius: 8px;
}

/* 导航箭头样式 */
.nexal-carousel-button-prev,
.nexal-carousel-button-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.nexal-carousel-button-prev:hover,
.nexal-carousel-button-next:hover {
    background: rgba(255, 255, 255, 1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: translateY(-50%) scale(1.1);
}

.nexal-carousel-button-prev {
    left: 16px;
}

.nexal-carousel-button-next {
    right: 16px;
}

.nexal-carousel-button-prev.swiper-button-disabled,
.nexal-carousel-button-next.swiper-button-disabled {
    opacity: 0.35;
    cursor: not-allowed;
    pointer-events: none;
}

/* 分页器样式 - 线条式导航点 */
.swiper-pagination.swiper-pagination-bullets {
    position: relative;
    margin-top: 20px;
    text-align: center;
    padding: 16px 0;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    background: transparent;
    bottom: 0;
}

.swiper-pagination-horizontal.swiper-pagination-bullets .swiper-pagination-bullet {
    margin: 0;
}

.swiper-pagination-bullet {
    width: 32px;
    height: 2px;
    background: #D1D1D1;
    opacity: 1;
    border-radius: 1px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

.swiper-pagination-bullet:hover {
    background: #B0B0B0;
}

.swiper-pagination-bullet-active {
    width: 64px;
    height: 2px;
    background: #007AFF;
    border-radius: 1px;
}

.swiper-pagination-bullet-active:hover {
    background: #007AFF;
}

/* 分数类型分页器 */
.swiper-pagination-fraction {
    font-size: 14px;
    color: #666;
    font-weight: 500;
}

/* 进度条类型分页器 */
.swiper-pagination-progressbar {
    height: 4px;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 2px;
}

.swiper-pagination-progressbar-fill {
    border-radius: 2px;
}

/* 移动端优化 */
@media (max-width: 768px) {
    .nexal-carousel-button-prev,
    .nexal-carousel-button-next {
        width: 36px;
        height: 36px;
    }
    
    .nexal-carousel-button-prev {
        left: 8px;
    }
    
    .nexal-carousel-button-next {
        right: 8px;
    }
    
    .nexal-carousel-button-prev svg,
    .nexal-carousel-button-next svg {
        width: 20px;
        height: 20px;
    }
}

/* 触摸设备优化 */
@media (hover: none) {
    .nexal-carousel-button-prev:hover,
    .nexal-carousel-button-next:hover {
        transform: translateY(-50%);
    }
}

/* 加载动画 */
.nexal-loop-carousel-wrapper.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* 平滑过渡 */
.nexal-loop-carousel-wrapper .swiper-slide {
    transition: transform 0.3s ease;
}

/* 自定义滚动条（如果需要） */
.nexal-loop-carousel-wrapper::-webkit-scrollbar {
    display: none;
}

/* 确保内容不溢出 */
.nexal-loop-carousel-wrapper .swiper-slide > * {
    max-width: 100%;
    height: auto;
}

/* RTL 支持 */
[dir="rtl"] .nexal-carousel-button-prev {
    left: auto;
    right: 16px;
}

[dir="rtl"] .nexal-carousel-button-next {
    right: auto;
    left: 16px;
}

/* 深色模式支持 */
@media (prefers-color-scheme: dark) {
    .nexal-carousel-placeholder {
        background: #2a2a2a;
        color: #999;
    }
    
    .nexal-carousel-button-prev,
    .nexal-carousel-button-next {
        background: rgba(42, 42, 42, 0.9);
        color: #fff;
    }
    
    .nexal-carousel-button-prev:hover,
    .nexal-carousel-button-next:hover {
        background: rgba(42, 42, 42, 1);
    }
}
