.fa-solid,.fas {
    font-family: "Font Awesome 6 Free" !important;
    font-weight: 900 !important
}

.fa-paper-plane:before {
    content: "\f1d8"
}

.fa-xmark:before {
    content: "\f00d"
}

i[class^=fa-],i[class*=" fa-"] {
    font-family: "Font Awesome 6 Free" !important;
    font-weight: 900 !important;
    speak: none
}

body {
    overflow-x: hidden !important
}

.chatbot-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    margin-right: 0 !important;
    padding-right: 0 !important
}

.custom-chatbot__image {
    cursor: pointer;
    transition: transform .2s ease
}

.custom-chatbot__image:hover {
    transform: scale(1.05)
}

.custom-chatbot {
    width: 400px;
    height: 600px;
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 0 10px rgba(0,0,0,.2);
    display: none;
    flex-direction: column;
    overflow: hidden
}

.lwh-open-cbot .custom-chatbot {
    display: flex
}

.chat {
    display: flex;
    flex-direction: column;
    height: 100%
}

.chat__header {
    background-color: #e50d0d;
    color: #fff;
    padding: 10px 15px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    row-gap: 4px
}

.chat__title {
    font-size: 16px;
    font-weight: 700;
    margin-right: 10px
}

.chat__status {
    display: flex;
    align-items: center;
    font-size: 15px
}

.chat__status span {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: #00ed14;
    margin-right: 6px
}

.chat__close-icon {
    cursor: pointer;
    margin-left: auto
}

.chat__messages {
    flex: 1;
    padding: 10px;
    overflow-y: auto;
    background: #f1f1f1;
    display: flex;
    flex-direction: column;
    gap: 8px
}

.chat__message {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    max-width: 90%
}

.message-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #f1f1f1;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0
}

.message-avatar i {
    font-size: 22px;
    color: #e50d0d
}

.chat__message--bot .message-avatar {
    background: #f0f7ff
}

.chat__message--bot .message-avatar i {
    color: #e50d0d
}

.message-content {
    padding: 6px 12px;
    border-radius: 12px;
    font-size: 14px;
    line-height: 1.4;
    white-space: pre-wrap;
    word-break: break-word;
    overflow-wrap: anywhere;
    min-width: 0;
    display: inline-block;
    max-width: 100%;
    font-weight: 600
}

.chat__message--user {
    align-self: flex-end
}

.chat__message--user .message-content {
    background-color: #d1e7dd;
    color: #000
}

.chat__message--bot {
    align-self: flex-start
}

.chat__message--bot .message-content {
    background-color: #fff;
    color: #000;
    border: 1px solid #ddd
}

.chat__loader {
    display: none;
    align-self: flex-start;
    padding: 10px 15px
}

.chat__loader-content {
    display: flex;
    gap: 8px;
    align-items: center
}

.chat__loader-dots {
    display: flex;
    gap: 4px
}

.chat__loader-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #e50d0d;
    animation: loader-bounce 1.4s infinite ease-in-out
}

.chat__loader-dot:nth-child(1) {
    animation-delay: -.32s
}

.chat__loader-dot:nth-child(2) {
    animation-delay: -.16s
}

@keyframes loader-bounce {
    0%,80%,100% {
        transform: scale(0)
    }

    40% {
        transform: scale(1)
    }
}

.chat__input-area {
    position: sticky;
    bottom: 0;
    padding: 10px;
    border-top: 1px solid #ccc;
    background: #fff;
    display: flex
}

.chat__input-area form {
    display: flex;
    gap: 8px;
    width: 100%
}

.chat__input-area input[type=text] {
    flex: 1;
    padding: 8px 12px;
    border-radius: 20px;
    border: 1px solid #ccc
}

.chat__input-area button {
    background-color: #fff !important;
    color: #e50d0d !important;
    border: 2px solid #e50d0d !important;
    border-radius: 50% !important;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all .2s ease-in-out
}

.chat__input-area button:hover {
    background-color: #e50d0d !important;
    color: #fff !important
}

.clear-history-btn {
    background: 0 0;
    border: none;
    color: #f44;
    cursor: pointer;
    font-size: 16px;
    padding: 8px;
    margin-left: 10px;
    border-radius: 50%;
    transition: all .3s ease
}

.clear-history-btn:hover {
    background: rgba(255,0,0,.1);
    transform: scale(1.1)
}

.clear-history-btn:active {
    transform: scale(.95)
}

@media (max-width: 768px) {
    .custom-chatbot {
        height:80vh !important;
        max-height: calc(100vh - 40px);
        bottom: 10px !important
    }

    .chat__header {
        position: sticky;
        top: 0;
        z-index: 10;
        padding: 12px 15px !important
    }
}

@media (max-width: 768px) {
    .chatbot-container {
        left:50% !important;
        transform: translateX(-50%) !important;
        right: auto !important;
        width: 95vw !important;
        max-width: 400px !important;
        margin: 0 !important;
        padding: 0 !important
    }

    .custom-chatbot {
        width: 100% !important;
        margin: 0 auto !important
    }
}

@media (max-width: 480px) {
    .custom-chatbot {
        height:100vh;
        max-width: 400px !important;
        width: 95vw !important;
        bottom: 0;
        right: 0;
        border-radius: 5px
    }
}
