@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@300;400&display=swap');

#rakubot *{
    box-sizing: content-box;
}

#rakubot{
    all:initial;
}

#rakubot img ,#rakubot input, #rakubot a{
    all:initial;
}

#rakubot #wakeup-button img{
    right:0;
    bottom: 0;
    width: 120px;
    height: 120px;
    margin: 1em;
    position: fixed;
    cursor: pointer;
    object-fit: cover;
    border-radius: 50%;
}

#rakubot .chatbot{
    font-family: 'Noto Sans JP', sans-serif;
    bottom: 0;
    position: fixed;
    margin: 1em;
    /* ネガティブマージンはchatbot-bodyのwidth＋100pxほどにする */
    right: -450px;
    z-index: 10000;

    border-radius:5px;
    box-shadow: 0 2.5px 5px 0 rgba(0, 0, 0, .5);
    transition: left .5s, right .5s; /* アニメーション */

}

#rakubot .chatbot-slide{
    right:0;
    transition: left .5s, right .5s; /* アニメーション */
    width: 350px;
}

#rakubot .chatbot-header {
    font-size: 17px;
    color: #ffffff;
    height: 50px;
    background: #355dfd;
    border-top-left-radius: 5px;
    border-top-right-radius: 5px;
    border-bottom:0.5px solid #afafaf;
    position:relative;
}

#rakubot .chatbot-header .chatbot-title{
    width:60%;
    margin-left:27%;
    height:50px;
    display:table;
}

#rakubot .chatbot-header .chatbot-title span{
    height:50px;
    display:table-cell;
    vertical-align:middle;
}

#rakubot .chatbot-icon img {
    border-radius: 50%;
    object-fit: contain;
    width: 55px;
    height: 55px;
    float: left;
    margin: -30px 20px 10px 20px;
    border: 4px solid rgba(0, 0, 0, 0.21);
    background: #fff;
    overflow: auto;
}

#rakubot #close-button{
    position:absolute;
    right:10px;
    top:15px;
    cursor:pointer;
}

#rakubot #close-button img{
    width: 20px;
    height: 20px;
    cursor: pointer;
}

#rakubot .chatbot-body {
    font-size:14px;
    background: #ffffff;
    margin: 0px 0 0px 0;
    height: 400px;
    /* widthは300px以下を設定できないようにする */
    width: 350px;

    overflow-y:scroll;
    /* スクロールバー非表示（IEとEdge用） */
    -ms-overflow-style: none;
    /* スクロールバー非表示（FireFox用） */
    scrollbar-width: none;
}


#rakubot .chatbot-body::-webkit-scrollbar{
    /* スクロールバー非表示（ChromeとSarfari用） */
    display:none;
}

#rakubot .chatbot-body .system-thinking img{
    margin-left:10px;

    margin-top:15px;
    height:10px;
}

#rakubot .chatbot-body .system-side {
    padding-top:5px;
    padding-bottom:5px;

}


#rakubot .chatbot-body .system-side .system-icon{
    float:left;
    height:40px;
    margin-left:10px;
    margin-top:5px;
}

#rakubot .chatbot-body .system-side .system-icon img{
    width: 40px;
    border-radius: 10%;
}


#rakubot .chatbot-body .system-side .system-message-with-icon{
    display:table;
    color:#333333;
    background:#f8f8f8;
    margin-left:60px;
    max-width:75%;
    border-radius: 5px;
    margin-top:5px;
}

#rakubot .chatbot-body .system-side .system-message-with-icon span{
    display:table;
    margin-top:5px;
    margin-bottom:5px;
    margin-right:10px;
    margin-left:10px;
}

#rakubot .chatbot-body .system-side .system-message-without-icon{
    display:table;
    color:#333333;
    background:#f8f8f8;
    margin-left:60px;
    max-width:75%;
    border-radius: 5px;
}

#rakubot .chatbot-body .system-side .system-message-without-icon span{
    display:table;
    margin-top:5px;
    margin-bottom:5px;
    margin-right:10px;
    margin-left:10px;
}


#rakubot .chatbot-body .system-side .system-button{
    margin-left:60px;
    background:#e2dfde;
    max-width:75%;
    min-width:30%;
    display:table;
    background:linear-gradient(90deg,#afafaf 0%,#afafaf 10px,#e2dfde 10px,#e2dfde 100%);
    border-radius: 5px;
    cursor:pointer;
}

#rakubot .chatbot-body .system-side .system-button span{
    padding-left:20px;
    display:table;
    margin-top:5px;
    margin-bottom:5px;
    margin-right:10px;
}


#rakubot .chatbot-body .user-side{
    padding-top:10px;
}

#rakubot .chatbot-body .user-side .user-message{
    display:table;
    color:#ffffff;
    background:#355dfd;
    border-radius: 5px;
    max-width:75%;

    /* 右寄せ */
    margin:0 0 0 auto;

    margin-top:5px;
    margin-bottom:5px;
    margin-right:15px;
}

#rakubot .chatbot-body .user-side .user-message span{
    display:table;
    margin-top:5px;
    margin-bottom:5px;
    margin-right:10px;
    margin-left:10px;
}



/* inputと.send-buttonのwidthと.send-buttonのmargin-leftを足したものが.chatbot-bodyのwidthになるようにする */
/* .chatbot-footerとinputと.send-buttonのheightは同じにする */

#rakubot .chatbot-footer {
    background:#ffffff;
    height:50px;
    border-bottom-left-radius: 5px;
    border-bottom-right-radius: 10px;
    border-top:0.5px solid #afafaf;
}

#rakubot .chatbot-footer input{
    color:#333333;
    height:50px;
    margin-left:10px;
    width:80%;
    padding:0px;
    border: none;
    outline: none;
}

#rakubot .chatbot-footer .send-button{
    float:right;
    width:35px;
    height:50px;
    background:grey;
    border-bottom-right-radius: 5px;
    cursor:pointer;
}

#rakubot .chatbot-footer .send-button img{
    width: 20px;
    height: 20px;
    margin-top:15px;
    margin-bottom:15px;
    margin-left:7.5px;
    cursor: pointer;
}

#rakubot .link{
    cursor:pointer;
    text-decoration: underline;
}

/* リンクのアイコン */
.gg-external {
    box-sizing: border-box;
    position: relative;
    display: inline-block;
    transform: scale(var(--ggs,1));
    width: 12px;
    height: 12px;
    box-shadow:
        -2px 2px 0 0,
        -4px -4px 0 -2px,
        4px 4px 0 -2px;
    margin-left: -2px;
    margin-top: 1px
}

.gg-external::after,
.gg-external::before {
    content: "";
    display: inline-block;
    box-sizing: border-box;
    position: absolute;
    right: -4px
}

.gg-external::before {
    background: currentColor;
    transform: rotate(-45deg);
    width: 12px;
    height: 2px;
    top: 1px
}

.gg-external::after {
    width: 8px;
    height: 8px;
    border-right: 2px solid;
    border-top: 2px solid;
    top: -4px
}

/* レスポンシブ */
@media only screen and (max-width:1024px) {
    #rakubot .chatbot{
        width:94.5%;
        /* ネガティブマージンはmax-widthと同じにする */
        right: -1024px;
        transition: left .0s, right .0s; /* アニメーション */
    }

    #rakubot .chatbot-slide{
        right:0;
        transition: left .5s, right .5s; /* アニメーション */
    }
    #rakubot .chatbot-body{
        width:100%;
        height:450px;
    }
}
