/* ==========================================================================
   MODERN LIGHTBOX SYSTEM
   ========================================================================== */
.dut-lightbox-root {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 999999999;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.dut-lightbox-root.dut-active {
    display: flex;
    opacity: 1;
}

/* Lightbox Content Area */
.dut-p-lightbox-content {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.dut-p-lightbox-stage {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-height: calc(100vh - 180px);
    position: relative;
}

.dut-p-lightbox-stage img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    border-radius: 12px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1), opacity 0.3s ease;
}

/* Navbar & Controls */
.dut-p-lightbox-controls {
    position: absolute;
    top: 25px;
    right: 25px;
    display: flex;
    gap: 15px;
    z-index: 100;
}

.dut-p-l-btn {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    -webkit-tap-highlight-color: transparent;
}

.dut-p-l-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-3px) scale(1.05);
    border-color: rgba(255, 255, 255, 0.4);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}

.dut-p-l-btn span {
    font-size: 28px;
    font-weight: 300;
}

/* Navigation Arrows */
.dut-p-l-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.8);
    width: 56px;
    height: 56px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 50;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dut-p-l-nav-btn span {
    font-size: 32px;
}

.dut-p-l-nav-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.3);
}

.dut-p-l-nav-btn.prev {
    left: 40px;
}

.dut-p-l-nav-btn.next {
    right: 40px;
}

@media (max-width: 850px) {
    .dut-p-l-nav-btn {
        display: none;
    }

    /* Use swipe on mobile */
}

/* Thumbnails Strip */
.dut-p-lightbox-thumbs-wrap {
    width: 100%;
    height: 100px;
    padding: 10px 0;
    display: flex;
    justify-content: center;
    background: rgba(0, 0, 0, 0.3);
}

.dut-p-lightbox-thumbs {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 0 20px;
    scrollbar-width: none;
}

.dut-p-lightbox-thumbs::-webkit-scrollbar {
    display: none;
}

.dut-p-l-thumb {
    width: 60px;
    height: 60px;
    flex: 0 0 60px;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    opacity: 0.5;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.dut-p-l-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.dut-p-l-thumb.active {
    opacity: 1;
    border-color: var(--dut-p-primary, #8da336);
    transform: scale(1.1);
}

/* Animations */
@keyframes dutLBFadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.dut-p-l-animating {
    animation: dutLBFadeIn 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

/* Lightbox Swipe UI */
.dut-lightbox-root .dut-p-handle-bar {
    position: absolute;
    top: 12px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 5px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    z-index: 1000;
    display: none;
    transition: background 0.3s ease;
}

.dut-lightbox-root .dut-p-swipe-indicator {
    position: absolute;
    top: 25px;
    left: 0;
    right: 0;
    text-align: center;
    color: rgba(255, 255, 255, 0.5);
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    z-index: 1000;
    display: none;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

@media (max-width: 850px) {

    .dut-lightbox-root .dut-p-handle-bar,
    .dut-lightbox-root .dut-p-swipe-indicator {
        display: block;
    }
}

.dut-lightbox-root.is-swiping .dut-p-swipe-indicator {
    opacity: 1;
}

.dut-lightbox-root.is-swiping .dut-p-lightbox-content {
    transition: none !important;
}

.dut-lightbox-root.threshold-met .dut-p-handle-bar {
    background: rgba(255, 255, 255, 0.8);
}

.dut-lightbox-root.threshold-met .dut-p-swipe-indicator {
    color: #fff;
}
