.custom-testimonials-carousel {
    max-width: 800px;
    margin: 40px auto;
}

.splide__slide {
    background: var(--ctc-bg, #fff);
    color: var(--ctc-text, #000);
    padding: 24px;
    border-radius: 5px;

    box-sizing: border-box;
    min-height: 240px;
}

.testimonial-header {
    display: block;
    margin-bottom: 8px;
    position: relative;
}

.testimonial-header > div {
    display: flex;
    align-items: center;
    min-width: 0;
    flex: 1;
}

.testimonial-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.15em;
    font-weight: normal;
    flex-shrink: 0;
}

.testimonial-name {
    font-weight: bold;
    font-size: 14px;
    margin-right: 10px;
    white-space: normal;
    overflow: visible;
    text-overflow: unset;
    line-height: 1.1;
    flex: 1;
    min-width: 0;
}

.provider-icon {
    display: flex !important; 
    align-items: center !important; 
    font-size: 14px !important; 
    color: #666 !important;
    position: absolute !important;
    top: 2px !important;
    right: 0 !important;
    text-decoration: none !important;
    border: none !important;
    background: none !important;
}

.provider-icon a {
    text-decoration: none !important;
    border: none !important;
    background: none !important;
    outline: none !important;
    box-shadow: none !important;
}
.provider-icon img {
    border: none!important; background: none!important;
    box-shadow: none!important; outline: none!important;
    filter: none!important; appearance: none!important;
    width: 26.088px;
    height: 26.088px;
    transform: translateY(-1px);
}

.testimonial-date {
    font-size: 12px;
    color: #888;
    margin: 4px 0 8px;
    width: 100%;
}

.stars {
    color: var(--ctc-star, #f39c12);
    font-size: 18px;
    margin-bottom: 5px;
}

.review-content {
    margin-top: 12px;
    margin-bottom: 0;
    font-size: 1em;
    min-height: 36px;
}

.ctc-faded {
    color: #bbbbbb !important;
    font-style: italic;
}

/* Read more link - completely independent of theme customizations */
.read-more-toggle {
    display: inline-block;
    margin-top: 8px;
    font-size: 14px;
    cursor: pointer;
    text-decoration: none !important;
    background: none !important;
    border: none !important;
    outline: none !important;
    font-weight: 500;
    transition: opacity 0.2s ease;
    box-shadow: none !important;
    text-shadow: none !important;
}

.read-more-toggle:hover {
    opacity: 0.8;
    text-decoration: none !important;
    background: none !important;
    border: none !important;
    box-shadow: none !important;
    text-shadow: none !important;
}

.read-more-toggle:focus {
    outline: none !important;
    box-shadow: none !important;
}

/* Carousel Controls */
.splide__arrows {
    margin-top: 20px;
    display: flex;
    justify-content: space-between;
    max-width: 800px;
    margin: 0 auto;
    padding-top: 20px;
}

.splide__arrow {
    position: static !important;
    transform: none !important;
    margin: 0 8px;
}

/* Responsive tweaks */
@media(max-width: 768px) {
    .splide__slide {
        padding: 15px;
    }
    .testimonial-header {
        position: relative !important;
    }
    .testimonial-name {
        max-width: 120px;
        font-size: 13px;
    }
    .provider-icon {
        font-size: 12px !important;
        align-items: center !important;
        position: absolute !important;
        top: 6px !important;
        right: 0 !important;
        /* Optionally set a min-width or let the image size control it */
        min-width: 35px;
    }
    .provider-icon img {
        width: 25px;
        height: 25px;
        transform: translate(-5px, -1px);
    }
}

/* Yelp provider icon specific styling */
/* (removed global .provider-icon img[src*="yelp"] rule) */

/* Mobile Yelp icon size */
@media(max-width: 768px) {
    .provider-icon img[src*="yelp"] {
        width: 58.777px !important;
        height: 40.888px !important;
        max-width: none !important;
        max-height: none !important;
        position: relative !important;
        right: 0px !important;
        top: -10px !important;
    }
}

/* Desktop provider icon positioning */
@media(min-width: 769px) {
    .provider-icon {
        position: absolute !important;
        transform: translateY(1px);
        top: 4px !important;
        right: 0 !important;
    }
    
    /* Desktop Yelp icon positioning */
    .provider-icon img[src*="yelp"] {
        width: 60.1128px !important;
        height: 40.0752px !important;
        max-width: none !important;
        max-height: none !important;
        position: relative !important;
        right: 0px !important;
        top: -7px !important;
        transform: translateY(-2px);
    }
}

/* Desktop pagination dot limiting */
.splide__pagination li:nth-child(n+9) {
    display: none !important;
}
.splide__pagination button:nth-child(n+9) {
    display: none !important;
}

/* Mobile pagination dot limiting */
@media(max-width: 768px) {
    .splide__pagination li:nth-child(n+9) {
        display: none !important;
    }
    .splide__pagination button:nth-child(n+9) {
        display: none !important;
    }
}

@media(max-width: 480px) {
    .splide__pagination li:nth-child(n+9) {
        display: none !important;
    }
    .splide__pagination button:nth-child(n+9) {
        display: none !important;
    }
}

/* CSS Custom Properties for dynamic theming */
:root {
    --ctc-bg: #ffffff;
    --ctc-text: #000000;
    --ctc-star: #f39c12;
    --ctc-link: #f87171;
}

/* Apply custom colors from settings */
.custom-testimonials-carousel {
    --ctc-bg: #ffffff;
    --ctc-text: #000000;
    --ctc-star: #f39c12;
}

/* Admin Settings Page Styles */
.ctc-settings-field {
    margin: 5px 0;
}

#ctc_theme_preset {
    min-width: 200px;
}

#ctc_reset_colors {
    margin-top: 5px;
}

.ctc-settings-field[type="color"] {
    width: 60px;
    height: 35px;
    padding: 2px;
    border: 1px solid #ddd;
    border-radius: 3px;
}

.ctc-settings-field[type="number"] {
    width: 120px;
}

.custom-testimonials-carousel .splide__pagination .is-active {
    background: #bbb !important;
    border-color: #bbb !important;
}
