/* Static plugin stylesheet: loaded by digital.css in both Portal and WebHost. */
@scope (.runner-shell) {
/*
 * Full-viewport adapter for the URL-addressable Checklist Execution workspace.
 * It overlays the host chrome like the document preview while retaining a real
 * route, and owns its local header, scrollable feed, and execution footer.
 */
:scope.digital-content-page {
    --runner-content-width: 1100px;
    --runner-layer-chrome: 20;
    --runner-layer-action: 25;
    --runner-layer-choice-backdrop: 49;
    --runner-layer-choice: 50;
    --runner-layer-contents-backdrop: 59;
    --runner-layer-contents: 60;
    --runner-layer-report-backdrop: 79;
    --runner-layer-report: 80;
    --runner-layer-continue-backdrop: 89;
    --runner-layer-continue: 90;
    --runner-layer-tool: 110;
    position: fixed;
    inset: 0;
    z-index: var(--digital-runner-zindex);
    width: 100%;
    height: 100dvh;
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 0;
    overflow: hidden;
    padding: 0;
    background: var(--digital-page-bg);
    color: var(--digital-text);
}

:scope > .runner-header {
    position: static;
    top: auto;
    z-index: var(--runner-layer-chrome);
    flex: 0 0 auto;
    margin: 0;
    padding: 10px 18px 9px;
    border-bottom: 1px solid var(--digital-border);
    background: color-mix(in srgb, var(--digital-surface) 98%, transparent);
    box-shadow: 0 3px 12px rgba(15, 23, 42, 0.04);
    backdrop-filter: blur(8px);
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 10px;
    min-height: 58px;
}

:scope > .runner-message {
    flex: 0 0 auto;
    margin: 10px 18px 0;
}

:scope > .runner-progress-card {
    flex: 0 0 auto;
    margin: 8px 18px 10px;
}

:scope > .work-panel {
    min-height: 0;
    margin: 18px;
    overflow: auto;
}

:scope > .worker-runner-grid {
    flex: 1 1 0;
    min-height: 0;
    overflow: hidden;
    padding: 0 18px 10px;
}

.worker-runner-grid > .worker-process-feed {
    height: 100%;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
    padding-right: 4px;
    padding-bottom: 12px;
}

:scope > .runner-execution-footer {
    position: static;
    bottom: auto;
    z-index: var(--runner-layer-chrome);
    flex: 0 0 auto;
    width: 100%;
    margin: 0;
    padding: 8px 18px;
    border-top: 1px solid var(--digital-border);
    background: color-mix(in srgb, var(--digital-surface) 98%, transparent);
    box-shadow: 0 -6px 18px rgba(15, 23, 42, 0.08);
    backdrop-filter: blur(8px);
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(130px, 220px) minmax(0, 1fr);
    gap: 14px;
    min-height: 58px;
}

.runner-close { width: 34px; height: 34px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 6px; background: transparent; color: var(--digital-text); cursor: pointer; }
.runner-close:hover { background: var(--digital-surface-subtle); }
.runner-identity { min-width: 0; width: max-content; max-width: 100%; display: grid; gap: 1px; padding: 3px 7px 4px; border: 0; border-radius: 6px; background: transparent; color: var(--digital-text); font: inherit; text-align: left; cursor: pointer; }
.runner-identity:hover { background: var(--digital-surface-subtle); }
.runner-identity code { flex: 0 0 auto; padding: 2px 5px; border-radius: 4px; background: var(--digital-surface-subtle); color: var(--digital-text); font-family: inherit; font-weight: 800; }
.runner-order-origin { display: flex; align-items: center; gap: 4px; color: var(--digital-text-muted); font-size: .67rem; font-weight: 500; line-height: 1.1; letter-spacing: .02em; }
.runner-order-origin code { padding: 1px 4px; font-size: .67rem; line-height: 1.1; }
.runner-identity-title { min-width: 0; display: flex; align-items: center; gap: 7px; }
.runner-identity strong { overflow: hidden; color: var(--digital-text); font-size: 1.25rem; font-weight: 800; line-height: 1.2; text-overflow: ellipsis; white-space: nowrap; }
.runner-state-dot { width: 9px; height: 9px; flex: 0 0 auto; border-radius: 50%; background: #2f6ff3; }
.runner-state-dot.paused { background: #f2b827; }.runner-state-dot.problem { background: #e5484d; }.runner-state-dot.completed { background: #1fa46a; }
.runner-current-step-title { width: min(var(--runner-content-width), 100%); margin: 6px auto 10px; color: var(--digital-text); font-size: 1.25rem; text-align: left; }
.runner-content-fab { position: fixed; right: 18px; bottom: 76px; z-index: var(--runner-layer-action); display: inline-flex; align-items: center; gap: 7px; min-height: 42px; padding: 0 13px; border: 1px solid var(--digital-border); border-radius: 7px; background: var(--digital-surface); box-shadow: 0 5px 16px rgb(15 23 42 / 14%); color: var(--digital-text); cursor: pointer; }
.runner-content-fab-indicator { position: absolute; top: -6px; right: -5px; width: 18px; height: 18px; display: grid; place-items: center; border: 2px solid var(--digital-surface); border-radius: 50%; background: #7745e7; color: #fff; font-size: .92rem; line-height: 1; font-style: normal; font-weight: 900; }
.runner-content-fab-indicator.failure { right: -8px; background: #e5484d; font-size: .68rem; }
.runner-content-fab-indicator.mandatory:has(+ .failure) { right: 7px; }

.runner-footer-side { min-width: 0; display: flex; align-items: center; }.runner-footer-side.right { justify-content: flex-end; }
.runner-footer-navigation { min-width: 0; display: inline-flex; align-items: center; gap: 8px; padding: 4px 6px; border: 0; background: transparent; color: var(--digital-text); font: inherit; cursor: pointer; }
.runner-footer-navigation:disabled {
    background: var(--digital-surface-subtle);
    color: color-mix(in srgb, var(--digital-text) 38%, var(--digital-surface));
    border-radius: 8px;
    cursor: not-allowed;
    box-shadow: none;
}
.runner-footer-navigation:disabled :is(span, b, small, .mud-icon-root) { color: inherit; }
.runner-footer-navigation span { min-width: 0; display: grid; text-align: left; }.runner-footer-side.right span { text-align: right; }
.runner-footer-navigation b { font-size: .92rem; font-weight: 760; }.runner-footer-navigation small { max-width: 240px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .7rem; }
.runner-footer-step-status { min-width: 0; display: grid; gap: 4px; place-items: center; }.runner-footer-step-status i { width: 100%; height: 4px; overflow: hidden; border-radius: 99px; background: var(--digital-surface-subtle); }.runner-footer-step-status i span { display: block; height: 100%; background: #2e4163; }.runner-footer-step-status small { font-size: .68rem; }

.runner-report-dialog-backdrop { position: fixed; inset: 0; z-index: var(--runner-layer-report-backdrop); border: 0; background: rgb(36 67 120 / 55%); }
.runner-report-dialog { position: fixed; top: 50%; left: 50%; z-index: var(--runner-layer-report); width: min(400px, calc(100vw - 28px)); display: grid; gap: 14px; padding: 24px; border-radius: 7px; background: var(--digital-surface); color: var(--digital-text); box-shadow: 0 24px 70px rgb(15 23 42 / 25%); transform: translate(-50%, -50%); }
.runner-report-dialog > header { display: flex; align-items: center; justify-content: space-between; }.runner-report-dialog h2 { margin: 0; font-size: 1.15rem; }.runner-dialog-name { font-size: .98rem; }.runner-created-by { color: var(--digital-text-muted); font-size: .78rem; }.runner-created-by b { color: var(--digital-text); font-weight: 600; }
.runner-dialog-summary { display: grid; gap: 5px; padding: 14px 16px; border: 1px solid var(--digital-border); border-radius: 7px; color: var(--digital-text-muted); font-size: .82rem; }.runner-dialog-summary > span { margin-bottom: 3px; color: var(--digital-text); font-size: .72rem; }.runner-dialog-summary div { display: flex; align-items: center; gap: 5px; }.runner-dialog-summary b { color: var(--digital-text); }.mandatory-summary { padding: 1px 5px; border-radius: 4px; background: var(--digital-secondary-soft); color: var(--digital-mandatory-text) !important; }.failed-summary { color: var(--digital-error) !important; }
.runner-state-select,.runner-report-comment { position: relative; display: grid; gap: 5px; }.runner-state-select > span,.runner-report-comment > span { color: var(--digital-text-muted); font-size: .75rem; }.runner-state-select select,.runner-report-comment textarea { width: 100%; box-sizing: border-box; border: 1px solid var(--digital-border); border-radius: 7px; background: var(--digital-surface); color: var(--digital-text); font: inherit; }.runner-state-select select { min-height: 44px; padding: 0 10px; }.runner-report-comment textarea { min-height: 64px; padding: 10px; resize: vertical; }
.runner-mandatory-warning { display: flex; align-items: center; gap: 7px; color: var(--digital-mandatory-text); font-size: .78rem; }.runner-mandatory-warning span { font-size: 1.25rem; font-weight: 800; }.runner-report-dialog > footer { display: flex; justify-content: flex-end; gap: 10px; }
.runner-report-dialog .mud-button-root.mud-disabled,
.runner-report-dialog .mud-button-root.mud-button-disabled,
.runner-report-dialog .mud-button-root:disabled { border-color: var(--digital-border) !important; background: var(--digital-surface-subtle) !important; color: var(--digital-text-muted) !important; box-shadow: none !important; cursor: not-allowed !important; opacity: 1 !important; }

.runner-continue-later-backdrop { position: fixed; inset: 0; z-index: var(--runner-layer-continue-backdrop); border: 0; background: rgb(36 67 120 / 55%); }
.runner-continue-later-dialog { position: fixed; top: 50%; left: 50%; z-index: var(--runner-layer-continue); width: min(394px, calc(100vw - 28px)); padding: 24px; border-radius: 4px; background: var(--digital-surface); box-shadow: 0 24px 70px rgb(15 23 42 / 25%); color: var(--digital-text); transform: translate(-50%, -50%); }
.runner-continue-later-dialog > header { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.runner-continue-later-dialog h2 { margin: 0; font-size: 1.15rem; font-weight: 700; }
.runner-continue-later-dialog p { margin: 22px 0 34px; color: var(--digital-text-muted); font-size: .9rem; line-height: 1.45; }
.runner-continue-later-dialog > footer { display: flex; justify-content: flex-end; gap: 16px; }
.runner-continue-later-error { margin: -18px 0 22px; color: var(--digital-error); font-size: .82rem; }

.runner-contents-drawer > header > div { display: flex; align-items: center; gap: 5px; }.runner-contents-drawer > header button:not(.mud-icon-button-root) { border: 0; background: transparent; color: var(--digital-text); font-size: .7rem; cursor: pointer; }.runner-contents-summary { display: flex; align-items: center; gap: 18px; min-height: 38px; padding: 0 8px 10px; border-bottom: 1px solid var(--digital-border); color: var(--digital-text-muted); font-size: .78rem; }.runner-contents-summary > span { display: inline-flex; align-items: center; gap: 5px; }
.runner-content-step.locked { opacity: .52; }.runner-content-step-title b,.runner-content-process b { color: var(--digital-mandatory-text); font-size: 1.15rem; }
.runner-content-process { width: 100%; border: 0; border-top: 1px solid var(--digital-border); background: var(--digital-surface); color: var(--digital-text); font: inherit; text-align: left; cursor: pointer; }.runner-content-process:disabled { cursor: not-allowed; opacity: .5; }.runner-content-process > div { min-width: 0; display: grid; gap: 4px; align-items: center; }.runner-content-process-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; }.runner-content-process-stat { display: flex; align-items: center; gap: 5px; color: var(--digital-text-muted); font-size: .72rem; }.runner-content-process-stat > span { color: var(--digital-text); font-weight: 700; }.runner-content-process-stat.mandatory > span { padding: 1px 5px; border-radius: 3px; background: var(--digital-secondary-soft); color: var(--digital-mandatory-text); }.runner-content-process-stat.mandatory > b { line-height: .8; }.runner-content-process-stat.failed { color: #e0444d; }.runner-content-process-stat.failed > span { padding: 1px 5px; border-radius: 3px; background: var(--digital-error-soft); color: var(--digital-error); }.runner-content-process-stat.failed .mud-icon-root { width: 16px; height: 16px; color: var(--digital-error); }.runner-content-process.complete > span { border-color: #2e72ed; background: #2e72ed; color: #fff; }.runner-content-process.failed > span { border-color: #e5484d; background: #e5484d; color: #fff; }

/* Runner body: process headers sit on the page; only interactions are cards. */
.worker-process-feed .worker-process-card {
    width: min(var(--runner-content-width), 100%);
    margin: 0 auto;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    gap: 7px;
}

.worker-process-feed .worker-process-card.selected { border: 0; }
.worker-process-feed .worker-process-header { min-height: 36px; align-items: center; }
.worker-process-feed .worker-process-header .process-number { position: relative; z-index: 2; }
.worker-process-feed .worker-process-card.selected > .worker-process-header .process-number {
    background: var(--digital-text);
    color: var(--digital-surface);
}
.worker-process-feed .worker-process-card.selected > .worker-interaction-list {
    border-left-color: var(--digital-text);
}
.worker-process-feed .worker-process-header h2 { margin: 0; font-size: 1rem; }
.worker-process-feed .worker-media-list { margin-left: 42px; }
.worker-process-feed .worker-interaction-list {
    position: relative;
    gap: 8px;
    margin-left: 16px;
    padding: 3px 0 8px 25px;
    border-left: 2px solid var(--digital-border);
}
.worker-process-feed .checklist-interaction-shell { gap: 0; }
.worker-process-feed .checklist-interaction-shell.conditional-child {
    width: 100%;
    margin-left: 0;
    padding-left: 18px;
}
.worker-process-feed .worker-interaction-row {
    min-height: 48px;
    border-radius: 7px 7px 0 0;
    box-shadow: none;
}
.worker-process-feed .worker-inline-input {
    margin: 0;
    padding: 10px 14px 12px;
    border: 1px solid var(--digital-border);
    border-top: 0;
    border-radius: 0 0 7px 7px;
    background: var(--digital-surface);
}
.worker-process-feed .worker-value-form { gap: 10px; }

/* Contents is a compact progress rail. */
.runner-content-step { position: relative; overflow: visible; border: 0; border-radius: 0; }
.runner-content-step.active { border: 0; box-shadow: none; }
.runner-content-step-title { border: 1px solid var(--digital-border); border-radius: 7px; background: var(--digital-surface); }
.runner-content-step.active > .runner-content-step-title { border-color: #6687df; background: var(--digital-surface-subtle); box-shadow: inset 3px 0 #376cf0; }
.runner-content-process { position: relative; margin-left: 14px; width: calc(100% - 14px); padding: 10px 8px 10px 18px; border-top: 0; background: transparent; }
.runner-content-process::before { content: ""; position: absolute; top: 0; bottom: 0; left: 11px; width: 2px; background: var(--digital-primary-soft); }
.runner-content-process > span { position: relative; z-index: 1; background: var(--digital-surface); }
.runner-content-process.active { color: var(--digital-text); background: var(--digital-surface-subtle); }
.runner-content-process.open > span { border-color: var(--digital-border); color: var(--digital-text-muted); }
.runner-content-process.complete::before { background: #7ea3f4; }
.runner-content-process.failed::before { background: #e5484d; }

@media (max-width: 860px) {
    :scope.digital-content-page {
        min-height: 0;
    }

    :scope > .runner-header {
        grid-template-columns: auto minmax(0, 1fr) auto;
        padding: 8px 12px;
    }

    :scope > .runner-message {
        margin: 8px 12px 0;
    }

    :scope > .runner-progress-card {
        margin: 8px 12px;
    }

    :scope > .work-panel {
        margin: 12px;
    }

    :scope > .worker-runner-grid {
        padding: 0 8px 8px 12px;
    }

    .worker-runner-grid > .worker-process-feed {
        padding-right: 4px;
        padding-bottom: 8px;
    }

    :scope > .runner-execution-footer {
        margin: 0;
        padding: 8px 12px calc(8px + env(safe-area-inset-bottom));
    }

    .runner-save-status { display: none; }
    .runner-content-fab { right: 10px; bottom: 74px; }
    .runner-footer-navigation small { max-width: 105px; }
}

@media (max-width: 420px) {
    :scope > .runner-header {
        padding-right: 8px;
        padding-left: 8px;
    }

    :scope > .runner-progress-card {
        margin-right: 8px;
        margin-left: 8px;
    }

    :scope > .worker-runner-grid {
        padding-right: 4px;
        padding-left: 8px;
    }

    :scope > .runner-execution-footer {
        padding-right: 8px;
        padding-left: 8px;
    }
}
}

