/* Image Gallery Plugin - Frontend Styles */

.igp-gallery-wrapper {
    position: relative;
    margin-bottom: 30px;
    overflow: hidden;
}

.igp-gallery-scroll {
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: thin;
    scrollbar-color: #888 #f1f1f1;
    scroll-behavior: smooth;
}

.igp-gallery-scroll::-webkit-scrollbar {
    height: 8px;
}

.igp-gallery-scroll::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.igp-gallery-scroll::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

.igp-gallery-scroll::-webkit-scrollbar-thumb:hover {
    background: #555;
}

.igp-gallery-track {
    display: flex;
    gap: 10px;
    padding: 10px 0;
}

.igp-gallery-item {
    flex: 0 0 auto;
    cursor: pointer;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s ease;
}

.igp-gallery-item:hover {
    transform: scale(1.05);
}

.igp-gallery-item img {
    display: block;
    height: 200px;
    width: auto;
    max-width: none;
    object-fit: cover;
}

/* Scroll buttons */
.igp-scroll-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 10;
}

.igp-gallery-wrapper:hover .igp-scroll-btn {
    opacity: 1;
}

.igp-scroll-btn:hover {
    background: #fff;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.igp-scroll-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.igp-scroll-left {
    left: 10px;
}

.igp-scroll-right {
    right: 10px;
}

.igp-scroll-btn .dashicons {
    font-size: 24px;
    width: 24px;
    height: 24px;
}

/* Lightbox */
.igp-lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999999;
}

.igp-lightbox.active {
    display: block;
}

.igp-lightbox-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    cursor: pointer;
}

.igp-lightbox-content {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

.igp-lightbox-content img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    animation: igp-fade-in 0.3s ease;
}

@keyframes igp-fade-in {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Lightbox controls */
.igp-lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid #fff;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
}

.igp-lightbox-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.igp-lightbox-close .dashicons {
    color: #fff;
    font-size: 30px;
    width: 30px;
    height: 30px;
}

.igp-lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid #fff;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.igp-lightbox-nav:hover {
    background: rgba(255, 255, 255, 0.2);
}

.igp-lightbox-nav.disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.igp-lightbox-prev {
    left: 20px;
}

.igp-lightbox-next {
    right: 20px;
}

.igp-lightbox-nav .dashicons {
    color: #fff;
    font-size: 30px;
    width: 30px;
    height: 30px;
}

.igp-lightbox-counter {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: #fff;
    font-size: 16px;
    background: rgba(0, 0, 0, 0.5);
    padding: 6px 12px;
    border-radius: 20px;
    pointer-events: none;
}