.section-my-messages ul.tabs-nav {
    flex-wrap: nowrap;
}

/* 
 * Mijn berichten pagina
 *
 * ============================= */

.section-my-messages .latest-messages-table {
    width: 100%;
}

.section-my-messages .message-item.message-status {
    font-weight: 400;
}

.section-my-messages .message-item.message-status.message-unread,
.section-my-messages .master-row.message-unread,
.section-my-messages .detail-message.message-unread {
    font-weight: 600;
}

.section-my-messages .master-row:hover,
.section-my-messages .detail-message:hover,
.section-my-messages .message-item.message-status:hover {
    background-color: rgba(var(--color-primary-rgb), 0.2) !important;
    cursor: pointer;

}

/* .section-my-messages .message-item.send-message {
    display: none;
} */

.section-my-messages .filters-header,
.section-my-messages .header-grouped-messages-filter {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    flex-wrap: wrap;

}

.section-my-messages .select-wrapper {
    position: relative;
    display: inline-flex;
    align-items: baseline;
    cursor: pointer;
    height: 30px;
    background-color: var(--color-grey-10);
    padding: 2px 2rem;
    border-radius: 28px;

    margin-bottom: 2rem;
    gap: 1rem;
}

.section-my-messages .filter-trigger-select {
    appearance: none;
    border: none;
    background: none;
    padding: 0 25px 0 0;
    font: inherit;
    cursor: pointer;
    margin-bottom: 0;
    padding: 0;
    height: 2.8rem;
    text-transform: uppercase;
    font-size: 1.4rem;

}

.section-my-messages #latest-messages-table_filter,
.section-my-messages #grouped-messages-table_filter {
    position: relative;
    max-width: 100%;

}

.section-my-messages #latest-messages-table_filter label,
.section-my-messages #grouped-messages-table_filter label {
    max-width: 100%;
}

.section-my-messages #latest-messages-table_filter input,
.section-my-messages #grouped-messages-table_filter input {
    border: 1px solid var(--color-grey-20);
    border-radius: 28px;
    width: 50rem;
    padding-left: 3rem;
    padding-right: 3rem;
}

.section-my-messages #latest-messages-table_filter::before {
    content: "\f002";
    font-family: "Font Awesome 6 Pro";
    position: absolute;
    right: 2.5rem;
    top: 33%;
    transform: translateY(-50%);
    color: var(--color-grey-20);
    pointer-events: none;

}

.section-my-messages .dataTables_wrapper .dataTables_length select {
    border: none;
    border-bottom: 1px solid var(--color-grey-20);
    cursor: pointer;
}

#grouped-messages-table>thead tr th i {
    margin-right: 0;
}

.section-my-messages table,
.section-my-messages th,
.section-my-messages td {
    /* border: none; */
    border-collapse: collapse;
}

/* .section-my-messages .master-row tr td {
    border-bottom:none;
} */
table tr.detail-message {
    border-bottom: none;
}

.section-my-messages .master-row i {
    color: var(--color-grey-60);
    transition: color 250ms ease-in-out, transform 250ms ease-in-out;
}

.section-my-messages .master-row.rotated i {
    transform: rotate(-90deg);
    color: var(--color-black);
}

.section-my-messages .detail-table {
    width: 100%;
}

.section-my-messages .detail-row td:last-of-type {
    border-bottom: none;
}

.section-my-messages .detail-table td {
    padding: 8px 10px;
}

.section-my-messages table.detail-table {
    margin-bottom: 0;
}

.section-my-messages .detail-message .arrow-icon {
    padding-right: 0;
    width: 1rem;
    color: rgba(var(--color-primary-rgb), 0.6);
}

.section-my-messages .detail-message .message-date {
    width: 18rem;
}

.section-my-messages .detail-message .read-status {
    text-align: right;
}

.section-my-messages .detail-row td:last-of-type {
    border-bottom: rgb(225, 225, 225) 1px solid;
}


/* table fixes */


@media screen and (max-width: 640px) {
    .section-my-messages .dataTables_wrapper .dataTables_length, .dataTables_wrapper .dataTables_filter {
        float: unset;
        text-align: left;
    }
}



/* Responsive Table > stacked */

/* Basis: tabel normaal op desktop */
#latest-messages-table {
    width: 100%;
    border-collapse: collapse;
}

