/*
 * Simplisio AI Gallery - Frontend Stylesheet
 * Version: 1.3.0 (Masonry Layout Update)
 */

/* ==========================================================================
   1. Global Settings & Fixes
   ========================================================================== */

   :root {
    --saig-grad-start: #36C0E2;
    --saig-grad-mid: #7D8DFF; /* Your updated brand purple */
    --saig-grad-end: #FF4F81;
    --saig-dark-bg-primary: #121212;
    --saig-dark-bg-secondary: #1E1E1E;
    --saig-dark-border: rgba(255, 255, 255, 0.1);
    --saig-text-primary: #FFFFFF;
    --saig-text-secondary: #b0b0b0;
    --saig-font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* Stacking Context Fix for Lightbox */
html.saig-lightbox-active,
body.saig-lightbox-active {
    overflow: hidden !important;
}

/* ==========================================================================
   2. Category Filters
   ========================================================================== */

   .saig-category-filters {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.saig-filter-btn {
    text-decoration: none;
    color: #333;
    padding: 10px 20px;
    border-radius: 20px;
    background-color: #f0f0f0;
    transition: all 0.3s ease;
    font-weight: 500;
    border: 1px solid transparent;
}

.saig-filter-btn:hover {
    background-color: #e0e0e0;
    color: #000;
}

.saig-filter-btn.active {
    background-color: #ffffff;
    color: #000;
    border-color: #ddd;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}


/* ==========================================================================
   3. Gallery Masonry Styles (Replaces old Grid)
   ========================================================================== */


.saig-gallery-grid {
    /* Use column-count for a pure CSS masonry effect */
    column-gap: 24px;
    column-count: 2; /* Default to 2 columns for mobile */
}
/* Responsive columns for larger screens */
@media (min-width: 768px)  { .saig-gallery-grid{ column-count: 3; } }
@media (min-width: 1200px) { .saig-gallery-grid{ column-count: 4; } }
@media (min-width: 1600px) { .saig-gallery-grid{ column-count: 5; } }


.saig-gallery-item {
    position: relative;
    cursor: pointer;
    overflow: hidden;
    border-radius: 12px;
    background: var(--saig-dark-bg-secondary);
    transition: transform 0.3s ease, box-shadow 0.3s ease;

    /* --- Masonry-specific styles --- */
    display: inline-block; /* Required for column-count to work */
    width: 100%;
    margin-bottom: 24px; /* Creates vertical gap between items */
    break-inside: avoid; /* Prevents items from splitting across columns */
    /* REMOVED: aspect-ratio: 1 / 1; to allow variable heights */
}

.saig-gallery-item:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.saig-gallery-item img {
    width: 100%;
    display: block;
    transition: transform 0.4s ease;
    /* --- Masonry-specific styles --- */
    height: auto; /* Let the image's height be natural */
    object-fit: contain;
}

.saig-gallery-item:hover img {
    transform: scale(1.1);
}

/* Grid Item Overlay & Title (Unchanged) */
.saig-item-overlay {
    position: absolute; bottom: 0; left: 0; right: 0;
    padding: 40px 20px 20px;
    background: linear-gradient(0deg, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0) 100%);
    opacity: 0; transition: opacity 0.3s ease;
    pointer-events: none;
}

.saig-gallery-item:hover .saig-item-overlay { opacity: 1; }
.saig-item-title {
    color: var(--saig-text-primary);
    font-size: 18px; margin: 0; line-height: 1.3;
    transform: translateY(20px); transition: transform 0.3s ease;
}
.saig-gallery-item:hover .saig-item-title { transform: translateY(0); }


/* ==========================================================================
   4. SHARED STYLES: Details Panel (Lightbox & Single Page)
   ========================================================================== */

   .saig-details-wrapper {
    background-color: var(--saig-dark-bg-secondary);
    padding: 30px;
    display: flex;
    flex-direction: column;
    gap: 25px;
    /* overflow-y: auto; */ /* This line must be removed or commented out */
}

.saig-details-wrapper h1,
body.saig-lightbox-active div#saig-lightbox h1 { /* More specific selector for lightbox h1 */
    font-size: 28px;
    margin: 0;
    line-height: 1.2;
    color: var(--saig-text-primary) !important;
}

.saig-details-wrapper .saig-details-section { width: 100%; }

.saig-details-wrapper .saig-details-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}
.saig-details-wrapper .saig-details-section-header .actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.saig-details-wrapper label {
    font-size: 14px;
    font-weight: 600;
    color: var(--saig-text-secondary);
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* --- Prompt Box --- */
.saig-details-wrapper .saig-prompt-box {
    position: relative;
}

.saig-details-wrapper .saig-prompt-content {
    margin:0;
    font-size: 14px;
    color: var(--saig-text-secondary);
    line-height: 1.6;
    white-space: pre-wrap;
    word-break: break-word;
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 4; /* Default truncation */
    /* REMOVED STYLES */
    padding: 0;
}

.saig-details-wrapper .saig-prompt-content.is-expanded {
    -webkit-line-clamp: unset;
}

.saig-details-wrapper .saig-more-less-container {
    text-align: right;
    margin-top: 8px;
}
.saig-details-wrapper .saig-more-less-toggle {
    background: none;
    border: none;
    font-size: 14px;
    color: var(--saig-grad-mid);
    cursor: pointer;
    padding: 0;
    display: inline;
}
.saig-details-wrapper .saig-more-less-toggle:hover {
    text-decoration: underline;
}

/* --- Action Buttons (Copy, Use, Share) --- */
.saig-details-wrapper .saig-copy-button,
.saig-details-wrapper .saig-use-button {
    display: flex;
    align-items: center;
    background: none;
    border: none;
    color: var(--saig-text-secondary);
    cursor: pointer;
    padding: 0;
}
.saig-details-wrapper .saig-copy-button:hover,
.saig-details-wrapper .saig-use-button:hover,
.saig-details-wrapper .saig-meta-item button:hover {
    color: var(--saig-text-primary);
}
.saig-details-wrapper .saig-copy-button,
.saig-details-wrapper .saig-use-button {
    position: relative; /* For tooltip positioning */
}
.saig-details-wrapper .saig-copy-button svg { width: 20px; height: 20px; }
.saig-details-wrapper .saig-use-button svg { width: 22px; height: 22px; }

/* --- NEW: Tooltip Styles --- */
.saig-tooltip {
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background-color: #000;
    color: #fff;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s, bottom 0.2s;
    z-index: 10;
}
.saig-copy-button:hover .saig-tooltip,
.saig-use-button:hover .saig-tooltip {
    opacity: 1;
    bottom: calc(100% + 5px);
}

/* --- Main "Create" Button --- */
.saig-details-wrapper #saig-single-page-create-btn {
    display: flex; align-items: center; justify-content: center; gap: 10px;
    width: 100%; text-align: center;
    background: linear-gradient(90deg, var(--saig-grad-start), var(--saig-grad-mid), var(--saig-grad-end));
    background-size: 200% 100%; color: #fff; text-decoration: none; padding: 14px 20px;
    border: none; border-radius: 8px; font-size: 16px; font-weight: 600;
    transition: all 0.3s ease;
}
.saig-details-wrapper #saig-single-page-create-btn:hover {
    background-position: 100% 0; transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(125, 141, 255, 0.4);
}

