.form-fill-height:not(:has(.tabs-fill-height:not(.tabs-left):not(.tabs-right))),
.form-fill-height:has(.tabs-fill-height:not(.tabs-left):not(.tabs-right) > .tab-content > .tab-fill-height.active) {
    display: flex;
    flex: 1 1 0;
    flex-direction: column;
    min-width: 0;
    min-height: 0;
}

.tabs-fill-height:not(.tabs-left):not(.tabs-right):has(> .tab-content > .tab-fill-height.active) {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

    .tabs-fill-height > .nav {
        flex: 0 0 auto;
    }

/* Normal tabs size the page to their content. Only an active fill-height tab
   constrains the main form to the available viewport height. */
.page-main:has(> #content > .cph > .form-fill-height > .tabs-fill-height .tab-fill-height.active) {
    --content-row: var(--content-height);
}

.form-fill-height:has(> .tabs-fill-height):not(:has(> .tabs-fill-height .tab-fill-height.active)) {
    flex: 1 0 auto;
}

.tabs-fill-height:has(> .tab-content > .tab-fill-height.active, > .nav-content > .tab-content > .tab-fill-height.active) {
    flex: 1 1 0;
    flex-wrap: nowrap;
    min-width: 0;
    min-height: 0;
}

    .tabs-fill-height:has(> .tab-content > .tab-fill-height.active) > .tab-content,
    .tabs-fill-height:has(> .nav-content > .tab-content > .tab-fill-height.active) > .nav-content,
    .tabs-fill-height:has(> .nav-content > .tab-content > .tab-fill-height.active) > .nav-content > .tab-content {
        display: flex;
        flex: 1 1 0;
        flex-direction: column;
        min-width: 0;
        min-height: 0;
    }

        .tabs-fill-height > .tab-content > .tab-fill-height.active,
        .tabs-fill-height > .nav-content > .tab-content > .tab-fill-height.active {
            display: flex;
            flex: 1 1 0;
            flex-direction: column;
            min-width: 0;
            min-height: 0;
            overflow: hidden;
        }
