/* Testimonial Slider for Divi — testimonial-slider.css */

.tsl-wrapper {
    --tsl-accent: #0049b4;
    --tsl-text: #333333;
    --tsl-muted: #777777;
    --tsl-bg: #ffffff;
    --tsl-card-shadow: none;
    --tsl-radius: 12px;
    --tsl-gap: 24px;
    position: relative;
    width: 100%;
    max-width: 100%;
    font-family: inherit;
    padding-top: 36px;
}

/* ── Track ── */
.tsl-track-outer {
    overflow: hidden;
	margin: 0 -12px;
    width: calc(100% + 24px);
}

.tsl-track {
    display: flex;
    transition: transform 0.45s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    will-change: transform;
    align-items: stretch;
    touch-action: pan-y;
    user-select: none;
    -webkit-user-select: none;
}

/* ── Slide ── */
.tsl-slide {
    flex: 0 0 100%;
    min-width: 0;
    padding: 0 12px;
    box-sizing: border-box;
}

/* Multi-slide variants — set by JS via data attribute */
.tsl-wrapper[data-per-view="2"] .tsl-slide { flex: 0 0 50%; }
.tsl-wrapper[data-per-view="3"] .tsl-slide { flex: 0 0 33.333%; }

@media (max-width: 768px) {
    .tsl-wrapper[data-per-view="2"] .tsl-slide,
    .tsl-wrapper[data-per-view="3"] .tsl-slide {
        flex: 0 0 100%;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .tsl-wrapper[data-per-view="3"] .tsl-slide { flex: 0 0 50%; }
}

/* ── Card ── */
.tsl-card {
    background: var(--tsl-bg);
    border-radius: var(--tsl-radius);
    box-shadow: var(--tsl-card-shadow);
    padding: 40px 36px 32px;
    height: 100%;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    position: relative;
    border: 1px solid var(--tsl-accent);
    transition: box-shadow 0.2s ease;
}

.tsl-card:hover {
    box-shadow: none;
}

/* ── Quote icon ── */
.tsl-quote-icon {
    color: var(--tsl-accent);
    width: 28px;
    height: auto;
    margin-bottom: 16px;
    opacity: 1;
}

.tsl-quote-icon svg {
    width: 100%;
    height: auto;
    display: block;
}

/* ── Stars ── */
.tsl-rating {
    display: flex;
    gap: 2px;
    margin-bottom: 14px;
}

.tsl-star {
    font-size: 18px;
    line-height: 1;
}

.tsl-star.filled { color: var(--tsl-accent); }
.tsl-star.empty  { color: #d0d0d0; }

/* ── Content ── */
.tsl-content {
    flex: 1;
    color: var(--tsl-text);
    margin-bottom: 28px;
}

.tsl-content p { margin: 0 0 1em; }
.tsl-content p:last-child { margin-bottom: 0; }

/* ── Author ── */
.tsl-author {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: auto;
    padding-top: 20px;
    border-top: 1px solid var(--tsl-accent);
}

.tsl-avatar {
    flex-shrink: 0;
    width: 54px;
    height: 54px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid var(--tsl-accent);
}

.tsl-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.tsl-author-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.tsl-author-name {
    font-weight: 600;
    color: var(--tsl-text);
}

.tsl-author-title {
    font-size: 13px;
    color: var(--tsl-muted);
}

/* ── Controls ── */
.tsl-controls {
    position: absolute;
    top: 0;
    right: 0;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 16px 0 0 0;
}

.tsl-prev,
.tsl-next {
    display: none;
}

/* ── Dots ── */
.tsl-dots {
    display: flex;
    align-items: center;
    gap: 5px;
}

.tsl-dot {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: #cccccc;
    border: none;
    cursor: pointer;
    padding: 0;
    transition: width 0.3s ease, background 0.3s ease;
    flex-shrink: 0;
}

.tsl-dot.active {
    width: 24px;
    background: var(--tsl-accent);
}

.tsl-dot:focus-visible {
    outline: 2px solid var(--tsl-accent);
    outline-offset: 3px;
}

/* ── Empty state ── */
.tsl-empty {
    text-align: center;
    color: var(--tsl-muted);
    padding: 40px 20px;
}

/* ── Divi Builder compatibility ── */
.et_pb_section .tsl-wrapper,
.et_pb_row .tsl-wrapper,
.et_pb_column .tsl-wrapper {
    position: relative;
}

/* Divi sometimes resets box-sizing */
.tsl-wrapper *,
.tsl-wrapper *::before,
.tsl-wrapper *::after {
    box-sizing: border-box;
}

/* Respect Divi's body font */
.tsl-card,
.tsl-content,
.tsl-author-name,
.tsl-author-title {
    font-family: inherit;
}

/* ── Reduced motion ── */
@media (prefers-reduced-motion: reduce) {
    .tsl-track { transition: none; }
    .tsl-prev, .tsl-next { transition: none; }
    .tsl-dot { transition: none; }
}
