.chat-bot-wrapper * {
    transition: all ease-in-out 0.15s;
    --chat-bot-button-width: 3rem;
}

/* Button */
.chat-bot-button {
    width: var(--chat-bot-button-width);
    height: var(--chat-bot-button-width);
    margin: 4px;
    padding: 0;
    box-sizing: border-box;
    border-radius: 100%;
    overflow: hidden;
    outline: 3px solid var(--chat-bot-color) !important;
    outline-offset: 3px;
}

.chat-bot-button:hover {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.562), 0 2px 4px -2px rgb(0 0 0 / 0.1);
}

/*  img */
.chat-bot-button img {
    object-fit: cover;
    aspect-ratio: 1;
    width: 100%;
    height: auto;
}

/* badge */
.chat-bot-badge :hover {
    background-color: var(chat-bot-color);
}

.chat-bot-badge {
    --chat-bot-badge-padding-x: 4px;
    --chat-bot-badge-padding-y: 2px;
    position: absolute;
    top: 0;
    right: 0;
    background-color: var(--chat-bot-color);
    color: antiquewhite;

    padding-left: var(--chat-bot-badge-padding-x);
    padding-right: var(--chat-bot-badge-padding-x);
    padding-top: var(--chat-bot-badge-padding-y);
    padding-bottom: var(--chat-bot-badge-padding-y);
    font-size: 15px;
    font-weight: 800;
    border-radius: 0.4rem;
}


/* Talk */
.chat-bot-talk {
    --cbt-margin-bottom: 10px;
    position: absolute;
    right: 0;
    bottom: 0;
    height: min(70vh, 35rem);
    width: 25rem;
    margin-bottom: var(--cbt-margin-bottom);
    z-index: 4;
    border: 1px solid silver;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    background-color: #fbfbfb;
    box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
}



/* Header */
.chat-bot-talk-header {
    padding: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    /* background-color: #bd21313d; */
}

.chat-bot-talk-header .cbth-title {
    font-weight: bold;
    display: flex;
    flex-direction: column;
    font-size: larger;
    color: #383838;
}

.chat-bot-talk-header .cbth-title .store-name {
    font-style: italic;
    font-weight: 600;
}

.chat-bot-talk-header .cbth-title small {
    font-weight: normal;
    font-size: 14px;
}

.chat-bot-talk-header .cbth-clear {
    border: none;
    background-color: transparent;
    color: var(--chat-bot-color);
    border-radius: 20%;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    width: 31px;
    height: 31px;
    padding: 2px;
}

.chat-bot-talk-header .cbth-clear:hover {
    color: #470808;
    background-color: rgba(238, 185, 185, 0.445);
}

.chat-bot-talk-header .cbth-clear svg {
    width: 20px;
}

.chat-bot-talk-header .cbth-close {
    border: none;
    background-color: transparent;
    color: #42597e;
    border-radius: 20%;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    width: 31px;
    height: 31px;
    padding: 2px;
}

.chat-bot-talk-header .cbth-close:hover {
    color: #082047;
    background-color: rgba(255, 255, 255, 0.445);
}

.chat-bot-talk-header .cbth-close svg {
    width: 20px;
}

/* BODY */
.chat-bot-talk-body {
    --cbtb-padding-y: 0.4rem;
    --cbtb-padding-x: 0;
    flex: 1;
    background-color: #f5f5f4;
    /* border: 3px solid green; */
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 100%;
    padding: var(--cbtb-padding-y) var(--cbtb-padding-x) var(--cbtb-padding-y) var(--cbtb-padding-x);
    border-top: 1px solid #c8c8c8;
    border-bottom: 1px solid #c8c8c8;
    position: relative;
    scroll-behavior: smooth;
    overscroll-behavior: content;
}

/* MSG */
.chat-bot-talk-body .msg {
    display: flex;
    flex-direction: column;
    padding: 2px;
}

.chat-bot-talk-body>.msg img,
.chat-bot-talk-body>.msg svg {
    width: 2rem;
    height: 2rem;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 50%;
    outline: 3px solid var(--chat-bot-color-opacity);
    flex: none;
    fill: white;
}

.chat-bot-talk-body>.msg>.msg-container {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: flex-start;
    gap: 0.5rem;
    margin: 0 5px;
}

.chat-bot-talk-body>.msg.user-msg>.msg-container {
    flex-direction: row-reverse;
}


.msg-list {
    max-width: 100%;
    --cbmlp-border-radius: 10px;
    --cbmlp-margin-r: 4rem;
    --cbmlp-margin-l: 0;
}

