.chatbot-container {
    background-color: #FFFFFF;
    border-radius: 24px;
    box-shadow: 0 320px 400px -80px rgba(0, 0, 0, 0.1),
    0 160px 160px -80px rgba(0, 0, 0, 0.04),
    inset 0 0 0 1px rgba(255, 255, 255, 0.5);
    width: 100%;
    max-width: 384px;
    height: 80vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: fixed;
    bottom: 25px;
    right: 25px;
    z-index: 99;
    transition: all 0.5s ease-in-out;
    transform-origin: bottom right;
}
.chatbot-container.expanded {
    max-width: 768px;
    height: 700px;
    border-radius: 24px;
}
.chatbot-container.hidden {
    opacity: 0;
    transform: scale(0.8);
    pointer-events: none;
}
.chatbot-container.visible {
    opacity: 1;
    transform: scale(1);
    pointer-events: auto;
    position: fixed;
    bottom: 90px;
}
@media (min-width: 768px) {
    .chatbot-container {
        height: 700px;
    }
}
#chatbot-container .screens-wrapper {
    display: flex;
    width: 330%;
    height: 100%;
    transition: transform 0.5s ease-in-out;
}
#chatbot-container .initial-screen,
#chatbot-container .new-chat-screen,
#chatbot-container .article-view-screen {
    width: 33%;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    height: 100%;
}
#chatbot-container .screens-wrapper.slide-left {
    transform: translateX(-30.3%);
}
#chatbot-container .screens-wrapper.slide-far-left {
    transform: translateX(-66.66%);
}
#chatbot-container .chat-area {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    background: linear-gradient(to bottom, #FFB347 20%, #FFD180 34%, #FFFFFF 90%, #FFFFFF 100%);
    -ms-overflow-style: none;
    scrollbar-width: none;
}
#chatbot-container .chat-area::-webkit-scrollbar {
    display: none;
}
#chatbot-container .welcome-circle {
    width: 96px;
    height: 96px;
    margin-left: auto;
    margin-right: auto;
    border-radius: 9999px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-image: url('../images/aichatbot_image.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}
#chatbot-container .message-bubble {
    max-width: 70%;
    padding: 12px;
    border-radius: 12px;
    background-color: #333333;
    color: #FFFFFF;
}
#chatbot-container .user-message {
    border-bottom-right-radius: 0;
    align-self: flex-end;
}
#chatbot-container .ai-message {
    border-bottom-left-radius: 0;
    align-self: flex-start;
}
#chatbot-container .chat-history-section {
    margin-top: 16px;
    padding: 0 8px;
}
#chatbot-container .chat-history-header {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    margin-bottom: 16px;
}
#chatbot-container .chat-history-title {
    font-size: 20px;
    font-weight: 600;
    color: #333333;
}
#chatbot-container .chat-history-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 12px;
}
#chatbot-container .chat-history-button {
    background-color: #333333;
    border-radius: 12px;
    padding: 6px 6px;
    display: flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    transition: background-color 0.15s ease-in-out;
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
#chatbot-container .chat-history-button:hover {
    background-color: #4F4F4F;
}
#chatbot-container .chat-history-icon-circle {
    width: 32px;
    height: 32px;
    background-color: #4F4F4F;
    border-radius: 9999px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
#chatbot-container .chat-history-icon {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: #FFFFFF;
    stroke-width: 2;
}
#chatbot-container .chat-history-text {
    color: #FFFFFF;
    font-size: 14px;
    font-weight: 500;
}
#chatbot-container .new-chat-button {
    background-color: #333333;
    border-radius: 12px;
    padding: 8px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    transition: background-color 0.15s ease-in-out;
    cursor: pointer;
    width: calc(100% - 32px);
    margin: 16px auto 0 auto;
    position: sticky;
    bottom: 18px;
    z-index: 10;
    flex-shrink: 0;
}
#chatbot-container .new-chat-button:hover {
    background-color: #4F4F4F;
}
#chatbot-container .new-chat-text {
    color: #FFFFFF;
    font-size: 16px;
    font-weight: 600;
}
#chatbot-container .new-chat-icon-circle {
    width: 40px;
    height: 40px;
    background-color: #4F4F4F;
    border-radius: 9999px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
