body {
    font-family: 'Montserrat', sans-serif !important;
    font-size: 14px !important;
}

.chat-button {
    position: fixed !important;
    z-index: 999999 !important;
    bottom: 0;
    right: 0;
    width: 100%;
    display: flex !important;
    align-items: flex-end !important;
    justify-content: flex-end !important;
}

.chat-button>button {
    border: none !important;
    outline: none !important;
    background: transparent !important;
    cursor: pointer !important;
    padding: 0 !important;
    margin-bottom: 0 !important;
}

.chat-button>button>img {
    width: 60px !important;
    height: 60px !important;
    object-fit: contain;
    object-position: center;
    border-radius: 50% !important;
}

.chat-button__message {
    flex: 1;
    width: calc(100% - 60px);
    background: transparent;
    display: flex;
    justify-content: flex-end;
    flex-wrap: wrap;
}

.chat-button__text {
    max-width: 100%;
    padding: 10px 20px;
    border-radius: 10px;
    margin-bottom: 15px;
    border-bottom-right-radius: 0;
    width: max-content;
    border: 0.5px solid #ccc;
    background: #fff;
    box-shadow: rgba(149, 157, 165, 0.2) 0px 6px 15px;
}

.chatbox {
    overflow: hidden;
    /* border: 0.5px solid #ccc; */
    box-shadow: rgba(149, 157, 165, 0.2) 0px 6px 15px;
    background: #fff;
    position: fixed;
    z-index: 9999;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
}

.chatbox__head {
    width: 100%;
    display: flex;
    align-items: center;
}

.chatbox__head-wrapper {
    z-index: inherit;
    padding: 0 10px;
    height: 60px;
    background: #e20177;
    display: flex;
    align-items: center
}

.chatbox__head .user {
    display: flex;
    align-items: center;
    flex-grow: 1;
    color: white;
    font-weight: 500;
}

.chatbox__head .user .avatar {
    margin-right: 5px;
}

.chatbox__head .user .avatar img {
    display: block;
    border-radius: 50%;
    width: 35px;
    height: 35px;
}

.chatbox__head .bar-tool {
    display: flex;
    flex-shrink: 0;
    list-style: none;
    padding: 0;
    margin: 0;
}

.chatbox__head .bar-tool li:hover {
    opacity: 0.5;
    transition: 0.2;
    cursor: pointer;
}

.chatbox__head .bar-tool svg {
    padding: 5px;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    fill: white
}

.chatbox__footer-wrapper {
    border-top: 1px solid #e20177;
    padding: 10px 10px 20px;
    margin-top: 1px;
}

.chatbox__footer {
    display: flex;
}

.chatbox__footer .msg {
    flex-grow: 1;
}

.chatbox__footer input[type="text"],
.chatbox__footer button {
    padding: 5px 0;
    border: 0;
    outline: 0;
    font-size: inherit;
    margin: 0 10px;
}

.chatbox__footer button {
    background-color: transparent;
    cursor: pointer;
}

.chatbox__footer button img {
    width: 20px;
    height: 20px;
    object-fit: contain
}

.chatbox__footer button:hover {
    transform: scale(1.2);
}

.chatbox__footer .stop_icon,
.chatbox__footer .send_icon {
    width: 20px;
    height: 20px;
    fill: #e20177;
}

.chat-body {
    padding: 10px;
    overflow-y: scroll;
    overflow-x: inherit;
    display: flex;
    flex-direction: column;
    flex: 1;
}

/* .chat-body__content {
    display: flex;
    flex-direction: column;
    flex: 1;
} */

.chat-body__content::-webkit-scrollbar-track {
    -webkit-box-shadow: inset 0 0 3px rgba(0, 0, 0, 0.3);
    border-radius: 2px;
    background-color: transparent;
}

.chat-body__content .notification {
    display: flex;
}

.chat-body__content .notification .notification__message {
    font-size: x-small;
    text-align: justify;
    font-weight: bold;
    opacity: 0.4;
}

.chat-body__content .notification .notification__icon {
    max-width: 1rem;
    fill: #e20177;
    margin: 10px 12px 10px 9px;
}

/* @media (max-width: 480px) {
    .chat-body__content .notification .notification__icon {
        width: 10rem;
        margin: 10px 10px 10px 5px;
    }
} */

.chat-body .message .bubble {
    display: inline-block;
    /* padding: 10px; */
    margin-bottom: 10px;
    border-radius: 15px;
    border-top-left-radius: 3px;
    /* background: #1b4298; */
    background: rgb(240, 240, 240);
    width: 100%;
    /* max-width: 65%; */
    /* width: max-content; */
}

.chat-body .message .bubble.bubble__bot { 
    flex-grow: 0;
    flex-shrink: 0;
    position: relative;
}

.chat-body .message .bubble.bubble__bot .select__list { 
    display: none;
}

