/**
 * Vehicle Gallery Styles
 * Custom lightbox for vehicle images from Formidable Forms
 */

/* Gallery Trigger/Thumbnail */
.vehicle-gallery-wrapper {
    display: inline-block;
    position: relative;
}

.vehicle-gallery-trigger {
    position: relative;
    cursor: pointer;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.vehicle-gallery-trigger:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.vehicle-gallery-trigger img {
    display: block;
    width: 100%;
    height: auto;
    max-width: 360px;
}

.vehicle-gallery-trigger .gallery-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    color: white;
    padding: 15px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.vehicle-gallery-trigger:hover .gallery-overlay {
    opacity: 1;
}

.vehicle-gallery-trigger .gallery-count {
    display: block;
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 5px;
}

.vehicle-gallery-trigger .gallery-text {
    display: block;
    font-size: 14px;
}

/* Lightbox/Modal */
.vehicle-lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 99999;
}

.lightbox-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
}

.lightbox-content {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100000;
}

.lightbox-image-container {
    max-width: 90%;
    max-height: 85vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-image {
    max-width: 100%;
    max-height: 85vh;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

/* Navigation Buttons */
.lightbox-close,
.lightbox-prev,
.lightbox-next {
    position: absolute;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    cursor: pointer;
    font-size: 32px;
    color: #333;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
    z-index: 100001;
}

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

.lightbox-close {
    top: 20px;
    right: 20px;
    font-size: 36px;
    line-height: 1;
}

.lightbox-prev {
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 48px;
    padding-bottom: 4px;
}

.lightbox-prev:hover {
    transform: translateY(-50%) scale(1.1);
}

.lightbox-next {
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 48px;
    padding-bottom: 4px;
}

.lightbox-next:hover {
    transform: translateY(-50%) scale(1.1);
}

/* Image Counter */
.lightbox-counter {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 10px 20px;
    border-radius: 20px;
    font-size: 16px;
    font-weight: 500;
    z-index: 100001;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .lightbox-image-container {
        max-width: 95%;
        max-height: 80vh;
    }

    .lightbox-image {
        max-height: 80vh;
    }

    .lightbox-close {
        top: 10px;
        right: 10px;
        width: 40px;
        height: 40px;
        font-size: 28px;
    }

    .lightbox-prev,
    .lightbox-next {
        width: 40px;
        height: 40px;
        font-size: 32px;
        background: rgba(255, 255, 255, 0.8);
    }

    .lightbox-prev {
        left: 10px;
    }

    .lightbox-next {
        right: 10px;
    }

    .lightbox-counter {
        bottom: 20px;
        padding: 8px 16px;
        font-size: 14px;
    }

    .vehicle-gallery-trigger img {
        max-width: 100%;
    }
}

/* Loading state */
.lightbox-image {
    background: rgba(255, 255, 255, 0.1);
}

/* Accessibility */
.lightbox-close:focus,
.lightbox-prev:focus,
.lightbox-next:focus {
    outline: 2px solid #4CAF50;
    outline-offset: 2px;
}

/* Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.vehicle-lightbox {
    animation: fadeIn 0.3s ease;
}

