


.table-wrapper {
    position: relative;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border: 1px solid #e2e8f0;
    background: #fff;
}

.filters-div {
    display: flex;
    background-color: #FAF8F2;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.filter-div {
    display: flex;
    padding: 10px;
}

.filter-div-name {
    padding: 10px;
}

table {
    border-collapse: collapse;
    width: 100%;
    min-width: 860px;
}
/* allow scroll if narrower viewport */
caption {
    text-align: left;
    font-weight: bold;
    margin: .75rem 1rem;
}

th, td {
    text-align: left;
    padding: .75rem 1rem;
    border-bottom: 1px solid #e2e8f0;
    vertical-align: top;
    min-height: var(--row-min);
}

th {
    background: #f1f5f9;
    font-weight: 600;
}

thead tr th {
    background: #123451;
    color: white;
}

tr:nth-child(even) {
    background: #f9fafb;
}


/* Subtle scroll hint on the right */
.table-wrapper::after {
    content: "";
    position: sticky;
    right: 0;
    top: 0;
    width: 24px;
    height: 100%;
    pointer-events: none;
    background: linear-gradient(90deg, rgba(248,250,252,0) 0%, rgba(248,250,252,1) 80%);
    display: block;
    float: right;
}

/* Mobile: card-based layout */
@media (max-width: 768px) {
    .table-wrapper {
        border: none;
        background: transparent;
    }

    table, thead, tbody, th, td, tr {
        display: block;
    }

    thead {
        display: none;
    }

    caption {
        margin: 0 0 .5rem 0;
    }

    tr {
        margin-bottom: 1rem;
        border: 1px solid #e2e8f0;
        border-radius: 12px;
        background: #fff;
        padding: 1rem;
    }

    td, th[scope=row] {
        border: none;
        padding: .25rem 0;
        min-height: auto;
    }

        td::before, th[scope=row]::before {
            font-weight: 600;
            display: block;
            color: #475569;
            margin-bottom: .1rem;
        }

        th[scope=row]::before {
            content: "Bedrijfsnaam";
        }

        td:nth-of-type(1)::before {
            content: "Plaats";
        }

        td:nth-of-type(2)::before {
            content: "Website";
        }

        td:nth-of-type(3)::before {
            content: "E-mailadres";
        }

        td:nth-of-type(4)::before {
            content: "Telefoon";
        }

        td:nth-of-type(5)::before {
            content: "Diensten";
        }

        td:nth-of-type(6)::before {
            content: "Type gebouwen";
        }

    .table-wrapper::after {
        display: none;
    }
}
