/* TODO: clean the style */

/* we have to override some Bootstrap rules (Bootstrap is unwanted, but necessary for tables sort and search),
   and use some tricks when it's not working */

table {
    width: 95% !important;
    margin: 0 auto !important;
}

div.fixed-table-container {
    margin-bottom: 20px;
}

.table-bordered, td, th {
    border: none !important;
}

th {
    background-color: var(--table-header-color-background);
    text-align: center;
    color: var(--table-header-color-text);
}

th:first-child {
    border-top-left-radius: var(--main-element-radius);
}

th:last-child {
    border-top-right-radius: var(--main-element-radius);
}

tbody tr:last-child {
    border-bottom: 1px solid var(--table-color-border);
}

/* tables search bar */
.fixed-table-toolbar .search input {
    float: right;
    width: 30%;
    margin-top: 20px;
    margin-bottom: 20px;
    /* the table takes 95% of the width, so there is 2.5% of margin on each side,
       so we align the input with the table */
    margin-right: 2.5%;
    padding-left: 15px;
    border: 2px solid var(--table-search-color-border);
}

table.table-news {
    word-break: break-word;
}

table.table-news tbody tr td div.table-news-tr {
    height: 75px;
    overflow: hidden;
    text-align: justify;
}

/* to have the same size for the news content cell */
table.table-news tbody tr td:last-child {
    width: 80%;
}

/* to give a different color to the lines of the tables according to the states */
.active-record {
    background-color: var(--table-color-background-active) !important;
}

.active-record:hover {
    background-color: var(--table-color-background-active-hover) !important;
}

.inactive-record {
    background-color: var(--table-color-background-inactive) !important;
}

.inactive-record:hover {
    background-color: var(--table-color-background-inactive-hover) !important;
}

.archived-record {
    background-color: var(--table-color-background-archived) !important;
}

.archived-record:hover {
    background-color: var(--table-color-background-archived-hover) !important;
}

/* pour éviter que le champ de recherche devienne trop étroit après la màj 1.18.3 -> 1.24.1 */
div.float-right.search.btn-group {
    width: 100%;
}
