/* SquadHack Lightbox - Custom Fancybox-like Image Viewer */

.sh-lightbox-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0, 0, 0, 0.92);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.sh-lightbox-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Main image container */
.sh-lightbox-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sh-lightbox-img {
    max-width: 90vw;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 0.75rem;
    opacity: 0;
    transform: scale(0.95);
    transition: opacity 0.3s ease, transform 0.3s ease;
    cursor: zoom-in;
    user-select: none;
    -webkit-user-drag: none;
}

.sh-lightbox-overlay.active .sh-lightbox-img {
    opacity: 1;
    transform: scale(1);
}

.sh-lightbox-img.zoomed {
    cursor: zoom-out;
    max-width: none;
    max-height: none;
    border-radius: 0;
}

/* Zoom wrapper */
.sh-lightbox-zoom-wrap {
    overflow: auto;
    max-width: 90vw;
    max-height: 85vh;
    border-radius: 0.75rem;
    scrollbar-width: thin;
    scrollbar-color: rgba(139, 92, 246, 0.3) transparent;
}

.sh-lightbox-zoom-wrap::-webkit-scrollbar {
    width: 4px;
    height: 4px;
}

.sh-lightbox-zoom-wrap::-webkit-scrollbar-thumb {
    background: rgba(139, 92, 246, 0.3);
    border-radius: 4px;
}

/* Close button */
.sh-lightbox-close {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 10001;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: rgba(17, 17, 24, 0.8);
    border: 1px solid rgba(139, 92, 246, 0.15);
    color: rgba(255, 255, 255, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    backdrop-filter: blur(10px);
}

.sh-lightbox-close:hover {
    background: rgba(139, 92, 246, 0.2);
    border-color: rgba(139, 92, 246, 0.4);
    color: white;
    transform: scale(1.05);
}

/* Navigation arrows */
.sh-lightbox-nav {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10001;
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: rgba(17, 17, 24, 0.8);
    border: 1px solid rgba(139, 92, 246, 0.15);
    color: rgba(255, 255, 255, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    backdrop-filter: blur(10px);
}

.sh-lightbox-nav:hover {
    background: rgba(139, 92, 246, 0.2);
    border-color: rgba(139, 92, 246, 0.4);
    color: white;
    transform: translateY(-50%) scale(1.05);
}

.sh-lightbox-prev {
    left: 1rem;
}

.sh-lightbox-next {
    right: 1rem;
}

.sh-lightbox-nav.hidden {
    display: none;
}

/* Counter */
.sh-lightbox-counter {
    position: fixed;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10001;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.4);
    background: rgba(17, 17, 24, 0.7);
    padding: 0.35rem 0.75rem;
    border-radius: 8px;
    border: 1px solid rgba(139, 92, 246, 0.1);
    backdrop-filter: blur(10px);
}

/* Toolbar (zoom controls) */
.sh-lightbox-toolbar {
    position: fixed;
    bottom: 1.5rem;
    right: 1rem;
    z-index: 10001;
    display: flex;
    gap: 0.35rem;
}

.sh-lightbox-tool {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: rgba(17, 17, 24, 0.8);
    border: 1px solid rgba(139, 92, 246, 0.15);
    color: rgba(255, 255, 255, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    backdrop-filter: blur(10px);
}

.sh-lightbox-tool:hover {
    background: rgba(139, 92, 246, 0.2);
    border-color: rgba(139, 92, 246, 0.4);
    color: white;
}

/* Loading spinner */
.sh-lightbox-spinner {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 32px;
    height: 32px;
    border: 3px solid rgba(139, 92, 246, 0.1);
    border-top-color: #8b5cf6;
    border-radius: 50%;
    animation: sh-lb-spin 0.7s linear infinite;
}

@keyframes sh-lb-spin {
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Clickable images in content */
.blog-content img,
.product-desc img {
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.blog-content img:hover,
.product-desc img:hover {
    opacity: 0.85;
}

/* Gallery clickable items */
.sh-gallery-item {
    cursor: pointer;
}

/* Responsive */
@media (max-width: 640px) {
    .sh-lightbox-prev { left: 0.5rem; }
    .sh-lightbox-next { right: 0.5rem; }
    .sh-lightbox-nav { width: 40px; height: 40px; }
    .sh-lightbox-close { top: 0.5rem; right: 0.5rem; }
    .sh-lightbox-toolbar { bottom: 1rem; right: 0.5rem; }
}
