/* Equipment Image Gallery Lightbox Styles */

.lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 9999;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lightbox-overlay.active {
    display: flex;
    opacity: 1;
    align-items: center;
    justify-content: center;
}

.lightbox-container {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s ease;
    background-color: white;
    padding: 10px;
}

.lightbox-image.zoomed {
    transform: scale(1.5);
    cursor: grab;
}

.lightbox-image.zoomed:active {
    cursor: grabbing;
}

/* Navigation Controls */
.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.2rem;
    color: var(--vd-primary, #225d38);
    transition: all 0.3s ease;
    z-index: 10001;
}

.lightbox-nav:hover {
    background-color: white;
    transform: translateY(-50%) scale(1.1);
}

.lightbox-nav:focus {
    outline: 2px solid var(--vd-primary, #225d38);
    outline-offset: 2px;
}

.lightbox-prev {
    left: 20px;
}

.lightbox-next {
    right: 20px;
}

.lightbox-nav:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.lightbox-nav:disabled:hover {
    transform: translateY(-50%) scale(1);
    background-color: rgba(255, 255, 255, 0.9);
}

/* Close Button */
.lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background-color: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.5rem;
    color: var(--vd-primary, #225d38);
    transition: all 0.3s ease;
    z-index: 10001;
}

.lightbox-close:hover {
    background-color: white;
    transform: scale(1.1);
}

.lightbox-close:focus {
    outline: 2px solid var(--vd-primary, #225d38);
    outline-offset: 2px;
}

/* Image Info */
.lightbox-info {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 12px 20px;
    border-radius: 20px;
    font-size: 0.9rem;
    text-align: center;
    max-width: 80%;
    z-index: 10001;
}

.lightbox-title {
    font-weight: 600;
    margin-bottom: 4px;
}

.lightbox-counter {
    opacity: 0.8;
    font-size: 0.8rem;
}

/* Zoom Controls */
.lightbox-zoom-controls {
    position: absolute;
    top: 20px;
    left: 20px;
    display: flex;
    gap: 8px;
    z-index: 10001;
}

.lightbox-zoom-btn {
    background-color: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.2rem;
    color: var(--vd-primary, #225d38);
    transition: all 0.3s ease;
}

.lightbox-zoom-btn:hover {
    background-color: white;
    transform: scale(1.1);
}

.lightbox-zoom-btn:focus {
    outline: 2px solid var(--vd-primary, #225d38);
    outline-offset: 2px;
}

/* Thumbnail Navigation */
.lightbox-thumbnails {
    position: absolute;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    max-width: 80%;
    overflow-x: auto;
    padding: 8px;
    background-color: rgba(0, 0, 0, 0.5);
    border-radius: 8px;
    z-index: 10001;
}

.lightbox-thumbnail {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
    cursor: pointer;
    opacity: 0.6;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.lightbox-thumbnail:hover,
.lightbox-thumbnail.active {
    opacity: 1;
    border-color: white;
    transform: scale(1.05);
}

.lightbox-thumbnail:focus {
    outline: 2px solid var(--vd-primary, #225d38);
    outline-offset: 2px;
}

/* Loading State */
.lightbox-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 1.2rem;
    z-index: 10001;
}

.lightbox-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
    margin-right: 8px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .lightbox-container {
        max-width: 95vw;
        max-height: 85vh;
    }
    
    .lightbox-nav {
        width: 44px;
        height: 44px;
        font-size: 1rem;
    }
    
    .lightbox-prev {
        left: 10px;
    }
    
    .lightbox-next {
        right: 10px;
    }
    
    .lightbox-close {
        top: 10px;
        right: 10px;
        width: 44px;
        height: 44px;
    }
    
    .lightbox-zoom-controls {
        top: 10px;
        left: 10px;
    }
    
    .lightbox-zoom-btn {
        width: 44px;
        height: 44px;
    }
    
    .lightbox-info {
        bottom: 10px;
        max-width: 90%;
        padding: 8px 16px;
        font-size: 0.8rem;
    }
    
    .lightbox-thumbnails {
        bottom: 60px;
        max-width: 90%;
    }
    
    .lightbox-thumbnail {
        width: 50px;
        height: 50px;
    }
    
    .lightbox-trigger-btn {
        width: 40px;
        height: 40px;
        font-size: 0.9rem;
        top: 8px;
        right: 8px;
    }
}

/* Accessibility - Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .lightbox-overlay,
    .lightbox-image,
    .lightbox-nav,
    .lightbox-close,
    .lightbox-zoom-btn,
    .lightbox-thumbnail {
        transition: none;
    }
    
    .lightbox-spinner {
        animation: none;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .lightbox-nav,
    .lightbox-close,
    .lightbox-zoom-btn {
        background-color: white;
        border: 2px solid black;
    }
    
    .lightbox-info {
        background-color: black;
        border: 1px solid white;
    }
}

/* Equipment Image Gallery Enhancement */
.mixer-image-link {
    position: relative;
    display: block;
    overflow: hidden;
    border-radius: 8px;
}

.mixer-image-link img {
    transition: transform 0.3s ease;
}

.mixer-image-link:hover img {
    transform: scale(1.02);
}

/* Lightbox Trigger Button */
.lightbox-trigger-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    cursor: pointer;
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 10;
}

.lightbox-trigger-btn:hover {
    background-color: var(--vd-primary, #225d38);
    transform: scale(1.1);
    opacity: 1;
}

.lightbox-trigger-btn:focus {
    outline: 2px solid white;
    outline-offset: 2px;
    opacity: 1;
}

.mixer-image-link:hover .lightbox-trigger-btn {
    opacity: 1;
}

.mixer-image-link:focus-within .lightbox-trigger-btn {
    opacity: 1;
}

/* Gallery indicator for multiple images */
.mixer-image-link.has-gallery::before {
    content: '\f03e'; /* Font Awesome images icon */
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    top: 10px;
    left: 10px;
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
}

.mixer-image-link.has-gallery:hover::before {
    opacity: 1;
}

.mixer-image-link.has-gallery:focus::before {
    opacity: 1;
}