/**
 * Testimonial Video Carousel - Carousel Styles
 */

/* ===== Base Styles ===== */
.tvc-carousel-wrapper {
    position: relative;
    width: 100%;
    padding: 20px 0;
}

.tvc-swiper {
    width: 100%;
    overflow: hidden;
}

.tvc-item {
    background: #ffffff;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.tvc-item:hover {
    transform: scale(1.02);
}

/* ===== Video Wrapper ===== */
.tvc-video-wrapper {
    position: relative;
    width: 100%;
    overflow: hidden;
    border-radius: 8px 8px 0 0;
    background: #000;
}

/* Orientation: Landscape (16:9) */
.tvc-video-wrapper.tvc-orientation-landscape,
.tvc-video-wrapper:has(video.tvc-orientation-landscape),
.tvc-video-wrapper:has(.tvc-orientation-landscape) {
    padding-bottom: 56.25%;
}

/* Orientation: Portrait (9:16) */
.tvc-video-wrapper.tvc-orientation-portrait,
.tvc-video-wrapper:has(video.tvc-orientation-portrait),
.tvc-video-wrapper:has(.tvc-orientation-portrait) {
    padding-bottom: 177.78%;
}

/* Orientation: Square (1:1) */
.tvc-video-wrapper.tvc-orientation-square,
.tvc-video-wrapper:has(video.tvc-orientation-square),
.tvc-video-wrapper:has(.tvc-orientation-square) {
    padding-bottom: 100%;
}

.tvc-video-wrapper video,
.tvc-video-wrapper .tvc-video-embed {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.tvc-video-wrapper .tvc-poster {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ===== Video Overlay ===== */
.tvc-video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(0,0,0,0.1) 0%, rgba(0,0,0,0.4) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease;
    pointer-events: none;
}

.tvc-item:hover .tvc-video-overlay {
    background: linear-gradient(to bottom, rgba(0,0,0,0.2) 0%, rgba(0,0,0,0.6) 100%);
}

/* Muted Indicator */
.tvc-muted-indicator {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    background: rgba(0,0,0,0.6);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    animation: tvc-pulse 2s infinite;
}

.tvc-muted-indicator svg {
    width: 16px;
    height: 16px;
    color: #ffffff;
    fill: none;
    stroke: #ffffff;
}

@keyframes tvc-pulse {
    0%, 100% { opacity: 0.7; }
    50% { opacity: 1; }
}

/* Watch Story Button */
.tvc-watch-story {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
    background: rgba(0,0,0,0.5);
    padding: 8px 16px;
    border-radius: 24px;
}

.tvc-watch-story svg {
    width: 20px;
    height: 20px;
    color: #ffffff;
    fill: none;
    stroke: #ffffff;
}

.tvc-item:hover .tvc-watch-story {
    opacity: 1;
    transform: translateY(0);
}

/* Play Button for Embeds */
.tvc-play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background: rgba(255,255,255,0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.3s ease, background 0.3s ease;
}

.tvc-play-btn::before {
    content: '';
    width: 0;
    height: 0;
    border-left: 18px solid #333;
    border-top: 12px solid transparent;
    border-bottom: 12px solid transparent;
    margin-left: 4px;
}

.tvc-play-btn:hover {
    transform: translate(-50%, -50%) scale(1.1);
    background: #fff;
}

/* ===== Item Content ===== */
.tvc-item-rating {
    padding: 12px 16px 0;
}

.tvc-rating {
    display: flex;
    gap: 2px;
    font-size: 16px;
}

.tvc-star-filled {
    color: #ffc107;
}

.tvc-star-empty {
    color: #ddd;
}

.tvc-item-text {
    padding: 8px 16px;
    font-size: 14px;
    color: #555;
    line-height: 1.5;
}

/* ===== Customer Info ===== */
.tvc-item-customer {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
}

.tvc-item-logo {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tvc-item-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.tvc-item-info {
    flex: 1;
    min-width: 0;
}

.tvc-item-name {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    color: #222;
}

.tvc-item-role,
.tvc-item-company {
    margin: 2px 0 0;
    font-size: 13px;
    color: #777;
}

/* ===== CTA Button ===== */
.tvc-item-cta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin: 0 16px 16px;
    padding: 10px 16px;
    background: #0073aa;
    color: #fff;
    text-decoration: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    transition: background 0.3s ease, box-shadow 0.3s ease;
}

.tvc-item-cta:hover {
    background: #005a87;
    box-shadow: 0 2px 8px rgba(0,115,170,0.3);
}

.tvc-item-cta svg {
    width: 14px;
    height: 14px;
    color: #ffffff;
    fill: none;
    stroke: #ffffff;
}

/* ===== Navigation Arrows ===== */
.tvc-nav-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    background: #fff;
    border: none;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    color: #333333;
}

