:root {
    --cpx-popup-background-color: #fff;
    --cpx-popup-backdrop-color: rgba(0, 0, 0, 0.62);
    --cpx-popup-border-color: #9b9b9b;
    --cpx-popup-text-color: #252525;
    --cpx-popup-focus-color: #1a5fa8;
    --cpx-popup-max-width: 1120px;
    --cpx-popup-spacing: clamp(24px, 4vw, 52px);
    --cpx-popup-transition-duration: 180ms;
}

.cpx_medewerker_popup[hidden] {
    display: none;
}

.cpx_medewerker_popup,
.cpx_medewerker_popup *,
.cpx_medewerker_popup *::before,
.cpx_medewerker_popup *::after {
    box-sizing: border-box;
}

.cpx_medewerker_popup {
    display: flex;
    width: 100%;
    height: 100%;
    padding: clamp(16px, 3vw, 40px);
    position: fixed;
    z-index: 999999;
    top: 0;
    left: 0;
    align-items: center;
    justify-content: center;
    color: var(--cpx-popup-text-color);
}

.cpx_medewerker_popup__backdrop {
    width: 100%;
    height: 100%;
    position: fixed;
    top: 0;
    left: 0;
    background-color: var(--cpx-popup-backdrop-color);
    opacity: 0;
    transition: opacity var(--cpx-popup-transition-duration) ease;
}

.cpx_medewerker_popup__dialog {
    display: grid;
    width: min(100%, var(--cpx-popup-max-width));
    max-height: calc(100vh - clamp(32px, 6vw, 80px));
    position: relative;
    z-index: 1;
    grid-template-columns: minmax(260px, 40%) minmax(0, 60%);
    overflow: hidden;
    background-color: var(--cpx-popup-background-color);
    opacity: 0;
    transform: translateY(16px) scale(0.985);
    transition:
        opacity var(--cpx-popup-transition-duration) ease,
        transform var(--cpx-popup-transition-duration) ease;
    border-radius: var(--cpx-border-radius);
}

.cpx_medewerker_popup__dialog--without_image {
    grid-template-columns: minmax(0, 1fr);
}

.cpx_medewerker_popup.is_open .cpx_medewerker_popup__backdrop,
.cpx_medewerker_popup.is_open .cpx_medewerker_popup__dialog {
    opacity: 1;
}

.cpx_medewerker_popup.is_open .cpx_medewerker_popup__dialog {
    transform: translateY(0) scale(1);
}

.cpx_medewerker_popup__close {
    display: flex !important;
    width: 48px !important;
    height: 48px !important;
    padding: 8px !important;
    position: absolute;
    z-index: 2;
    top: 10px;
    right: 10px;
    align-items: center;
    justify-content: center;
    border: none !important;
    background: transparent;
    cursor: pointer;
    background-color: var(--e-global-color-4a767ad) !important;     
}

.cpx_medewerker_popup__close img {
    display: block;
    width: 60%;
    height: 60%;
    object-fit: contain;
}

.cpx_medewerker_popup__close:focus-visible,
.cpx_medewerker_popup__contact_link:focus-visible {
    outline: 3px solid var(--cpx-popup-focus-color);
    outline-offset: 3px;
}

.cpx_medewerker_popup__image_wrapper {
    min-height: min(640px, calc(100vh - clamp(32px, 6vw, 80px)));
    overflow: hidden;
}

.cpx_medewerker_popup__image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cpx_medewerker_popup__body {
    display: flex;
    min-width: 0;
    padding: var(--cpx-popup-spacing);
    padding-top: max(var(--cpx-popup-spacing), 64px);
    flex-direction: column;
    overflow-y: auto;
}

.cpx_medewerker_popup__content > :first-child,
.cpx_medewerker_popup__person > :first-child {
    margin-top: 0;
}

.cpx_medewerker_popup__content > :last-child,
.cpx_medewerker_popup__person > :last-child {
    margin-bottom: 0;
}

.cpx_medewerker_popup__person {
    margin-top: auto;
    padding-top: 24px;
}

.cpx_medewerker_popup__name,
.cpx_medewerker_popup__function {
    margin: 0;
    font-size: inherit;
    line-height: 1.25;
}

.cpx_medewerker_popup__name {
    font-weight: 700;
}

.cpx_medewerker_popup__contact {
    display: flex;
    margin-top: 8px;
    align-items: center;
    gap: 10px;
}

.cpx_medewerker_popup__contact_link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: var(--e-global-color-primary);
    height: 40px;
    width: 40px;
    border-radius: 100%;
}

.cpx_medewerker_popup__contact_link svg {
    display: block;
    width: 20px;
    height: 20px;
    object-fit: contain;
    color: var(--e-global-color-accent);

    position: relative;
}

body.cpx_popup_is_open {
    overflow: hidden;
}

@media (max-width: 767px) {
    .cpx_medewerker_popup {
        padding: 12px;
        align-items: flex-start;
        overflow-y: auto;
    }

    .cpx_medewerker_popup__dialog {
        max-height: none;
        grid-template-columns: 1fr;
    }

    .cpx_medewerker_popup__image_wrapper {
        min-height: 0;
        height: min(70vw, 380px);
        border-right: 0;
    }

    .cpx_medewerker_popup__body {
        padding: 28px 22px;
        padding-top: 58px;
        overflow: visible;
    }
}

@media (prefers-reduced-motion: reduce) {
    .cpx_medewerker_popup__backdrop,
    .cpx_medewerker_popup__dialog {
        transition: none;
    }
}