/* --- Meta Details Section (Share, Creator) --- */
.saig-details-wrapper .saig-details-meta {
    border-top: 1px solid var(--saig-dark-border);
    padding-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    font-size: 14px;
    color: var(--saig-text-secondary);
}
.saig-details-wrapper .saig-meta-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.saig-details-wrapper .saig-meta-item .actions {
    display: flex;
    align-items: center;
    gap: 8px;
}
.saig-details-wrapper .saig-meta-item label {
    font-size: 14px;
    font-weight: 600;
    text-transform: none;
    letter-spacing: 0;
}
.saig-details-wrapper .saig-meta-item a,
.saig-details-wrapper .saig-meta-item button {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--saig-text-secondary);
    text-decoration: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}
.saig-details-wrapper .saig-meta-item a {
    color: var(--saig-grad-mid);
}
.saig-details-wrapper .saig-meta-item a:hover,
.saig-details-wrapper .saig-meta-item button:hover {
    color: var(--saig-text-primary);
}
.saig-details-wrapper .saig-meta-item svg { width: 18px; height: 18px; }

.saig-details-wrapper .saig-back-to-gallery {
    font-size: 14px;
    color: var(--saig-grad-mid);
    text-decoration: none;
}

/* ==========================================================================
   3. Lightbox Modal Styles (Including your mobile optimizations)
   ========================================================================== */

.saig-lightbox-overlay {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(10, 10, 10, 0.9); backdrop-filter: blur(8px);
    z-index: 999999;
    display: none; align-items: center; justify-content: center;
    padding: 20px; box-sizing: border-box;
    font-family: var(--saig-font-family);
}

