.wp-block-acf-team-card {
    background-color: var(--wp--preset--color--base);
    border-radius: 2.5rem;
    display: block;
    min-height: 100%;
    padding: 1.125rem;
    position: relative;
    text-decoration-line: none;
    transition: background-color 0.25s ease-out;
}

.wp-block-acf-team-card:hover,
.wp-block-acf-team-card:focus {
    background-color: var(--wp--preset--color--fairy);
}

.wp-block-acf-team-card:focus {
    outline-color: var(--wp--preset--color--berry);
}

.wp-block-acf-team-card::before {
    background-image: var(--wp--preset--gradient--chill);
    border-radius: inherit;
    border-radius: 2.625rem;
    bottom: -0.125rem;
    content: '';
    height: calc(100% + 0.25rem);
    left: -0.125rem;
    position: absolute;
    width: calc(100% + 0.25rem);
    z-index: -1;
}

.team-card__image-wrapper {
    border-radius: inherit;
    margin: 0;
    overflow: hidden;
    position: relative;
}

.team-card__image {
    aspect-ratio: 1/1;
    border-radius: inherit;
    height: auto;
    object-fit: cover;
    width: 100%;
}

.team-card__image--secondary {
    left: 0;
    opacity: 0;
    position: absolute;
    top: 0;
    transition: opacity 0.375s ease-out;
}

.team-card--has-secondary-image:hover .team-card__image--secondary,
.team-card--has-secondary-image:focus .team-card__image--secondary {
    opacity: 1;
}

.team-card__name {
    font-size: var(--wp--preset--font-size--large);
    margin-block: 1.5rem;
}

.team-card__pronouns,
.team-card__position {
    text-transform: uppercase;
}

.team-card__button {
    background-image: var(--wp--preset--gradient--chill);
    border-radius: 2rem;
    color: var(--wp--preset--color--base);
    padding: var(--wp--preset--spacing--30) var(--wp--preset--spacing--40);
    position: absolute;
    right: 1rem;
    top: 1rem;
}

.team-card__overlay[open] {
    display: flex;
}

.team-card__overlay {
    align-items: flex-start;
    animation: team-overlay-reveal 0.25s ease-out 1 forwards;
    background-color: var(--wp--preset--color--base);
    border-width: 0;
    flex-direction: column;
    gap: 2rem;
    margin: auto;
    max-width: calc(100% - var(--wp--style--root--padding-left) - var(--wp--style--root--padding-right));
    overflow: hidden;
    padding: 4rem 2rem;
    position: fixed;
}

.team-card__overlay::backdrop {
    background-color: var(--wp--preset--color--base);
    overscroll-behavior: contain;
}

.team-card__overlay::before {
    background-color: var(--wp--preset--color--base);
    border-radius: inherit;
    border-radius: 3.075rem;
    bottom: 0.125rem;
    content: '';
    height: calc(100% - 0.25rem);
    left: 0.125rem;
    position: absolute;
    width: calc(100% - 0.25rem);
    z-index: -1;
}

.team-card__overlay-inner {
    color: var(--wp--preset--color--contrast, black);
    color: var(--wp--preset--color--primary);
    color: var(--wp--preset--color--primary-80);
    order: 1;
    outline-color: var(--wp--preset--color--berry);
    scrollbar-color: var(--wp--preset--color--berry) var(--wp--preset--color--fairy);
    scrollbar-width: thin;
}

.team-card__overlay-name,
.team-card__overlay-pronouns,
.team-card__overlay-title {
    margin: 0;
}

.team-card__overlay-name {
    -webkit-background-clip: text;
    background-image: var(--wp--preset--gradient--bubblegum);
    font-size: var(--wp--preset--font-size--medium);
    font-weight: bold;
    -webkit-text-fill-color: transparent;
}

.team-card__overlay-picture {
    position: relative;
    width: 100%;
}

.team-card__overlay-slider {
    aspect-ratio: 1/1;
    border-radius: 1.5rem;
    display: flex;
    list-style: none;
    margin: 0;
    overflow: hidden;
    padding: 0;
    position: relative;
    width: 100%;
}

