/* Video Testimonials Slider - Frontend Styles */

.vts-wrap {
    background: var(--vts-bg);
    padding: var(--vts-pad-y, 40px) var(--vts-pad-x, 20px);
    color: var(--vts-text);
    font-family: var(--vts-name-font);
}

.vts-slider {
    position: relative;
    width: 100%;
    max-width: var(--vts-slider-width, 1200px);
    margin: 0 auto;
}

.vts-viewport {
    /* Clip cleanly at the slider's edges. Partial cards on the left and right
       are made visible by the `peek` setting: cards are sized slightly narrower
       than viewport/cards-visible so adjacent cards extend into the peek window
       (and infinite-loop clones keep the partial cards always populated). */
    overflow: hidden;
    padding: 20px 0;
}

.vts-track {
    display: flex;
    gap: var(--vts-gap);
    transition: transform 0.55s cubic-bezier(.4,.1,.2,1);
    will-change: transform;
}

.vts-card {
    /* Card width = (100% - 2*peek - (cards-1) gaps) / cards */
    flex: 0 0 calc((100% - (var(--vts-peek, 0px) * 2) - (var(--vts-gap) * (var(--vts-cards) - 1))) / var(--vts-cards));
    background: var(--vts-card-bg);
    border-radius: var(--vts-radius);
    overflow: hidden;
    box-shadow: var(--vts-shadow);
    display: flex;
    flex-direction: column;
}

/* Thumbnail */
.vts-thumb {
    position: relative;
    aspect-ratio: 16 / 11;
    overflow: hidden;
    cursor: pointer;
    background: #111;
}

.vts-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.6s ease;
}

.vts-thumb:hover img { transform: scale(1.04); }

.vts-thumb-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #333, #555);
}

.vts-play {
    position: absolute;
    inset: 0;
    margin: auto;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: rgba(255,255,255,0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.25s ease, background 0.25s ease;
    box-shadow: 0 4px 14px rgba(0,0,0,0.15);
    pointer-events: none;
}

.vts-thumb:hover .vts-play {
    background: #fff;
    transform: scale(1.08);
}

.vts-play::after {
    content: "";
    width: 0;
    height: 0;
    border-left: 16px solid var(--vts-play-icon);
    border-top: 10px solid transparent;
    border-bottom: 10px solid transparent;
    margin-left: 5px;
}

/* Inline player swap */
.vts-thumb.is-playing > img,
.vts-thumb.is-playing > .vts-play,
.vts-thumb.is-playing > .vts-thumb-placeholder { display: none; }

.vts-thumb.is-playing iframe,
.vts-thumb.is-playing video {
    width: 100%;
    height: 100%;
    border: 0;
}

/* Content */
.vts-content {
    padding: 26px 28px 24px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.vts-quote {
    font-family: var(--vts-quote-font);
    font-style: var(--vts-quote-style);
    font-size: var(--vts-quote-size);
    line-height: 1.55;
    color: var(--vts-text);
    margin: 0 0 28px;
    flex: 1;
}

.vts-author {
    display: flex;
    align-items: center;
    gap: 14px;
}

.vts-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--vts-accent);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
    flex-shrink: 0;
    font-family: var(--vts-name-font);
}

.vts-name {
    font-size: var(--vts-name-size);
    font-weight: 700;
    letter-spacing: 1.2px;
    color: var(--vts-text);
    margin-bottom: 4px;
    text-transform: uppercase;
}

.vts-role {
    font-size: var(--vts-role-size);
    font-weight: 500;
    letter-spacing: 1.1px;
    color: var(--vts-muted);
    text-transform: uppercase;
}

/* Nav */
.vts-nav {
    position: absolute;
    top: 38%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--vts-nav);
    color: #fff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: background 0.2s ease, transform 0.2s ease;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    padding: 0;
}

.vts-nav:hover {
    background: var(--vts-nav-hover);
    transform: translateY(-50%) scale(1.08);
}

.vts-nav:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.vts-prev { left:  calc(var(--vts-peek, 0px) - 22px); }
.vts-next { right: calc(var(--vts-peek, 0px) - 22px); }
.vts-nav svg { width: 16px; height: 16px; }

/* Dots */
.vts-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 20px;
}

.vts-dots button {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(0,0,0,0.2);
    border: none;
    cursor: pointer;
    padding: 0;
    transition: background 0.2s ease, transform 0.2s ease;
}

.vts-dots button.is-active {
    background: var(--vts-nav);
    transform: scale(1.2);
}

/* Modal */
.vts-modal {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.vts-modal.is-open { display: flex; }

.vts-modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.85);
    cursor: pointer;
}

.vts-modal-inner {
    position: relative;
    width: 100%;
    max-width: 960px;
    aspect-ratio: 16 / 9;
    z-index: 1;
}

.vts-modal-content {
    width: 100%;
    height: 100%;
    background: #000;
    border-radius: 8px;
    overflow: hidden;
}

.vts-modal-content iframe,
.vts-modal-content video {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
}

.vts-modal-close {
    position: absolute;
    top: -42px;
    right: 0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #fff;
    color: #000;
    border: 0;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Responsive — peek is disabled below 900px (handled in JS) and arrows
   are repositioned to sit flush at the slider edges. */
@media (max-width: 900px) {
    .vts-card { flex: 0 0 calc((100% - var(--vts-gap)) / 2); }
    .vts-prev { left: 8px; }
    .vts-next { right: 8px; }
}

@media (max-width: 600px) {
    .vts-card { flex: 0 0 100%; }
    .vts-prev { left: 8px; }
    .vts-next { right: 8px; }
}
