:root {
    --stariz-modal-layer-z: 30000;
    --stariz-modal-surface-z: 30001;
    --stariz-modal-radius: 16px;
    --stariz-modal-gap: 16px;
    --stariz-modal-padding: 20px;
    --stariz-modal-shadow: 0 20px 56px rgba(15, 23, 42, .20);
}

html.stariz-modal-open,
html.stariz-modal-open body {
    overflow: hidden;
    overscroll-behavior: none;
}

html body .stariz-global-modal-layer {
    align-items: center;
    display: flex;
    background: transparent;
    background-color: transparent;
    background-image: none;
    inset: 0;
    isolation: isolate;
    justify-content: center;
    padding: 20px;
    pointer-events: auto;
    position: fixed;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    z-index: var(--stariz-modal-layer-z);
}

html body dialog.stariz-global-modal-surface::backdrop,
html body dialog::backdrop {
    background: transparent;
    background-color: transparent;
    background-image: none;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
}

html body .stariz-global-modal-surface {
    background: var(--panel, #fff);
    border: 1px solid color-mix(in srgb, var(--text, #17202c) 18%, transparent);
    border-radius: var(--stariz-modal-radius);
    box-shadow: var(--stariz-modal-shadow);
    color: var(--text, #17202c);
    max-height: calc(100vh - 40px);
    max-width: calc(100vw - 40px);
    overflow: auto;
    position: relative;
    z-index: var(--stariz-modal-surface-z);
}

html body .stariz-global-modal-surface[data-stariz-modal-size="small"] {
    width: min(520px, calc(100vw - 40px));
}

html body .stariz-global-modal-surface[data-stariz-modal-size="medium"] {
    width: min(720px, calc(100vw - 40px));
}

html body .stariz-global-modal-surface[data-stariz-modal-size="large"] {
    width: min(1080px, calc(100vw - 40px));
}

html body dialog.stariz-global-modal-surface {
    inset: auto;
    margin: auto;
    padding: 0;
}

html body .stariz-global-modal-surface > header {
    align-items: flex-start;
    border-bottom: 1px solid var(--line, #dfe5ec);
    gap: 16px;
    justify-content: space-between;
    margin: 0;
    padding: 18px 20px;
}

html body .stariz-global-modal-surface > header h1,
html body .stariz-global-modal-surface > header h2,
html body .stariz-global-modal-surface > header h3 {
    color: var(--text, #17202c);
    margin-top: 0;
}

html body .stariz-global-modal-surface > footer {
    align-items: center;
    border-top: 1px solid var(--line, #dfe5ec);
    gap: 10px;
    justify-content: flex-end;
    margin: 0;
    padding: 14px 20px;
}

html body .process-management-dialog.stariz-global-modal-layer,
html body .process-delete-dialog.stariz-global-modal-layer {
    background: transparent;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    z-index: var(--stariz-modal-layer-z);
}

html body .process-management-dialog__surface.stariz-global-modal-surface {
    display: grid;
    gap: var(--stariz-modal-gap);
    padding: 0;
}

html body .process-management-dialog__surface.stariz-global-modal-surface > :not(header):not(footer) {
    margin-left: var(--stariz-modal-padding);
    margin-right: var(--stariz-modal-padding);
}

html body .process-management-dialog__surface.stariz-global-modal-surface > footer {
    padding-top: 14px;
}

html body .process-management-dialog__summary {
    margin-bottom: 0;
}

html body .process-delete-dialog__surface.stariz-global-modal-surface {
    padding: 20px;
}

html body .stariz-global-modal-layer[style],
html body [data-stariz-modal-layer].stariz-global-modal-layer {
    background: transparent;
    background-color: transparent;
    background-image: none;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
}

@media (max-width: 720px) {
    html body .stariz-global-modal-layer {
        align-items: flex-start;
        padding: 12px;
    }

    html body .stariz-global-modal-surface,
    html body .stariz-global-modal-surface[data-stariz-modal-size] {
        max-height: calc(100vh - 24px);
        max-width: calc(100vw - 24px);
        width: calc(100vw - 24px);
    }

    html body .stariz-global-modal-surface > footer {
        align-items: stretch;
        flex-direction: column-reverse;
    }

}
