/*-----------------------------------------------
    Team Member Modal
------------------------------------------------*/

.team-member-modal {
    position: fixed;
    inset: 0;
    width: min(1000px, 92vw);
    max-width: 92vw;
    max-height: 90dvh;
    margin: auto;
    padding: clamp(20px, 4vw, 50px);
    box-sizing: border-box;
    border: none;
    border-radius: 8px;
    background: var(--wp--preset--color--base, #fff);
    color: inherit;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.team-member-modal::backdrop {
    background: rgba(0, 0, 0, 0.65);
}

/* Close button */

.team-member-modal-close {
    position: sticky;
    top: 0;
    display: block;
    margin-left: auto;
    margin-bottom: 10px;
    width: 40px;
    height: 40px;
    padding: 0;
    border: none;
    background: transparent;
    color: inherit;
    font-size: 32px;
    line-height: 1;
    cursor: pointer;
    z-index: 10;
}

/* Loading and error messages */

.team-member-modal-status:empty {
    display: none;
}

.team-member-modal-status {
    padding: 20px 0;
    text-align: center;
}

/* Prevent background scrolling */

body.team-member-modal-open {
    overflow: hidden;
}

/* Reset outer profile spacing */

#team-member-modal-content .team-member-profile {
    margin: 0;
    max-width: none;
}

/* Mobile */

@media (max-width: 600px) {

    .team-member-modal {
        width: 95vw;
        max-width: 95vw;
        max-height: 94dvh;
        padding: 20px;
    }

}


/*-----------------------------------------------
    Team Member - Name and Academic Title
------------------------------------------------*/

.wp-block-group.team-member-name {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    column-gap: 0.5em;
    row-gap: 0;
}

.wp-block-group.team-member-name > p {
    margin: 0;
    padding: 0;
    font-weight: 700;
    font-size: 1.5rem;
    line-height: 1.2;
}

/*-----------------------------------------------
    Team Member - Social Profiles
------------------------------------------------*/

.social_profiles .wp-block-social-links {
    gap: 0.4rem;
    margin: 0;
    padding: 0;
}

.social_profiles .wp-block-social-link {
    font-size: 16px;
}

.social_profiles .wp-block-social-link-anchor {
    padding: 0.4em;
}

.social_profiles .wp-block-social-link svg {
    width: 1em;
    height: 1em;
}

/*-----------------------------------------------
    Team Member - Featured Image
------------------------------------------------*/

.team-member-detail .wp-block-post-featured-image {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    box-sizing: border-box;
}

.team-member-detail .wp-block-post-featured-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/*-----------------------------------------------
    Team Member - Mobile Featured Image
------------------------------------------------*/

@media (max-width: 781px) {

    .team-member-detail .wp-block-post-featured-image {
        height: auto !important;
        aspect-ratio: auto !important;
        margin-bottom: 1rem;
    }

    .team-member-detail .wp-block-post-featured-image img {
        width: 100%;
        height: auto !important;
        max-height: 300px;
        object-fit: contain;
    }

}
/*-----------------------------------------------
    Team Member - Archive Featured Image
------------------------------------------------*/

.wp-block-post-featured-image.team-member-archive-image {
    width: 100%;
    height: auto;
    max-width: 100%;
    margin: 0;
    overflow: hidden;
    box-sizing: border-box;
}

.team-member-archive-image a {
    display: block;
    width: 100%;
}

.team-member-archive-image img {
    display: block;
    width: 100%;
    height: auto;
    max-width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    object-position: center top;
}