/* Shared editor document workspace: contracts and invoices. */

body.editor-document-page :where(.contract-shell, .invoice-shell) {
    width: 100%;
    height: 100%;
    margin: 0;
    overflow: hidden;
    display: grid;
    grid-template-rows: 48px minmax(0, 1fr);
}

body.editor-document-page :where(.contract-header, .invoice-header) {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

body.editor-document-page :where(.contract-header, .invoice-header) h1 {
    margin: 0;
}

body.editor-document-page :where(.contract-header .header-link, .invoice-header > a) {
    position: absolute;
    right: 8px;
    height: 34px;
    display: flex;
    align-items: center;
    padding: 0 14px;
}

body.editor-document-page :where(.contract-workspace, .invoice-workspace) {
    min-height: 0;
    padding: 9px;
    display: grid;
    grid-template-rows: 42px minmax(0, 1fr);
    gap: 9px;
}

body.editor-document-page :where(.contract-tabs, .invoice-tabs) {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 5px;
}

body.editor-document-page :where(.contract-tabs, .invoice-tabs) a {
    min-width: 150px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

body.editor-document-page :where(.contract-panel, .invoice-panel) {
    min-height: 0;
    overflow: hidden;
}

body.editor-document-page .entry-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

body.editor-document-page .entry-heading h2 {
    margin: 0 0 3px;
}

body.editor-document-page .entry-heading p {
    margin: 0;
}

body.editor-document-page .heading-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

body.editor-document-page .registry-panel {
    display: grid;
    grid-template-rows: 48px minmax(0, 1fr) 30px;
    padding: 9px;
}

body.editor-document-page .registry-tools {
    display: grid;
    grid-template-columns: minmax(240px, 1fr) 190px 150px 175px;
    gap: 7px;
    align-items: end;
}

body.editor-document-page .registry-date-filter {
    display: grid;
    grid-template-rows: 12px 34px;
    gap: 2px;
}

body.editor-document-page .registry-date-filter span {
    padding-inline: 3px;
}

body.editor-document-page .registry-date-filter input {
    direction: ltr;
}

body.editor-document-page .registry-scroll {
    min-height: 0;
    overflow: auto;
}

body.editor-document-page .registry-scroll::-webkit-scrollbar {
    width: 0;
    height: 0;
}

body.editor-document-page .registry-panel footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
}

@media (max-width: 900px) {
    body.editor-document-page :where(.contract-workspace, .invoice-workspace) {
        padding: 5px;
        gap: 5px;
    }

    body.editor-document-page .entry-heading p {
        display: none;
    }
}
