/**
 * Testimonials Display Block Styles
 */

/* ===== BASE WRAPPER ===== */
.zonkey-testimonials-display {
    --testimonials-columns-desktop: 3;
    --testimonials-columns-tablet: 2;
    --testimonials-columns-mobile: 1;
    --testimonials-gap: 2rem;
    --testimonials-card-bg: #ffffff;
    --testimonials-text: inherit;
    --testimonials-bg: transparent;
    --testimonials-list-max-width: 800px;

    background-color: var(--testimonials-bg);
    color: var(--testimonials-text);
}

.zonkey-testimonials-no-results {
    text-align: center;
    padding: 2rem;
    color: #666;
}

/* ===== GRID LAYOUT ===== */
.zonkey-testimonials-grid {
    display: grid;
    grid-template-columns: repeat(var(--testimonials-columns-desktop), 1fr);
    gap: var(--testimonials-gap);
}

@media (max-width: 1024px) {
    .zonkey-testimonials-grid {
        grid-template-columns: repeat(var(--testimonials-columns-tablet), 1fr);
    }
}

@media (max-width: 768px) {
    .zonkey-testimonials-grid {
        grid-template-columns: repeat(var(--testimonials-columns-mobile), 1fr);
    }
}

/* ===== LIST LAYOUT ===== */
.zonkey-testimonials-list {
    display: flex;
    flex-direction: column;
    gap: var(--testimonials-gap);
}

.zonkey-testimonials-list .zonkey-testimonial-card {
    max-width: var(--testimonials-list-max-width);
    width: 100%;
    margin-left: auto;
    margin-right: auto;
}

/* ===== CAROUSEL LAYOUT ===== */
/* Scoped to .zonkey-testimonials-display to avoid conflicts with standalone testimonials block */
.zonkey-testimonials-display .zonkey-testimonials-carousel {
    position: relative;
    max-width: var(--testimonials-carousel-max-width, 100%);
    margin-left: auto;
    margin-right: auto;
}

.zonkey-testimonials-display .zonkey-testimonials-carousel .splide__track {
    overflow: hidden;
}

.zonkey-testimonials-display .zonkey-testimonials-carousel .splide__list {
    display: flex;
    min-height: var(--testimonials-carousel-min-height, auto);
}

.zonkey-testimonials-display .zonkey-testimonials-carousel .splide__slide {
    flex-shrink: 0;
    padding: 1rem;
    display: flex;
    justify-content: center;
}

.zonkey-testimonials-display .zonkey-testimonials-carousel .splide__slide .zonkey-testimonial-card {
    height: 100%;
    width: 100%;
    max-width: var(--testimonials-content-max-width, 100%);
}

/* Carousel arrows */
.zonkey-testimonials-display .zonkey-testimonials-carousel .splide__arrows {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    transform: translateY(-50%);
    pointer-events: none;
    z-index: 10;
}

.zonkey-testimonials-display .zonkey-testimonials-carousel .splide__arrow {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(0, 0, 0, 0.1);
    cursor: pointer;
    pointer-events: auto;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.zonkey-testimonials-display .zonkey-testimonials-carousel .splide__arrow:hover {
    background: #ffffff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: scale(1.05);
}

.zonkey-testimonials-display .zonkey-testimonials-carousel .splide__arrow--prev {
    left: -24px;
}

.zonkey-testimonials-display .zonkey-testimonials-carousel .splide__arrow--next {
    right: -24px;
}

.zonkey-testimonials-display .zonkey-testimonials-carousel .splide__arrow svg {
    width: 24px;
    height: 24px;
    color: #333;
}

.zonkey-testimonials-display .zonkey-testimonials-carousel .splide__arrow:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* Carousel pagination */
.zonkey-testimonials-display .zonkey-testimonials-carousel .splide__pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1.5rem;
    padding: 0;
    list-style: none;
}

.zonkey-testimonials-display .zonkey-testimonials-carousel .splide__pagination__page {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.2);
    border: none;
    padding: 0;
    cursor: pointer;
    transition: all 0.2s ease;
}

