/* Staff Directory Shortcode Table Styles */
.staff-directory-table {
    border-collapse: collapse; /* Combine cell borders */
    width: 100%;
    margin-bottom: 1.5em;
    border: 1px solid #ddd;
}

.staff-directory-table th,
.staff-directory-table td {
    border: 1px solid #ddd;
    padding: 8px;
    text-align: left;
    vertical-align: top; /* Align content to the top */
}

.staff-directory-table .staff-photo-cell {
    width: 100px; /* Adjust width as needed */
    text-align: center;
    vertical-align: middle; /* Center photo vertically */
}

.staff-directory-table .staff-photo-cell img {
    max-width: 100%;
    height: auto;
    display: block; /* Prevents extra space below image */
    margin: 0 auto;
}

.staff-directory-table .staff-info-cell {
    /* The remaining width will be taken by this cell */
}

.staff-directory-table .staff-info-cell h3 {
    margin-top: 0;
    margin-bottom: 0.5em;
}

.staff-directory-table .staff-info-cell p {
    margin: 0 0 0.5em 0;
    font-size: 0.9em;
}

.staff-directory-table .staff-member-rank {
    font-style: italic;
    color: #555;
}

/* Optional: Add hover effect */
.staff-directory-table .staff-member-row:hover {
    background-color: #f9f9f9;
}

/* Single Staff Profile Template Styles */
/* These styles assume the template is rendered within the theme's standard content wrappers */

.staff-profile-entry .entry-header {
    margin-bottom: 1.5em;
    border-bottom: 1px solid #eee;
    padding-bottom: 1em;
}

.staff-profile-entry .entry-title {
    margin-bottom: 0.2em;
}

.staff-profile-entry .staff-rank,
.staff-profile-entry .staff-designations {
    margin-top: 0.2em;
    margin-bottom: 0;
    font-size: 1.1em;
    color: #555;
}

.asd-profile-main-layout { /* Simplified selector */
    display: flex; /* Reverted from !important */
    flex-wrap: wrap;
    gap: 2em;
    margin-bottom: 2em;
    width: 100%;
    max-width: none; /* Reverted from !important */
}

.asd-profile-photo-column { /* Simplified selector */
    flex: 0 0 200px;
    max-width: 200px;
}

.staff-profile-photo { /* Simplified selector */
    max-width: 100%;
    height: auto;
    display: block;
    border: 1px solid #ddd;
    padding: 4px;
}

.staff-photo-placeholder { /* Simplified selector */
    width: 200px;
    height: 200px;
    background-color: #f0f0f0;
    border: 1px solid #ddd;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #888;
    font-size: 0.9em;
}

.asd-profile-info-column { /* Simplified selector */
    flex: 1;
    min-width: 300px;
}

.staff-contact { /* Simplified selector */
    margin-bottom: 0.7em;
    font-size: 0.95em;
}

.staff-contact strong { /* Simplified selector */
    margin-right: 0.5em;
}

.staff-bio { /* Simplified selector */
    margin-top: 1.5em;
}

.staff-bio h2 { /* Simplified selector */
    font-size: 1.3em;
    margin-bottom: 0.5em;
    border-bottom: 1px solid #eee;
    padding-bottom: 0.3em;
}

/* Publications Table */
.staff-publications-section { /* Simplified selector */
    margin-top: 2em;
    clear: both;
}

.staff-publications-section h2 { /* Simplified selector */
    font-size: 1.5em;
    margin-bottom: 0.7em;
    border-bottom: 1px solid #eee;
    padding-bottom: 0.3em;
}

.staff-publications-table { /* Simplified selector */
    width: 100%;
    border-collapse: collapse;
    border: 1px solid #ddd;
}

.staff-publications-table th,
.staff-publications-table td { /* Simplified selector */
    border: 1px solid #ddd;
    padding: 8px 10px;
    text-align: left;
    vertical-align: top;
}

.staff-publications-table th { /* Simplified selector */
    background-color: #f9f9f9;
    font-weight: bold;
}

.staff-publications-table .pub-year {
    width: 10%;
}

.staff-publications-table .pub-type {
    width: 20%;
}

.staff-publications-table .pub-citation {
    width: 60%;
}

.staff-publications-table .pub-link {
    width: 10%;
    text-align: center;
}

/* Department Publications Shortcode Table Styles */
.department-publications-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1.5em;
    border: 1px solid #ddd;
}

.department-publications-table th,
.department-publications-table td {
    border: 1px solid #ddd;
    padding: 8px 10px;
    text-align: left;
    vertical-align: top;
}

.department-publications-table th {
    background-color: #f9f9f9;
    font-weight: bold;
}

.department-publications-table .pub-year {
    width: 10%;
}

.department-publications-table .pub-type {
    width: 15%;
}

.department-publications-table .pub-staff-name {
    width: 20%;
}

.department-publications-table .pub-citation-title {
    width: 55%;
}

.department-publications-table .pub-citation-title a {
    /* Optional: Style the citation link if needed */
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .asd-profile-main-layout { /* Simplified selector */
        flex-direction: column;
        gap: 1em;
    }

    .asd-profile-photo-column { /* Simplified selector */
        flex: 0 0 auto;
        max-width: 300px;
        margin: 0 auto;
    }

    .staff-photo-placeholder { /* Simplified selector */
         margin: 0 auto;
    }

    .asd-profile-info-column { /* Simplified selector */
        min-width: unset;
    }

    .staff-publications-table th,
    .staff-publications-table td { /* Simplified selector */
        padding: 6px 8px;
    }
}
