.uc-table {
    box-sizing: border-box;
    --color-bg-hover: #fafafa;
    --color-border: #f0f0f0;
    --size-border-radius: 4px;
    width: 100%;
    border-top: 1px solid var(--color-border);
    border-left: 1px solid var(--color-border);
    border-right: 1px solid var(--color-border);
    border-radius: var(--size-border-radius) var(--size-border-radius) 0 0;
}
.uc-table.bordered {
    border-right: none;
}
.uc-table.noborder {
    border: none;
}
.uc-table table {
    width: 100%;
    text-align: start;
    border-collapse: separate;
    border-spacing: 0;
    table-layout: auto;
}
.uc-table-thead>tr>th,
.uc-table-tbody>tr>td {
    padding: 12px;
    overflow-wrap: break-word;
    border-bottom: 1px solid var(--color-border);
}
.uc-table.bordered :is(.uc-table-thead>tr>th, .uc-table-tbody>tr>td) {
    border-inline-end: 1px solid var(--color-border);
}
.uc-table-thead>tr>th {
    position: relative;
    font-weight: 600;
    text-align: start;
    background: var(--color-bg-hover);
    transition: background 0.1s;
}
.uc-table-thead>tr>th.allowSort {
    cursor: pointer;
}
.uc-table-thead>tr>th.allowSort:hover {
    background: var(--color-border);
}
.uc-table-thead>tr>th:first-child {
    border-start-start-radius: var(--size-border-radius);
}
.uc-table-thead>tr>th:last-child {
    border-start-end-radius: var(--size-border-radius);
}
/*
.uc-table:not(.bordered) .uc-table-thead>tr>th:not(:last-child)::before {
    position: absolute;
    content: "";
    top: 50%;
    inset-inline-end: 0;
    right: 0;
    width: 1px;
    height: 50%;
    transform: translateY(-50%);
    background: var(--color-border);
}

 */
.uc-table-sorters {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 50%;
    inset-inline-end: 0;
    right: 16px;
    transform: translateY(-50%);
    transition: opacity 0.1s;
}
.uc-table-sort-icon {
    font-size: 12px;
    color: #999;
    transform: scale(0.8);
}
.uc-table-sort-icon.asc {
    margin-bottom: -3px;
}
.uc-table-sort-icon.desc {
    margin-top: -3px;
}
.uc-table-sort-icon.active {
    color: var(--color-primary);
}
.uc-table-tbody > tr {
    transition: background 0.1s,border-color 0.1s;
}
.uc-table-tbody > tr:hover {
    background: var(--color-bg-hover);
}


/* table2 */
.kdl-table-wrapper {
    box-sizing: border-box;
}
.kdl-table-wrapper table {
    width: 100%;
    text-align: start;
    border-radius: 8px 8px 0 0;
    border-collapse: separate;
    border-spacing: 0;
}
.kdl-table-selection-col {
    width: 32px;
}
.kdl-table-cell {
    position: relative;
    padding: 16px 16px;
    text-align: start;
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.2s ease;
    word-break: break-word;
}
.kdl-table-cell.align-left {
    text-align: start;
}
.kdl-table-cell.align-center {
    text-align: center;
}
.kdl-table-cell.align-right {
    text-align: end;
}
.kdl-table-thead .kdl-table-cell {
    color: var(--color-text);
    font-weight: 600;
    background: #fafafa;
}
.kdl-table-thead .kdl-table-cell:first-child {
    border-top-left-radius: 8px;
}
.kdl-table-thead .kdl-table-cell:last-child {
    border-top-right-radius: 8px;
}
.kdl-table-wrapper:not(.bordered) .kdl-table-thead .kdl-table-cell:not(:last-child)::before {
    position: absolute;
    top: 50%;
    inset-inline-end: 0;
    width: 1px;
    height: 1.6em;
    background-color: #f0f0f0;
    transform: translateY(-50%);
    transition: background-color 0.2s;
    content: "";
}
.kdl-table-checked .kdl-table-cell{
    background: #e6f4ff;
}
.kdl-table-tbody > tr:hover .kdl-table-cell  {
    background: #fafafa;
}
.kdl-table-tbody > tr.kdl-table-checked:hover .kdl-table-cell {
    background-color: #bae0ff;
}

.kdl-table-selection {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* bordered */
.kdl-table-wrapper.bordered {
    border-left: 1px solid #f0f0f0;
    border-top: 1px solid #f0f0f0;
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
}
.kdl-table-wrapper.bordered .kdl-table-cell {
    border-right: 1px solid #f0f0f0;
}

/* size */
.kdl-table-wrapper.size-s .kdl-table-cell {
    padding: 12px 8px;
}

@media screen and (max-width: 768px) {
    .uc-table,
    .kdl-table-wrapper {
        max-width: 100%;
        overflow-y: auto;
        padding-bottom: 4px;
    }
    :is(.uc-table, .kdl-table-wrapper) > table {
        width: max-content;
    }
}