.saig-lightbox-container {
    background: var(--saig-dark-bg-secondary); border-radius: 16px;
    border: 1px solid var(--saig-dark-border); max-width: 90vw; width: 1400px;
    height: 85vh; position: relative; box-shadow: 0 10px 40px rgba(0,0,0,0.6);
    overflow: hidden; color: var(--saig-text-primary);
}

.saig-lightbox-content { display: flex; height: 100%; }

.saig-image-wrapper {
    flex: 3; background: var(--saig-dark-bg-primary); display: flex;
    align-items: center; justify-content: center; overflow: hidden; padding: 20px;
}
#saig-lightbox-image {
    max-width: 100%; max-height: 100%; width: auto; height: auto;
    object-fit: contain; border-radius: 8px;
}
.saig-lightbox-container .saig-details-wrapper {
    height: 100%;
    width: 420px;
    flex-shrink: 0;
    border-left: 1px solid var(--saig-dark-border);
    overflow-y: auto; /* This makes the details panel scrollable on DESKTOP */
}

/* ==========================================================================
   5. Single Page-Specific Styles
   ========================================================================== */

/* This ensures the single page layout overrides theme defaults */
.content-area, .site-main {
    width: 100%;
    max-width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
}
.saig-single-page-wrapper {
    background-color: var(--saig-dark-bg-primary);
    color: var(--saig-text-primary);
    font-family: var(--saig-font-family);
    padding: 120px 20px 60px; /* Increased top padding to clear theme headers */
    min-height: 80vh;
    box-sizing: border-box; /* Good practice with padding */
}
.saig-single-page-container {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 40px;
    max-width: 1400px;
    margin: 0 auto;
}
.saig-single-page-image img {
    width: 100%;
    height: auto;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 12px;
}
.saig-single-page-details {
    border: 1px solid var(--saig-dark-border);
    border-radius: 12px;
}


/* ==========================================================================
   6. Controls & Responsive (Was section 3)
   ========================================================================== */
body.saig-lightbox-active div#saig-lightbox h2#saig-lightbox-title {
    color: var(--saig-text-primary) !important;
    font-size: 26px; margin: 0; line-height: 1.2;
}

.saig-details-section-header {
    display: flex; justify-content: space-between; align-items: center;
}

/* Highly specific title selector to override themes */
.saig-prompt-box {
    position: relative;
    background: var(--saig-dark-bg-primary);
    border: 1px solid var(--saig-dark-border);
    padding: 15px;
    padding-right: 50px; /* Make space for the copy button */
    border-radius: 8px;
}
.saig-prompt-box #saig-lightbox-prompt {
    margin: 0; font-size: 14px; color: var(--saig-text-secondary);
    line-height: 1.6; word-break: break-word;
    display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 4;
    overflow: hidden;
}
.saig-prompt-box.is-expanded #saig-lightbox-prompt {
    -webkit-line-clamp: unset;
}
#saig-copy-prompt {
    position: absolute;
    top: 5px; right: 5px;
}
.saig-more-less-toggle {
    background: none; border: none; font-size: 14px; color: var(--saig-grad-mid);
    cursor: pointer; padding: 0; display: inline;
}
/* ADDED SPECIFICITY to guarantee the title color is white */
.saig-gallery-item .saig-item-title {
    color: var(--saig-text-primary) !important; /* Forces the color to be white */
    font-size: 18px; 
    margin: 0; 
    line-height: 1.3;
    transform: translateY(20px); 
    transition: transform 0.3s ease;
}


/* --- Upgraded Link Box --- */
.saig-link-box {
    display: flex; align-items: center;
    background: var(--saig-dark-bg-primary);
    border: 1px solid var(--saig-dark-border);
    border-radius: 8px;
    padding-left: 15px;
}
.saig-link-label {
    font-size: 14px; color: var(--saig-text-secondary);
    margin-right: 10px; white-space: nowrap;
}
.saig-link-wrapper {
    display: flex; align-items: center; overflow: hidden; flex-grow: 1;
}
#saig-share-link {
    color: #7D8DFF; text-decoration: none;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    flex-grow: 1; font-size: 14px;
}
#saig-share-link:hover { color: var(--saig-grad-end); }
#saig-copy-link { flex-shrink: 0; }

