/* staff directory table search */

.staff-directory-wrapper {
    width: 100%;
    overflow-x: auto;
}
.staff-directory-wrapper table {
    min-width: 400px; /* Prevent excessive squishing */
}

/* Base table styles */
.staff-directory-table {
    width: 100%;
    border-collapse: collapse;
}
.staff-directory-table th {
    text-align: left;
    padding: 0.5rem;
    cursor: pointer;
}
.staff-directory-table .staff-member {
    border-bottom: 1px solid #d6c5c5;
}
.staff-directory-table .staff-member td {
    padding: 0.5rem;
    vertical-align: top;
}

/* Enhanced search box styling */
#staff_keyword_search_wrapper {
    position: relative;
    margin-bottom: 1rem;
    max-width: 300px;
    background-color: #fff;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    border-radius: 0.5rem;
    overflow: hidden;
}
#staff_keyword_search_wrapper #staff-search {
    padding: 0.5rem 1rem 0.5rem 2.5rem;
    width: 100%;
    border: none;
    font-size: 1rem;
    transition: background-color 0.3s ease;
}
#staff_keyword_search_wrapper #staff-search:focus {
    outline: none;
    background-color: #f0f8ff;
}
#staff_keyword_search_wrapper .fa-search {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
    transition: color 0.3s ease;
}
#staff_keyword_search_wrapper #staff-search:focus + .fa-search,
#staff_keyword_search_wrapper #staff-search:not(:placeholder-shown) + .fa-search {
    color: #333;
}

/* Mobile: stack rows more tightly without heavy cards */
@media (max-width: 600px) {
    .staff-directory-table,
    .staff-directory-table thead,
    .staff-directory-table tbody,
    .staff-directory-table th,
    .staff-directory-table td,
    .staff-directory-table tr {
        display: block;
    }

    /* Hide table headers */
    .staff-directory-table thead {
        display: none;
    }

    /* Each row as a lightweight card */
    .staff-directory-table tr {
        margin-bottom: 0.5rem;
        padding: 0.5rem;
        background-color: #fff;
        border-radius: 0.25rem;
    }

    /* Stack each cell: label on its own line above the value */
    .staff-directory-table td {
        display: block;
        padding: 0.25rem 0;
        border: none;
    }
    .staff-directory-table td::before {
        content: attr(data-label);
        display: block;
        font-weight: 600;
        margin-bottom: 0.25rem;
    }
    .staff-directory-table td:last-child {
        margin-bottom: 0;
    }
}