.msg-list>p {
    border: 2px solid #efefef;
    filter: drop-shadow(0 10px 8px rgb(0 0 0 / 0.04)) drop-shadow(0 4px 3px rgb(0 0 0 / 0.1));
    --cbmlp-padding-x: 8px;
    --cbmlp-padding-y: 8px;
    margin: 0 var(--cbmlp-margin-r) 0 var(--cbmlp-margin-l);
    font-family: system-ui;
    font-size: 12.5px;
    padding: var(--cbmlp-padding-y) var(--cbmlp-padding-x);
    background-color: white;
    text-wrap: pretty;
    color: #232323;
}

.recomendation-list .recomendations-list-title {
    font-weight: bold;
    color: #3c3d68;
}

.recomendation-card {
    margin: 0 var(--cbmlp-margin-r) 0 0.5rem;
    /* background-color: var(--chat-bot-color-opacity); */
    background-color: white;
    border: 1px solid #efefef;
    border-radius: 0px var(--cbmlp-border-radius) var(--cbmlp-border-radius) var(--cbmlp-border-radius);
    margin-bottom: 8px;
    overflow: hidden;
}

.recomendation-card:hover {
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
}

.recomendation-card-img {
    aspect-ratio: 4 / 3;
    height: 50px;
}

.recomendation-card-img>img {
    width: auto !important;
    height: 50px !important;
    object-fit: cover !important;
    border-radius: 0% !important;
    aspect-ratio: 4/3 !important;
}

