/**
 * Text Carousel Widget Styles
 * Place at: /wp-content/themes/YOUR-THEME/assets/css/text-carousel.css
 */

.text-carousel-wrapper {
    position: relative;
    width: 100%;
    margin: 0 auto;
    font-family: inherit;
}

/* Slides Container */
.text-carousel-slides {
    position: relative;
    width: 100%;
    overflow: hidden;
    border-radius: 4px;
    box-sizing: border-box;
}

/* Individual Slide */
.text-carousel-slide {
    position: absolute;
    width: 100%;
    height: 100%;
    box-sizing: border-box;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    display: flex;
    align-items: center;
    justify-content: center;
    top: 0;
    left: 0;
}

.text-carousel-slide.active {
    opacity: 1;
    position: relative;
}

.text-carousel-slide p {
    margin: 0;
    font-size: 14px;
    line-height: 1.6;
    color: rgb(255, 255, 255);
    text-align: center;
    word-wrap: break-word;
    hyphens: auto;
}

/* Arrow Buttons */
.text-carousel-arrows {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 10px;
    box-sizing: border-box;
    pointer-events: none;
    z-index: 10;
}

.carousel-arrow {
    pointer-events: all;
    /* background: rgba(0, 0, 0, 0.5); */
    color: white;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

/* .carousel-arrow:hover {
    background: rgba(0, 0, 0, 0.8);
    transform: scale(1.1);
}

.carousel-arrow:active {
    transform: scale(0.95);
}

.carousel-arrow:focus {
    outline: 2px solid #0073aa;
    outline-offset: 2px;
} */

/* Arrow Position Variants */

/* Right side only (default) */
.text-carousel-wrapper[data-arrow-position="right"] .text-carousel-arrows {
    justify-content: flex-end;
}

.text-carousel-wrapper[data-arrow-position="right"] .carousel-prev {
    display: none;
}

/* Left side only */
.text-carousel-wrapper[data-arrow-position="left"] .text-carousel-arrows {
    justify-content: flex-start;
}

.text-carousel-wrapper[data-arrow-position="left"] .carousel-next {
    display: none;
}

/* Both sides */
.text-carousel-wrapper[data-arrow-position="both"] .text-carousel-arrows {
    justify-content: space-between;
}

/* Bottom center */
.text-carousel-wrapper[data-arrow-position="bottom"] .text-carousel-arrows {
    position: static;
    transform: none;
    justify-content: center;
    gap: 15px;
    margin-top: 15px;
    padding: 0;
}

.text-carousel-wrapper[data-arrow-position="bottom"] .carousel-arrow {
    width: 40px;
    height: 40px;
    font-size: 20px;
}

/* Slide Indicators (dots) */
.text-carousel-indicators {
    display: none !important;
    /* display: flex; */
    justify-content: center;
    gap: 8px;
    margin-top: 12px;
    padding: 0 10px;
}

.carousel-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ccc;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
}

.carousel-indicator:hover {
    background: #999;
}

.carousel-indicator.active {
    background: #333;
    width: 24px;
    border-radius: 4px;
}

.carousel-indicator:focus {
    outline: 2px solid #0073aa;
    outline-offset: 2px;
}

/* Responsive Design */

/* Tablets */
@media (max-width: 768px) {
    .text-carousel-slide {
        padding: 5px;
    }

    .text-carousel-slide p {
        font-size: 13px;
    }

    .carousel-arrow {
        width: 32px;
        height: 32px;
        font-size: 16px;
    }

    .text-carousel-wrapper[data-arrow-position="bottom"] .carousel-arrow {
        width: 36px;
        height: 36px;
        font-size: 18px;
    }
}

/* Mobile */
@media (max-width: 480px) {
    .text-carousel-slide {
        padding: 5px;
    }

    .text-carousel-slide p {
        max-width: 80%;
        font-size: 12px;
        line-height: 1.5;
    }

    .carousel-arrow {
        width: 28px;
        height: 28px;
        font-size: 14px;
    }

    .text-carousel-arrows {
        padding: 0 5px;
    }

    .text-carousel-wrapper[data-arrow-position="bottom"] .carousel-arrow {
        width: 32px;
        height: 32px;
        font-size: 16px;
    }

    .carousel-indicator {
        width: 6px;
        height: 6px;
    }

    .carousel-indicator.active {
        width: 18px;
    }
}

/* Small phones */
@media (max-width: 320px) {
    .text-carousel-slide p {
        font-size: 11px;
    }

    .carousel-arrow {
        width: 24px;
        height: 24px;
        font-size: 12px;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    .text-carousel-slide {
        transition: none;
    }

    .carousel-arrow,
    .carousel-indicator {
        transition: none;
    }
}