/**
 * Testimonials Slider Styles
 * Built with Swiper.js for vanilla JavaScript functionality
 */

.uagb-container-inner-blocks-wrap:has(.sel-testimonials-slider) {
	overflow: hidden;
}

 .sel-testimonials-slider {
    overflow: hidden;
 }

 .sel-testimonials-slider .wp-block-uagb-container {
    flex-flow: column;
    gap: 10px;
    flex: 1;
 }

 .sel-testimonials-slider .swiper-wrapper {
    height: auto;
 }

 .sel-testimonials-slider .uagb-container-inner-blocks-wrap {
    display: flex;
    gap: 32px;
    padding: 0 80px;
 }

/* Navigation arrows */
.sel-testimonials-button-prev,
.sel-testimonials-button-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    background: #ffffff;
    border: 2px solid #e0e0e0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
    font-size: 16px;
    color: #666666;
}

.sel-testimonials-button-prev:hover,
.sel-testimonials-button-next:hover {
    background: #333333;
    border-color: #333333;
    color: #ffffff;
    transform: translateY(-50%) scale(1.1);
}

.sel-testimonials-button-prev {
    left: 10px;
}

.sel-testimonials-button-next {
    right: 10px;
}

.sel-testimonials-button-prev::after {
    content: '←';
}

.sel-testimonials-button-next::after {
    content: '→';
}

.sel-testimonials-button-prev.swiper-button-disabled,
.sel-testimonials-button-next.swiper-button-disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.sel-testimonials-button-prev.swiper-button-disabled:hover,
.sel-testimonials-button-next.swiper-button-disabled:hover {
    background: #ffffff;
    border-color: #e0e0e0;
    color: #666666;
    transform: translateY(-50%) scale(1);
}

/* Pagination dots */
.sel-testimonials-pagination {
    position: relative;
    top: unset;
    bottom: unset;
    left: unset;
    transform: unset;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px 0 42px;
    gap: 8px;
}

.sel-testimonials-bullet {
    width: 12px;
    height: 12px;
    background: #FF5721;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    padding: 0;
    opacity: 0.25;
}

.sel-testimonials-bullet:hover {
    transform: scale(1.1);
}

.sel-testimonials-bullet-active {
    background: #FF5721;
    transform: scale(1.1);
    opacity: 1;
}

/* Loading state */
.sel-testimonials-slider.loading {
    opacity: 0.7;
    pointer-events: none;
}

.sel-testimonials-slider.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    margin: -20px 0 0 -20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #333333;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    z-index: 100;
}

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

/* Error state */
.sel-testimonials-slider .sel-testimonials-error {
    text-align: center;
    padding: 40px;
    color: #666666;
    font-style: italic;
}

/* Empty state */
.sel-testimonials-slider .sel-testimonials-empty {
    text-align: center;
    padding: 40px;
    color: #999999;
    font-style: italic;
}

/* Navigation controls container for mobile */
.sel-testimonials-controls {
    display: none;
}

@media (max-width: 998px) {
    .sel-testimonials-slider .uagb-container-inner-blocks-wrap {
        flex-flow: column;
    }

    .sel-testimonials-pagination {
        padding: 42px 0;
    }
}

@media (max-width: 600px) {
    .sel-testimonials-slider .uagb-container-inner-blocks-wrap {
        padding: 0px;
    }
    
    /* Hide absolute positioned buttons on mobile */
    .sel-testimonials-button-prev,
    .sel-testimonials-button-next {
        display: none;
    }
    
    /* Show mobile navigation controls */
    .sel-testimonials-controls {
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 20px;
        padding-top: 20px;
    }
    
    /* Mobile navigation buttons */
    .sel-testimonials-controls .sel-testimonials-button-prev,
    .sel-testimonials-controls .sel-testimonials-button-next {
        display: flex;
        position: static;
        transform: none;
        width: 36px;
        height: 36px;
        font-size: 14px;
    }
    
    .sel-testimonials-controls .sel-testimonials-button-prev:hover,
    .sel-testimonials-controls .sel-testimonials-button-next:hover {
        transform: scale(1.1);
    }
    
    .sel-testimonials-controls .sel-testimonials-button-prev.swiper-button-disabled:hover,
    .sel-testimonials-controls .sel-testimonials-button-next.swiper-button-disabled:hover {
        transform: none;
    }
}