/* =========================================================
   MODERN COMPACT CHATBOT
   ========================================================= */

#my-chatbot {
    position: fixed;
    right: 28px;
    bottom: 28px;
    z-index: 99999;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
        Helvetica, Arial, sans-serif;
}


/* =========================================================
   CHATBOT TOGGLE BUTTON
   ========================================================= */

#my-chatbot .chatbot-toggle-button {
    position: fixed;
    right: 28px;
    bottom: 28px;

    width: 58px;
    height: 58px;

    padding: 0;
    margin: 0;

    border: 0;
    border-radius: 50%;

    background: #4caf50;
    color: #fff;

    font-size: 21px;
    line-height: 58px;

    display: flex;
    align-items: center;
    justify-content: center;

    cursor: pointer;

    box-shadow:
        0 8px 25px rgba(0, 0, 0, 0.18),
        0 2px 6px rgba(0, 0, 0, 0.08);

    transition:
        transform 0.25s ease,
        box-shadow 0.25s ease,
        background 0.25s ease;
}

#my-chatbot .chatbot-toggle-button:hover {
    transform: translateY(-2px);
    background: #43a047;

    box-shadow:
        0 12px 30px rgba(0, 0, 0, 0.22),
        0 3px 8px rgba(0, 0, 0, 0.10);
}


/* Chat icon */

#my-chatbot .chatbot-toggle-button:before {
    content: "\f086";
    font-family: FontAwesome;

    display: flex;
    align-items: center;
    justify-content: center;

    width: 100%;
    height: 100%;
}


/* Close state */

#my-chatbot .chatbot-toggle-button.open {
    background: #f44336;
}

#my-chatbot .chatbot-toggle-button.open:before {
    content: "\f00d";
}


/* =========================================================
   CHAT MESSAGE / FLOATING PROMPT
   ========================================================= */

#my-chatbot .chat-message {
    position: fixed;

    right: 98px;
    bottom: 39px;

    z-index: 100000;

    white-space: nowrap;

    background: #36579e;
    color: #fff;

    padding: 10px 17px;

    border-radius: 22px;

    font-size: 15px;
    line-height: 20px;
    font-weight: 600;

    box-shadow: 0 7px 24px rgba(0, 18, 46, 0.18);

    transition:
        opacity 0.25s ease,
        transform 0.25s ease;
}


/* Small arrow */

#my-chatbot .chat-message:after {
    content: "";

    position: absolute;

    right: -7px;
    top: 50%;

    width: 14px;
    height: 14px;

    background: #36579e;

    transform: translateY(-50%) rotate(45deg);
}


/* =========================================================
   CHATBOT CONTENT / POPUP
   ========================================================= */

#my-chatbot .chatbot-content {
    position: absolute;

    right: 0;
    bottom: 76px;

    width: 340px;
    max-height: none;

    padding: 0;

    overflow: hidden;

    background: #fff;

    border: 1px solid rgba(0, 0, 0, 0.06);

    border-radius: 18px;

    box-shadow:
        0 20px 55px rgba(0, 0, 0, 0.16),
        0 5px 15px rgba(0, 0, 0, 0.06);

    display: none;

    animation: chatbotSlideUp 0.25s ease;
}


/* Popup animation */

@keyframes chatbotSlideUp {

    from {
        opacity: 0;
        transform: translateY(12px) scale(0.98);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }

}


/* =========================================================
   CHAT CONTAINER
   ========================================================= */

#my-chatbot .chat-container {
    padding: 22px 20px 20px;
    background: #fff;
}


/* =========================================================
   FORM TITLE
   ========================================================= */

#my-chatbot .chat-input-form {
    margin: 0;
}


/* Label */

#my-chatbot .chat-input-form label {
    display: block;

    margin: 0 0 14px;

    color: #171717;

    font-size: 20px;
    line-height: 25px;

    font-weight: 700;

    letter-spacing: -0.25px;
}


/* Divider */

#my-chatbot .chat-input-form hr {
    border: 0;

    height: 1px;

    margin: 0 0 15px;

    background: #eeeeee;
}


/* =========================================================
   INPUTS
   ========================================================= */

#my-chatbot .chat-input {
    box-sizing: border-box;

    display: block;

    width: 100%;

    height: 48px;

    margin: 0;

    padding: 0 14px;

    border: 1px solid #dedede;

    border-radius: 9px;

    background: #fff;

    color: #222;

    font-family: inherit;

    font-size: 15px;

    outline: none;

    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        background 0.2s ease;
}


