@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;700&display=swap');
body {
    font-family: 'Roboto', sans-serif;
    padding: 20px;
}

.chat-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    background-color: #f0f0f0;
    overflow: hidden;
}

#messages {
    width: 100%;
    height: 85%;
    padding: 10px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    margin: 15% auto 0;
    padding-bottom: 160px;
    overflow-x: hidden;
    box-sizing: border-box;
    padding-left: 5%;
    padding-right: 5%;
    scrollbar-width: thin; /* Firefox */
    scrollbar-color: #888 #f0f0f0; /* Firefox */
}

#messages::-webkit-scrollbar {
    width: 4px;
    height: 4px;
}

#messages::-webkit-scrollbar-track {
    background: #f0f0f0;
    border-radius: 10px;
}

#messages::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 10px;
}

#messages::-webkit-scrollbar-thumb:hover {
    background: #555;
}

.message {
    word-wrap: break-word;
    padding: 8px 12px;
    border-radius: 10px;
    margin: 5px 0;
    display: flex;
    align-items: center;
}

.user-message {
    align-self: flex-end;
    max-width: 60%;
    background-color: #007bff;
    color: white;
    text-align: left;
    display: block;
}

.response {
    align-self: flex-start;
    width: 100%;
    color: black;
    text-align: left;
    margin-left: -10px;
}

.text-content {
    max-width: 99%;
    text-align: justify;
    line-height: 1.75;
}

.text-content p,
.text-content ul,
.text-content ol {
    margin: 0 0 10px 0;
}

.text-content ul,
.text-content ol {
    padding-left: 20px;
}

.text-content p:empty {
    display: none !important;
}

.text-content > * {
    margin: 0.5em 0;
  }
  
  .text-content > * + ul,
  .text-content > * + ol {
    margin-top: 0;
  }
  
  .text-content > ul + *,
  .text-content > ol + * {
    margin-top: 0;
  }
  
  .text-content li {
    margin: 0.25em 0;
  }

.cursor {
    display: inline-block;
    width: 5px;
    height: 14px;
    background: black;
    margin-left: 2px;
    animation: blink 1s infinite;
}

@keyframes blink {
    50% {
        opacity: 0;
    }
}

#footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    margin: 0 auto;
    background-color: #f0f0f0;
    z-index: 100;
    padding-bottom: 20px;
}

.input-container {
    display: flex;
    flex-direction: column;
    padding: 10px;
    border-top: 1px solid #ccc;
    background-color: #fff;
    border-radius: 25px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
    gap: 10px;
    width: calc(85% + 20px);
    margin-left: auto;
    margin-right: auto;
}

#questionInput {
    flex: 1;
    padding: 10px;
    border: none;
    border-radius: 25px;
    margin: 0 10px;
    font-size: 16px;
    outline: none;
}

#questionInput:disabled {
    background-color: #fff;
    color: #000;
    opacity: 1;
    cursor: not-allowed;
}

.send-button:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

.icon-button,
.send-button {
    background-color: transparent;
    border: none;
    cursor: pointer;
    font-size: 18px;
    margin: 0 5px;
}

.icon-button {
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #ccc;
}

.send-button {
    background-color: #000;
    color: #fff;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.send-button:hover {
    background-color: #333;
}

.logo {
    width: 35%;
    max-width: 200px;
    height: auto;
    position: fixed;
    top: 10px;
    left: 10px;
    z-index: 999;
}

.footer {
    font-size: 14px;
    display: flex;
    justify-content: space-between;
    width: calc(85% + 20px);
    margin-left: auto;
    margin-right: auto;
}

.m-4 {
    margin: 4px 0px;
}

.m-6 {
    margin: 6px 0px;
}

.footer img {
    height: 18px;
    margin-right: 4px;
}

.footer .logo-contact {
    width: 40px;
    height: auto;
    margin: 0 10px;
}

.footer a {
    display: block;
}

.d-flex {
    display: flex;
}

.align-items-center {
    align-items: center;
}

@media screen and (min-width: 1920px) {
    #messages {
        padding-bottom: 200px;
        margin-top: 55px;
    }

    #footer {
        padding-bottom: 20px;
    }
}

@media screen and (min-width: 768px) {
    #messages {
        padding-left: 25%;
        padding-right: 25%;
        margin-top: 55px;
    }

    .input-container,
    .footer {
        width: calc(50% + 20px);
        /* Thêm 20px để bù cho padding */
    }
}