/**
 * Lightbox Styles
 * 
 * @package Arka_Vacation
 */

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

.arka-lightbox.is-open {
    opacity: 1;
    visibility: visible;
}

/* Overlay */
.arka-lightbox-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    cursor: pointer;
}

/* Container */
.arka-lightbox-container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 20px 80px;
}

/* Close Button */
.arka-lightbox-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: background 0.2s ease, transform 0.2s ease;
}

.arka-lightbox-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.arka-lightbox-close svg {
    width: 24px;
    height: 24px;
    color: #fff;
}

/* Navigation Buttons */
.arka-lightbox-prev,
.arka-lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: background 0.2s ease, transform 0.2s ease;
}

.arka-lightbox-prev {
    left: 15px;
}

.arka-lightbox-next {
    right: 15px;
}

.arka-lightbox-prev:hover,
.arka-lightbox-next:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-50%) scale(1.1);
}

.arka-lightbox-prev svg,
.arka-lightbox-next svg {
    width: 24px;
    height: 24px;
    color: #fff;
}

/* Content Area */
.arka-lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Image */
.arka-lightbox-image {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.5);
    transition: opacity 0.3s ease;
}

/* Loader */
.arka-lightbox-loader {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: none;
}

.arka-lightbox-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.2);
    border-top-color: #fff;
    border-radius: 50%;
    animation: arka-spin 0.8s linear infinite;
}

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

/* Caption */
.arka-lightbox-caption {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    color: #fff;
    font-size: 14px;
    text-align: center;
    max-width: 80%;
    padding: 10px 20px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 4px;
    display: none;
}

/* Counter */
.arka-lightbox-counter {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.7);
    font-size: 13px;
    display: none;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .arka-lightbox-container {
        padding: 50px 10px 70px;
    }
    
    .arka-lightbox-prev,
    .arka-lightbox-next {
        width: 40px;
        height: 40px;
    }
    
    .arka-lightbox-prev {
        left: 10px;
    }
    
    .arka-lightbox-next {
        right: 10px;
    }
    
    .arka-lightbox-prev svg,
    .arka-lightbox-next svg {
        width: 20px;
        height: 20px;
    }
    
    .arka-lightbox-close {
        top: 10px;
        right: 10px;
        width: 40px;
        height: 40px;
    }
    
    .arka-lightbox-close svg {
        width: 20px;
        height: 20px;
    }
    
    .arka-lightbox-content {
        max-width: 95%;
    }
    
    .arka-lightbox-caption {
        bottom: 35px;
        font-size: 12px;
        padding: 8px 15px;
    }
    
    .arka-lightbox-counter {
        bottom: 10px;
        font-size: 11px;
    }
}

/* Thumbnail Gallery Grid - Optional helper classes */
.arka-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
}

.arka-gallery-grid img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.arka-gallery-grid img:hover {
    transform: scale(1.02);
    opacity: 0.9;
}

/* Gallery with main + thumbnails */
.arka-gallery-main {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 10px;
    cursor: pointer;
}

.arka-gallery-thumbs {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 5px;
}

.arka-gallery-thumbs img {
    width: 80px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
    cursor: pointer;
    flex-shrink: 0;
    border: 2px solid transparent;
    transition: border-color 0.2s ease, opacity 0.2s ease;
}

.arka-gallery-thumbs img:hover,
.arka-gallery-thumbs img.active {
    border-color: #0891B2;
    opacity: 0.8;
}

/* Animation for lightbox open */
.arka-lightbox.is-open .arka-lightbox-image {
    animation: arka-zoom-in 0.3s ease;
}

@keyframes arka-zoom-in {
    from {
        transform: scale(0.9);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}
