.portal-teams-table {
    width: 100%;
    border-collapse: collapse;
}

.portal-teams-table th,
.portal-teams-table td {
    border: 1px solid #ddd;
    padding: 8px;
}

.portal-teams-table th {
    background-color: #f2f2f2;
}

.portal-teams-table .serial-number-cell {
    width: 70px;
    text-align: center;
    vertical-align: middle;
    font-weight: bold;
}

.portal-teams-table .picture-cell {
    width: 130px;
    text-align: center;
    vertical-align: middle;
}

.portal-teams-table .picture-cell img {
    max-width: 100%;
    height: auto;
}

td.details-cell p {
    margin-bottom: 5px;
}

td.details-cell p:last-child {
    margin-bottom: 0;
}

.portal-teams-table .details-cell {
    vertical-align: middle;
}

.team-member-thumbnail {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
}

.detail-label {
    display: inline-block;
    width: 80px;
    font-weight: bold;
}

.portal-teams-table thead {
    font-size: 16px;
}

/* Controls for search and filter */
.portal-teams-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.portal-teams-search input[type="text"] {
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    width: 200px; /* Adjust as needed */
}

.portal-teams-filter select {
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

/* Responsive styles for card view on mobile */
@media screen and (max-width: 768px) {
    .portal-teams-table, .portal-teams-table thead, .portal-teams-table tbody, .portal-teams-table th, .portal-teams-table td, .portal-teams-table tr {
        display: block;
    }

    .portal-teams-table thead tr {
        position: absolute;
        top: -9999px;
        left: -9999px;
    }

    .portal-teams-table tr {
        border: 1px solid #ccc;
        margin-bottom: 10px;
    }

    .portal-teams-table td {
        border: none;
        border-bottom: 1px solid #eee;
        position: relative;
        padding-left: 50%;
        text-align: left;
    }

    .portal-teams-table td:before {
        position: absolute;
        top: 6px;
        left: 6px;
        width: 45%;
        padding-right: 10px;
        white-space: nowrap;
        content: attr(data-label);
        font-weight: bold;
    }

    /* Specific adjustments for cells */
    .portal-teams-table .serial-number-cell, 
    .portal-teams-table .picture-cell {
        width: auto; /* Reset fixed width */
        text-align: left; /* Reset center alignment */
    }

    .portal-teams-table .picture-cell img {
        max-width: 100px; /* Adjust image size for mobile card view */
        height: auto;
    }

    .portal-teams-table .detail-label {
        width: auto; /* Reset fixed width for labels in card view */
        display: inline;
    }

    .portal-teams-controls {
        flex-direction: column; /* Stack controls vertically on mobile */
        align-items: flex-start;
    }

    .portal-teams-search,
    .portal-teams-filter {
        width: 100%;
        margin-bottom: 10px;
    }

    .portal-teams-search input[type="text"],
    .portal-teams-filter select {
        width: 100%;
    }
}