/* ============================================================
   Nectar Row Background Slider — Stylesheet v1.8.0
   ============================================================ */

/* -- Row ---------------------------------------------------- */

/* Ensures the row is a positioning context for the slider */
.vc_row[data-has-nrbs="1"] {
    position: relative !important;
}

/* -- Slider container --------------------------------------- */

/* Fills whatever element the slider is injected into.
   For "Full width Background" rows this is .fullwidth-row-background,
   which Salient has already stretched to the full viewport width. */
.nrbs-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
}

/* -- Individual slides -------------------------------------- */

.nrbs-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    opacity: 0;
    will-change: opacity;
    /* Transition speed is set per-instance via CSS custom property from JS */
    transition: opacity var(--nrbs-speed, 800ms) ease;
}

.nrbs-slide.nrbs-active {
    opacity: 1;
}

/* -- Overlay ------------------------------------------------ */

.nrbs-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

/* -- Salient compatibility ---------------------------------- */

/* Ensure column wrappers render above the slider.
   Covers both Salient row structures (with and without .inner-wrap). */
.vc_row[data-has-nrbs="1"] > .inner-wrap,
.vc_row[data-has-nrbs="1"] > .vc_column_container,
.vc_row[data-has-nrbs="1"] > .wpb_column {
    position: relative;
    z-index: 1;
}

/* -- Mobile and tablet portrait fallback -------------------- */

/* All sliders hidden by default at ≤1024px (mobile + tablet portrait).
   The row or column background set in WPBakery Design Options shows instead.
   Sliders with nrbs-show-mobile class (set by JS when opted in) are exempt. */
@media ( max-width: 1024px ) {
    .nrbs-container {
        display: none;
    }
    /* Opt-in: show slider on mobile when "Show on mobile" is enabled */
    .nrbs-container.nrbs-show-mobile {
        display: block;
    }
}

/* Full Width Background rows need overflow: visible so the viewport-wide
   slider is not clipped to the container width of the .vc_row element */
.vc_row[data-nrbs-fwbg="1"] {
    overflow: visible !important;
}

/* -- Column-level slider (companion element) ------------------------ */

/* Column needs position: relative to contain the absolute slider */
.vc_column_container[data-has-nrbs-col="1"] {
    position: relative !important;
    overflow: hidden; /* Clip slider to column bounds */
}

/* Use top/bottom inset instead of height: 100% so the slider fills the
   full flex-stretched column height, not just its content height */
.vc_column_container[data-has-nrbs-col="1"] > .nrbs-container {
    height: auto;
    top: 0;
    bottom: 0;
}

/* Column content renders above the slider */
.vc_column_container[data-has-nrbs-col="1"] > .vc_column-inner {
    position: relative;
    z-index: 1;
}
