// Position, inset & stacking-context helpers (veela-independent)
// Forwarded via lib/basic/_index.scss as part of the public veela-lib surface.

@mixin center-absolute {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

@mixin absolute-fill {
    position: absolute;
    inset: 0;
}

@mixin fixed-fill {
    position: fixed;
    inset: 0;
}

@mixin position($type: "relative", $inset: null) {
    position: #{$type};

    @if $inset {
        inset: $inset;
    }
}

@mixin sticky($top: 0) {
    position: sticky;
    inset-block-start: $top;
}

/// Screen-reader only: visually hidden but still exposed to accessibility APIs
@mixin visually-hidden {
    position: absolute;
    inline-size: 1px;
    block-size: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
