/* ============================================================
   PNSP 홈페이지 팝업
   PC + Mobile
   ============================================================ */

#pnsPopup,
#pnsPopup * {
    box-sizing: border-box;
}


/* ------------------------------------------------------------
   팝업 전체 영역
   ------------------------------------------------------------ */

#pnsPopup {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;

    z-index: 99999;

    display: none;

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

    padding: 20px;

    pointer-events: none;
}


/* 팝업 열림 */

#pnsPopup.is-open {
    display: flex;
}


/* ------------------------------------------------------------
   화면 뒤 어두운 배경
   ------------------------------------------------------------ */

.pns-popup__dim {
    display: none;
}


/* ------------------------------------------------------------
   팝업 본체
   ------------------------------------------------------------ */

.pns-popup__box {
    position: relative;
    z-index: 1;

    width: min(
        var(--popup-width),
        calc(100vw - 40px)
    );

    max-height: calc(100vh - 40px);

    margin-left: auto;
    margin-right: 0;

    background: #fff;

    border-radius: 4px;

    overflow: hidden;

    box-shadow:
        0 12px 40px rgba(0, 0, 0, 0.28);

    pointer-events: auto;
}


/* ------------------------------------------------------------
   이미지
   ------------------------------------------------------------ */

.pns-popup__image-link {
    display: block;

    line-height: 0;

    text-decoration: none;
}


.pns-popup__image {
    display: block;

    width: 100%;
    height: auto;

    max-height: calc(100vh - 90px);

    object-fit: contain;
}


/* ------------------------------------------------------------
   하단 버튼 영역
   ------------------------------------------------------------ */

.pns-popup__bottom {
    display: flex;

    align-items: center;
    justify-content: space-between;

    height: 46px;

    padding: 0 14px;

    background: #111;

    color: #fff;
}


/* 버튼 공통 */

.pns-popup__bottom button {
    border: 0;

    background: transparent;

    color: #fff;

    padding: 0;
    margin: 0;

    cursor: pointer;

    font-family: inherit;

    font-size: 13px;

    line-height: 46px;
}


/* 오늘 하루 보지 않기 */

.pns-popup__today {
    opacity: 0.92;
}


/* 닫기 */

.pns-popup__close {
    font-weight: 500;
}


/* X */

.pns-popup__close span {
    display: inline-block;

    margin-left: 4px;

    font-size: 18px;

    vertical-align: -1px;
}


/* ============================================================
   MOBILE
   ============================================================ */

@media (max-width: 767px) {

    #pnsPopup {
        padding: 12px;
    }


    .pns-popup__box {
        width: min(
            var(--popup-width),
            calc(100vw - 24px)
        );

        max-height: calc(100vh - 24px);
    }


    .pns-popup__image {
        max-height: calc(100vh - 70px);
    }


    .pns-popup__bottom {
        height: 42px;

        padding: 0 12px;
    }


    .pns-popup__bottom button {
        font-size: 12px;

        line-height: 42px;
    }

}