.team-card__overlay-slide {
    bottom: 0;
    opacity: 1;
    position: absolute;
    transition: opacity 0.25s ease-out;
    width: 100%;
}

.team-card__overlay-slide[aria-hidden=true] {
    opacity: 0;
    transition-duration: 0.5s;
}

.team-card__overlay-slider-pagination {
    align-items: center;
    display: flex;
    gap: 0.25rem;
    justify-content: center;
    list-style: none;
    margin: 0;
    padding: 0.75rem;
    position: absolute;
    top: 100%;
    width: 100%;
}

.team-card__overlay-slider-button {
    appearance: none;
    aspect-ratio: 1/1;
    background-color: transparent;
    border: 1px solid var(--wp--preset--color--primary);
    border-radius: 100%;
    cursor: pointer;
    min-height: 0.5rem;
    min-width: 0.5rem;
    transition: all 0.25s ease-out;
    transition-property: background-color;
}

.team-card__overlay-slider-button:hover,
.team-card__overlay-slider-button:focus {
    background-color: var(--wp--preset--color--berry);
}

.team-card__overlay-slider-button[aria-selected=true] {
    background-image: var(--wp--preset--gradient--midnite);
}

.team-card__overlay-icon {
    bottom: 0;
    min-width: 1rem;
    position: absolute;
    right: 10%;
    transform: translateY(50%);
    width: 15%;
}

.team-card__overlay-icon > svg {
    width: 100%;
}

.team-card__overlay-close {
    align-items: center;
    aspect-ratio: 1/1;
    background-color: transparent;
    border: none;
    border-radius: 4rem;
    box-shadow: none;
    color: var(--wp--preset--color--contrast);
    cursor: pointer;
    display: flex;
    justify-content: center;
    padding: 1rem;
    position: absolute;
    right: 1rem;
    top: 1rem;
}

.team-card__overlay-close svg {
    color: inherit;
    stroke: currentcolor;
    transition: all 0.25s ease-out;
    transition-property: color, stroke-width;
}

.team-card__overlay-close:hover,
.team-card__overlay-close:focus {
    color: var(--wp--preset--color--berry);
}

.team-card__overlay-close:focus {
    outline: none;
}

.team-card__overlay-close:focus > svg,
.team-card__overlay-close:hover > svg {
    stroke-width: 2;
}

@media screen and (max-width: 600px) {
    .team-card__overlay {
        height: 100vh;
        margin: 0;
        min-width: 100vw;
        overflow-y: auto;
        padding-block-start: 6.25rem;
    }

    .team-card__overlay-name {
        margin-bottom: 0.25rem;
    }
}

@media screen and (min-width: 600px) {
    .team-card__overlay {
        align-items: center;
        background-image: var(--wp--preset--gradient--chill);
        border-radius: 3.125rem;
        flex-direction: row;
    }

    .team-card__overlay-inner {
        max-height: 24rem;
        min-width: 36%;
        overflow-y: auto;
    }

    .team-card__overlay-slider {
        min-width: 16rem;
    }

    .team-card__overlay-details {
        align-items: baseline;
        display: flex;
        gap: 1em;
        margin-block-end: 0.25rem;
    }

    .team-card__overlay::before {
        display: block;
    }

    .team-card__overlay::backdrop {
        cursor: pointer;
        opacity: 0.5;
    }
}

@media screen and (min-width: 900px) {
    .team-card__overlay {
        gap: 2.5rem;
        max-width: 56rem;
        padding: 3.5rem;
    }

    .team-card__overlay-slider {
        min-width: 24rem;
    }
}

@media screen and (min-width: 1200px) {
    .team-card__overlay {
        gap: 6.25rem;
        max-width: 76rem;
        padding: 6.25rem;
    }
}

@keyframes team-overlay-reveal {
    from {
        opacity: 0;
        transform: translateY(-0.25rem);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}
