/* Omni Scroller. Graviwork owns the explicit canvas dimensions. Scroll Children can fill one viewport or size naturally along the scroll axis. */
.graviwork-omni-scroller {
    position: relative;
    box-sizing: border-box;
    max-width: 100%;
}
.graviwork-omni-scroller__viewport {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}
.graviwork-omni-scroller__track,
.graviwork-omni-scroller__track > .block-editor-inner-blocks > .block-editor-block-list__layout {
    display: flex;
    align-items: stretch;
    gap: var(--graviwork-scroll-gap, 0px);
    min-width: 100%;
    min-height: 100%;
}
.graviwork-omni-scroller.is-axis-horizontal .graviwork-omni-scroller__track,
.graviwork-omni-scroller.is-axis-horizontal .graviwork-omni-scroller__track > .block-editor-inner-blocks > .block-editor-block-list__layout {
    flex-flow: row nowrap;
    height: 100%;
}
.graviwork-omni-scroller.is-axis-vertical .graviwork-omni-scroller__track,
.graviwork-omni-scroller.is-axis-vertical .graviwork-omni-scroller__track > .block-editor-inner-blocks > .block-editor-block-list__layout {
    flex-flow: column nowrap;
    width: 100%;
}
.graviwork-omni-scroller .graviwork-scroll-child {
    box-sizing: border-box;
    flex: 0 0 100%;
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
}
.graviwork-omni-scroller.is-axis-horizontal .graviwork-scroll-child {
    min-width: 100%;
    min-height: 0;
}
.graviwork-omni-scroller.is-axis-vertical .graviwork-scroll-child {
    min-width: 0;
    min-height: 100%;
}
/* Contain Content releases only the main scroll-axis dimension. The cross-axis
   remains tied to the Omni viewport, preserving the stable vertical geometry. */
.graviwork-omni-scroller.is-axis-horizontal .graviwork-scroll-child.is-sizing-contain {
    flex-basis: auto;
    width: auto;
    min-width: 0;
    height: 100%;
}
.graviwork-omni-scroller.is-axis-vertical .graviwork-scroll-child.is-sizing-contain {
    flex-basis: auto;
    width: 100%;
    height: auto;
    min-height: 0;
}

/* Prevent outer Gutenberg content margins from becoming unintended space
   between Scroll Children. Internal content spacing remains untouched. */
.graviwork-omni-scroller__track .graviwork-scroll-child > :first-child {
    margin-block-start: 0;
}
.graviwork-omni-scroller__track .graviwork-scroll-child > :last-child {
    margin-block-end: 0;
}
.graviwork-omni-scroller[data-graviwork-scroll-mode="manual"].is-axis-horizontal .graviwork-omni-scroller__viewport {
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-inline: contain;
}
.graviwork-omni-scroller[data-graviwork-scroll-mode="manual"].is-axis-vertical .graviwork-omni-scroller__viewport {
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-block: contain;
}
.editor-styles-wrapper .graviwork-omni-scroller.is-editor-preview {
    outline: 1px dashed rgba(117, 117, 117, 0.45);
    outline-offset: -1px;
}
.editor-styles-wrapper .graviwork-omni-scroller.is-axis-horizontal .graviwork-omni-scroller__viewport { overflow-x: auto; overflow-y: hidden; }
.editor-styles-wrapper .graviwork-omni-scroller.is-axis-vertical .graviwork-omni-scroller__viewport { overflow-x: hidden; overflow-y: auto; }
.editor-styles-wrapper .graviwork-omni-scroller__track { transform: none !important; }

/* Unified Video Scroller. The block behaves like a Gutenberg Cover: video is
   a background layer and InnerBlocks remain normal editable/layout content. */
.graviwork-video-scroller {
    position: relative;
    overflow: hidden;
    box-sizing: border-box;
    min-height: 240px;
}
/* Gutenberg owns the outer block geometry. Graviwork pins this internal visual
   layer for Sticky Scene so full/wide alignment is never recalculated by the pin. */
.graviwork-video-scroller__scene {
    position: absolute;
    inset: 0 auto auto 0;
    width: 100%;
    height: 100%;
    min-height: inherit;
    overflow: hidden;
    isolation: isolate;
    box-sizing: border-box;
}
/* Sticky Scene deliberately decouples the visual viewport from Gutenberg's
   natural content height. The saved scene receives the block's configured
   minimum-height/aspect-ratio, while InnerBlocks remain normal flow content. */
.graviwork-video-scroller[data-graviwork-scroll-source="sticky-scene"] {
    overflow: visible;
}
.graviwork-video-scroller[data-graviwork-scroll-source="sticky-scene"] > .graviwork-video-scroller__scene {
    height: auto;
}

.graviwork-video-scroller__video,
.graviwork-video-scroller__placeholder {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    margin: 0;
}
.graviwork-video-scroller__video {
    z-index: 0;
    display: block;
}
.graviwork-video-scroller__placeholder {
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.06);
}
.editor-styles-wrapper .graviwork-video-scroller__placeholder .components-button {
    position: relative;
    z-index: 1;
}
.graviwork-video-scroller__content {
    position: relative;
    z-index: 1;
    width: 100%;
    min-height: inherit;
    box-sizing: border-box;
}
.editor-styles-wrapper .graviwork-video-scroller.is-editor-preview {
    outline: 1px dashed rgba(117, 117, 117, 0.45);
    outline-offset: -1px;
}