/* Stacked / card view op mobiele schermen */
@media (max-width: 768px) {

    #latest-messages-table,
    #latest-messages-table thead,
    #latest-messages-table tbody,
    #latest-messages-table th,
    #latest-messages-table td,
    #latest-messages-table tr {
        display: block;
        width: 100%;
    }

    /* Verberg de headers */
    #latest-messages-table thead tr {
        display: none;
    }

    /* Rij wordt een "card" */
    #latest-messages-table tr {
        margin-bottom: 1em;
        border: 1px solid var(--color-grey-20);
        padding: 0.5em;
        border-radius: 6px;
        background-color: var(--color-white);
        /* box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05); */
        box-shadow: var(--box-shadow);
        display: flex;
        flex-wrap: wrap
    }


    /* Cellen onder elkaar met kolomnaam */
    #latest-messages-table td {
        display: flex;
        justify-content: flex-start;
        padding: 0.5em;
        border-bottom: 1px solid var(--color-grey-10);
        position: relative;
        text-align: left;
    }

    #latest-messages-table td::before {
        content: attr(data-label);
        font-weight: bold;
        /* width: 40%; */
        flex-shrink: 0;
        text-align: left;
    }

    /* Laat de laatste border van de rij weg */
    #latest-messages-table td:nth-child(3) {
        border-bottom: none;
    }

    #latest-messages-table.latest-messages-table td {
        width: 100%;
    }

    #latest-messages-table.latest-messages-table td:first-child {

        /* width: 66%; */
        order: -2;
        width: 20%;
        flex-grow: 1;
    }

    #latest-messages-table.latest-messages-table td:last-child {
        order: -1;
        width: 20%;
        justify-content: end;
    }
}


/* Stacked / card view op mobiele schermen */
@media (max-width: 768px) {

    #grouped-messages-table,
    #grouped-messages-table thead,
    #grouped-messages-table tbody,
    #grouped-messages-table th,
    #grouped-messages-table td,
    #grouped-messages-table tr {
        display: block;
        width: 100%;
    }

    /* Verberg de headers */
    #grouped-messages-table thead tr {
        display: none;
    }

    /* Rij wordt een "card" */
    #grouped-messages-table tr {
        margin-bottom: 1em;
        border: 1px solid var(--color-grey-20);
        /* padding: 0.5em; */
        padding: 0.2em;
        border-radius: 6px;
        background-color: var(--color-white);
        /* box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05); */
        box-shadow: var(--box-shadow);
        display: flex;
        flex-wrap: wrap;
    }

    /* Cellen onder elkaar met kolomnaam */
    #grouped-messages-table td {
        display: flex;
        justify-content: flex-start;
        padding: 0.5em;
        border-bottom: 1px solid var(--color-grey-10);
        position: relative;
        text-align: left;
        width: 100%;
    }

    #grouped-messages-table td::before {
        content: attr(data-label);
        font-weight: bold;
        flex-shrink: 0;
        margin-right: 0.5em;
        text-align: left;
    }

    /* Laat de laatste border van de rij weg */
    #grouped-messages-table td:last-child {
        border-bottom: none;
    }

    /* Specifieke breedtes en volgorde aanpassen zoals bij je eerdere tabel */
    #grouped-messages-table td:first-child {
        width: 100%;
        /* Onderwerp */
    }

    #grouped-messages-table td:nth-child(2) {
        width: 100%;
        border-bottom: none;
        /* Type */
    }

    #grouped-messages-table td:nth-child(3) {
        order: -1;
        width: 50%;
        flex-grow: 1;
    }

    #grouped-messages-table td:nth-child(4) {
        order: -1;
        width: 20%;
        flex-grow: 1;
        justify-content: flex-end;
    }

    #grouped-messages-table td:last-child {
        order: 1;
        /* Actie / caret onderaan */
        width: 100%;
        justify-content: flex-end;
    }

    #grouped-messages-table .detail-message td:first-child {
        order: -1;
        width: 5%;
    }

    #grouped-messages-table .detail-message td:nth-child(2) {
        order: 1;
        width: 60%;
        border-bottom: 1px solid var(--color-grey-10);
    }

    #grouped-messages-table .detail-message td:nth-child(3) {
        order: 3;
        border-bottom: none;
        padding-left: 10%;
    }

    #grouped-messages-table .detail-message td:nth-child(4) {
        order: 1;
        width: 30px;
        border-bottom: 1px solid var(--color-grey-10);
    }
}