/* MB-03 | Work Layer */

.work-layer-surface[hidden] {
    display: none !important;
}

.work-layer-wp {
    position: relative;
    width: 100%;
    min-height: 100%;
}

.work-layer-wp.is-stacked {
    display: none !important;
}

.work-layer-dr,
.work-layer-drawer {
    position: fixed;
    top: 64px;
    right: 0;
    bottom: 0;
    z-index: 7000;

    width: min(480px, calc(100vw - 48px));
    overflow: auto;

    background: #ffffff;
    border-left: 1px solid #e2e8f0;
    box-shadow: -18px 0 40px rgba(15, 23, 42, 0.12);
    animation: work-layer-drawer-in 180ms ease-out;
}

@keyframes work-layer-drawer-in {
    from { transform: translateX(100%); opacity: 0.98; }
    to { transform: translateX(0); opacity: 1; }
}

.work-layer-md {
    position: fixed;
    inset: 0;
    z-index: 8000;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 24px;
    background: rgba(15, 23, 42, 0.34);
}

.work-layer-md > .work-layer-modal-card {
    width: min(560px, 100%);
    max-height: calc(100vh - 48px);
    overflow: auto;

    border-radius: 14px;
    background: #ffffff;
    box-shadow: 0 24px 70px rgba(15, 23, 42, 0.22);
}

/* DEV-3.03D | MB-03 Workspace Scroll Ownership
   AppShell keeps #app-workspace overflow:hidden for the locked Home viewport.
   Any active Work Layer WP temporarily hands vertical scroll ownership to the
   workspace host; when the WP stack is empty, the Home lock is restored. */
.v2-theme .app-shell__workspace.work-layer-scroll-active {
    overflow-y: auto !important;
    overflow-x: hidden !important;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
}