.tvc-nav-arrow:hover {
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.tvc-nav-arrow svg {
    width: 20px;
    height: 20px;
    color: #333333;
    fill: none;
    stroke: #333333;
    display: block;
}

.tvc-nav-prev {
    left: -22px;
}

.tvc-nav-next {
    right: -22px;
}

/* ===== Pagination Dots - Elementor Standard Size ===== */
.tvc-pagination {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 20px;
}

.tvc-pagination .swiper-pagination-bullet,
.tvc-dot {
    width: 6px !important;
    height: 6px !important;
    border-radius: 50%;
    border: none;
    background: #d1d1d1;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.3s ease, width 0.3s ease;
    padding: 0;
    opacity: 1;
    margin: 0 3px;
    display: inline-block;
}

.tvc-pagination .swiper-pagination-bullet:hover,
.tvc-dot:hover {
    background: #a0a0a0;
}

.tvc-pagination .swiper-pagination-bullet-active,
.tvc-dot.tvc-active {
    background: #333333;
    width: 20px !important;
    border-radius: 3px;
}

/* ===== No Videos Message ===== */
.tvc-no-videos {
    text-align: center;
    padding: 40px;
    color: #777;
    font-size: 16px;
}

/* ===== Center Focused Layout ===== */
.tvc-layout-center .swiper-slide {
    transition: transform 0.3s ease;
}

.tvc-layout-center .swiper-slide-active .tvc-item {
    transform: scale(1.05);
    box-shadow: 0 8px 32px rgba(0,0,0,0.15);
}

/* ===== Grid Layout ===== */
.tvc-layout-grid .tvc-grid-wrapper {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.tvc-layout-grid .swiper-slide {
    width: auto !important;
    margin-right: 0 !important;
}

/* ===== Elementor Preview ===== */
.tvc-elementor-preview {
    background: #f0f0f0;
    border: 2px dashed #ccc;
    border-radius: 8px;
    padding: 40px;
    text-align: center;
}

.tvc-elementor-preview i {
    font-size: 48px;
    color: #999;
    margin-bottom: 12px;
}

.tvc-elementor-preview p {
    margin: 0;
    font-size: 16px;
    color: #555;
}

.tvc-elementor-preview small {
    color: #999;
}

/* ===== Portrait Orientation Specific ===== */
.tvc-orientation-portrait .tvc-video-wrapper {
    max-height: 500px;
}

.tvc-orientation-portrait .tvc-item {
    max-width: 320px;
    margin: 0 auto;
}

/* ===== Reduced Motion ===== */
@media (prefers-reduced-motion: reduce) {
    .tvc-item,
    .tvc-video-overlay,
    .tvc-watch-story,
    .tvc-nav-arrow,
    .tvc-pagination .swiper-pagination-bullet,
    .tvc-dot,
    .tvc-play-btn {
        transition: none !important;
        animation: none !important;
    }

    .tvc-item:hover {
        transform: none;
    }

    .tvc-nav-arrow:hover {
        transform: translateY(-50%);
    }
}