.chat-body .message .bubble.bubble__bot .select__list.show { 
    display: flex;
    justify-content: space-between;
    max-width: 10rem;
    margin: 0 0 1rem 1rem;
}

@media screen and (max-width: 360px) {
    .chat-body .message .bubble.bubble__bot .select__list.show { 
        flex-wrap: wrap;
    }

    .chat-body .message .bubble.bubble__bot .select__list.show .select__item:last-child { 
        margin-top: 1rem;
    }
}

.chat-body .message .bubble.bubble__bot .select__list .select__item { 
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 10px;
    font-size: 20px;
    color: #4b4b4b;
    border-radius: 10px;
    border-right: 3px solid #e5e5e5;
    border-bottom: 3px solid #e5e5e5;
    padding: 12px 16px;
    margin-right: 1rem;
    background-color: white;
}

@media only screen and (min-width: 768px) {
    .chat-body .message .bubble.bubble__bot .select__list .select__item:hover { 
        color: white;
        border-color: #9c0252;
        background: linear-gradient(160deg, #e20177, #ff63b5);
    }
}

.chat-body .message .bubble.bubble__bot .select__list .select__item.selected { 
    color: white;
    border-color: #9c0252;
    background: linear-gradient(160deg, #e20177, #ff63b5);
}

.chat-body .message .bubble.bubble__user .select__list {
    display: none;
}

.chat-body .message .bubble .select__list input[type='radio'] {
    accent-color: #e20177;
}

.chat-body .message .bubble.bubble__user {
    border-radius: 15px;
    border-top-right-radius: 3px;
    /* background: #e20177; */
    background: linear-gradient(160deg, #e20177, #ff63b5);
    margin-left: 5px;
    width: max-content;
    max-width: 75%;
}

.chat-body .message:hover .vote__icon,
.chat-body .message:active .vote__icon {
    visibility: visible;
}

/* .chat-body .show-icon .vote__icon{
    visibility: hidden !important;
} */

.chat-body .message.message__user {
    display: flex;
    flex-direction: row-reverse;
    width: 100%;
}

/* Hide user like dislike */
.chat-body .message.message__user .vote__icon {
    /* display: none !important; */
    visibility: hidden !important;
}

.chat-body .message .vote__icon {
    flex: 1;
    /* display: none; */
    visibility: hidden;
    max-width: 70%;
    text-align: right;
    position: absolute;
    bottom: -2rem;
    right: 0.6rem; 
}

.chat-body a {
    word-wrap: break-word;
}

.chat-body .message .vote__icon .like__icon,
.chat-body .message .vote__icon .dislike__icon,
.chat-body .message .vote__icon .normal__icon {
    width: 15px;
    height: 15px;
    margin-top: 5px;
    margin-left: 7px;
    cursor: pointer;
    color: lightgray;
}

.chat-body .message .vote__icon .like__icon:hover,
.chat-body .message .vote__icon .like__icon:active,
.chat-body .message .vote__icon .dislike__icon:hover,
.chat-body .message .vote__icon .dislike__icon:active,
.chat-body .message .vote__icon .normal__icon:hover,
.chat-body .message .vote__icon .normal__icon:active {
    color: #e20177;
    opacity: 0.5;
}

.chat-body .message .vote__icon .like__icon.active,
.chat-body .message .vote__icon .dislike__icon.active,
.chat-body .message .vote__icon .normal__icon.active {
    color: #e20177;
}

.chat-body .message .vote__icon .like__icon.active:hover,
.chat-body .message .vote__icon .like__icon.active:active,
.chat-body .message .vote__icon .dislike__icon.active:hover,
.chat-body .message .vote__icon .dislike__icon.active:active,
.chat-body .message .vote__icon .normal__icon.active:hover,
.chat-body .message .vote__icon .normal__icon.active:active {
    opacity: 1;
}

.chat-body .message .bubble {
    position: relative;
}

/* Hide user like__show dislike__show */
.chat-body .message.message__user .like__icon__show,
.chat-body .message.message__user .dislike__icon__show,
.chat-body .message.message__user .normal__icon__show {
    /* display: none; */
    visibility: hidden;
}

.chat-body .message .bubble .border__icon {
    box-shadow: 0 2px 0px 0 rgba(0, 1, 5, 0.19);
    width: 20px;
    height: 20px;
    position: absolute;
    right: 30px;
    bottom: -10px;
    border-radius: 15px;
    background: white;
    opacity: 0;
    transform: translateY(20px);
    transition: transform 0.15s ease, opacity 0.15s ease;
}

.chat-body .message .bubble .border__icon.show {
    opacity: 1;
    transform: translateY(0);
}

.chat-body .message .bubble .like__icon__show,
.chat-body .message .bubble .dislike__icon__show,
.chat-body .message .bubble .normal__icon__show {
    position: absolute;
    top: 50%;
    right: 50%;
    transform: translateX(50%) translateY(-50%) scale(0.1);
    width: 15px;
    height: 15px;
    color: #e20177;
    opacity: 0;
    transition: transform 0.15s ease, opacity 0.15s ease;
    transform-origin: center center;
    perspective: 1000px;
}

.chat-body .message.message__user .like__icon__show,
.chat-body .message.message__user .dislike__icon__show,
.chat-body .message.message__user .normal__icon__show {
    left: 30px;
    color: lightgray;
}

.chat-body .message .like__icon__show.show,
.chat-body .message .dislike__icon__show.show,
.chat-body .message .normal__icon__show.show {
    transform: translateX(50%) translateY(-50%) scale(1);
    opacity: 1;
}

.chat-body .message .bubble.bubble__user p {
    color: #fff;
    word-wrap: break-word;
}

.chat-body .bubble-wrapper {
    z-index: -1;
    margin-bottom: 30px;
    display: flex;
    animation: msg 0.15s ease-out 0s forwards;
    width: 75%;
}

@keyframes msg {
    0% {
        transform: translateX(-100px);
        opacity: 0;
    }

    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

.chat-body .bubble-wrapper.bubble-wrapper__user {
    animation: msguser 0.15s ease-out 0s forwards;
    width: unset;
}

@keyframes msguser {
    0% {
        transform: translateX(100px);
        opacity: 0;
    }

    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

.chat-body .bubble__avatar img {
    width: 30px !important;
    height: 30px !important;
    border-radius: 100%;
    margin-right: 5px;
    border: 0.5px solid #e20177;
    max-width: none;
}

.chat-body .message .bubble p {
    /* color: white; */
    color: #000;
    font-size: 14px;
    text-align: left;
    line-height: 1.4;
    margin: 10px;
    text-align: justify;
}

@keyframes bounce {
    50% {
        transform: translate(0, 5px);
    }

    100% {
        transform: translate(0, 0);
    }
}

.typing .ellipsis {
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    margin-left: 4px;
    background-color: #e20177;
}

.typing .ellipsis__wrapper {
    margin-left: 10px;
}

.typing .dot_1 {
    /* animation: name duration timing-function delay iteration-count */
    animation: bounce 0.8s linear 0.1s infinite;
}

.typing .dot_2 {
    animation: bounce 0.8s linear 0.2s infinite;
}

.typing .dot_3 {
    animation: bounce 0.8s linear 0.3s infinite;
}

/* Tùy chỉnh thanh cuộn dọc */
.chat-body::-webkit-scrollbar {
  width: 4px;
  /* Chiều rộng của thanh cuộn */
  height: 4px;
}

/* Tùy chỉnh nút cuộn lên và cuộn xuống */
.chat-body::-webkit-scrollbar-button {
  display: none;
  /* Màu sắc của nút cuộn */
}

/* Tùy chỉnh phần cuộn */
.chat-body::-webkit-scrollbar-thumb {
  background-color: #e20177;
  /* Màu sắc của phần cuộn */
  border-radius: 5px;
}

/* Tùy chỉnh phần cuộn khi di chuột qua */
.chat-body::-webkit-scrollbar-thumb:hover {
  background-color: #e20177;
  /* Màu sắc của phần cuộn khi di chuột qua */
}

/* Tùy chỉnh phần được bao phủ bởi phần cuộn */
.chat-body::-webkit-scrollbar-track {
  background-color: transparent;
  /* Màu sắc của phần được bao phủ bởi phần cuộn */
}

/* Tùy chỉnh phần được bao phủ bởi phần cuộn khi di chuột qua */
.chat-body::-webkit-scrollbar-track:hover {
  background-color: transparent;
  /* Màu sắc của phần được bao phủ bởi phần cuộn khi di chuột qua */
}

/* Override để chatbot hiển thị full page thay vì popup */
.chatbox {
    position: static !important;
    width: 100% !important;
    height: calc(100vh - 200px) !important;
    max-width: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    margin: 0 !important;
}

.chat-body {
    height: calc(100vh - 300px) !important;
    overflow: hidden !important;
}

.chat-body__content {
    height: 100% !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    scroll-behavior: smooth !important;
    padding-bottom: 20px !important;
}

/* Đảm bảo page hiển thị đầy đủ chiều cao */
body {
    margin: 0;
    padding: 0;
}

.page-content {
    background: #f5f5f5;
    min-height: 100vh;
    padding: 20px 0;
    overflow: hidden !important;
}

/* Mobile responsive - full width container */
@media (max-width: 768px) {
    .page-content {
        padding: 0 !important;
    }

    .container {
        max-width: 100% !important;
        width: 100% !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
        margin: 0 !important;
    }

    .chatbox {
        height: 95vh !important;
        border-radius: 0 !important;
    }

    .chat-body {
        height: calc(100vh - 140px) !important;
    }
}

/* Đảm bảo không có scroll ở body khi chat đang hoạt động */
html,
body {
    overflow-x: hidden !important;
}
