/**
 * NexusAI Advanced Lightbox & FPS Slideshow Stylesheet
 */

.nexus-lightbox {
    position: fixed;
    inset: 0;
    background: rgba(3, 7, 18, 0.94);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 999999;
    display: none;
    flex-direction: column;
    justify-content: space-between;
    opacity: 0;
    transition: opacity 0.3s ease;
    user-select: none;
}

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

/* Lightbox Header Bar */
.nexus-lightbox-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    background: linear-gradient(180deg, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0) 100%);
    z-index: 10;
}

.nexus-lightbox-counter {
    color: #94a3b8;
    font-size: 14px;
    font-weight: 600;
}

.nexus-lightbox-counter span.current {
    color: #f8fafc;
    font-size: 16px;
    font-weight: 700;
}

.nexus-lightbox-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.nexus-lb-btn {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #f8fafc;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.nexus-lb-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.05);
}

.nexus-lb-btn.active {
    background: #6366f1;
    border-color: #818cf8;
}

/* FPS Speed Controls Bar */
.nexus-fps-selector {
    display: flex;
    align-items: center;
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 20px;
    padding: 3px 6px;
    gap: 2px;
}

.nexus-fps-label {
    font-size: 11px;
    font-weight: 700;
    color: #94a3b8;
    padding: 0 6px;
    text-transform: uppercase;
}

.nexus-fps-chip {
    background: transparent;
    border: none;
    color: #94a3b8;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.nexus-fps-chip:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

.nexus-fps-chip.active {
    background: #6366f1;
    color: #fff;
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.4);
}

.nexus-lb-zoom-level {
    font-size: 12px;
    font-weight: 700;
    color: #94a3b8;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 0 10px;
    height: 38px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 54px;
    cursor: pointer;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    transition: all 0.2s ease;
}

.nexus-lb-zoom-level:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.16);
    border-color: rgba(255, 255, 255, 0.25);
}

/* Lightbox Stage */
.nexus-lightbox-stage {
    position: relative;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    cursor: default;
    user-select: none;
    -webkit-user-select: none;
    touch-action: none;
}

.nexus-lightbox-stage.is-zoomed {
    cursor: grab;
}

.nexus-lightbox-stage.is-hand-tool {
    cursor: grab !important;
}

.nexus-lightbox-stage.is-dragging {
    cursor: grabbing !important;
}

.nexus-stage-img-wrapper {
    position: relative;
    max-width: 90vw;
    max-height: 75vh;
    display: flex;
    align-items: center;
    justify-content: center;
    transform-origin: center center;
    will-change: transform;
    transition: none; /* Instant 1:1 direct tracking during pan */
}

.nexus-stage-img-wrapper.smooth-animate {
    transition: transform 0.28s cubic-bezier(0.2, 0.8, 0.2, 1) !important;
}

.nexus-stage-img {
    max-width: 100%;
    max-height: 75vh;
    object-fit: contain;
    border-radius: 12px;
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.85);
    pointer-events: none;
    user-select: none;
    -webkit-user-drag: none;
    will-change: opacity, transform, filter;
    transition: opacity 0.45s cubic-bezier(0.16, 1, 0.3, 1), transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), filter 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Nav Arrows */
.nexus-nav-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(15, 23, 42, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.25s ease;
    z-index: 20;
}

.nexus-nav-arrow:hover {
    background: #6366f1;
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.5);
}

.nexus-nav-prev { left: 24px; }
.nexus-nav-next { right: 24px; }

/* Lightbox Footer & Prompt Bar (Hidden by Default) */
.nexus-lightbox-footer {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 16px 28px 24px 28px;
    background: linear-gradient(0deg, rgba(0,0,0,0.92) 0%, rgba(0,0,0,0.7) 70%, rgba(0,0,0,0) 100%);
    z-index: 30;
    display: none;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.nexus-lightbox-footer.visible {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.nexus-prompt-panel {
    max-width: 900px;
    margin: 0 auto;
    background: rgba(15, 23, 42, 0.92);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 16px;
    padding: 16px 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    backdrop-filter: blur(16px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.6);
    position: relative;
}

.nexus-prompt-text {
    flex: 1;
    font-size: 14px;
    color: #f1f5f9;
    line-height: 1.5;
    margin: 0;
}

.nexus-prompt-meta {
    font-size: 11px;
    font-weight: 700;
    color: var(--nexus-accent, #38bdf8);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 4px;
}

.nexus-copy-prompt-btn {
    background: var(--nexus-accent, #6366f1);
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
    white-space: nowrap;
}

.nexus-copy-prompt-btn:hover {
    filter: brightness(1.15);
    transform: scale(1.02);
}

/* Progress bar for slideshow */
.nexus-slideshow-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, #6366f1, #ec4899);
    width: 0%;
    transition: width 0.1s linear;
}

/* ==========================================================================
   Luxury Stage Transitions & High-Speed Slideshow Mode
   ========================================================================== */

/* 1. Luxury Editorial Fade Transition */
.nexus-trans-fade .nexus-stage-img {
    opacity: 0;
    transform: scale(1.025);
    filter: blur(4px);
}

.nexus-trans-fade .nexus-stage-img.show {
    opacity: 1;
    transform: scale(1);
    filter: blur(0px);
}

/* 2. Luxury Horizontal Slide Transition */
.nexus-trans-slide .nexus-stage-img {
    opacity: 0;
    transform: translateX(40px) scale(0.98);
    filter: blur(2px);
}

.nexus-trans-slide .nexus-stage-img.show {
    opacity: 1;
    transform: translateX(0) scale(1);
    filter: blur(0px);
}

/* 3. Luxury Zoom Transition */
.nexus-trans-zoom .nexus-stage-img {
    opacity: 0;
    transform: scale(0.93);
    filter: blur(3px);
}

.nexus-trans-zoom .nexus-stage-img.show {
    opacity: 1;
    transform: scale(1);
    filter: blur(0px);
}

/* ==========================================================================
   High-Speed Slideshow Mode (> 1 FPS) - Transitions Disabled for Crisp Playback
   ========================================================================== */
.nexus-lightbox-stage.nexus-no-transition .nexus-stage-img,
.nexus-lightbox-stage.nexus-no-transition .nexus-stage-img-wrapper {
    transition: none !important;
    animation: none !important;
    filter: none !important;
    opacity: 1 !important;
    transform: none !important;
}
