/**
 * PixelVault Lightbox Styles
 */

.pv-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

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

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

.pv-lightbox-content {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 20px 100px;
}

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

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

.pv-lightbox-close:active {
    transform: scale(0.95);
}

/* Toolbar */
.pv-lightbox-toolbar {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    padding: 10px 15px;
    border-radius: 30px;
    z-index: 10;
}

.pv-lightbox-toolbar button {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: background 0.3s ease, transform 0.2s ease;
}

.pv-lightbox-toolbar button:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.pv-lightbox-toolbar button:active {
    transform: translateY(0);
}

.pv-lightbox-toolbar button span {
    display: inline-block;
}

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

.pv-lightbox-prev {
    left: 40px;
}

.pv-lightbox-next {
    right: 40px;
}

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

.pv-lightbox-prev:active,
.pv-lightbox-next:active {
    transform: translateY(-50%) scale(0.95);
}

/* Image Wrapper */
.pv-lightbox-image-wrapper {
    position: relative;
    max-width: 90%;
    max-height: calc(100vh - 200px);
    display: flex;
    align-items: center;
    justify-content: center;
}

.pv-lightbox-image {
    max-width: 100%;
    max-height: calc(100vh - 200px);
    width: auto;
    height: auto;
    object-fit: contain;
    transition: opacity 0.3s ease;
    border-radius: 8px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

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

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

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

/* Caption */
.pv-lightbox-caption {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    max-width: 80%;
    text-align: center;
    color: white;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    padding: 15px 25px;
    border-radius: 12px;
}

.pv-lightbox-title {
    margin: 0 0 5px 0;
    font-size: 18px;
    font-weight: 600;
    color: white;
}

.pv-lightbox-counter {
    margin: 0;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
}

/* Fullscreen Mode */
.pv-lightbox:fullscreen .pv-lightbox-content {
    padding: 100px 20px 120px;
}

.pv-lightbox:fullscreen .pv-lightbox-image {
    max-height: calc(100vh - 220px);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .pv-lightbox-content {
        padding: 60px 10px 80px;
    }

    .pv-lightbox-close {
        width: 40px;
        height: 40px;
        top: 15px;
        right: 15px;
    }

    .pv-lightbox-toolbar {
        top: 10px;
        gap: 5px;
        padding: 8px 12px;
        flex-wrap: wrap;
        max-width: calc(100% - 100px);
    }

    .pv-lightbox-toolbar button span {
        display: none;
    }

    .pv-lightbox-toolbar button {
        padding: 8px;
        min-width: 40px;
        justify-content: center;
    }

    .pv-lightbox-prev,
    .pv-lightbox-next {
        width: 44px;
        height: 44px;
    }

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

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

    .pv-lightbox-image-wrapper {
        max-width: 95%;
        max-height: calc(100vh - 160px);
    }

    .pv-lightbox-image {
        max-height: calc(100vh - 160px);
    }

    .pv-lightbox-caption {
        bottom: 10px;
        max-width: 90%;
        padding: 12px 20px;
    }

    .pv-lightbox-title {
        font-size: 16px;
    }

    .pv-lightbox-counter {
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .pv-lightbox-toolbar {
        max-width: calc(100% - 80px);
    }

    .pv-lightbox-close {
        top: 12px;
        right: 12px;
    }

    .pv-lightbox-prev,
    .pv-lightbox-next {
        width: 36px;
        height: 36px;
    }

    .pv-lightbox-prev {
        left: 12px;
    }

    .pv-lightbox-next {
        right: 12px;
    }

    .pv-lightbox-prev svg,
    .pv-lightbox-next svg {
        width: 24px;
        height: 24px;
    }
}
