/* FuchsTravels Lightbox Styles */

/* Prevent body scroll when lightbox is open */
.lightbox-open {
    overflow: hidden;
}

/* Main lightbox container */
.fuchs-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.fuchs-lightbox.lightbox-active {
    opacity: 1;
    visibility: visible;
}

/* Background overlay */
.lightbox-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
}

/* Main container */
.lightbox-container {
    position: relative;
    width: 90%;
    height: 90%;
    max-width: 1200px;
    max-height: 800px;
    display: flex;
    flex-direction: column;
    background: rgba(30, 41, 59, 0.9);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Header */
.lightbox-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: rgba(15, 23, 42, 0.9);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

.lightbox-counter {
    color: #e2e8f0;
    font-weight: 500;
    font-size: 14px;
    letter-spacing: 0.5px;
}

.lightbox-controls {
    display: flex;
    gap: 8px;
}

.lightbox-btn {
    width: 40px;
    height: 40px;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    color: #e2e8f0;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    backdrop-filter: blur(10px);
}

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

.lightbox-btn.active {
    background: rgba(59, 130, 246, 0.8);
    color: white;
}

.lightbox-btn svg {
    width: 20px;
    height: 20px;
}

/* Content area */
.lightbox-content {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    min-height: 0;
}

/* Navigation buttons */
.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    border: none;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    z-index: 10;
    backdrop-filter: blur(10px);
}

.lightbox-nav:hover {
    background: rgba(0, 0, 0, 0.9);
    transform: translateY(-50%) scale(1.1);
}

.lightbox-prev {
    left: 20px;
}

.lightbox-next {
    right: 20px;
}

.lightbox-nav svg {
    width: 24px;
    height: 24px;
}

/* Image container */
.lightbox-image-container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.lightbox-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: all 0.3s ease;
    border-radius: 4px;
}

/* Loading spinner */
.lightbox-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: none;
}

.lightbox-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top: 3px solid rgba(59, 130, 246, 0.8);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Image information panel */
.lightbox-info {
    padding: 20px;
    background: rgba(15, 23, 42, 0.95);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    max-height: 200px;
    overflow-y: auto;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.lightbox-info.visible {
    transform: translateY(0);
}

.lightbox-caption {
    color: #e2e8f0;
    font-size: 16px;
    margin-bottom: 12px;
    line-height: 1.5;
}

.lightbox-exif h4 {
    color: #94a3b8;
    font-size: 14px;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.exif-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 8px;
}

.exif-item {
    display: flex;
    justify-content: space-between;
    padding: 4px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.exif-label {
    color: #94a3b8;
    font-size: 12px;
    font-weight: 500;
}

.exif-value {
    color: #e2e8f0;
    font-size: 12px;
}

/* Thumbnails */
.lightbox-thumbnails {
    padding: 16px 20px;
    background: rgba(15, 23, 42, 0.95);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

.lightbox-thumbnails-container {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 4px 0;
}

.lightbox-thumbnails-container::-webkit-scrollbar {
    height: 4px;
}

.lightbox-thumbnails-container::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
}

.lightbox-thumbnails-container::-webkit-scrollbar-thumb {
    background: rgba(59, 130, 246, 0.8);
    border-radius: 2px;
}

.lightbox-thumbnail {
    flex-shrink: 0;
    width: 60px;
    height: 40px;
    border: 2px solid transparent;
    border-radius: 4px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.2s ease;
    background: rgba(255, 255, 255, 0.1);
}

.lightbox-thumbnail:hover {
    border-color: rgba(255, 255, 255, 0.5);
    transform: scale(1.05);
}

.lightbox-thumbnail.active {
    border-color: rgba(59, 130, 246, 0.8);
}

.lightbox-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Responsive Design */
@media (max-width: 768px) {
    .lightbox-container {
        width: 95%;
        height: 95%;
        border-radius: 8px;
    }

    .lightbox-header {
        padding: 12px 16px;
    }

    .lightbox-btn {
        width: 36px;
        height: 36px;
    }

    .lightbox-btn svg {
        width: 18px;
        height: 18px;
    }

    .lightbox-nav {
        width: 44px;
        height: 44px;
    }

    .lightbox-nav svg {
        width: 20px;
        height: 20px;
    }

    .lightbox-prev {
        left: 12px;
    }

    .lightbox-next {
        right: 12px;
    }

    .lightbox-info {
        padding: 16px;
        max-height: 150px;
    }

    .lightbox-caption {
        font-size: 14px;
    }

    .exif-grid {
        grid-template-columns: 1fr;
    }

    .lightbox-thumbnails {
        padding: 12px 16px;
    }

    .lightbox-thumbnail {
        width: 50px;
        height: 33px;
    }
}

@media (max-width: 480px) {
    .lightbox-container {
        width: 100%;
        height: 100%;
        border-radius: 0;
    }

    .lightbox-header {
        padding: 10px 12px;
    }

    .lightbox-counter {
        font-size: 12px;
    }

    .lightbox-controls {
        gap: 4px;
    }

    .lightbox-btn {
        width: 32px;
        height: 32px;
    }

    .lightbox-btn svg {
        width: 16px;
        height: 16px;
    }

    .lightbox-nav {
        width: 40px;
        height: 40px;
    }

    .lightbox-prev {
        left: 8px;
    }

    .lightbox-next {
        right: 8px;
    }

    .lightbox-info {
        padding: 12px;
    }

    .lightbox-thumbnails {
        padding: 8px 12px;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .lightbox-overlay {
        background: rgba(0, 0, 0, 0.98);
    }

    .lightbox-container {
        border: 2px solid white;
    }

    .lightbox-btn {
        border: 1px solid rgba(255, 255, 255, 0.3);
    }

    .lightbox-nav {
        border: 1px solid white;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .fuchs-lightbox,
    .lightbox-image,
    .lightbox-info,
    .lightbox-btn,
    .lightbox-nav,
    .lightbox-thumbnail {
        transition: none;
    }

    .lightbox-spinner {
        animation: none;
        border: 3px solid rgba(59, 130, 246, 0.8);
    }
}

/* Focus states for accessibility */
.lightbox-btn:focus,
.lightbox-nav:focus,
.lightbox-thumbnail:focus {
    outline: 2px solid rgba(59, 130, 246, 0.8);
    outline-offset: 2px;
}

/* Dark theme adjustments (if using CSS custom properties) */
@media (prefers-color-scheme: dark) {
    .lightbox-container {
        background: rgba(17, 24, 39, 0.95);
    }

    .lightbox-header {
        background: rgba(9, 14, 23, 0.95);
    }

    .lightbox-info {
        background: rgba(9, 14, 23, 0.98);
    }

    .lightbox-thumbnails {
        background: rgba(9, 14, 23, 0.98);
    }
}
