/* ==========================================================================
   LC Product Gallery - Frontend Styles
   ========================================================================== */

/* === Main Container === */
.lcpg-images {
    position: relative;
    margin-bottom: 2em;
}

.lcpg-wrapper {
    position: relative;
}

.lcpg-container {
    position: relative;
}

/* === Slider === */
.lcpg-slider-wrapper {
    position: relative;
    overflow: hidden;
}

.lcpg-slider {
    width: 100%;
}

.lcpg-slide {
    position: relative;
}

.lcpg-image-container {
    position: relative;
    overflow: hidden;
}

.lcpg-image-container img {
    width: 100%;
    height: auto;
    display: block;
}

/* === Navigation Arrows === */
.lcpg-slider-prev,
.lcpg-slider-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    cursor: pointer;
    color: #333;
    background: rgba(255, 255, 255, 0.85);
    border-radius: 50%;
    width: 36px;
    height: 36px;
    font-size: 20px;
    line-height: 36px;
    text-align: center;
    transition: all 0.2s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.lcpg-slider-prev:hover,
.lcpg-slider-next:hover {
    background: #fff;
    color: #000;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
}

.lcpg-slider-prev {
    left: 10px;
}

.lcpg-slider-next {
    right: 10px;
}

/* === Lightbox Trigger === */
.lcpg-lightbox-trigger {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 10;
    background: rgba(255, 255, 255, 0.85);
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: #333;
    transition: all 0.2s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.lcpg-lightbox-trigger:hover {
    background: #fff;
    color: #000;
}

.lcpg-lightbox-trigger .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
}

/* === Thumbnails === */
.lcpg-thumbnail-wrapper {
    margin-top: 10px;
    position: relative;
}

.lcpg-thumbnail-slider {
    width: 100%;
}

.lcpg-thumbnail-item {
    cursor: pointer;
    border: 2px solid transparent;
    border-radius: 4px;
    overflow: hidden;
    transition: border-color 0.2s ease;
    position: relative;
}

.lcpg-thumbnail-item img {
    width: 100%;
    height: auto;
    display: block;
    aspect-ratio: 1;
    object-fit: cover;
}

.lcpg-thumbnail-item.swiper-slide-thumb-active {
    border-color: #40b8f5;
}

.lcpg-thumbnail-item:hover {
    border-color: #999;
}

/* Thumbnail navigation */
.lcpg-thumb-prev,
.lcpg-thumb-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    cursor: pointer;
    color: #333;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    width: 28px;
    height: 28px;
    font-size: 16px;
    line-height: 28px;
    text-align: center;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
}

.lcpg-thumb-prev {
    left: -4px;
}

.lcpg-thumb-next {
    right: -4px;
}

/* === Video Slide === */
.lcpg-slide-video {
    background: #000;
}

.lcpg-video-container {
    width: 100%;
    aspect-ratio: 16 / 9;
    position: relative;
}

.lcpg-video-container iframe,
.lcpg-video-container video {
    width: 100%;
    height: 100%;
    display: block;
}

/* Video thumbnail badge */
.lcpg-thumbnail-video {
    position: relative;
}

.lcpg-play-badge {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 50%;
    width: 28px;
    height: 28px;
    font-size: 16px;
    line-height: 28px;
    text-align: center;
}

/* YouTube-style play badge */
.lcpg-yt-badge {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 36px;
    height: 26px;
    pointer-events: none;
}

.lcpg-yt-badge svg {
    width: 100%;
    height: 100%;
    display: block;
}

/* === PDF Slide === */
.lcpg-slide-pdf {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f8f8;
    min-height: 300px;
}

.lcpg-pdf-card {
    text-align: center;
    padding: 40px 30px;
    max-width: 320px;
}

.lcpg-pdf-card-preview {
    position: relative;
    width: 100%;
    max-width: none;
    padding: 0;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    background-color: #f8f8f8;
    min-height: 400px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

.lcpg-pdf-overlay {
    width: 100%;
    padding: 20px;
    background: linear-gradient(transparent, rgba(0,0,0,0.7));
    text-align: center;
}

.lcpg-pdf-card-preview .lcpg-pdf-filename {
    color: #fff;
    font-size: 14px;
    margin-bottom: 10px;
    text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}

.lcpg-pdf-card:not(.lcpg-pdf-card-preview) .lcpg-pdf-overlay {
    background: none;
}

.lcpg-pdf-icon-wrapper {
    margin-bottom: 15px;
}

.lcpg-pdf-icon-wrapper .dashicons {
    font-size: 60px;
    width: 60px;
    height: 60px;
    color: #cc0000;
}

.lcpg-pdf-filename {
    font-size: 14px;
    color: #555;
    margin-bottom: 15px;
    word-break: break-word;
}

.lcpg-pdf-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.lcpg-pdf-actions .button,
.lcpg-pdf-actions a {
    display: inline-block;
    padding: 8px 18px;
    background: #40b8f5;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    font-size: 14px;
    border: none;
    cursor: pointer;
    transition: background 0.2s ease;
}

.lcpg-pdf-actions .button:hover,
.lcpg-pdf-actions a:hover {
    background: #008ABB;
    color: #fff;
}

/* PDF thumbnail */
.lcpg-thumbnail-pdf {
    position: relative;
}

.lcpg-thumbnail-pdf img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.lcpg-pdf-badge {
    position: absolute;
    bottom: 2px;
    right: 2px;
    color: #cc0000;
    background: rgba(255, 255, 255, 0.85);
    border-radius: 3px;
    font-size: 16px;
    width: 20px;
    height: 20px;
    line-height: 20px;
    text-align: center;
}

.lcpg-thumbnail-pdf-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f0f0f0;
}

.lcpg-thumbnail-pdf-icon .lcpg-pdf-icon {
    font-size: 36px;
    width: 36px;
    height: 36px;
    color: #cc0000;
}

/* === No gallery state === */
.lcpg-no-gallery .lcpg-thumbnail-wrapper {
    display: none;
}

/* === Lightbox overrides === */
.lcpg-lightbox-iframe,
.lcpg-lightbox-video,
.lcpg-lightbox-pdf {
    border: none;
}

/* === Responsive === */
@media (max-width: 768px) {
    .lcpg-slider-prev,
    .lcpg-slider-next {
        width: 30px;
        height: 30px;
        font-size: 16px;
        line-height: 30px;
    }

    .lcpg-lightbox-trigger {
        width: 30px;
        height: 30px;
    }

    .lcpg-pdf-card {
        padding: 25px 15px;
    }

    .lcpg-pdf-icon-wrapper .dashicons {
        font-size: 40px;
        width: 40px;
        height: 40px;
    }
}