/* Space between fields */

#my-chatbot .chat-input + .chat-input {
    margin-top: 9px;
}


/* Placeholder */

#my-chatbot .chat-input::placeholder {
    color: #8a8a8a;
    opacity: 1;
}


/* Focus */

#my-chatbot .chat-input:focus {
    border-color: #4caf50;

    box-shadow:
        0 0 0 3px rgba(76, 175, 80, 0.10);
}


/* =========================================================
   LOCATION DROPDOWN
   ========================================================= */

#my-chatbot select.chat-input {
    appearance: none;
    -webkit-appearance: none;

    padding-right: 40px;

    color: #555;

    cursor: pointer;

    background-color: #fff;

    background-image:
        linear-gradient(45deg, transparent 50%, #999 50%),
        linear-gradient(135deg, #999 50%, transparent 50%);

    background-position:
        calc(100% - 17px) 20px,
        calc(100% - 12px) 20px;

    background-size:
        5px 5px,
        5px 5px;

    background-repeat: no-repeat;
}


/* =========================================================
   SUBMIT BUTTON
   ========================================================= */

#my-chatbot .chat-submit {
    display: flex;

    align-items: center;
    justify-content: center;

    width: 100%;

    height: 48px;

    margin-top: 12px;

    padding: 0 18px;

    border: 0;

    border-radius: 9px;

    background: #4caf50;

    color: #fff;

    font-family: inherit;

    font-size: 15px;

    font-weight: 600;

    line-height: 48px;

    text-align: center;

    cursor: pointer;

    box-shadow: 0 5px 14px rgba(76, 175, 80, 0.20);

    transition:
        background 0.2s ease,
        transform 0.2s ease,
        box-shadow 0.2s ease;
}


#my-chatbot .chat-submit:hover {
    background: #43a047;

    transform: translateY(-1px);

    box-shadow: 0 7px 18px rgba(76, 175, 80, 0.25);
}


#my-chatbot .chat-submit:active {
    transform: translateY(0);
}


/* =========================================================
   SUCCESS / ERROR MESSAGES
   ========================================================= */

#my-chatbot .negative-message {
    margin-top: 10px;

    padding: 8px 10px;

    border-radius: 7px;

    background: #fff5f5;

    color: #d32f2f;

    font-size: 13px;
    line-height: 18px;
}


#my-chatbot .positive-message {
    margin: 10px 0 0;

    padding: 9px 10px;

    border-radius: 7px;

    background: #f1f9f2;

    color: #2e7d32;

    font-size: 13px;
    line-height: 18px;
}


/* =========================================================
   CHAT MESSAGES
   ========================================================= */

#my-chatbot .chat-messages {
    max-height: 180px;

    overflow-y: auto;

    margin-bottom: 10px;

    font-size: 14px;

    line-height: 20px;

    color: #444;
}


/* Scrollbar */

#my-chatbot .chat-messages::-webkit-scrollbar {
    width: 4px;
}

#my-chatbot .chat-messages::-webkit-scrollbar-thumb {
    background: #d0d0d0;
    border-radius: 10px;
}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 600px) {

    #my-chatbot {
        right: 16px;
        bottom: 18px;
    }

    #my-chatbot .chatbot-content {
        position: fixed;

        left: 14px;
        right: 14px;

        bottom: 86px;

        width: auto;

        border-radius: 16px;
    }

    #my-chatbot .chat-container {
        padding: 20px 16px 16px;
    }

    #my-chatbot .chat-input-form label {
        font-size: 19px;
        line-height: 23px;
    }

    #my-chatbot .chatbot-toggle-button {
        right: 16px;
        bottom: 18px;

        width: 56px;
        height: 56px;

        line-height: 56px;
    }

    #my-chatbot .chat-message {
        right: 84px;
        bottom: 30px;

        max-width: calc(100vw - 125px);

        overflow: hidden;

        text-overflow: ellipsis;

        font-size: 14px;
    }

}


/* =========================================================
   VERY SMALL MOBILE
   ========================================================= */

@media (max-width: 380px) {

    #my-chatbot .chatbot-content {
        left: 10px;
        right: 10px;
    }

    #my-chatbot .chat-container {
        padding: 18px 14px 14px;
    }

    #my-chatbot .chat-input {
        height: 46px;
    }

    #my-chatbot .chat-submit {
        height: 46px;
        line-height: 46px;
    }

}