/* =====================================================
   CHATBOT ROOM
===================================================== */

*{
    box-sizing:border-box;
}

html,
body{
    margin:0;
    padding:0;
    width:100%;
    height:100%;
}

body{
    font-size:14px;
}

.chat-wrapper{
    width:100%;
    height:100vh;

    display:flex;
    flex-direction:column;

    background:#f8f9fa;

    overflow:hidden;
}


/* =====================================================
   HEADER CHATBOT
===================================================== */

.chat-popup-header{
    height:55px;
    min-height:55px;

    background:#696cff;
    color:#fff;

    display:flex;
    align-items:center;
    justify-content:space-between;

    padding:0 18px;

    font-size:16px;
    font-weight:600;
}


/* =====================================================
   AREA CHAT
===================================================== */

#chatArea{
    flex:1;

    overflow-y:auto;
    overflow-x:hidden;

    padding:12px !important;

    font-size:15px;
}


/* =====================================================
   INPUT CHAT
===================================================== */

.chat-input{
    padding:8px;

    border-top:1px solid #dee2e6;

    background:#fff;

    flex-shrink:0;
}

.chat-input .form-control{
    min-height:40px;

    font-size:15px;
}

.chat-input .btn{
    min-height:40px;

    font-size:15px;

    padding-left:16px;
    padding-right:16px;
}


/* =====================================================
   MESSAGE
===================================================== */

.msg-user{
    display:flex;
    justify-content:flex-end;

    margin-bottom:10px;
}

.msg-bot{
    display:flex;
    justify-content:flex-start;

    margin-bottom:10px;
}


/* USER */

.chat-user{
    max-width:82%;

    padding:9px 13px;

    background:#0d6efd;
    color:#fff;

    border-radius:14px 14px 0 14px;

    font-size:15px;
    line-height:1.45;

    word-break:break-word;
}


/* BOT */

.chat-bot{
    max-width:88%;

    padding:10px 13px;

    background:#e9ecef;
    color:#212529;

    border-radius:14px 14px 14px 0;

    font-size:15px;
    line-height:1.45;

    word-break:break-word;
}


/* =====================================================
   BODY / IFRAME
===================================================== */

.chat-body{
    height:calc(100% - 55px);

    overflow:hidden;
}

.chat-body iframe{
    display:block;

    width:100%;
    height:100%;

    border:none;
}


/* =====================================================
   KATEGORI
===================================================== */

.kategori-item{
    display:inline-block;

    margin:3px;

    padding:7px 11px;

    border:1px solid #dbe2ea;
    border-radius:9px;

    background:#fff;
    color:#374151;

    font-size:15px;
    line-height:1.4;

    cursor:pointer;

    transition:.2s;
}

.kategori-item:hover{
    background:#696cff;
    color:#fff;

    border-color:#696cff;
}


/* =====================================================
   FAQ
===================================================== */

.faq-item{
    display:block;

    width:100%;

    margin-bottom:8px;

    padding:9px 12px;

    border:1px solid #dbe2ea;
    border-radius:9px;

    background:#fff;
    color:#374151;

    text-align:left;

    font-size:15px;
    line-height:1.4;

    cursor:pointer;

    transition:.2s;
}

.faq-item:hover{
    background:#696cff;
    color:#fff;

    border-color:#696cff;
}


/* =====================================================
   BUTTON CHATBOT
===================================================== */

.kategori-lain,
.btn-lanjut,
.btn-kategori{
    appearance:none;
    -webkit-appearance:none;

    border:none;
    outline:none;

    text-decoration:none;

    padding:7px 12px;

    border-radius:20px;

    font-size:15px;
    line-height:1.4;

    cursor:pointer;

    transition:.25s;
}


/* BUTTON LANJUT */

.btn-lanjut{
    background:#696cff;
    color:#fff;
}

.btn-lanjut:hover{
    background:#5b5ef8;
}


/* BUTTON KATEGORI */

.btn-kategori,
.kategori-lain{
    background:#eef2f7;
    color:#374151;
}

.btn-kategori:hover,
.kategori-lain:hover{
    background:#dbe4f0;
}


/* =====================================================
   CLOSE BUTTON
===================================================== */

#closeChat{
    background:none;

    border:none;

    color:#fff;

    font-size:21px;

    cursor:pointer;

    line-height:1;
}

#closeChat:hover{
    opacity:.8;
}


/* =====================================================
   SCROLLBAR
===================================================== */

#chatArea::-webkit-scrollbar{
    width:5px;
}

#chatArea::-webkit-scrollbar-thumb{
    background:#cbd5e1;

    border-radius:20px;
}


/* =====================================================
   TYPING
===================================================== */

.typing{
    display:inline-block;
}

.typing::after{
    content:'';

    animation:dots 1.5s infinite;
}

@keyframes dots{

    0%{
        content:'';
    }

    33%{
        content:'.';
    }

    66%{
        content:'..';
    }

    100%{
        content:'...';
    }
}


/* =====================================================
   DARK MODE
===================================================== */

body.dark-mode .chat-wrapper{
    background:#1e293b;
}

body.dark-mode .chat-input{
    background:#1e293b;

    border-color:#334155;
}

body.dark-mode .chat-bot{
    background:#334155;

    color:#fff;
}


/* =====================================================
   RESPONSIVE TABLET
===================================================== */

@media (max-width:768px){

    body{
        font-size:13px;
    }

    #chatArea{
        padding:10px !important;

        font-size:13px;
    }

    .chat-user,
    .chat-bot{
        font-size:13px;

        line-height:1.4;
    }

    .faq-item{
        font-size:12.5px;

        padding:8px 10px;
    }

    .kategori-item{
        font-size:12.5px;

        padding:6px 10px;
    }

    .kategori-lain,
    .btn-lanjut,
    .btn-kategori{
        font-size:12.5px;

        padding:6px 10px;
    }

    .chat-input .form-control,
    .chat-input .btn{
        font-size:13px;
    }
}


/* =====================================================
   RESPONSIVE HP
===================================================== */

@media (max-width:576px){

    .chat-wrapper{
        height:100vh;
    }

    #chatArea{
        padding:8px !important;
    }

    .chat-user{
        max-width:85%;

        padding:8px 11px;

        font-size:13px;
    }

    .chat-bot{
        max-width:92%;

        padding:9px 11px;

        font-size:13px;
    }

    .faq-item{
        margin-bottom:7px;

        padding:8px 10px;

        font-size:12.5px;

        border-radius:8px;
    }

    .kategori-item{
        margin:2px;

        padding:6px 9px;

        font-size:12px;
    }

    .kategori-lain,
    .btn-lanjut,
    .btn-kategori{
        padding:6px 10px;

        font-size:12px;
    }

    .chat-input{
        padding:7px;
    }

    .chat-input .form-control{
        min-height:38px;

        font-size:13px;
    }

    .chat-input .btn{
        min-height:38px;

        padding-left:12px;
        padding-right:12px;

        font-size:13px;
    }
}