/* ============================================================
   Calvex Testimonial Videos – Spotlight Layout
   ============================================================ */

.cvt-spotlight-wrapper {
    --cvt-accent:     #009b51;
    --cvt-radius:     8px;
    --cvt-text:       #1c1c1c;
    --cvt-muted:      #6b7280;
    --cvt-border:     #e5e7eb;
    --cvt-transition: .2s ease;
    font-family: inherit;
    color: var(--cvt-text);
}

/* ── No results ──────────────────────────────────────────── */
.cvt-no-results { text-align: center; padding: 40px; color: var(--cvt-muted); }

/* ── Layout row ──────────────────────────────────────────── */
.cvt-spotlight-row  { align-items: flex-start; }

.cvt-featured-col,
.cvt-list-col       { display: flex; flex-direction: column; }

/* ============================================================
   Featured (left panel)
   ============================================================ */
.cvt-featured-thumb-wrap {
    position: relative;
    aspect-ratio: 16 / 9;
    border-radius: var(--cvt-radius);
    overflow: hidden;
    background: #0a0a0a;
    cursor: pointer;
    width: 100%;
}

/* Thumbnail image */
.cvt-featured-thumb {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: opacity .25s ease;
}

/* HLS preview video */
.cvt-featured-preview {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    opacity: 0;
    pointer-events: none;
    transition: opacity .25s ease;
}

/* Show preview on hover */
.cvt-featured-thumb-wrap:hover .cvt-featured-thumb,
.cvt-featured-thumb-wrap.cvt-previewing .cvt-featured-thumb { opacity: 0; }
.cvt-featured-thumb-wrap:hover .cvt-featured-preview,
.cvt-featured-thumb-wrap.cvt-previewing .cvt-featured-preview { opacity: 1; }

/* Gradient overlay – bottom to top, black fade */
.cvt-featured-gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to top,
        rgba(0, 0, 0, 0.95) 10%,
        rgba(0, 0, 0, 0.75) 30%,
        rgba(0, 0, 0, 0.30) 50%,
        rgba(0, 0, 0, 0.0)  60%
    );
    pointer-events: none;
    z-index: 1;
}

/* Quote + name overlay sitting on gradient */
.cvt-featured-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 28px 28px 24px;
    z-index: 2;
    pointer-events: none;
}

.cvt-overlay-quote {
    font-size: clamp(1.1rem, 2.2vw, 1.5rem);
    font-style: italic;
    line-height: 1.5;
    color: #fff;
    margin: 0 0 14px;
    text-shadow: 0 1px 6px rgba(0,0,0,.6);
}

.cvt-overlay-person {
    display: flex;
    align-items: baseline;
    gap: 10px;
    flex-wrap: wrap;
}

.cvt-overlay-name {
    font-size: .9rem;
    font-weight: 700;
    color: #fff;
    text-shadow: 0 1px 3px rgba(0,0,0,.5);
}

.cvt-overlay-company {
    font-size: .82rem;
    color: #86efac;
    font-weight: 500;
}

/* Play button – centred in upper area of the image */
.cvt-featured-play {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) translateY(-16px); /* shift up slightly away from overlay */
    z-index: 3;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    line-height: 0;
}
.cvt-featured-play svg {
    width: 68px;
    height: 68px;
    filter: drop-shadow(0 2px 10px rgba(0,0,0,.5));
    transition: transform var(--cvt-transition), filter var(--cvt-transition);
}
.cvt-featured-play:hover svg {
    transform: scale(1.1);
    filter: drop-shadow(0 4px 16px rgba(0,0,0,.6));
}

/* ============================================================
   List (right panel)
   ============================================================ */
.cvt-list {
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    height: var(--cvt-list-height, 400px);
    scrollbar-color: var(--cvt-accent) transparent;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
}
.cvt-list::-webkit-scrollbar       { width: 3px; }
.cvt-list::-webkit-scrollbar-thumb { background: var(--cvt-accent); border-radius: 2px; }