#chatbot-container .new-chat-arrow-icon {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: #FFFFFF;
    stroke-width: 2;
}
#chatbot-container .search-input-wrapper {
    background-color: #FFFFFF;
    border-radius: 9999px;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    border: 1px solid #E0E2E7;
}
#chatbot-container .search-input-wrapper input {
    flex: 1;
    background-color: transparent;
    outline: none;
    color: #333333;
    font-size: 14px;
    padding-left: 8px;
    border: none;
}
#chatbot-container .search-input-wrapper input::placeholder {
    color: #6B7280;
}
#chatbot-container .search-icon {
    width: 20px;
    height: 20px;
    color: #6B7280;
    flex-shrink: 0;
}
#chatbot-container .article-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding-right: 0;
}
#chatbot-container .article-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 12px;
    background-color: transparent;
    border-radius: 9999px;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.20);
    transition: background-color 0.15s ease-in-out;
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    border-bottom: none;
}
#chatbot-container .article-item:hover {
    background-color: #F8F9FA;
}
#chatbot-container .article-item:last-child {
    border-bottom: none;
}
#chatbot-container .article-icon-circle {
    display: none;
}
#chatbot-container .article-text {
    color: #333333;
    font-size: 14px;
    font-weight: 500;
}
#chatbot-container .article-arrow-icon {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: #6B7280;
    stroke-width: 2;
    margin-left: auto;
    flex-shrink: 0;
}
#chatbot-container .chat-top-bar {
    background: #FFB347;
    padding: 16px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 16px;
    position: sticky;
    top: 0;
    z-index: 20;
    padding-bottom: 8px;
}
#chatbot-container .chat-top-bar .back-button {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    flex-shrink: 0;
}
#chatbot-container .chat-top-bar .back-button svg {
    width: 24px;
    height: 24px;
    color: #333;
}
#chatbot-container .chat-profile-info {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-grow: 1;
}
#chatbot-container .chat-profile-image {
    width: 32px;
    height: 32px;
    border-radius: 9999px;
    background-image: url('../images/aichatbot_image.png');
    background-size: cover;
    background-position: center;
    flex-shrink: 0;
}
#chatbot-container .chat-profile-details {
    display: flex;
    flex-direction: column;
}
#chatbot-container .chat-profile-name {
    font-size: 16px;
    font-weight: 600;
    color: #333;
}
#chatbot-container .new-chat-messages-container {
    flex: 1;
    overflow-y: auto;
    padding: 0 16px 16px 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: linear-gradient(to bottom, #FFB347 20%, #FFD180 34%, #FFFFFF 90%, #FFFFFF 100%);
    -ms-overflow-style: none;
    scrollbar-width: none;
    width: 85%;
    margin-bottom: 3px;
}
#chatbot-container .new-chat-messages-container::-webkit-scrollbar {
    display: none;
}
#chatbot-container .chat-input-area {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    padding: 10px 16px;
    background-color: #333333;
    border-radius: 12px;
    margin: 1px 16px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    position: sticky;
    bottom: 18px;
    z-index: 20;
    width: 100%;
    max-width: 320px;
}
#chatbot-container .chat-input-area .input-group {
    display: flex;
    width: 100%;
    gap: 8px;
    align-items: center;
}
#chatbot-container .chat-input-area textarea,
#chatbot-container .chat-input-area input[type="text"],
#chatbot-container .chat-input-area input[type="email"] {
    flex: 1;
    background-color: transparent;
    border: none;
    outline: none;
    color: #FFFFFF;
    font-size: 14px;
    padding: 8px 8px;
    resize: none;
    min-height: 40px;
    line-height: 24px;
    border-radius: 9999px;
    max-height: 50px !important;
    overflow-y: auto;
    scrollbar-width: none;
}
#chatbot-container .chat-input-area textarea::-webkit-scrollbar,
#chatbot-container .chat-input-area input::-webkit-scrollbar {
    display: none;
}
#chatbot-container .chat-input-area button {
    background-color: #333333;
    color: #FFFFFF;
    border-radius: 9999px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.15s ease-in-out;
    box-shadow: none;
    flex-shrink: 0;
    padding: 6px 8px;
}
#chatbot-container .chat-input-area button:hover {
    background-color: #4F4F4F;
}
#chatbot-container .chat-input-area button svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: #FFFFFF;
    stroke-width: 2;
}
#chatbot-container .order-tracking-input-group {
    display: flex;
    flex-direction: column;
    width: 100%;
    gap: 8px;
}
#chatbot-container .order-tracking-input-group .input-row {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
}
#chatbot-container .order-tracking-input-group input {
    flex: 1;
    background-color: #4F4F4F;
    padding: 12px 16px;
    border-radius: 9999px;
    color: #FFFFFF;
    font-size: 14px;
    outline: none;
    border: none;
}
#chatbot-container .order-tracking-input-group input::placeholder {
    color: #B0B0B0;
}
#chatbot-container .close-button {
    background-color: #4F4F4F;
    color: #FFFFFF;
    border-radius: 9999px;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.15s ease-in-out;
    box-shadow: none;
    flex-shrink: 0;
}
#chatbot-container .close-button:hover {
    background-color: #6B7280;
}
#chatbot-container .close-button svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: #FFFFFF;
    stroke-width: 2;
}
#chatbot-container .loader-dots {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 16px;
    margin-top: 4px;
}
#chatbot-container .loader-dots span {
    display: inline-block;
    width: 8px;
    height: 8px;
    background-color: #6B7280;
    border-radius: 50%;
    margin: 0 2px;
    animation: bounce 1.4s infinite ease-in-out both;
}
#chatbot-container .loader-dots span:nth-child(1) {
    animation-delay: -0.32s;
}
#chatbot-container .loader-dots span:nth-child(2) {
    animation-delay: -0.16s;
}
@keyframes bounce {
    0%,
    80%,
    100% {
        transform: scale(0);
    }
    40% {
        transform: scale(1);
    }
}
#chatbot-container .predefined-options {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
    padding-left: 16px;
    padding-right: 16px;
    flex-wrap: wrap;
}
#chatbot-container .predefined-options button {
    background: #dadada;
    color: #333;
    border-radius: 9999px;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    font-weight: 500;
    font-size: 15.2px;
    padding: 8px 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    border: none;
    cursor: pointer;
    transition: background 0.15s;
}
#chatbot-container .predefined-options button:hover {
    background: #F8F9FA;
}
#chatbot-container .article-view-screen {
    background-color: #FFFFFF;
    padding: 24px;
    overflow-y: auto;
    color: #333333;
    display: flex;
    flex-direction: column;
    height: 100%;
}
#chatbot-container .article-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid #E0E2E7;
    flex-shrink: 0;
}
#chatbot-container .article-header .back-button {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    flex-shrink: 0;
}
#chatbot-container .article-header .back-button svg {
    width: 24px;
    height: 24px;
    color: #333;
}
#chatbot-container .article-header .expand-button {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    flex-shrink: 0;
}
#chatbot-container .article-header .expand-button svg {
    width: 24px;
    height: 24px;
    color: #333;
}
#chatbot-container .article-content {
    flex-grow: 1;
    overflow-y: auto;
    padding-right: 8px;
    -ms-overflow-style: none;
    scrollbar-width: none;
}
#chatbot-container .article-content::-webkit-scrollbar {
    display: none;
}
#chatbot-container .article-content h1 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 8px;
    color: #333;
}
#chatbot-container .article-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #6B7280;
    margin-bottom: 16px;
}
#chatbot-container .article-meta img {
    width: 24px;
    height: 24px;
    border-radius: 9999px;
}
#chatbot-container .article-content p {
    margin-bottom: 16px;
    line-height: 1.5;
    color: #333;
}
#chatbot-container .article-content ol,
#chatbot-container .article-content ul {
    margin-bottom: 16px;
    padding-left: 24px;
}
#chatbot-container .article-content ol li,
#chatbot-container .article-content ul li {
    margin-bottom: 8px;
    color: #333;
}
#chatbot-container .article-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin-top: 16px;
    margin-bottom: 16px;
}
#chatbot-container .article-content h2 {
    font-size: 20px;
    font-weight: 600;
    margin-top: 24px;
    margin-bottom: 12px;
    color: #333;
}
.chat-toggle-button {
    position: fixed;
    bottom: 25px;
    right: 25px;
    background-color: #333333;
    color: #FFFFFF;
    border-radius: 9999px;
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    z-index: 100;
    transition: background-color 0.15s ease-in-out;
}
button.chat-toggle-button:hover {
    background-color: #4F4F4F;
}
.chat-toggle-button svg {
    width: 24px;
    height: 24px;
    fill: none;
    stroke: #FFFFFF;
    stroke-width: 2;
}

