/**
 * Testimonial Video Carousel - Lightbox Styles (Fully Customizable)
 */

/* ===== Lightbox Container ===== */
.tvc-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.35s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.35s;
}

.tvc-lightbox.tvc-active {
    opacity: 1;
    visibility: visible;
}

/* ===== Backdrop ===== */
.tvc-lightbox-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    cursor: pointer;
}

/* ===== Lightbox Content ===== */
.tvc-lightbox-content {
    position: relative;
    width: 92%;
    max-width: 1200px;
    max-height: 92vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transform: scale(0.92) translateY(20px);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    z-index: 1;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.4);
}

.tvc-lightbox.tvc-active .tvc-lightbox-content {
    transform: scale(1) translateY(0);
}

/* ===== Inner Layout ===== */
.tvc-lightbox-inner {
    display: flex;
    width: 100%;
    height: 100%;
    max-height: 92vh;
    overflow: hidden;
}

/* Video Left Layout (default) */
.tvc-lightbox.tvc-layout-video_left .tvc-lightbox-inner {
    flex-direction: row;
}

/* Video Right Layout */
.tvc-lightbox.tvc-layout-video_right .tvc-lightbox-inner {
    flex-direction: row-reverse;
}

/* ===== Video Section ===== */
.tvc-lightbox-video-section {
    position: relative;
    flex-shrink: 0;
    background: #000;
    display: flex;
    flex-direction: column;
}

.tvc-lightbox-video-wrapper {
    position: relative;
    width: 100%;
    flex: 1;
    min-height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.tvc-lightbox-video-wrapper video,
.tvc-lightbox-video-wrapper iframe {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border: none;
}

/* ===== Video Controls Overlay ===== */
.tvc-lightbox-video-controls {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.tvc-lightbox-video-section:hover .tvc-lightbox-video-controls {
    opacity: 1;
}

.tvc-vc-play,
.tvc-vc-mute,
.tvc-vc-fullscreen {
    width: 36px;
    height: 36px;
    background: rgba(255,255,255,0.2);
    border: none;
    border-radius: 50%;
    color: #ffffff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
    flex-shrink: 0;
}

.tvc-vc-play svg,
.tvc-vc-mute svg,
.tvc-vc-fullscreen svg {
    width: 18px;
    height: 18px;
    color: #ffffff;
    fill: none;
    stroke: #ffffff;
    display: block;
}

.tvc-vc-play:hover,
.tvc-vc-mute:hover,
.tvc-vc-fullscreen:hover {
    background: rgba(255,255,255,0.35);
}

.tvc-vc-progress {
    flex: 1;
    height: 4px;
    background: rgba(255,255,255,0.3);
    border-radius: 2px;
    cursor: pointer;
    position: relative;
}

.tvc-vc-progress-bar {
    height: 100%;
    background: #fff;
    border-radius: 2px;
    width: 0%;
    transition: width 0.1s linear;
}

/* ===== Info Section ===== */
.tvc-lightbox-info-section {
    flex: 1;
    overflow-y: auto;
    position: relative;
    display: flex;
    flex-direction: column;
}

/* ===== Top Bar ===== */
.tvc-lightbox-top-bar {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    margin-bottom: 16px;
}

.tvc-lightbox-share-btn,
.tvc-lightbox-speed-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(0,0,0,0.06);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #555555;
    transition: background 0.2s ease;
    position: relative;
}

.tvc-lightbox-share-btn svg,
.tvc-lightbox-speed-btn svg {
    width: 18px;
    height: 18px;
    color: #555555;
    fill: none;
    stroke: #555555;
    display: block;
}

.tvc-lightbox-share-btn:hover,
.tvc-lightbox-speed-btn:hover {
    background: rgba(0,0,0,0.1);
}

.tvc-lightbox-speed-btn span {
    font-size: 12px;
    font-weight: 600;
    color: #555555;
}

/* ===== Close Button ===== */
.tvc-lightbox-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 40px;
    height: 40px;
    background: rgba(0, 0, 0, 0.5);
    border: none;
    border-radius: 50%;
    color: #ffffff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    transition: background 0.2s ease, transform 0.2s ease;
}

.tvc-lightbox-close svg {
    width: 20px;
    height: 20px;
    color: #ffffff;
    fill: none;
    stroke: #ffffff;
    display: block;
}

.tvc-lightbox-close:hover {
    background: rgba(0, 0, 0, 0.8);
    transform: scale(1.1);
}

/* ===== Share Menu ===== */
.tvc-lightbox-share-menu {
    position: absolute;
    top: 50px;
    right: 0;
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    padding: 8px 0;
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px) scale(0.95);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 50;
}

.tvc-lightbox-share-menu.tvc-active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.tvc-share-option {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 10px 16px;
    border: none;
    background: none;
    font-size: 14px;
    color: #444;
    cursor: pointer;
    text-align: left;
    transition: background 0.15s ease;
}

.tvc-share-option:hover {
    background: #f5f5f5;
}

.tvc-share-option svg {
    width: 18px;
    height: 18px;
    display: block;
}

