@use '../core/styles/common/tokens' as *;

@mixin kbq-table-theme() {
    .kbq-table {
        & > thead {
            color: var(--kbq-foreground-contrast-secondary);

            & > tr > th {
                border-bottom-color: var(--kbq-line-contrast-less);
            }
        }

        & > tbody {
            & > tr {
                & > th,
                & > td {
                    color: var(--kbq-foreground-contrast);
                }

                &.kbq-hovered td,
                &:hover td {
                    background-color: var(--kbq-states-background-transparent-hover);
                }
            }
        }

        &.kbq-table_bordered {
            & > tbody > tr {
                & th,
                & td {
                    border-bottom-color: var(--kbq-line-contrast-less);
                }
            }
        }
    }
}

@mixin kbq-table-typography() {
    .kbq-table {
        & > thead {
            & > tr > th {
                font-weight: normal;
            }

            @include kbq-typography-level-to-styles-css-variables(typography, text-normal);
        }

        & > tbody {
            & > tr > th {
                font-weight: normal;
            }

            @include kbq-typography-level-to-styles-css-variables(typography, tabular-normal);
        }
    }
}
