/* ==========================================================================
   3D Live — Media Carousel
   ========================================================================== */

.tdl-media-carousel {
    position: relative;
    width: 100%;
}

/* Main viewer area */
.tdl-carousel-main {
    position: relative;
    width: 100%;
    height: 500px;
    overflow: hidden;
    border-radius: 10px;
    background: #f5f5f5;
}

.tdl-carousel-main .tdl-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.45s ease, visibility 0.45s ease;
    z-index: 1;
}

.tdl-carousel-main .tdl-slide.active {
    opacity: 1;
    visibility: visible;
    z-index: 2;
}

.tdl-carousel-main .tdl-slide img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.tdl-carousel-main .tdl-slide threed-live-viewer {
    display: block;
    width: 100%;
    height: 100%;
}

/* Navigation arrows */
.tdl-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.4);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.25s ease, transform 0.2s ease;
    padding: 0;
}

.tdl-arrow:hover {
    background: rgba(0, 0, 0, 0.65);
    transform: translateY(-50%) scale(1.08);
}

.tdl-arrow-prev { left: 12px; }
.tdl-arrow-next { right: 12px; }

/* Thumbnails wrapper */
.tdl-carousel-thumbs-wrapper {
    display: flex;
    align-items: center;
    margin-top: 10px;
    gap: 6px;
}

.tdl-thumb-arrow {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 50%;
    background: #e0e0e0;
    color: #555;
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    padding: 0;
}

.tdl-thumb-arrow:hover {
    background: #ccc;
}

/* Thumbnails strip */
.tdl-carousel-thumbs {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    flex: 1;
    -ms-overflow-style: none;
    scrollbar-width: none;
    padding: 2px;
}

.tdl-carousel-thumbs::-webkit-scrollbar {
    display: none;
}

/* Individual thumbnail */
.tdl-thumb {
    flex-shrink: 0;
    width: auto;
    aspect-ratio: 4 / 3;
    height: 80px;
    border: 2px solid transparent;
    border-radius: 6px;
    overflow: hidden;
    cursor: pointer;
    position: relative;
    background: #e8e8e8;
    padding: 0;
    transition: border-color 0.25s ease, opacity 0.25s ease;
}

.tdl-thumb:hover {
    opacity: 0.85;
}

.tdl-thumb.active {
    border-color: #667eea;
    border-width: 3px;
}

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

/* 3D thumbnail icon (no custom thumb) */
.tdl-thumb-3d-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
}

.tdl-thumb-3d-icon svg {
    color: #fff;
    stroke: #fff;
}

/* 3D badge overlay on custom thumbnail */
.tdl-thumb-3d-badge {
    position: absolute;
    bottom: 3px;
    right: 3px;
    width: 22px;
    height: 22px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.tdl-thumb-3d-badge svg {
    width: 14px !important;
    height: 14px !important;
    color: #667eea;
    stroke: #667eea;
}

/* Responsive */
@media (max-width: 767px) {
    .tdl-carousel-main {
        height: 300px;
    }
    .tdl-thumb {
        height: 56px;
    }
    .tdl-arrow {
        width: 32px;
        height: 32px;
    }
    .tdl-arrow svg {
        width: 16px;
        height: 16px;
    }
}
