/**
 * Oxygen Lightbox Styles
 * Modern lightbox replacing prettyPhoto
 */

/* ============================================================================
   BASE LIGHTBOX
   ============================================================================ */

.oxy-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;
}

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

/* ============================================================================
   OVERLAY
   ============================================================================ */

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

/* ============================================================================
   CONTENT AREA
   ============================================================================ */

.oxy-lightbox-content {
    position: relative;
    max-width: 90vw;
    max-height: 85vh;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
}

/* ============================================================================
   IMAGE
   ============================================================================ */

.oxy-lightbox-image {
    max-width: 90vw;
    max-height: 80vh;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.5);
    opacity: 0;
    transform: scale(0.95);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.oxy-lightbox-image.loaded {
    opacity: 1;
    transform: scale(1);
}

/* ============================================================================
   LOADER
   ============================================================================ */

.oxy-lightbox-loader {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 0;
}

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

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

/* ============================================================================
   CLOSE BUTTON
   ============================================================================ */

.oxy-lightbox-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 44px;
    height: 44px;
    padding: 0;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    transition: all 0.2s ease;
}

.oxy-lightbox-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

.oxy-lightbox-close:focus {
    outline: 2px solid rgba(255, 255, 255, 0.5);
    outline-offset: 2px;
}

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

/* ============================================================================
   NAVIGATION BUTTONS
   ============================================================================ */

.oxy-lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 80px;
    padding: 0;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 4px;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    transition: all 0.2s ease;
}

.oxy-lightbox-nav:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.2);
}

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

.oxy-lightbox-nav:focus {
    outline: 2px solid rgba(255, 255, 255, 0.5);
    outline-offset: 2px;
}

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

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

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

/* ============================================================================
   INFO AREA (Caption & Counter)
   ============================================================================ */

.oxy-lightbox-info {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    z-index: 10;
    max-width: 80%;
}

.oxy-lightbox-caption {
    color: white;
    font-size: 15px;
    line-height: 1.5;
    padding: 10px 20px;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 6px;
    margin-bottom: 10px;
    display: none;
}

.oxy-lightbox-counter {
    color: rgba(255, 255, 255, 0.8);
    font-size: 13px;
    font-weight: 500;
    padding: 6px 14px;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 20px;
    display: none;
}

/* ============================================================================
   RESPONSIVE
   ============================================================================ */

@media (max-width: 768px) {
    .oxy-lightbox-nav {
        width: 40px;
        height: 60px;
    }
    
    .oxy-lightbox-prev {
        left: 10px;
    }
    
    .oxy-lightbox-next {
        right: 10px;
    }
    
    .oxy-lightbox-close {
        top: 10px;
        right: 10px;
        width: 40px;
        height: 40px;
    }
    
    .oxy-lightbox-info {
        bottom: 15px;
        max-width: 90%;
    }
    
    .oxy-lightbox-caption {
        font-size: 14px;
        padding: 8px 15px;
    }
    
    .oxy-lightbox-counter {
        font-size: 12px;
    }
    
    .oxy-lightbox-image {
        max-width: 95vw;
        max-height: 75vh;
    }
}

@media (max-width: 480px) {
    .oxy-lightbox-nav {
        width: 36px;
        height: 50px;
    }
    
    .oxy-lightbox-nav svg {
        width: 20px;
        height: 20px;
    }
    
    .oxy-lightbox-prev {
        left: 5px;
    }
    
    .oxy-lightbox-next {
        right: 5px;
    }
}

/* ============================================================================
   GALLERY ITEM STYLING (Optional - for consistency)
   ============================================================================ */

a[rel^="prettyPhoto"] {
    cursor: pointer;
    display: inline-block;
    position: relative;
}

a[rel^="prettyPhoto"] img {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

a[rel^="prettyPhoto"]:hover img {
    transform: scale(1.02);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}