@media only screen and (min-width: 1000px) and (max-width: 1300px){
    body .chatbot-container {
        height: 500px;
    }
    body .chatbot-container.visible{
        bottom: 65px;
    }
}
@media only screen and (max-width: 440px) {
    body .chatbot-container {
        left: 0;
        right: 0;
    }
    body #chatbot-container .screens-wrapper.slide-left {
        transform: translateX(-30.5%);
    }
    body #chatbot-container .chat-input-area {
        bottom: 7px;
    }
    body .new-chat-messages-container .product-ai-img{
        padding-left: 2px;
    }
}
@media only screen and (max-width: 390px) {
    body .chatbot-container{
        max-width: 340px;
    }
}
@media only screen and (min-width: 640px) {
    body .chatbot-container #close-chat,
    body .chatbot-container .new-chat-messages-container .chat-close-btn{
        display: none;
    }
}
@media only screen and (max-width: 530px) {
    body .chatbot-container{
        max-width: 100%;
        transition: all 0.3s ease-in-out;
    }
    body #chatbot-container .chat-input-area{
        max-width: 100%;
        width: 77%;
    }
    body .chatbot-container.visible{
        bottom: 0;
        z-index: 99999;
        height: 90%;
        max-height: 100%;
    }
    .chatbot-container #close-chat{
        position: absolute;
        right: 10px;
        top: 8px;
    }
    body .chat-screen.new-chat-screen #close-chat-inner{
        position: absolute;
        top: 8px;
        right: -3px;
    }
}