.zonkey-testimonials-display .zonkey-testimonials-carousel .splide__pagination__page.is-active {
    background: var(--color-primary, #2563eb);
    transform: scale(1.2);
}

.zonkey-testimonials-display .zonkey-testimonials-carousel .splide__pagination__page:hover:not(.is-active) {
    background: rgba(0, 0, 0, 0.4);
}

/* Carousel progress bar */
.zonkey-testimonials-display .zonkey-testimonials-carousel .splide__progress {
    margin-top: 1rem;
    height: 4px;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 2px;
    overflow: hidden;
}

.zonkey-testimonials-display .zonkey-testimonials-carousel .splide__progress__bar {
    height: 100%;
    background: var(--color-primary, #2563eb);
    border-radius: 2px;
    transition: width 0.1s linear;
}

@media (max-width: 768px) {
    .zonkey-testimonials-display .zonkey-testimonials-carousel .splide__arrow {
        width: 40px;
        height: 40px;
    }

    .zonkey-testimonials-display .zonkey-testimonials-carousel .splide__arrow--prev {
        left: 0;
    }

    .zonkey-testimonials-display .zonkey-testimonials-carousel .splide__arrow--next {
        right: 0;
    }

    .zonkey-testimonials-display .zonkey-testimonials-carousel .splide__arrow svg {
        width: 20px;
        height: 20px;
    }
}

/* ===== TESTIMONIAL CARD ===== */
.zonkey-testimonial-card {
    background: var(--testimonials-card-bg);
    border-radius: 12px;
    padding: 2rem;
    height: 100%;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Card styling modifiers */
.zonkey-testimonials-display.has-shadow .zonkey-testimonial-card {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.zonkey-testimonials-display.has-hover .zonkey-testimonial-card:hover {
    transform: translateY(-4px);
}

.zonkey-testimonials-display.has-shadow.has-hover .zonkey-testimonial-card:hover {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

/* Text alignment */
.zonkey-testimonials-align-left .zonkey-testimonial-card {
    text-align: left;
}

.zonkey-testimonials-align-center .zonkey-testimonial-card {
    text-align: center;
}

.zonkey-testimonials-align-right .zonkey-testimonial-card {
    text-align: right;
}

/* ===== QUOTE ICON ===== */
.zonkey-testimonial-quote-icon {
    color: var(--color-primary, #2563eb);
    opacity: 0.3;
    margin-bottom: 1rem;
}

.zonkey-testimonials-align-center .zonkey-testimonial-quote-icon {
    display: flex;
    justify-content: center;
}

.zonkey-testimonials-align-right .zonkey-testimonial-quote-icon {
    display: flex;
    justify-content: flex-end;
}

/* ===== TESTIMONIAL CONTENT ===== */
.zonkey-testimonial-content {
    flex-grow: 1;
    margin: 0 0 1.5rem 0;
    padding: 0;
    border: none;
    font-size: var(--testimonials-font-size, 1.1rem) !important;
    line-height: 1.7 !important;
    font-family: var(--testimonials-font-family, var(--font-body)) !important;
    font-style: var(--testimonials-font-style, italic) !important;
}

.zonkey-testimonial-content p {
    margin: 0 0 1rem 0;
    font-size: inherit !important;
    line-height: inherit !important;
    font-family: inherit !important;
    font-style: inherit !important;
}

.zonkey-testimonial-content p:last-child {
    margin-bottom: 0;
}

/* ===== AUTHOR INFO ===== */
.zonkey-testimonial-author {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.zonkey-testimonials-align-center .zonkey-testimonial-author {
    justify-content: center;
    flex-direction: column;
    text-align: center;
}

.zonkey-testimonials-align-right .zonkey-testimonial-author {
    flex-direction: row-reverse;
}

/* Author image */
.zonkey-testimonial-image {
    flex-shrink: 0;
}

.zonkey-testimonial-image img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
}

/* Author info text */
.zonkey-testimonial-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.zonkey-testimonial-name {
    font-weight: 600;
    font-size: 1rem;
    color: var(--color-text, #1f2937);
}

.zonkey-testimonial-position {
    font-size: 0.875rem;
    color: var(--color-dark-gray, #6b7280);
}

.zonkey-testimonial-client {
    font-size: 0.875rem;
    color: var(--color-primary, #2563eb);
    font-weight: 500;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .zonkey-testimonial-card {
        padding: 1.5rem;
    }

    .zonkey-testimonial-content {
        font-size: 1rem;
    }

    .zonkey-testimonial-image img {
        width: 50px;
        height: 50px;
    }
}
