/* 
   NetSurf Loop Grid Styles 
   ========================================================================== */

.netsurf-loop-grid {
    position: relative;
    /* Ensure no conflict with grid system */
    display: block; 
}

.netsurf-loop-grid .splide__track {
    overflow: hidden;
}

/* Header & Controls */
.netsurf-loop-grid .netsurf-carousel-header {
    display: flex;
    justify-content: space-between; /* Align title left, controls right */
    align-items: center;
    width: 100%;
    margin-bottom: 48px;
    position: relative;
}

.netsurf-carousel-title {
    margin: 0;
    /* Default styling, can be overridden by Elementor Typography settings */
    font-size: 24px;
    font-weight: 600;
}

/* Absolute positioning for controls if requested, 
   BUT we use flex-end in header container to be safer with layout flow.
   If user strictly wants absolute top-right relative to the whole block:
*/
/* 
.netsurf-loop-grid .netsurf-loop-grid-controls {
    position: absolute;
    top: -60px;
    right: 0;
}
*/

.netsurf-loop-grid-controls {
    display: flex;
    gap: 10px;
}

.netsurf-loop-grid-controls button {
    background: #f5f5f5;
    opacity: 1;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    cursor: pointer;
    padding: 0;
}
.netsurf-loop-grid-controls button[disabled] {
    cursor: not-allowed;
    opacity: 0.3;
}
.netsurf-loop-grid-controls button svg {
    fill: #333;
    width: 16px;
    height: 16px;
    transition: fill 0.3s ease;
}

.netsurf-loop-grid-controls button:hover {
    background: #FF0000;
}

.netsurf-loop-grid-controls button:hover svg {
    fill: #fff;
}

/* Splide Slide Adjustments */
.netsurf-loop-grid .splide__slide {
    /* Reset Elementor's default list styles just in case */
    list-style: none;
    margin: 0;
    /* Ensure content takes full height if needed */
    height: auto; 
}

/* Ensure Elementor Template content fits nicely */
.netsurf-loop-grid .elementor-section,
.netsurf-loop-grid .elementor-container {
    width: 100%;
}

/* Hide default pagination if parent Loop Grid renders it */
.netsurf-loop-grid .elementor-pagination {
    display: none !important;
}

/* Fix for Editor Visibility */
.elementor-editor-active .netsurf-loop-grid.splide {
    visibility: visible !important;
}
