/* public/page-studio/runtimes/layout-sticky.css
   Runtime CSS for sticky layout behavior.
   Shared verbatim by SSR and builder canvas. */

@layer ps-components {

  .ps-sticky-fixed {
    position: fixed;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 100;
    /* top is set inline by the JS from data-ps-sticky-offset */
  }

  /* Builder canvas: keep sticky elements in normal flow for editing —
     the fixed class should not fire inside the builder iframe since
     the runtime JS is disabled there (data-ps-builder-preview blocks
     the scroll listener from making visual changes that confuse editing).
     This rule ensures no layout breakage if ps-sticky-fixed somehow
     gets applied in the canvas. */
  [data-ps-builder-preview="true"] .ps-sticky-fixed {
    position: relative !important;
    top: auto !important;
    width: auto !important;
  }
}
