/**
 * Lightbox styles
 */

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

.wpgm-lightbox.wpgm-lightbox-active {
    display: block;
}

.wpgm-lightbox-open {
    overflow: hidden;
}

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

.wpgm-lightbox-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wpgm-lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    background-color: #000;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
    transition: opacity 0.3s ease;
}

.wpgm-lightbox-content.wpgm-lightbox-loading::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    margin-top: -20px;
    margin-left: -20px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: wpgm-lightbox-spin 1s linear infinite;
}

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

.wpgm-lightbox-image {
    display: block;
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
}

.wpgm-lightbox-caption {
    position: absolute;
    bottom: -40px;
    left: 0;
    width: 100%;
    padding: 10px;
    background-color: rgba(0, 0, 0, 0.7);
    color: #fff;
    text-align: center;
    font-size: 14px;
    line-height: 1.4;
}

.wpgm-lightbox-counter {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 5px 10px;
    background-color: rgba(0, 0, 0, 0.7);
    color: #fff;
    font-size: 12px;
    border-radius: 3px;
}

.wpgm-lightbox-prev,
.wpgm-lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background-color: rgba(0, 0, 0, 0.5);
    border: none;
    border-radius: 50%;
    color: #fff;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.wpgm-lightbox-prev {
    left: 10px;
}

.wpgm-lightbox-next {
    right: 10px;
}

.wpgm-lightbox-close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 30px;
    height: 30px;
    background-color: rgba(0, 0, 0, 0.5);
    border: none;
    border-radius: 50%;
    color: #fff;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.wpgm-lightbox-prev:hover,
.wpgm-lightbox-next:hover,
.wpgm-lightbox-close:hover {
    background-color: rgba(0, 0, 0, 0.8);
}

.wpgm-lightbox-error {
    color: #ff6b6b;
}

/* Responsive Styles */
@media (max-width: 767px) {
    .wpgm-lightbox-content {
        max-width: 95%;
    }

    .wpgm-lightbox-prev,
    .wpgm-lightbox-next {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }

    .wpgm-lightbox-close {
        width: 25px;
        height: 25px;
        font-size: 16px;
    }

    .wpgm-lightbox-caption {
        font-size: 12px;
    }
}