.recomendation-card-title {
    flex: 1;
    color: black;
    font-weight: bold;
    padding: 8px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.bot-msg .msg-list>p {
    border-radius: 0px var(--cbmlp-border-radius) var(--cbmlp-border-radius) var(--cbmlp-border-radius);
    background-color: var(--chat-bot-color-opacity);
}

.user-msg .msg-list>p {
    --cbmlp-margin-r: 0;
    --cbmlp-margin-l: 4rem;
    border-radius: var(--cbmlp-border-radius) 0px var(--cbmlp-border-radius) var(--cbmlp-border-radius);
}

.msg-list>p.error {
    color: rgb(201, 8, 8);
    font-style: italic;
    background-color: #f1e8e8;
    border-color: rgb(206, 10, 10);
    display: block;
}

.msg-list .msg-list-title {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-right: 6px;
}

.user-msg .msg-list>.msg-list-title {
    justify-content: flex-end;
}

.msg-list>.msg-list-title>.name {
    font-weight: bold;
    color: #484848;
}

.msg-list>.msg-list-title>.name.error {
    font-weight: bold;
    color: red;
}

.msg-list>.msg-list-title>.dotb {
    font-family: monospace;
    color: #666;
    font-weight: 800;
}

.msg-list>.msg-list-title>.date {
    font-family: monospace;
    color: #666;
    font-size: smaller;
}


/* Footer */
.chat-bot-talk-footer {
    flex: none;
    display: flex;
    padding: 6px;
    gap: 0.3rem;
    align-items: flex-end;
}

.chat-bot-talk-footer textarea {
    --cbtf-textarea-padding: 8px;
    padding: var(--cbtf-textarea-padding);
    flex: 1;
    resize: none;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 6px;
    font-family: system-ui;
    max-height: calc((34px - var(--cbtf-textarea-padding))*4);
    height: auto;
    margin-bottom: 0;
    font-size: 13px;
    font-weight: 400;
    line-height: normal;
    box-sizing: border-box;
    border: 0;
    outline: 1px solid silver;
}

.chat-bot-talk-footer textarea:focus {
    /* outline: 2px solid #e70a20;
    filter: drop-shadow(0 25px 25px rgb(0 0 0 / 0.15)); */
    color: #495057;
    background-color: #fff;
    border-color: var(--chat-bot-color);
    outline: 0;
    /* box-shadow: 0 0 0 .2rem rgba(0, 123, 255, .25); */
    box-shadow: 0 0 0 .2rem var(--chat-bot-color-hover);
}

.chat-bot-talk-footer .cbtf-send-btn {
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 8px;
    border: 2px solid #a1a1a1;
    background-color: var(--chat-bot-color-hover);
    box-sizing: border-box;
    cursor: pointer;
    padding: 4px;
}

.chat-bot-talk-footer .cbtf-send-btn:hover {
    /* border: 2px solid #bd2130; */
    border: 2px solid rgb(214, 214, 214);
    background-color: var(--chat-bot-color-hover);
    color: white;
}

.chat-bot-talk-footer .cbtf-send-btn:disabled {
    border: 2px solid gray;
    background-color: #d6d6d6;
    cursor: default;
    pointer-events: none;
}

.chat-bot-talk-footer .cbtf-send-btn * {
    transition: none !important;
}

.cb-spinner {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: gray;
}

.cb-spinner-grow {
    display: inline-block;
    width: 0.5rem;
    aspect-ratio: 1;
    vertical-align: -0.125em;
    background-color: currentColor;
    border-radius: 50%;
    animation: 1s linear infinite cbsg;

}

.cb-spinner-grow:nth-child(2) {
    animation-delay: 0.3s;
}

.cb-spinner-grow:nth-child(3) {
    animation-delay: 0.4s;
}

.cb-spinner-grow:nth-child(4) {
    animation-delay: 0.5s;
}

@keyframes cbsg {
    0% {
        opacity: 0.1;

    }

    50% {
        opacity: 1;
        transform: none;
    }

    30% {
        transform: translateY(-5px);
    }

}



.muted-nb {
    font-weight: 400;
    font-size: 15px;
    color: #444;
}


/* Animations */

@-webkit-keyframes msg-fadeInDown {
    from {
        opacity: 0;
        -webkit-transform: translate3d(0, -100%, 0);
        transform: translate3d(0, -100%, 0);
    }

    to {
        opacity: 1;
        -webkit-transform: translate3d(0, 0, 0);
        transform: translate3d(0, 0, 0);
    }
}

@keyframes msg-fadeInDown {
    from {
        opacity: 0;
        -webkit-transform: translate3d(0, -100%, 0);
        transform: translate3d(0, -100%, 0);
    }

    to {
        opacity: 1;
        -webkit-transform: translate3d(0, 0, 0);
        transform: translate3d(0, 0, 0);
    }
}

.msg-fadeInDown {
    -webkit-animation-name: msg-fadeInDown;
    animation-name: msg-fadeInDown;
}

@-webkit-keyframes msg-fadeInUp {
    from {
        opacity: 0;
        -webkit-transform: translate3d(0, 100%, 0);
        transform: translate3d(0, 100%, 0);
    }

    to {
        opacity: 1;
        -webkit-transform: translate3d(0, 0, 0);
        transform: translate3d(0, 0, 0);
    }
}

@keyframes msg-fadeInUp {
    from {
        opacity: 0;
        -webkit-transform: translate3d(0, 100%, 0);
        transform: translate3d(0, 100%, 0);
    }

    to {
        opacity: 1;
        -webkit-transform: translate3d(0, 0, 0);
        transform: translate3d(0, 0, 0);
    }
}

.msg-fadeInUp {
    -webkit-animation-name: msg-fadeInUp;
    animation-name: msg-fadeInUp;
}

.msg-animated {
    --msg-animated-duration: 250ms;
    --msg-animated-fillmode: both;
    -webkit-animation-duration: var(--msg-animated-duration);
    animation-duration: var(--msg-animated-duration);
    -webkit-animation-fill-mode: var(--msg-animated-fillmode);
    animation-fill-mode: var(--msg-animated-fillmode);
}

.float-button-go-down {
    position: sticky;
    /* float: left; */
    /* margin-left: auto; */
    width: 100%;
    bottom: 1rem;
    right: 0.3rem;
}


.float-button-go-down .float-button-go-down-button {
    position: absolute;
    bottom: 0;
    right: 0;
    aspect-ratio: 1;
    color: #fff;
    background-color: #007bff63;
    border-color: #007bff85;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 0.2rem;
    box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
}

.float-button-go-down .float-button-go-down-button:hover {
    color: #fff;
    background-color: #0069d9;
    border-color: #0062cc;
}

.float-button-go-down .float-button-go-down-button svg {
    --cbfbsvg-size: 1.4rem;
    width: var(--cbfbsvg-size);
    height: var(--cbfbsvg-size);
    aspect-ratio: 1;
    color: #efefef;
}

p.error>button.try-again {
    margin-top: 0.5rem;
    padding: 0.5rem;
    display: flex;
    justify-content: center;
    align-items: center;
    color: red;
    width: 100%;
    text-align: center;
    border-radius: 8px;
}

p.error>button.try-again>span {
    padding: 0.5rem 1rem;
}

p.error>button.try-again:hover {
    color: red;
    text-decoration: underline;
    cursor: pointer;
    background-color: #f8d7da;
}

p.error>button.try-again>svg {
    color: white;
    background-color: red;
    padding: 0.3rem;
}


@media screen and (max-width: 600px) {
    .chat-bot-talk {
        height: 100vh; 
        width: auto; 
        position: fixed;
        bottom: 1dvh; 
        margin: 2dvh 3dvw; 
        max-height: 80vh; 
    }

    

    .chat-bot-talk-body>.msg img,
    .chat-bot-talk-body>.msg svg {
        display: none;
    }

    .msg-list>p {
        font-size: 14px;
    }

    .float-button-go-down .float-button-go-down-button svg {
        --cbfbsvg-size: 1.6rem;
    }
}

[x-cloak] {
    display: none;
}