.levis-banner-rotator {
    box-sizing: border-box;
    position: relative;
    width: 100%;
    max-width: 100%;
    line-height: 0;
}

.levis-banner-rotator.lbr-light-border {
    --lbr-light-color: #ff2b2b;
    border: 2px solid rgba(255, 255, 255, 0.22);
    border-radius: 5px;
    isolation: isolate;
}

.levis-banner-rotator.lbr-light-border > a,
.levis-banner-rotator.lbr-light-border > img {
    position: relative;
    z-index: 1;
    border-radius: 3px;
}

.levis-banner-rotator.lbr-light-border > a {
    overflow: hidden;
}

.levis-banner-rotator.lbr-light-border > a > img {
    border-radius: 3px;
}

.lbr-light-track {
    position: absolute;
    z-index: 3;
    inset: -2px;
    border-radius: 5px;
    pointer-events: none;
}

.lbr-light-segment {
    position: absolute;
    display: block;
    opacity: 0;
    pointer-events: none;
    border-radius: 999px;
    filter:
        drop-shadow(0 0 3px var(--lbr-light-color))
        drop-shadow(0 0 7px var(--lbr-light-color));
}

.lbr-light-segment-top,
.lbr-light-segment-bottom {
    width: 18%;
    min-width: 28px;
    max-width: 86px;
    height: 2px;
    background: linear-gradient(
        90deg,
        transparent 0%,
        var(--lbr-light-color) 24%,
        #ffffff 50%,
        var(--lbr-light-color) 76%,
        transparent 100%
    );
}

.lbr-light-segment-right,
.lbr-light-segment-left {
    width: 2px;
    height: 34%;
    min-height: 16px;
    max-height: 56px;
    background: linear-gradient(
        180deg,
        transparent 0%,
        var(--lbr-light-color) 24%,
        #ffffff 50%,
        var(--lbr-light-color) 76%,
        transparent 100%
    );
}

/*
 * The cycle duration is supplied per banner at runtime. The visible sweep
 * occupies the same ~22.22% of each cycle as before; the remaining time is
 * idle. Short vertical edges intentionally receive slightly more travel time
 * than the long horizontal edges so wide, shallow banners do not appear to
 * "snap" down the sides.
 */
.lbr-light-segment-top {
    top: 0;
    left: -18%;
    animation: lbr-light-top var(--lbr-light-cycle, 9s) linear infinite;
}

.lbr-light-segment-right {
    top: -34%;
    right: 0;
    animation: lbr-light-right var(--lbr-light-cycle, 9s) linear infinite;
}

.lbr-light-segment-bottom {
    right: -18%;
    bottom: 0;
    animation: lbr-light-bottom var(--lbr-light-cycle, 9s) linear infinite;
}

.lbr-light-segment-left {
    bottom: -34%;
    left: 0;
    animation: lbr-light-left var(--lbr-light-cycle, 9s) linear infinite;
}

@keyframes lbr-light-top {
    0% { left: -18%; opacity: 0; }
    0.35% { opacity: 1; }
    4.65% { opacity: 1; }
    5% { left: 100%; opacity: 0; }
    100% { left: 100%; opacity: 0; }
}

@keyframes lbr-light-right {
    0%, 5% { top: -34%; opacity: 0; }
    5.35% { opacity: 1; }
    10.76% { opacity: 1; }
    11.11% { top: 100%; opacity: 0; }
    100% { top: 100%; opacity: 0; }
}

@keyframes lbr-light-bottom {
    0%, 11.11% { right: -18%; opacity: 0; }
    11.46% { opacity: 1; }
    15.76% { opacity: 1; }
    16.11% { right: 100%; opacity: 0; }
    100% { right: 100%; opacity: 0; }
}

@keyframes lbr-light-left {
    0%, 16.11% { bottom: -34%; opacity: 0; }
    16.46% { opacity: 1; }
    21.87% { opacity: 1; }
    22.22% { bottom: 100%; opacity: 0; }
    100% { bottom: 100%; opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
    .lbr-light-segment {
        animation: none;
        opacity: 0;
    }
}

/*
 * Optional per-group sticky mode. The shell remains at the shortcode's
 * original position while the live banner is temporarily moved to <body>
 * and fixed to the viewport. This avoids Elementor parent overflow/transform
 * containers limiting how far the banner can remain sticky.
 */
.lbr-sticky-shell {
    box-sizing: border-box;
    position: relative;
    width: 100%;
    max-width: 100%;
}

.levis-banner-rotator.lbr-sticky-active {
    position: fixed !important;
    top: var(--lbr-sticky-top) !important;
    left: var(--lbr-sticky-left) !important;
    width: var(--lbr-sticky-width) !important;
    max-width: none !important;
    margin: 0 !important;
    z-index: 9999;
}
