/* ==========================
   共通モーダル
========================== */

.modal{
    position:fixed;
    top:0;
    right:0;
    bottom:70px;
    left:0;
    z-index:1000;
    display:none;
    align-items:center;
    justify-content:center;
    padding:15px;
    box-sizing:border-box;
    overflow:hidden;
    background:rgba(0,0,0,.5);
}

.modal.active{
    display:flex;
}

.modal-content{
    display:flex;
    flex-direction:column;
    width:100%;
    max-width:430px;
    max-height:100%;
    min-height:0;
    overflow:hidden;
    border-radius:12px;
    background:#fff;

    font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","Noto Sans JP","Yu Gothic","Hiragino Kaku Gothic ProN",sans-serif;
}

.modal-content *{
    font-family:inherit;
}


/* ==========================
   モーダルヘッダー
========================== */

.modal-header{
    display:flex;
    align-items:center;
    justify-content:space-between;
    flex:0 0 50px;
    width:100%;
    height:50px;
    min-height:50px;
    padding:0 15px;
    box-sizing:border-box;
    border-bottom:1px solid #ddd;
}

.modal-title{
    min-width:0;
    overflow:hidden;
    font-size:18px;
    font-weight:bold;
    text-overflow:ellipsis;
    white-space:nowrap;
}

.modal-close{
    flex:0 0 auto;
    padding:0 5px;
    border:0;
    background:none;
    font-family:inherit;
    font-size:28px;
    line-height:1;
    cursor:pointer;
}


/* ==========================
   モーダル本文
========================== */

.modal-body{
    min-height:0;
    padding:15px;
    box-sizing:border-box;
    overflow-x:hidden;
    overflow-y:auto;
    font-size:13px;
    line-height:1.8;
    text-align:left;
    scrollbar-width:none;
    -ms-overflow-style:none;
}

.modal-body::-webkit-scrollbar{
    display:none;
}


/* ==========================
   利用規約・プライバシーポリシー
========================== */

.legal-modal-page{
    width:100%;
}

.legal-modal-page .update-date{
    margin:0 0 20px;
    color:#666;
    font-size:12px;
}

.legal-modal-page .legal-section{
    margin-bottom:20px;
}

.legal-modal-page .legal-section:last-child{
    margin-bottom:0;
}

.legal-modal-page h2{
    margin:0 0 8px;
    font-size:15px;
}

.legal-modal-page p{
    margin:0 0 12px;
}

.legal-modal-page ul{
    margin:0 0 12px;
    padding-left:22px;
}

.legal-modal-page li{
    margin-bottom:6px;
}


/* ==========================
   iframeモーダル
========================== */

.modal-iframe-body{
    display:flex;
    flex:1 1 auto;
    min-height:0;
    width:100%;
    overflow:hidden;
}

.modal-iframe-body iframe{
    display:block;
    flex:1 1 auto;
    width:100%;
    height:100%;
    min-height:0;
    border:0;
}

.inquiry-modal{
    align-items:center;
    justify-content:center;
    padding:15px;
}

.inquiry-modal .modal-content{
    display:flex;
    flex-direction:column;
    width:100%;
    max-width:430px;
    height:100%;
    max-height:100%;
    min-height:0;
    overflow:hidden;
    border-radius:12px;
}

.inquiry-modal .modal-header{
    flex:0 0 50px;
    height:50px;
    min-height:50px;
}


/* ==========================
   スマートフォン
========================== */

@media(max-width:600px){
    .modal{
        padding:12px;
    }

    .modal-content{
        max-height:100%;
        min-height:0;
    }

    .inquiry-modal{
        padding:12px;
    }

    .inquiry-modal .modal-content{
        height:100%;
        max-height:100%;
        min-height:0;
        border-radius:12px;
    }
}


/* ==========================
   PC
========================== */

@media(min-width:601px){
    .modal{
        bottom:0;
        padding:30px;
    }

    .modal-content{
        width:min(800px, 100%);
        max-width:800px;
        max-height:90vh;
    }

    .modal-body{
        padding:24px 30px 30px;
        font-size:14px;
        line-height:1.9;
    }

    .inquiry-modal .modal-content{
        width:min(900px, 100%);
        max-width:900px;
        height:80vh;
        max-height:80vh;
    }
}