/* ========================================
 Bio Popup
======================================== */

.team-bio-popup {
    position: fixed;
    inset: 0;
    z-index: 9999;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: var(--space-6);

    background: rgba(21, 21, 21, 0.6);

    opacity: 0;
    visibility: hidden;

    transition:
        opacity 0.25s ease,
        visibility 0.25s ease;
}

.team-bio-popup.is-open {
    opacity: 1;
    visibility: visible;
}

.team-bio-popup__overlay {
    position: absolute;
    inset: 0;
}


/* ========================================
   Dialog
======================================== */

.team-bio-popup__dialog {
    position: relative;
    z-index: 1;

    width: min(100%, 880px);
    max-height: 90vh;

    display: grid;
    grid-template-columns:
        minmax(280px, 0.85fr)
        minmax(0, 1.15fr);

    background: var(--color-white);

    border-radius: 16px;
    overflow: hidden;

    box-shadow:
        0 24px 80px rgba(0, 0, 0, 0.2);

    transform: translateY(16px);

    transition:
        transform 0.25s ease;
}

.team-bio-popup.is-open .team-bio-popup__dialog {
    transform: translateY(0);
}


/* ========================================
   Close Button
======================================== */

.team-bio-popup__close {
    position: absolute;
    top: var(--space-4);
    right: var(--space-4);

    z-index: 2;

    width: 40px;
    height: 40px;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 0;

    border: 0;
    border-radius: 50%;

    background: var(--color-white);
    color: var(--grey-950);

    cursor: pointer;

    appearance: none;
    -webkit-appearance: none;

    box-shadow:
        0 4px 16px rgba(0, 0, 0, 0.12);
}

.team-bio-popup__close:hover {
    opacity: 0.8;
}

.team-bio-popup__close:focus-visible {
    outline: 2px solid var(--pink-500);
    outline-offset: 3px;
}

.team-bio-popup__close svg {
    width: 20px;
    height: 20px;
}


/* ========================================
   Image
======================================== */

.team-bio-popup__image-wrapper {
    min-height: 520px;

    background: var(--grey-100);
}

.team-bio-popup__image {
    display: block;

    width: 100%;
    height: 100%;
    min-height: 520px;

    object-fit: cover;
}


/* ========================================
   Content
======================================== */

.team-bio-popup__content {
    min-width: 0;

    max-height: 90vh;
    overflow-y: auto;

    padding: var(--space-10);

    display: flex;
    flex-direction: column;
    justify-content: center;
}

.team-bio-popup__role {
    margin: 0 0 var(--space-2);

    color: var(--pink-500);

    font-family: var(--font-family-primary);
    font-size: var(--text-body-sm);
    line-height: var(--leading-body-sm);
    font-weight: var(--font-semibold);
}

.team-bio-popup__name {
    margin: 0;

    color: var(--grey-950);

    font-family: var(--font-family-primary);
    font-size: var(--text-h2);
    line-height: var(--leading-h2);
    font-weight: var(--font-bold);
}

.team-bio-popup__bio {
    margin-top: var(--space-6);

    color: var(--grey-700);

    font-family: var(--font-family-primary);
    font-size: var(--text-body);
    line-height: var(--leading-body);
    font-weight: var(--font-regular);
}

.team-bio-popup__bio p {
    margin: 0;
}

.team-bio-popup__bio p + p {
    margin-top: var(--space-4);
}


/* ========================================
   Body Lock
======================================== */

body.is-team-bio-open {
    overflow: hidden;
}


/* ========================================
   Mobile
======================================== */

@media (max-width: 768px) {

    .team-bio-popup {
        padding: 0;
        align-items: flex-end;
    }

    .team-bio-popup__dialog {
        width: 100%;
        max-height: calc(100dvh - var(--space-4));

        display: flex;
        flex-direction: column;

        border-radius: 20px 20px 0 0;
    }

    .team-bio-popup__image-wrapper {
        flex: 0 0 240px;
        min-height: 240px;
        max-height: 240px;
    }

    .team-bio-popup__image {
        width: 100%;
        height: 240px;
        min-height: 240px;
        max-height: 240px;

        object-fit: cover;
        object-position: center;
    }

    .team-bio-popup__content {
        flex: 1 1 auto;
        min-height: 0;
        max-height: none;

        overflow-y: auto;
        -webkit-overflow-scrolling: touch;

        padding: var(--space-6);

        display: block;
    }

    .team-bio-popup__role {
        margin-bottom: var(--space-2);
    }

    .team-bio-popup__name {
        font-size: var(--text-h2);
        line-height: var(--leading-h2);
    }

    .team-bio-popup__bio {
        margin-top: var(--space-4);

        font-size: var(--text-body);
        line-height: var(--leading-body);
    }
}



/* ========================================
   Reduced Motion
======================================== */

@media (prefers-reduced-motion: reduce) {

    .team-bio-popup,
    .team-bio-popup__dialog {
        transition: none;
    }
}