/* =====================================================
   MEDIBORDER FLOATING CHATBOT
   ===================================================== */

#mediborder-chatbot {
    position: fixed;

    right: 22px;
    bottom: 20px;

    z-index: 999999;

    font-family:
        Arial,
        Helvetica,
        sans-serif;
}


/* =====================================================
   FLOATING BUTTON
   ===================================================== */

#chatbot-toggle {

    position: relative;

    width: 62px;
    height: 62px;

    border: none;
    border-radius: 50%;

    background: #ffffff;

    color: #ffffff;

    font-size: 28px;

    cursor: pointer;

    display: flex;
    align-items: center;
    justify-content: center;

    box-shadow:
        0 5px 20px rgba(0,0,0,0.25);

    transition: 0.3s;
}


#chatbot-toggle:hover {

    transform: scale(1.08);

    background: #078f94;
}


/* =====================================================
   NOTIFICATION BADGE
   ===================================================== */

.chatbot-badge {

    position: absolute;

    top: -2px;
    right: -2px;

    width: 20px;
    height: 20px;

    background: #e53935;

    color: #ffffff;

    border-radius: 50%;

    font-size: 11px;
    font-weight: bold;

    display: flex;
    align-items: center;
    justify-content: center;

    border: 2px solid #ffffff;
}


/* =====================================================
   CHAT WINDOW
   ===================================================== */

#chatbot-window {

    position: absolute;

    right: 0;

    bottom: 78px;

    width: 380px;

    height: 580px;

    background: #ffffff;

    border-radius: 18px;

    overflow: hidden;

    display: none;

    flex-direction: column;

    box-shadow:
        0 10px 40px rgba(0,0,0,0.25);
}


/* Open */

#mediborder-chatbot.chat-open
#chatbot-window {

    display: flex;
}


/* =====================================================
   HEADER
   ===================================================== */

.chatbot-header {

    position: relative;

    min-height: 72px;

    padding: 14px 55px 14px 20px;

    background:
        linear-gradient(
            135deg,
            #10aeb3,
            #07999e
        );

    color: #ffffff;

    display: flex;

    flex-direction: column;

    justify-content: center;
}


.chatbot-header strong {

    font-size: 20px;

    font-weight: 700;
}


.chatbot-header span {

    margin-top: 3px;

    font-size: 12px;
}


/* =====================================================
   CLOSE BUTTON
   ===================================================== */

#chatbot-close {

    position: absolute;

    right: 12px;
    top: 15px;

    width: 35px;
    height: 35px;

    border: none;

    background: transparent;

    color: #ffffff;

    font-size: 27px;

    cursor: pointer;
}


/* =====================================================
   MESSAGES
   ===================================================== */

#chatbot-messages {

    flex: 1;

    padding: 18px;

    overflow-y: auto;

    background: #f6fafa;
}


#chatbot-messages::-webkit-scrollbar {

    width: 5px;
}


#chatbot-messages::-webkit-scrollbar-thumb {

    background: #b7dddd;

    border-radius: 10px;
}


/* =====================================================
   BOT MESSAGE
   ===================================================== */

.bot-message {

    max-width: 88%;

    padding: 12px 14px;

    margin-bottom: 12px;

    background: #ffffff;

    color: #333333;

    border-radius: 14px;

    font-size: 14px;

    line-height: 1.5;

    box-shadow:
        0 2px 8px rgba(0,0,0,0.06);
}


/* =====================================================
   USER MESSAGE
   ===================================================== */

.user-message {

    max-width: 82%;

    padding: 11px 14px;

    margin:

        0 0 12px auto;

    background: #10aeb3;

    color: #ffffff;

    border-radius:
        14px
        14px
        3px
        14px;

    font-size: 14px;

    line-height: 1.5;
}


/* =====================================================
   OPTION BUTTONS
   ===================================================== */

.chat-option {

    width: 100%;

    min-height: 44px;

    margin: 5px 0;

    padding: 10px 14px;

    border:

        1px solid
        #dce7e8;

    border-radius: 24px;

    background: #ffffff;

    color: #0874c9;

    font-size: 14px;

    font-weight: 600;

    text-align: left;

    cursor: pointer;

    transition: 0.2s;
}


.chat-option:hover {

    background: #eafafa;

    border-color: #10aeb3;

    transform: translateX(2px);
}


/* =====================================================
   INPUT AREA
   ===================================================== */

#chatbot-input-area {

    min-height: 68px;

    padding: 10px;

    display: flex;

    align-items: center;

    gap: 8px;

    background: #ffffff;

    border-top:
        1px solid
        #eeeeee;
}


#chatbot-input {

    flex: 1;

    height: 46px;

    padding:
        0 14px;

    border:
        1px solid
        #dddddd;

    border-radius: 12px;

    outline: none;

    font-size: 14px;
}


#chatbot-input:focus {

    border-color: #10aeb3;
}


#chatbot-send {

    width: 46px;
    height: 46px;

    border: none;

    border-radius: 12px;

    background: #10aeb3;

    color: #ffffff;

    font-size: 20px;

    cursor: pointer;
}


#chatbot-send:hover {

    background: #078f94;
}


/* =====================================================
   UPLOAD BUTTON
   ===================================================== */

.chat-upload {

    width: 100%;

    padding: 11px;

    margin-top: 6px;

    border: none;

    border-radius: 22px;

    background: #10aeb3;

    color: #ffffff;

    font-weight: 600;

    cursor: pointer;
}


.chat-upload:hover {

    background: #078f94;
}


/* =====================================================
   SUCCESS MESSAGE
   ===================================================== */

.chat-success {

    padding: 14px;

    background: #eaf8ed;

    border-left:
        4px solid
        #28a745;

    border-radius: 8px;

    color: #245b31;

    font-size: 14px;

    line-height: 1.5;
}


/* =====================================================
   MOBILE
   ===================================================== */

@media (max-width: 600px) {

    #mediborder-chatbot {

        right: 12px;
        bottom: 12px;

    }


    #chatbot-toggle {

        width: 56px;
        height: 56px;

        font-size: 25px;

    }


    #chatbot-window {

        position: fixed;

        left: 8px;
        right: 8px;

        bottom: 76px;

        width: auto;

        height:
            calc(
                100vh - 100px
            );

        max-height: 650px;

        border-radius: 16px;

    }

}


/* =====================================================
   SMALL MOBILE
   ===================================================== */

@media (max-width: 380px) {

    #chatbot-window {

        left: 4px;
        right: 4px;

        bottom: 70px;

        height:
            calc(
                100vh - 85px
            );

    }


    #chatbot-messages {

        padding: 12px;

    }

}