/* --- Final "Create" Button and Footer Link --- */
.saig-button-primary {
    display: flex; align-items: center; justify-content: center; gap: 10px;
    width: 100%; text-align: center;
    background: linear-gradient(90deg, var(--saig-grad-start), var(--saig-grad-mid), var(--saig-grad-end));
    background-size: 200% 100%; color: #fff; text-decoration: none;
    padding: 14px 20px; border: none; border-radius: 8px; font-size: 16px;
    font-weight: 600; transition: all 0.3s ease;
}
.saig-button-primary:hover {
    background-position: 100% 0; transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(125, 141, 255, 0.4); color: #fff;
}
.saig-button-primary svg { width: 20px; height: 20px; }
.saig-details-footer {
    margin-top: 10px;
    font-size: 13px;
    color: var(--saig-text-secondary);
}
.saig-details-footer a {
    color: var(--saig-grad-mid);
    text-decoration: none;
}
.saig-details-footer a:hover {
    color: var(--saig-text-primary);
    text-decoration: underline;
}

/* --- Reusable Icon Button (for Copy Link & Copy Prompt) --- */
.saig-icon-button {
    position: relative; background: transparent; border: none;
    color: var(--saig-text-secondary); cursor: pointer;
    padding: 10px; border-radius: 8px;
    transition: color 0.2s, background-color 0.2s;
    line-height: 0;
}
.saig-icon-button:hover { background-color: rgba(255,255,255,0.1); color: var(--saig-text-primary); }

.saig-icon-button svg { width: 16px; height: 16px; }

/* --- Tooltip (used for copy buttons) --- */
.saig-copy-tooltip {
    position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%);
    background: #000; color: #fff; padding: 5px 10px; border-radius: 4px;
    font-size: 12px; white-space: nowrap; opacity: 0; pointer-events: none;
    transition: opacity 0.2s, bottom 0.2s; margin-bottom: 5px;
}
.saig-icon-button:hover .saig-copy-tooltip {
    opacity: 1;
    bottom: calc(100% + 5px);
}

/* --- Lightbox-Specific Nav/Close Controls --- */
.saig-close {
    position: absolute; top: 15px; right: 15px; background: transparent;
    border: none; color: var(--saig-text-secondary); font-size: 28px;
    cursor: pointer; z-index: 10; transition: transform 0.2s, color 0.2s; line-height: 1;
}
.saig-close:hover { color: var(--saig-text-primary); transform: rotate(90deg); }


.saig-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.5);
    color: var(--saig-text-secondary);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    /* FIX: Increased z-index to ensure buttons are on top */
    z-index: 10001; 
    font-size: 24px;
}
.saig-nav:hover { background: rgba(0,0,0,0.8); box-shadow: 0 0 15px rgba(0,0,0,0.5); }
.saig-prev { left: 20px; }
/* FIX: Use calc() for robust positioning next to the details panel */
.saig-next { right: calc(420px + 20px); }

/* ==========================================================================
   6. Animations
   ========================================================================== */
   @keyframes fade-in-zoom {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.saig-lightbox-container.is-opening {
    animation: fade-in-zoom 0.3s ease-out forwards;
}

/* Base state for the image during transitions */
#saig-lightbox-image {
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.4s;
    transform: translateX(0);
    opacity: 1;
}

/* Next Button Clicked */
.slide-out-left {
    transform: translateX(-100px) scale(0.9);
    opacity: 0;
}
.slide-in-right {
    position: absolute; /* Prevent layout jump */
    transform: translateX(100px) scale(0.9);
    opacity: 0;
}

/* Prev Button Clicked */
.slide-out-right {
    transform: translateX(100px) scale(0.9);
    opacity: 0;
}
.slide-in-left {
    position: absolute; /* Prevent layout jump */
    transform: translateX(-100px) scale(0.9);
    opacity: 0;
}

@media (max-width: 900px) {
    .saig-single-page-container { grid-template-columns: 1fr; }
    .saig-single-page-image img { max-height: 60vh; }
    .saig-next { right: 20px; }
}

