.kfw-table-container {
    transition: var(--global-transition);
}
.kfw-table-wrapper {
    overflow-x: auto;
    overflow-y: auto;
    border-radius: var(--global-radius);
    background-color: var(--background-color);
    position: relative;
    transition: var(--global-transition);
    border: var(--global-border);
    box-shadow: var(--box-shadow);
}
.kfw-table-wrapper tbody {
    transition: var(--global-transition);
}
table {
    width: 100%;
    background: var(--background-color);
    height: max-content;
    z-index: 1;
    border-spacing: 0;
}
thead.fixed {
    position: sticky;
    top: 0;
    z-index: 3;
}
table:not(.form-repeater table) {
    border: none;
}
.kfw-table-wrapper table {
    border: none !important;
}
table {
    border-radius: var(--global-radius);
}
table tr:not(.group) td:not(.fixed) {
    padding: 10px 12px;
    box-sizing: content-box;
}
table tr:not(.group) td.fixed {
    box-sizing: border-box;
}
th.fixed,
td.fixed {
    position: sticky;
    left: 0;
    z-index: 2;
    box-sizing: border-box;
}
thead.fixed th.fixed {
    z-index: 3;
}
table tr:not(.group):not(:last-child) td {
    box-sizing: content-box;
    border-bottom: var(--table-cell-border);
}
html.dark table tr:not(.group) td {
    border-bottom: var(--table-cell-border);
}
table.kfw-table tbody > tr:not(.group):not(.kfw-accordion-row):not(:has(tr:hover)):hover > td {
    background: rgba(var(--primary-rgb), 0.045);
}
table tr.group td {
    border-bottom: none;
}
table tr th {
    padding: 10px 12px;
    background: color-mix(in srgb, var(--body-background) 65%, var(--background-color));
    border-bottom: var(--table-cell-border);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--font-color-light);
    white-space: nowrap;
}
table tr th:not(:last-child) {
    border-right: 1px solid transparent;
}
table tr th:first-child {
    border-top-left-radius: var(--global-radius);
    border-bottom-left-radius: var(--global-radius);
}
table tr th:last-child {
    border-top-right-radius: var(--global-radius);
    border-bottom-right-radius: var(--global-radius);
}
table tr th > * {
    text-wrap: nowrap;
}
table td.actions {
    width: max-content;
}
table tr:first-child {
    border-top: none;
    border-top-left-radius: var(--global-radius);
    border-top-right-radius: var(--global-radius);
}
table tr:last-child {
    border-bottom: none;
    border-bottom-left-radius: var(--global-radius);
    border-bottom-right-radius: var(--global-radius);
}
table tr:last-child td:first-child {
    border-bottom-left-radius: var(--global-radius);
}
table tr:last-child td:last-child {
    border-bottom-right-radius: var(--global-radius);
}
.sticky-column {
    position: sticky;
    left: 0;
    background: var(--background-color);
    z-index: 10;
    border-right: var(--global-border);
}
.group-description {
    font-weight: normal;
}
td:has(button) {
    width: max-content;
    max-width: max-content;
}
.kfw-table .move-column {
    cursor: move;
    opacity: 0.45;
    margin-right: 10px;
    transition: var(--global-transition);
}
.kfw-table .move-column:hover {
    opacity: 0.9;
    color: var(--primary-color-darker);
}
.kfw-table .order-column {
    cursor: pointer;
    opacity: 0.55;
    transition: var(--global-transition);
}
.kfw-table .order-column:hover {
    opacity: 1;
    color: var(--primary-color-darker);
}
.kfw-table-head-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.table-header-schema, .table-footer-schema {
    background: var(--background-color);
    display: flex;
    flex-wrap: wrap;
    justify-content: end;
    width: 100%;
    padding: 12px 14px;
    gap: 10px;
    box-shadow: none;
    border: var(--global-border);
    align-items: center;
}
.table-header-schema {
    padding-bottom: 22px;
    margin-bottom: -20px;
    border-top-left-radius: var(--global-radius);
    border-top-right-radius: var(--global-radius);
    border-bottom: none;
}
.table-footer-schema {
    padding-top: 32px;
    margin-top: -20px;
    border-bottom-left-radius: var(--global-radius);
    border-bottom-right-radius: var(--global-radius);
    border-top: none;
}
.kfw-table-container.transparent .kfw-table-wrapper,
.kfw-table-wrapper.transparent {
    border: none;
    box-shadow: none;
    background: transparent;
}
.table-header-schema.transparent,
.table-footer-schema.transparent {
    border: none;
    box-shadow: none;
    background: transparent;
}
.table-footer-schema .records-number {
    opacity: 0.7;
    font-size: var(--font-size-small);
}
.kfw-filter-indicators {
    margin-top: -10px;
    padding-top: 10px;
    flex-wrap: wrap;
}
tr.group td {
    background: color-mix(in srgb, var(--body-background) 70%, var(--background-color));
    padding: 10px 14px;
    border-radius: 0;
    font-weight: 600;
    color: var(--font-color);
}
tr.group p {
    margin: 0;
}
tr.kfw-empty-row td.kfw-empty-cell {
    text-align: center;
    padding: 18px 12px;
    color: var(--font-color-light);
}
.dragging {
    opacity: 0.55;
    background-color: rgba(var(--primary-rgb), 0.08);
}
.drag-over {
    border: 1px dashed rgba(var(--primary-rgb), 0.5);
    background-color: rgba(var(--primary-rgb), 0.06);
}
@media only screen and (max-width: 1000px) {
    th.fixed, td.fixed {
        position: relative;
        left: 0 !important;
    }
}
th[data-table-buttons="true"] {
    padding: 0;
}
th[data-col-name="kfw_selectable_column"] {
    min-width: 45px;
}
td.fixed:has(> .selectable-row-checkbox:first-child) {
    padding: 3px 10px;
}
.kfw-table-accordion-icon {
    cursor: pointer;
    color: var(--font-color-light);
    transition: var(--global-transition);
}
.kfw-table-accordion-icon:hover {
    color: var(--primary-color-darker);
}
.table-selectable-schema {
    padding: 10px;
    gap: 10px;
    display: none;
    width: 100%;
    height: min-content;
    background: var(--background-color);
    position: sticky;
    left: 0;
}
.selectable-row-checkbox {
    width: 18px;
    border: var(--global-border);
    height: 18px;
    color: var(--primary-color);
    background: var(--primary-color);
    accent-color: var(--primary-color);
    border-radius: 5px;
    cursor: pointer;
}
.kfw-table-wrapper.kfw-accordion-open {
    overflow-x: auto !important;
}
.kfw-accordion-cell {
    position: relative;
    width: 1px;
    min-width: 0;
    max-width: 1px;
    padding: 0 !important;
    overflow: visible;
}
.kfw-accordion-cell > .kfw-accordion-anim {
    position: sticky;
    left: 0;
    z-index: 2;
    display: block;
    box-sizing: border-box;
    width: auto;
    min-width: 0;
    max-width: none;
    overflow-x: auto;
    overflow-y: hidden;
    background: var(--background-color);
}
.kfw-accordion-row .kfw-table-wrapper {
    width: 100%;
    max-width: 100%;
    overflow-x: auto !important;
    overflow-y: visible !important;
    height: auto !important;
    max-height: none !important;
}
.kfw-accordion-row .kfw-table-wrapper > table.kfw-table {
    min-width: 100%;
    width: max-content;
}
.kfw-table-horizontal-scroll {
    display: none;
    position: fixed;
    left: 0;
    bottom: 0;
    z-index: 20;
    overflow-x: auto;
    overflow-y: hidden;
    height: 16px;
    background: var(--background-color);
}
.kfw-table-horizontal-scroll-inner {
    height: 1px;
}
.table-header-schema-mobile {
    display: none !important;
}
.kfw-td-buttons {
    gap: 6px;
    min-width: max-content;
    margin: 3px 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}
td.fixed {
    background: var(--background-color);
}
th[data-col-name="kfw_selectable_column"] {
    max-width: none !important;
}
@media only screen and (max-width: 1000px) {
    th.fixed, td.fixed {
        position: relative;
        left: 0 !important;
    }
    .table-header-schema-desktop,
    .table-controls-desktop {
        display: none !important;
    }
    .table-header-schema-mobile {
        display: flex !important;
        width: 100%;
        align-items: center;
        justify-content: flex-end;
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    .table-footer-schema {
        justify-content: space-between !important;
        align-items: center;
        gap: 12px;
    }
    .table-footer-schema .records-number {
        order: 1;
        width: auto;
        text-align: left;
    }
    .table-footer-schema .records-per-page {
        order: 2;
        margin-left: 0;
        margin-right: 0;
        display: flex;
        justify-content: flex-end;
    }
    .table-footer-schema .records-page-buttons {
        order: 3;
        width: 100%;
        display: flex;
        justify-content: center;
        align-items: center;
    }
}