/* last from phtml */
.chatbot-container .welcome-main-div{
    margin-top: 1rem;
    text-align: center;
}
.chatbot-container .welcome-main-div h2{
    margin-top: 1rem;
    font-weight: bold;
    color: #333;
}
.chatbot-container .welcome-main-div p{
    margin-top: 0.5rem;
}
.chatbot-container .flex{
    display: flex;
}
.chatbot-container .items-start{
    align-items: end;
}
.chatbot-container .justify-start {
    justify-content: flex-start;
}
.chatbot-container .gap-2 {
    gap: 0.5rem;
}
.chatbot-container .justify-end {
    justify-content: flex-end;
}
/* items grid */
.items-grid{
    display: grid;
    margin-top: 1rem;
    gap: 1rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}
.items-grid .product-card {
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
    background-color: rgb(255 255 255 / 1);
    border-color: rgb(229 231 235 / 1);
    border-width: 1px;
    border-radius: 0.5rem;
    overflow: hidden;
}
.items-grid .product-card img {
    object-fit: cover;
    width: 100%;
    height: 12rem;
    display: block;
    vertical-align: middle;
}
.p-4 {
    padding: 0.3rem;
}
.items-grid .product-card h3{
    font-size: 1.3rem;
    font-weight: 500;
    word-wrap: break-word;
    margin-top: 7px;
    margin-bottom: 7px;
}
.items-grid .product-card p{
    font-size: 1.2rem;
}
.items-grid .product-card button{
    width: 100%;
    border-radius: 0.5rem;
    background-color: rgb(79 70 229 / 1);
    padding: 0.5rem 1rem;
    color: #FFF;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 150ms;
    box-shadow: none;
    font-size: 1.2rem;
    font-weight: 500;
}
.chatbot-container .message-bubble p {
    margin-bottom: 0;
}
.chatbot-container .chat-powered-by{
    text-align: center;
    font-size: 10px;
    padding-bottom: 1px;
    position: sticky;
    bottom: 0;
}