fluent-dialog:has(.cogo-large-dialog-shell__body)::part(control) {
    display: flex;
    flex-direction: column;
    padding: 0 !important;
    overflow: hidden;
}

fluent-dialog:has(.cogo-large-dialog-shell__body) .cogo-large-dialog-shell__header {
    flex: 0 0 auto;
    padding: 1.5rem 1.5rem 0 !important;
}

fluent-dialog:has(.cogo-large-dialog-shell__body) .cogo-large-dialog-shell__body {
    flex: 1 1 auto;
    padding: 1rem 1.5rem 1.5rem !important;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable both-edges;
}

fluent-dialog:has(.cogo-large-dialog-shell__body) .cogo-large-dialog-shell__footer {
    flex: 0 0 auto;
    padding: 0 1.5rem 1.5rem !important;
}

fluent-dialog:has(.asset-picker-dialog) .cogo-large-dialog-shell__body.asset-picker-dialog {
    --cogo-dialog-accent: var(--cogo-brand-green-color, #00bc94);
    --cogo-dialog-accent-strong: #00997a;
    --cogo-dialog-accent-soft: rgba(0, 188, 148, 0.12);
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden !important;
    scrollbar-gutter: auto !important;
}

@media screen and (max-width: 960px), screen and (hover: none) and (pointer: coarse) {
    fluent-dialog:has(.cogo-large-dialog-shell__body)::part(overlay) {
        top: var(--cogo-app-header-height);
        bottom: calc(var(--cogo-mobile-nav-height) + var(--cogo-mobile-nav-safe-area));
    }

    fluent-dialog:has(.cogo-large-dialog-shell__body)::part(positioning-region) {
        align-items: stretch !important;
        justify-content: stretch !important;
        inset: var(--cogo-app-header-height) 0 calc(var(--cogo-mobile-nav-height) + var(--cogo-mobile-nav-safe-area)) 0 !important;
        padding: 0 !important;
    }

    fluent-dialog:has(.cogo-large-dialog-shell__body)::part(control) {
        display: grid;
        grid-template-rows: auto minmax(0, 1fr) auto;
        width: 100% !important;
        max-width: 100% !important;
        height: calc(var(--vh, 1vh) * 100 - var(--cogo-app-header-height) - var(--cogo-mobile-nav-height) - var(--cogo-mobile-nav-safe-area)) !important;
        max-height: calc(var(--vh, 1vh) * 100 - var(--cogo-app-header-height) - var(--cogo-mobile-nav-height) - var(--cogo-mobile-nav-safe-area)) !important;
        margin: 0 !important;
        padding: 0 !important;
        border-radius: 0 !important;
        overflow: hidden !important;
    }

    fluent-dialog:has(.cogo-large-dialog-shell__body) .cogo-large-dialog-shell__header,
    fluent-dialog:has(.cogo-large-dialog-shell__body) .cogo-large-dialog-shell__footer {
        position: relative;
        z-index: 1;
        background: var(--neutral-layer-1);
        flex-shrink: 0;
    }

    fluent-dialog:has(.cogo-large-dialog-shell__body) .cogo-large-dialog-shell__header {
        padding: 1.25rem 1.5rem 0 !important;
    }

    fluent-dialog:has(.cogo-large-dialog-shell__body) .cogo-large-dialog-shell__body {
        padding: 1rem 1.5rem 1.25rem !important;
        min-height: 0;
        overflow-y: auto;
        overscroll-behavior: contain;
        scrollbar-gutter: stable both-edges;
        -webkit-overflow-scrolling: touch;
    }

    fluent-dialog:has(.cogo-large-dialog-shell__body) .cogo-large-dialog-shell__footer {
        padding: 1rem 1.5rem calc(1.5rem + env(safe-area-inset-bottom, 0px)) !important;
    }
}
