/* 離脱防止ポップアップ */
/* 本番サイトのスタイルに合わせて作成 */

#popUp {
    background-color: rgba(0, 0, 0, 0.2);
    width: 100%;
    height: 100%;
    position: fixed;
    top: 0;
    z-index: 10000; /* ナビバー(z-index: 999)より上に表示 */
    display: none;
}

#popUp .popup-content {
    display: none;
}

#popUp .popup-content.show {
    display: block;
}

#popUp .popup-content.content1 {
    max-width: 500px;
    width: 90%;
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    margin: auto;
    aspect-ratio: 1 / 1;
}

#popUp .popup-content.content2 {
    max-width: 400px;
    width: 90%;
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    margin: auto;
    aspect-ratio: 1 / 1.5;
}

#popUp .popup-content .close-btn {
    display: block;
    position: absolute;
    width: 45px;
    height: 45px;
    top: -55px;
    right: 0;
    background-color: #f3f3f3;
    border-radius: 50%;
    z-index: 10001; /* ポップアップより上に表示 */
    cursor: pointer;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
}

#popUp .popup-content .close-btn:hover {
    opacity: 0.7;
}

#popUp .popup-content .close-btn::before,
#popUp .popup-content .close-btn::after {
    content: "";
    display: block;
    width: 3px;
    height: 65%;
    background-color: #297842;
    position: absolute;
    top: 9px;
    left: 48%;
}

#popUp .popup-content .close-btn::before {
    transform: rotate(45deg);
}

#popUp .popup-content .close-btn::after {
    transform: rotate(-45deg);
}

#popUp .popup-content a {
    display: block;
    width: 100%;
    height: 100%;
    z-index: 10000; /* ポップアップコンテンツ内で適切に表示 */
    position: absolute;
}

#popUp .popup-content img {
    width: 100%;
    height: 100%;
}

@media screen and (max-width: 480px) {
    #popUp {
        background-color: rgba(0, 0, 0, 0.4);
    }
    
    #popUp .popup-content.content1 {
        width: 75%;
    }

    #popUp .popup-content.content2 {
        width: 60%;
    }

    #popUp .popup-content .close-btn {
        width: 40px;
        height: 40px;
        top: -50px;
    }

    #popUp .popup-content .close-btn::before,
    #popUp .popup-content .close-btn::after {
        top: 7px;
    }
}

