/* elifsung6300won.mycafe24.com 참고 사이트 final/css/popup.css 를 그대로 포팅 (죽은 배경이미지 참조만 제거) */

.popupWrap {
    position: fixed;
    top: 200px;
    right: 0px;
    transition: all 1s;
    z-index: 9;
    display: flex;
    flex-flow: row wrap;
    transform: translateX(100%);
}

.popupWrap.active {
    transform: translateX(0%);
}

.popupWrap .contWrap {
    display: flex;
    position: relative;
    opacity: 1;
    transition: all 1s;
}

.popupWrap.active .contWrap {
    opacity: 1;
}

.popupWrap .contWrap > div {
    position: relative;
}

.popupWrap .btnsWrap {
    float: left;
    display: block;
    width: 50px;
    height: 100%;
    background-color: #ABA197;
    top: 0px;
    left: -50px;
    position: absolute;
    cursor: pointer;
}

.popupWrap .btnsWrap p {
    color: #fff;
    font-size: 18px;
    position: absolute;
    top: 20px;
    left: 70%;
    font-weight: bold;
    transform-origin: 0 0;
    transform: rotate(90deg);
}

.popupWrap .btnsWrap span {
    position: absolute;
    display: block;
    width: 100%;
    height: 70px;
    bottom: 0;
    left: 0;
    transition: all .3s;
}

.popupWrap .btnsWrap::after {
    width: 20px;
    height: 4px;
    display: block;
    background: #fff;
    position: absolute;
    bottom: 17px;
    left: 15px;
    transform: rotate(135deg);
    content: "";
    transition: all .5s;
    z-index: 1;
}

.popupWrap .btnsWrap::before {
    width: 20px;
    height: 4px;
    display: block;
    background: #fff;
    position: absolute;
    bottom: 29px;
    left: 15px;
    transform: rotate(-135deg);
    content: "";
    transition: all .5s;
    z-index: 1;
}

.popupWrap.active .btnsWrap::after {
    width: 30px;
    height: 4px;
    display: block;
    background: #fff;
    position: absolute;
    bottom: 30px;
    left: 10px;
    transform: rotate(-45deg);
    content: "";
    z-index: 1;
}

.popupWrap.active .btnsWrap::before {
    width: 30px;
    height: 4px;
    display: block;
    background: #fff;
    position: absolute;
    bottom: 30px;
    left: 10px;
    transform: rotate(45deg);
    content: "";
    z-index: 1;
}

.popupWrap .contWrap > div img {
    max-width: 320px;
}

/* PC 는 팝업이 가로로 나란히 보이므로 넘김 화살표는 모바일에서만 */
.popupWrap .arrow-nav {
    display: none;
}

/* ===================================================================
   모바일 (final/mobile/css/popup.css 그대로 포팅) — 가운데 모달 + 반투명 배경,
   탭을 누르면 토글이 아니라 한 번에 닫힘. 사이트 공통 모바일 기준(1024px)에 맞춤.
   =================================================================== */
@media (max-width: 1024px) {
    .popupWrap {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        transform: none;
        background-color: rgba(0, 0, 0, .4);
        flex-direction: column;
        flex-wrap: nowrap;
        align-items: center;
        justify-content: center;
        z-index: 10000;
        opacity: 1;
        transition: opacity .3s ease;
    }

    .popupWrap.is-closed {
        opacity: 0;
        pointer-events: none;
    }

    .popupWrap .contWrap {
        width: 340px;
        max-width: 80%;
        display: flex;
        flex-wrap: nowrap;
        overflow: hidden;
        opacity: 1;
        transition: none;
    }

    /* 팝업을 가로로 이어 붙이고 --popup-idx 만큼 옆으로 밀어 슬라이드 */
    .popupWrap .contWrap > div {
        display: block;
        flex: 0 0 100%;
        position: relative;
        transform: translateX(calc(var(--popup-idx, 0) * -100%));
        transition: transform .45s cubic-bezier(.4, 0, .2, 1);
    }

    .popupWrap .contWrap > div img {
        width: 100%;
        max-width: none;
        display: block;
    }

    .popupWrap .arrow-nav {
        display: block;
        position: absolute;
        top: 50%;
        margin-top: -18px;
        width: 36px;
        height: 36px;
        border: 0;
        border-radius: 50%;
        background: rgba(0, 0, 0, .5);
        color: #fff;
        font-size: 20px;
        line-height: 1;
        cursor: pointer;
        z-index: 20;
    }

    .popupWrap .arrow-nav--prev { left: calc(10% - 18px); }
    .popupWrap .arrow-nav--next { right: calc(10% - 18px); }

    .popupWrap .btnsWrap {
        position: static;
        width: 340px;
        max-width: 80%;
        height: 41px;
        display: flex;
        align-items: center;
        padding: 0 10px;
        background-color: #232547;
    }

    .popupWrap .btnsWrap p {
        position: static;
        transform: none;
        font-size: 16px;
        margin-right: auto;
    }

    .popupWrap .btnsWrap span {
        position: static;
        width: 40px;
        height: 40px;
        text-align: center;
        background: none;
    }

    .popupWrap .btnsWrap span::before {
        content: "X";
        display: block;
        width: 100%;
        height: 100%;
        line-height: 40px;
        color: #fff;
        font-size: 20px;
    }

    .popupWrap .btnsWrap::before,
    .popupWrap .btnsWrap::after {
        content: none;
    }
}