.cvt-list-item {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 12px 16px;
    border-bottom: 1px solid #e5e7eb;
    cursor: pointer;
    transition: background var(--cvt-transition);
    outline: none;
    border-left: 3px solid transparent;
}
.cvt-list-item:last-child    { border-bottom: none; }
.cvt-list-item:hover         { background: #f1f1f1; }
.cvt-list-item:focus-visible { outline: 4px solid var(--cvt-accent); outline-offset: -4px; }
.cvt-list-item.active {
    background: #edf8f2;
    border-left-color: var(--cvt-accent);
    padding-left: 16px;
}

/* List thumbnail */
.cvt-list-thumb-wrap {
    flex-shrink: 0;
    width: 88px;
    aspect-ratio: 16 / 9;
    border-radius: 3px;
    overflow: hidden;
    background: #111;
    position: relative;
}
.cvt-list-thumb-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.cvt-list-play {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}
.cvt-list-play svg { width: 26px; height: 26px; }

/* List text */
.cvt-list-meta {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}
.cvt-list-quote {
    font-size: .8rem;
    font-style: italic;
    font-weight: 600;
    color: var(--cvt-text) !important;
    line-height: 1.45;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.cvt-list-name {
    font-size: .78rem;
    font-weight: 700;
    color: var(--cvt-muted);
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 2px;
}
.cvt-list-company {
    font-size: .75rem;
    color: var(--cvt-accent);
    font-weight: 500;
    display: block;
    margin-top: -4px;
}

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 849px) {
    .cvt-spotlight-row      { align-items: flex-start; }
    .cvt-featured-col,
    .cvt-list-col           { display: block; }
    .cvt-list               { height: auto !important; max-height: 220px; margin-top: 2px; }
    .cvt-featured-play svg  { width: 54px; height: 54px; }
    .cvt-overlay-quote      { font-size: .95rem; }
    .cvt-featured-overlay   { padding: 18px 18px 16px; }
}

/* ============================================================
   Lightbox – Bunny iframe
   ============================================================ */
.cvt-lightbox {
    position: fixed;
    inset: 0;
    z-index: 2147483647; /* Max possible z-index – beats Flatsome header, sliders, etc. */
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    isolation: isolate; /* Establish own stacking context so children can't leak out */

}
.cvt-lightbox[hidden] { display: none; }

.cvt-lightbox-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,.88);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    cursor: pointer;
}

.cvt-lightbox-inner {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 980px;
    box-shadow: 0 24px 80px rgba(0,0,0,.7);
    animation: cvt-lb-in .25s ease;
}
@keyframes cvt-lb-in {
    from { opacity: 0; transform: scale(.96) translateY(12px); }
    to   { opacity: 1; transform: scale(1)   translateY(0); }
}

.cvt-lightbox-close {
    position: absolute;
    top: -40px;
    right: -70px;
    z-index: 10;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    color: #fff;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    opacity: .8;
    transition: opacity .2s ease;
}
.cvt-lightbox-close:hover { opacity: 1; }

@media (max-width: 768px) {
    .cvt-lightbox-close {
        top: -50px;
        right: -35px;
    }
}

.cvt-lightbox-close:focus-visible,
.cvt-list-item:focus-visible {
    outline: none !important;
}

.cvt-lightbox-video-wrap {
    position: relative;
    aspect-ratio: 16 / 9;
    background: #000;
    border-radius: 10px;
    overflow: hidden;
}

/* Bunny iframe */
.cvt-lightbox-video-wrap iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

/* Spinner (shown while iframe loads) */
.cvt-lb-loading  { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; pointer-events: none; }
.cvt-lb-spinner  { width: 40px; height: 40px; border: 3px solid rgba(255,255,255,.2); border-top-color: #fff; border-radius: 50%; animation: cvt-spin .7s linear infinite; }
@keyframes cvt-spin { to { transform: rotate(360deg); } }
