.ipe-popups {
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 999;
}
.ipe-popups.active {
    display: flex;
}
.ipe-popups-background {
    background: #00000088;
}

.ipe-popup {
    display: none;
    position: relative;
    background: black;
    color: white;
    justify-content: center;
    align-items: stretch;
}
.ipe-popup.active {
    display: flex;
}
.ipe-popup-content-wrapper {
    overflow: auto;
}

.ipe-popup-close-button {
    position: relative;
    width:64px;
    height: 64px;
    cursor:pointer;
}
.ipe-placement-center .ipe-popup-close-button {
    width:  36px;
    height: 36px;
}

.ipe-popup-close-button-background {
    display: block;
    background: white;
    width:  100%;
    height: 100%;
    border-radius: 50%;
    transition: transform 0.3s ease;
}
@media screen AND (hover:hover){
    .ipe-popup-close-button:hover .ipe-popup-close-button-background {
        transform: scale(1.1);
    }
}
.ipe-popup-close-button:focus .ipe-popup-close-button-background,
.ipe-popup-close-button:focus-visible .ipe-popup-close-button-background {
    transform: scale(1.1);
}

.ipe-popup-close-button span {
    display: block;
    position: absolute;
    top: 50%;
    left: 50%;
    background: black;
    width:50%;
    height: 2px;
}

.ipe-popup-close-button span:nth-of-type(2) {
    transform: translate(-50%, -50%) rotate(45deg);
}

.ipe-popup-close-button span:nth-of-type(1) {
    transform: translate(-50%, -50%) rotate(-45deg);
}

.ipe-popup.ipe-placement-top .ipe-popup-content {
    display: flex;
    padding: 50px 20px;
    max-width: 1350px;
}

.ipe-popup-cta-buttons {
    white-space: nowrap;
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
}



/* TOP */
.ipe-popup.ipe-placement-top {
    position: absolute;
    top:0;
    left:0;
    right:0;
    width:100%;
    max-height: 100%;
}

.ipe-popup.ipe-placement-top .ipe-popup-content .ipe-popup-heading {
    flex: 1 0 auto;
    padding-right: 8%;
}

.ipe-popup.ipe-placement-top .ipe-popup-content p {
    flex: auto;
    padding-right: 8%;
}

.ipe-popup.ipe-placement-top .ipe-popup-content {
    justify-content: space-between;
    align-items: center;
    margin: auto;
    width: 100%;
}

.ipe-popup.ipe-placement-top .ipe-popup-close-button {
    position: absolute;
    top:25px;
    right:45px;
}

@media screen AND (max-width:767px){
    .ipe-popup.ipe-placement-top .ipe-popup-content {
        flex-direction: column;
        align-items: flex-start;
    }
    .ipe-popups-controller .ipe-popup-close-button {
        width:  36px;
        height: 36px;
    }
    .ipe-popup.ipe-placement-top .ipe-popup-close-button {
        top:7px;
        right:22px;
    }
}



/* CENTER */
.ipe-popup.ipe-placement-center {
    margin: 40px;
    max-width: 95%;
    max-width: calc( 100% - 40px);
    max-height: 95%;
    max-height: calc( 100% - 40px);
}
@media screen AND (max-width:767px){
    .ipe-popup.ipe-placement-center {
        margin: 20px;
    }
}
.ipe-popup.ipe-placement-center .ipe-popup-close-button {
    position: absolute;
    right: 0;
    top: 0;
    transform: translate(50%, -50%);
}
.ipe-popup .ipe-popup-close-button:focus-visible {
    outline: 2px solid white;
    border-radius: 99px;
}
.ipe-popup.ipe-placement-center .ipe-popup-content-wrapper {
    max-width: unset;
    margin: 0 40px;
}
.ipe-popup.ipe-placement-center .ipe-popup-content {
    display: flex;
    flex-direction: column;
    padding: 40px 0;
    justify-content: space-evenly;
}
@media screen AND (max-width:767px){
    .ipe-popup.ipe-placement-center .ipe-popup-content-wrapper {
        margin: 40px 0;
    }
    .ipe-popup.ipe-placement-center .ipe-popup-content {
        padding: 0 25px;
    }
}
.ipe-popup.ipe-placement-center .ipe-popup-cta-buttons {
    flex-direction: row;
    justify-content: center;
    flex-flow: wrap;
    gap:10px;
}


/* MODALS */
.sape-modal {
    position: relative;
    background: white;
    margin: auto;
    width: 600px;
    max-width: 90vw;
    padding: 60px;
}

.sape-modal .ipe-popup-close-button {
    position: absolute;
    width: 36px;
    height: 36px;
    top: 0;
    right: 0;
    transform: translate(50%,-50%);
}

.sape-modal h2 {
    text-align: center;
    margin-bottom: 30px;
}

.sape-modal p {
    text-align: center;
}

.sape-modal-buttons {
    display: flex;
    gap: 20px;
    margin-top: 40px;
    justify-content: center;
}

.sape-modal-buttons .sape-button {
    font-size: 1em;
}
html body .sape-modal-button {
    min-width: 25%;
}

.sape-input{
    width: 100%;
    width: -webkit-fill-available;
}
@media screen AND (max-width:767px){
    .sape-modal {
        padding: 20px 20px 40px;
    }
    .url-sharing-modal .sape-modal-buttons{
        flex-direction: column;
        align-items: center;
    }
    body .sape-modal-button {
        width: -webkit-fill-available;
        max-width: 50%;
    }
}