/* Shared list-menu treatment. Keep editing dialogs and print layouts unchanged. */
/* Reserve the action column even when permission checks hide Add Employee.
   The form uses display:contents, so its controls must have explicit columns. */
.responsive-records-employees > .records-toolbar > .list-add-button {
    grid-column: 1;
    grid-row: 1;
}
.responsive-records-employees #employeeFilters > .search-composer {
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
}
.responsive-records-employees #employeeFilters > .filter-actions {
    grid-column: 3;
    grid-row: 1;
}
.responsive-records-employees #employeeFilters > .filter-slide-panel {
    grid-column: 1 / -1;
    grid-row: 2;
}
@media (max-width: 640px) {
    .responsive-records-employees > .records-toolbar {
        grid-template-columns: minmax(0, 1fr) auto !important;
    }
    .responsive-records-employees > .records-toolbar > .list-add-button {
        grid-column: 1 / -1;
        justify-self: start;
    }
    .responsive-records-employees #employeeFilters > .search-composer {
        grid-column: 1;
        grid-row: 2;
    }
    .responsive-records-employees #employeeFilters > .filter-actions {
        grid-column: 2;
        grid-row: 2;
    }
    .responsive-records-employees #employeeFilters > .filter-slide-panel {
        grid-row: 3;
    }
}

.page .search-composer.animated-search.search-always-open,
.page .search-composer.animated-search.search-always-open .form-control {
    transition: none !important;
}

.page .reference-heading-action-button {
    border-radius: 10px;
    min-height: 44px;
}

/* Filled primary Add actions; secondary toolbar links keep their neutral style. */
.page:not(.login-only-layout) .reference-heading-action-button.list-add-button {
    background: #0f766e !important;
    border-color: #0f766e !important;
    color: #ffffff !important;
    box-shadow: none !important;
}

.page:not(.login-only-layout) .reference-heading-action-button.list-add-button:hover,
.page:not(.login-only-layout) .reference-heading-action-button.list-add-button:focus-visible {
    background: #0b625c !important;
    border-color: #0b625c !important;
    color: #ffffff !important;
}

.page .list-add-button:not(.is-personnel-add-loading) .salary-annex-settings-icon {
    color: #ffffff !important;
}

.page .list-add-button.is-personnel-add-loading .salary-annex-settings-icon::before {
    border-color: rgba(255, 255, 255, .35);
    border-top-color: #ffffff;
}

.list-toolbar-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .5rem;
    min-width: 0;
    min-height: 44px;
    grid-column: 1;
    grid-row: 1;
}

.content-panel:is(.responsive-records-window, .standard-list-panel) {
    padding-top: 1.5rem;
}

.content-panel:is(.responsive-records-window, .standard-list-panel) > .records-toolbar,
.reports-shell .standard-report-toolbar {
    margin-bottom: 1.5rem;
    align-items: center;
}

/* Reports have no Add action. The page heading now supplies the report name. */
.reports-shell .standard-report-toolbar {
    grid-template-columns: minmax(0, 1fr) !important;
    min-height: 44px;
}

.standard-report-toolbar > .list-toolbar-actions {
    display: none;
}

.reports-shell .standard-report-toolbar > .report-search-form {
    display: flex !important;
    grid-column: 1 !important;
    width: 100% !important;
    row-gap: 0 !important;
    min-height: 44px;
    align-content: center;
}

.standard-report-toolbar .filter-slide-panel:not(.is-open):not(.is-animating) {
    margin-block: 0 !important;
    border-block-width: 0;
}

/* The salary list has nested panels; only the outer one supplies top padding. */
.content-panel.salary-annex-page-shell {
    padding-top: 1.5rem !important;
}

.salary-annex-settings-page-panel .salary-annex-list-table-panel {
    gap: 1.5rem;
}

.salary-annex-settings-page-panel .salary-annex-list-table-heading {
    min-height: 44px;
    align-items: center;
}

.salary-annex-settings-page-panel .salary-annex-reference-table-wrap {
    margin-top: 0;
}

@media (min-width: 901px) {
    .content-panel:is(.responsive-records-window, .standard-list-panel) > .records-toolbar,
    .standard-list-panel .leave-employees-toolbar .records-search-form {
        row-gap: 0 !important;
    }

    :is(.responsive-records-window, .standard-list-panel) .filter-slide-panel:not(.is-open):not(.is-animating) {
        border-block-width: 0;
    }

    :is(.responsive-records-window, .standard-list-panel) .filter-slide-panel.is-open {
        margin-top: 1rem;
    }
}

@media (max-width: 900px) {
    .employee-reference-panel .list-toolbar-actions {
        grid-column: 1 / -1;
        grid-row: 1;
    }

    .employee-reference-panel .reference-filter-form .search-composer,
    .employee-reference-panel .reference-filter-form .filter-actions {
        grid-row: 2;
    }
}