/* ===== Speed Menu ===== */
.tvc-lightbox-speed-menu {
    position: absolute;
    top: 50px;
    right: 48px;
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    padding: 8px;
    min-width: 80px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px) scale(0.95);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 50;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.tvc-lightbox-speed-menu.tvc-active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.tvc-speed-option {
    padding: 8px 12px;
    border: none;
    background: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    color: #555;
    cursor: pointer;
    text-align: center;
    transition: background 0.15s ease;
}

.tvc-speed-option:hover {
    background: #f0f0f0;
}

.tvc-speed-option.tvc-active {
    background: #e8e8e8;
    color: #222;
    font-weight: 600;
}

/* ===== Header ===== */
.tvc-lightbox-header {
    margin-bottom: 20px;
}

.tvc-lightbox-customer {
    display: flex;
    align-items: center;
    gap: 14px;
}

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

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

.tvc-lightbox-customer-info {
    flex: 1;
}

.tvc-lightbox-name {
    margin: 0 0 4px 0;
    font-size: var(--tvc-popup-name-size, 22px);
    font-weight: 700;
    color: inherit;
    line-height: 1.3;
}

.tvc-lightbox-role,
.tvc-lightbox-company {
    margin: 0;
    font-size: 14px;
    color: #777;
    line-height: 1.4;
}

.tvc-lightbox-rating {
    margin-top: 8px;
}

.tvc-lightbox-stars {
    font-size: 18px;
    color: #ffc107;
    letter-spacing: 2px;
}

/* ===== Testimonial Text ===== */
.tvc-lightbox-testimonial {
    font-size: var(--tvc-popup-text-size, 15px);
    line-height: 1.7;
    color: inherit;
    margin-bottom: 24px;
    opacity: 0.9;
}

.tvc-lightbox-testimonial p {
    margin: 0 0 12px;
}

.tvc-lightbox-testimonial p:last-child {
    margin-bottom: 0;
}

/* ===== Product Section ===== */
.tvc-lightbox-product-section {
    margin-bottom: 24px;
    padding: 16px;
    background: #f8f8f8;
    border-radius: 10px;
    display: none;
}

.tvc-lightbox-product-section.tvc-active {
    display: block;
}

/* ===== Actions ===== */
.tvc-lightbox-actions {
    margin-bottom: 24px;
}

.tvc-lightbox-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    background: var(--tvc-popup-accent, #0073aa);
    color: #fff;
    text-decoration: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.tvc-lightbox-cta svg {
    width: 16px;
    height: 16px;
    color: #ffffff;
    fill: none;
    stroke: #ffffff;
    display: block;
}

.tvc-lightbox-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
    filter: brightness(1.1);
    color: #fff;
}

/* ===== Bottom Navigation ===== */
.tvc-lightbox-bottom-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
    padding-top: 16px;
    border-top: 1px solid rgba(0,0,0,0.08);
}

.tvc-lightbox-nav-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: transparent;
    border: 1px solid rgba(0,0,0,0.1);
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    color: inherit;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.tvc-lightbox-nav-btn svg {
    width: 18px;
    height: 18px;
    color: inherit;
    fill: none;
    stroke: currentColor;
    display: block;
}

.tvc-lightbox-nav-btn:hover {
    background: rgba(0,0,0,0.04);
    border-color: rgba(0,0,0,0.2);
}

/* ===== Responsive Lightbox ===== */
@media (max-width: 900px) {
    .tvc-lightbox-content {
        width: 96%;
        max-height: 96vh;
    }

    .tvc-lightbox-inner {
        flex-direction: column !important;
    }

    .tvc-lightbox-video-section {
        width: 100% !important;
        height: 45vh;
        min-height: 250px;
    }

    .tvc-lightbox-info-section {
        padding: 20px !important;
    }

    .tvc-lightbox-video-controls {
        opacity: 1;
    }
}

@media (max-width: 600px) {
    .tvc-lightbox-content {
        width: 100%;
        height: 100%;
        max-height: 100vh;
        border-radius: 0 !important;
    }

    .tvc-lightbox-video-section {
        height: 40vh;
    }

    .tvc-lightbox-info-section {
        padding: 16px !important;
    }

    .tvc-lightbox-name {
        font-size: 18px !important;
    }

    .tvc-lightbox-testimonial {
        font-size: 14px !important;
    }

    .tvc-lightbox-cta {
        width: 100%;
        justify-content: center;
    }

    .tvc-lightbox-bottom-nav {
        gap: 8px;
    }

    .tvc-lightbox-nav-btn {
        flex: 1;
        justify-content: center;
    }
}

/* ===== Reduced Motion ===== */
@media (prefers-reduced-motion: reduce) {
    .tvc-lightbox,
    .tvc-lightbox-content,
    .tvc-lightbox-share-menu,
    .tvc-lightbox-speed-menu,
    .tvc-lightbox-close,
    .tvc-lightbox-nav-btn,
    .tvc-lightbox-cta {
        transition: none !important;
    }

    .tvc-lightbox.tvc-active .tvc-lightbox-content {
        transform: none;
    }
}