/* START: Add this single, clean block */
@media (max-width: 768px) {
    /* --- Lightbox Mobile Styles --- */
    .saig-lightbox-overlay {
        padding: 0;
        overflow: hidden; 
    }
    .saig-lightbox-container {
        width: 100%; /* CHANGED from 100vw */
        height: 100%; /* CHANGED from 100vh */
        max-width: 100%;
        max-height: 100%;
        border-radius: 0;
        top: 0;
        transform: none;
        background: var(--saig-dark-bg-secondary);
        overflow: hidden; /* ADDED: This is critical to clip any overflowing children */
    }
    .saig-lightbox-content {
        height: 100%;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        display: block;
        overflow-x: hidden; /* ADDED: Prevents the scrolling area itself from sliding */
    }
    .saig-image-wrapper {
        padding: 40px 10px 10px 10px;
        box-sizing: border-box;
    }
    #saig-lightbox-image {
        display: block;
        width: 100%;
        height: auto;
        max-height: 60vh;
        object-fit: contain;
    }
    .saig-details-wrapper {
        padding: 20px;
    }
    .saig-nav {
        top: 30vh;
        transform: translateY(-50%);
    }
    .saig-next {
        right: 10px !important;
    }
    .saig-prev {
        left: 10px !important;
    }
    .saig-close {
        position: fixed;
        top: 15px;
        right: 15px;
        background: rgba(0,0,0,0.3);
    }

    /* --- Single Page Mobile Styles --- */
    .saig-single-page-wrapper {
        padding: 100px 15px 30px;
    }
    .saig-single-page-details h1 {
        font-size: 24px;
    }
}

/* ==========================================================================
   7. Static "Before & After" Grid Preview
   ========================================================================== */
.saig-static-comparison {
    position: relative;
    line-height: 0;
    background: var(--saig-dark-bg-secondary);
    cursor: pointer;
}
.saig-static-comparison .saig-static-comparison-after {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    clip-path: inset(0 0 0 50%); /* Only show the right half */
}
.saig-static-comparison .saig-static-comparison-before {
    display: block;
    width: 100%;
    height: auto;
    object-fit: cover;
}
.saig-static-comparison .saig-static-comparison-handle {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none; /* Make sure it's not interactive */
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
    transition: transform 0.3s ease;
}
.saig-gallery-item:hover .saig-static-comparison-handle {
    transform: translate(-50%, -50%) scale(1.1);
}
.saig-static-comparison .saig-static-comparison-arrow-left {
    width: 0; height: 0; border-top: 8px solid transparent; border-bottom: 8px solid transparent; border-right: 10px solid #333; margin-right: 2px;
}
.saig-static-comparison .saig-static-comparison-arrow-right {
    width: 0; height: 0; border-top: 8px solid transparent; border-bottom: 8px solid transparent; border-left: 10px solid #333; margin-left: 2px;
}

/* ==========================================================================
   8. Bug Fixes & Overrides
   ========================================================================== */

/* FIX: Ensure lightbox close button is positioned correctly relative to its container. */
.saig-lightbox-container .saig-close {
    position: absolute;
    top: 15px;
    right: 15px;
    z-index: 10002; /* Ensure it's above all other lightbox content */
}
/* ==========================================================================
   9. Before/After Labels
   ========================================================================== */

/* Style for the interactive slider labels (in lightbox and single page) */
.image-comparison-slider .image-compare-label {
    position: absolute; /* Added for positioning */
    top: 20px; /* Added for positioning */
    background-color: rgba(30, 30, 30, 0.7); /* Dark, blurred background */
    color: #fff;
    font-size: 13px;
    font-weight: 500;
    padding: 8px 16px; /* FIX: Increased top/bottom padding */
    border-radius: 20px; /* Pill shape */
    border: 1px solid rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    z-index: 5; /* Ensure they appear above images */
}
/* Position the interactive labels */
.image-comparison-slider .image-compare-label.is-before {
    left: 20px;
}
.image-comparison-slider .image-compare-label.is-after {
    right: 20px;
}

/* Style for the static grid preview labels (smaller and more subtle) */
.saig-static-comparison .saig-static-label {
    position: absolute;
    top: 10px;
    background-color: rgba(30, 30, 30, 0.7);
    color: #fff;
    font-size: 10px; /* Smaller font */
    font-weight: 500;
    padding: 8px 12px; /* FIX: Increased top/bottom padding */
    border-radius: 20px;
    z-index: 5; /* Above the images */
    border: 1px solid rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}
.saig-static-comparison .saig-static-label.is-before {
    left: 10px;
}
.saig-static-comparison .saig-static-label.is-after {
    right: 10px;
}

/* Add rounded corners to the slider on the single page AND in the lightbox */
.single-ai_gallery_image .image-comparison-slider,
.saig-lightbox .image-comparison-slider {
    border-radius: 15px;
    overflow: hidden; /* This clips the images inside to the rounded shape */
}
.saig-lightbox .image-comparison-slider .image-compare-label {
    z-index: 9999;
}