table {
    --border: 1px solid #ddd;
    border-radius: 10px;

    border-spacing: 0;
    border-collapse: separate;
    /* border: var(--border); */
    box-shadow: 0px 2px 4px rgba(0, 0, 0, .1);
    overflow: hidden;
    background-color: var(--tabela-background);
    font-size: 14px;
    width: 100%;
}

table+* {
    margin-bottom: 20px;
}

table>thead>tr:not(:last-child)>th,
table>thead>tr:not(:last-child)>td,
table>tbody>tr:not(:last-child)>th,
table>tbody>tr:not(:last-child)>td,
table>tfoot>tr:not(:last-child)>th,
table>tfoot>tr:not(:last-child)>td,
table>tr:not(:last-child)>td,
table>tr:not(:last-child)>th,
table>thead:not(:last-child),
table>tbody:not(:last-child),
table>tfoot:not(:last-child) {
    border-bottom: var(--border);
}

table th {
    border-bottom: var(--border);
    text-transform: uppercase;
    font-weight: 600;
    font-size: 13px;
    color: #828282;
}

table,
thead,
tbody,
th,
td,
tr {
    text-align: inherit;
    font-weight: inherit;
    color: #333;
}

table tbody tr:hover {
    background-color: var(--tabela-hover);
}

th,
td {
    padding: 1em 1em;
}

td input {
    border: 0px;
    padding-left: 0px;
    transition: padding-left 100ms ease-in-out;
    background-color: transparent;
    cursor: pointer;
}

tr.editando td input {
    padding-left: 0.6em;
    transition: padding-left 100ms ease-in-out;
    background-color: #ddd;
}

tr .botao-acao-linha {
    display: none;
    transition: 1s;
}

tbody tr.editando {
    background-color: #F1F2F2;
}


tbody tr.editando .botao-acao-linha {
    display: block;
}

table a {
    text-decoration: none;
    color: inherit;
}

table th.acoes {
    width: 100px;
    text-align: center;
}

.paginacao {
    display: flex;
    width: 100%;
    justify-content: center;
    align-items: baseline;
    margin-bottom: 20px;
}

.paginacao a {
    background-color: #cdcdcd;
    border: 0px solid #dadada;
    color: #666;
    font-weight: 300;
    width: 30px;
    height: 30px;
    font-size: 0.835em;
    display: flex;
    justify-content: center;
    align-items: center;
}

.paginacao a.carregando {
    color: transparent;
}

.paginacao span {
    /* background-color: #fafafa; */
    border: 0px solid #dadada;
    color: #000;
    font-weight: 300;
    width: 30px;
    height: 30px;
    font-size: 0.835em;
    display: flex;
    justify-content: center;
    align-items: center;
}

.paginacao .ativo {
    /* border: 0px solid #dadada; */
    padding: 5px 10px 5px 10px;
    color: #ddd;
    font-weight: bolder;
    background-color: #333;
    width: 30px;
    height: 30px;
    font-size: 0.835em;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 3px;
}

table:not(:has(tbody tr)) {
    position: relative;
}

table:not(:has(tbody tr))::after {
    display: flex;
    justify-content: center;
    content: 'Nada para exibir';
    padding: 15px;
    width: 100%;
    position: absolute;
    top: 0px;
    background-color: #ddd;
}

.link-tabela {
    font-weight: 600;
}

@media(max-width: 991px) {

    table,
    thead,
    tbody,
    th,
    td,
    tr {
        display: block;
        background-color: transparent;
        border: 0px;
        box-shadow: inherit;
    }

    table>thead>tr:not(:last-child)>th,
    table>thead>tr:not(:last-child)>td,
    table>tbody>tr:not(:last-child)>th,
    table>tbody>tr:not(:last-child)>td,
    table>tfoot>tr:not(:last-child)>th,
    table>tfoot>tr:not(:last-child)>td,
    table>tr:not(:last-child)>td,
    table>tr:not(:last-child)>th,
    table>thead:not(:last-child),
    table>tbody:not(:last-child),
    table>tfoot:not(:last-child) {
        border: 0px;
    }

    table th {
        border: 0px;
    }

    thead tr {
        position: absolute;
        top: -9999px;
        left: -9999px;
    }

    tbody tr {
        position: relative;
        /* border: 1px solid rgb(0, 0, 0, .1); */
        padding: 5px;
        border-radius: 1em;
        background-color: var(--tabela-background);
    }

    tbody tr:not(:last-child) {
        margin-bottom: 10px;
    }

    tbody tr::after {
        content: '';
        border-radius: 10px;
        box-shadow: 0px 2px 4px rgba(0, 0, 0, .1);
        position: absolute;
        top: 0;
        width: calc(100% - 6px);
        height: 100%;
        z-index: -1;
    }

    td {
        padding: 10px 10px;
    }

    td[label]:before {
        content: attr(label) ':';
        top: 6px;
        left: 6px;
        padding-right: 1px;
        text-transform: uppercase;
        font-weight: 500;
        font-size: 13px;
        color: #929292;
    }

    table td.acoes {
        margin: 10px;
    }

    @keyframes fade-in-td {
        from {
            display: none;
            opacity: 0;
        }

        to {
            display: inherit;
            opacity: 1;
        }
    }

    table td[mobile="hover"] {
        display: none;
        opacity: 0;
    }

    table tr:not(:has(.link-tabela.carregando)):hover td[mobile="hover"] {
        display: inherit;
        opacity: 1;
        animation: fade-in-td 500ms;
    }

    table .botoes {
        display: none;
        opacity: 0;
    }

    @keyframes fade-in-botoes {
        from {
            display: none;
            opacity: 0;
        }

        to {
            display: flex;
            opacity: 1;
        }
    }

    table tbody tr:not(:has(.link-tabela.carregando)):hover .botoes {
        display: flex;
        opacity: 1;
        animation: all 500ms;
        /* animation: fade-in-botoes 500ms; */
    }

    table .botoes:not(.box.transparente .botoes) {
        justify-content: space-around;
        border-top: 1px solid #e5e5e5;
        margin-top: 10px;
        padding-top: 10px;
    }

    /* table tr:hover td .botoes:not(.box.transparente .botoes){
        border-top: 1px solid #ddd;
    } */

    table td .botoes>button,
    table td .botoes>a {
        width: 100%;
        margin: 5px 0px;
        position: relative;
    }

    table:not(:has(tbody tr))::after {
        position: relative;
    }

}