.initial-msg {
    font-size: 13px;
    line-height: 1.4;
    gap: 5px;
}

/* Emoji before message */
.initial-msg::before {
    content: "👋";
    display: inline-block;
    font-size: 18px;
    vertical-align: middle;
    margin-inline-end: 6px;
    transform-origin: 70% 70%;
    animation: wave 1.5s infinite;
}

@keyframes wave {
    0%   { transform: rotate(0deg); }
    10%  { transform: rotate(14deg); }
    20%  { transform: rotate(-8deg); }
    30%  { transform: rotate(14deg); }
    40%  { transform: rotate(-4deg); }
    50%  { transform: rotate(10deg); }
    60%  { transform: rotate(0deg); }
    100% { transform: rotate(0deg); }
}

.send-arrow::before {
    content: "\27A4";
    margin-right: 4px;
    color: #fff;
    font-weight: bold;
    display: inline-block;
    transform: rotate(-38.5deg);
    margin-left: -27px;
    padding-bottom: 6px;
}

.typing-indicator {
    display: flex;
    align-items: center;
    font-family: Arial, sans-serif;
    font-size: 13px;
    color: #555;
    gap: 5px;
}

.dots {
    display: flex;
    gap: 3px;
}

.dots span {
    width: 6px;
    height: 6px;
    background-color: #555;
    border-radius: 50%;
    display: inline-block;
    animation: blink 1.4s infinite both;
}

.dots span:nth-child(1) { animation-delay: 0s; }
.dots span:nth-child(2) { animation-delay: 0.2s; }
.dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes blink {
    0%, 80%, 100% { opacity: 0; }
    40% { opacity: 1; }
}

/* Container */
#modern-chatbot {
    position: fixed;
    bottom: 25px;
    right: 11px;
    z-index: 999;
}

/* Chat Window */
#chat-window {
    width: 340px;
    height: 515px;
    position: fixed;
    bottom: 24px;
    right: 7px;

    flex-direction: column;
    border-radius: 18px;
    backdrop-filter: blur(18px);
    background: rgba(255, 255, 255, 0.75);
    box-shadow: 0 15px 25px rgba(0,0,0,0.25);
    overflow: hidden;
    display: flex;
    transform: translateY(100%);
    opacity: 0;
    transition: all 0.35s ease;
}

#chat-window.open {
    transform: translateY(0);
    opacity: 1;
}

#chat-window.chat-window-extended {
    width: 50vw;
    height: auto;
    bottom: 18px;
    right: 7px;
    top: 129px;
    border-radius: 18px;
}

#toggle-extend .fa-solid {
    color:#414a51;
}
.chat-window-extended #toggle-extend {
    left: 93% !important;
}
.chat-window-extended .chat-content-section {
    max-height: 89% !important
}

#toggle-extend {
    left: 279px;
    font-size: 18px;
    position: fixed;
    display: inline-block;
    cursor: pointer;
}

.img-gen-ai-bot-icon {
    width: 29px;
    height: 29px;
}
#chat-header .title {
    color: #e85f09;
}

#chat-header {
    padding: 6px 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255,255,255,0.8);
    border-bottom: 1px solid rgba(217, 217, 217, 0.6);
    font-weight: 600;
}

#close-chat {
    cursor: pointer;
    font-size: 22px;
    color: #555;
    transition: 0.2s;
}

#close-chat:hover {
    color: #ff4d4d;
}

/* Chat Content */
#chat-content {
    padding: 8px;
    flex: 1;
    overflow-y: auto;
    max-height: 415px;
}

/* Messages */
.bot-msg, .user-msg {
    padding: 10px 14px;
    border-radius: 14px;
    margin-bottom: 12px;
    max-width: 80%;
    line-height: 1.4;
    animation: fadeIn 0.3s ease;
    font-size: 14px;
}

.bot-msg {
    background: #f6eded;
    color: #333;
    border: 1px solid #e5e6ec;
}

.user-msg {
    background: #e85f09;
    color: #fff;
    margin-left: auto;
}
.sender-label {
    font-weight: bold;
    margin-right: 4px;
}
.sender-label .fa-solid.fa-user {
    margin-right: 2px;
}
/* Input Box */
#chat-input-box {
    display: flex;
    padding: 12px 9px 11px 10px;
}

#chat-input {
    flex: 1;
    border-radius: 12px;
    font-size: 16px;
    outline: none;
    resize: none;
    overflow: hidden;
    min-height: 35px;
    max-height: 120px;
    padding: 6px 8px;
    border: 1px solid #797979;
    line-height: 20px;
    font-family: lato,helvetica,arial,sans-serif;
}

#send-chat {
    margin-left: 10px;
    border: none;
    color: #fff;
    width: 72px;
    height: 35px;
    border-radius: 12px;
    cursor: pointer;
    font-size: 18px;
    transition: 0.2s;
    display: flex;
    padding: 6px 0 0 34px;
}

#send-chat:disabled {
    background-color: #ccc;
    color: #888;
    cursor: not-allowed;
}

#chat-input-box .clear-chat-btn {
    margin-left: 5px;
    border-radius: 12px;
    width: 70px;
    font-size: 13px;
    text-transform: capitalize;
    height: 35px;
    margin-top: 0;
    font-weight: bold;
}

/* Floating Button */
#chat-toggle-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 5px 20px rgba(0,0,0,0.3);
    transition: 0.3s;
    background: #fff;
}

#chat-toggle-btn:hover {
    transform: translateY(-3px);
}

#chat-toggle-btn span {
    font-size: 15px;
    color: #fff;
    font-weight: bold;
    font-style: italic;
}


/* Animations */
@keyframes slideUp {
    from { transform: translateY(50px); opacity: 0; }
    to   { transform: translateY(0); opacity: 1; }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}

#send-chat .arrow {
    margin-left: -28px;
    margin-right: 5px;
    transform: rotate(-38.5deg);
    display: inline-block;
    transition: transform 0.2s ease;
}

#send-chat .send-title {
    font-size: 13px;
    text-transform: capitalize;
    font-weight: 600;
    padding-top: 5px;
    margin-left: -3px;
}

/* product slider */
.product-carousel-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.product-carousel-horizontal {
    display: flex;
    overflow-x: auto;
    overflow-y: hidden;
    gap: 10px;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    padding: 10px 0;
    flex: 1;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-x;
}

.product-carousel-horizontal::-webkit-scrollbar {
    display: none;
}

/* Product card width to show 1.5 products */
.product-item {
    min-width: 137px;
    max-width: 137px;
    scroll-snap-align: start;
    border: 1px solid #ccc;
    padding: 8px;
    border-radius: 8px;
    background: #f9f9f9;
    text-align: center;
    flex-shrink: 0;
}

.product-item img {
    width: 100%;
    height: 100px;
    object-fit: contain;
    margin-bottom: 5px;
}

.product-title .name {
    font-size: 12px;
    margin-bottom: 2px;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    color: #333;
    min-height: 29px;
}

.product-price {
    color: #414a51;
    font-size: 13px;
    font-weight: 700;
    padding-top: 10px;
}

/* Arrows */
.slider-arrow {
    background: rgba(0,0,0,0.5);
    color: #fff;
    border: none;
    padding: 4px;
    cursor: pointer;
    border-radius: 10%;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
}

.slider-arrow.left {
    left: -15px;
}
.slider-arrow.right {
    right: -15px;
}

.slider-arrow.left:hover {
    background: #3c3737;
}
.slider-arrow.right:hover {
    background: #3c3737;
}
.arrow:hover {
    background: rgba(0,0,0,0.8);
}

/* Overlay behind modal */
.clear-prompt-overlay {
    position: absolute; /* inside chat box */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4); /* semi-transparent dark overlay */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 999; /* higher than chat content */
}

/* Modal box */
.clear-prompt-modal {
    background: #fff; /* white box */
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    min-width: 250px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    z-index: 1000;
}

/* Buttons */
.prompt-buttons {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 15px;
}

.prompt-buttons button {
    padding: 6px 12px;
    cursor: pointer;
    border: none;
    border-radius: 5px;
    background-color: #e85f09;
    color: #fff;
    font-weight: bold;
    transition: background 0.3s;
    height: 30px;
    font-size: 12px;
}

.prompt-buttons button:hover {
    background-color: #b2230b;
}
.clear-prompt-msg {
    font-size: 13px;
}

.ai-qty {
    overflow: hidden;
    margin-top: 12px;
}
.ai-qty .add-to-cart-qty {
    float: left;
    width: 38px;
    height: 31px;
    margin-right: 1px;
    text-align: center;
    font-size: 13px;
    font-weight: 700;
    color: #414a51;
    border-radius: 2px;
    margin-top: 4px;
}
.ai-sign {
    float: left;
    line-height: 41px;
    margin: 0 0 0 6px;
    text-align: center;
    font-size: 30px;
    overflow: hidden;
}
/* product slider ends */

.chat-content-section .add-to-cart {
    min-height: 33px;
    padding: 4px 0;
    border-top: 0;
}
.chat-content-section .add-to-cart-btn {
    font-size: 12px;
    height: 29px;
}
.chat-content-section .add-to-cart-btn span {
    padding-left: 26px;
}

.chat-content-section .add-to-cart-btn span::before {
    font-size: 18px;
    top: -3px;
}
.chat-content-section .add-to-cart.success .add-to-cart-added {
    height: 29px;
    line-height: 21px;
    font-size: 12px;
}
.chat-content-section .add-to-cart-added span:before {
    top: -3px;
    font-size: 18px;
}
.chat-content-section .add-to-cart-added span {
    padding-left: 26px;
}


/* Arabic / RTL */
[dir="rtl"] .chat-window-extended #toggle-extend {
    right: 92% !important;
}

[dir="rtl"]  #toggle-extend {
    right: 279px;
}

[dir="rtl"] .ai-qty .add-to-cart-qty {
    float: right;
    margin-right: 0;
    margin-left: 1px;
}

[dir="rtl"] .ai-sign {
    float: right;
    margin: 0 6px 0 0;
}

[dir="rtl"] #modern-chatbot {
    right: auto;
    left: 11px;
}
[dir="rtl"] .send-arrow::before {
    padding-bottom: 10px;
    padding-right: 4px;
}
[dir="rtl"] #send-chat .send-title {
    float: right;
    margin-right: 6px;
}
[dir="rtl"] #send-chat {
    display: block;
    margin-right: 5px;
}
[dir="rtl"] #chat-window.chat-window-extended {
    position: relative;
    height: 724px;
    top: 9px;
}
[dir="rtl"] #chat-window {
    position: relative;
    top: -5px;
}
[dir="rtl"] .img-gen-ai-bot-icon {
    width: 29px;
    height: 29px;
}

[dir="rtl"] .chat-content-section .add-to-cart-btn span {
    padding-right: 34px;
    padding-left: 0;
}
[dir="rtl"] .chat-content-section .add-to-cart-added span {
    padding-right: 34px;
    padding-left: 0;
}
[dir="rtl"] .chat-content-section .add-to-cart-added span:before {
    font-size: 18px;
}
.bot-error{
    color: #ff0000d6;
}
.product-item .checkbox-bulk-add {
    float: right;
    cursor: pointer;
}

[dir="rtl"] .product-item .checkbox-bulk-add {
    float: left;
}

.fade-slide-enter-active,
.fade-slide-leave-active {
    transition: all 0.3s ease;
}

.fade-slide-enter-from,
.fade-slide-leave-to {
    opacity: 0;
    transform: translateY(20px);
}

.bulk-cart-btn {
    position: fixed;
    bottom: 270px;
    right: 10px;
    z-index: 999;
    color: #fff;
    border: none;
    border-radius: 11px;
    padding: 14px 22px;
    font-weight: 600;
    cursor: pointer;
    background-color: #16a34a !important;
    background-image: none;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}
.chat-window-extended .bulk-cart-btn {
    bottom: 297px;
}
.bulk-cart-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 30px rgba(0,0,0,0.25);
}

.bulk-cart-loader-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.bulk-cart-loader-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #ccc;
    border-top-color: #e85f09;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}
.success-toast-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 999;
}
.success-toast-modal {
    background: #16a34a;
    padding: 12px;
    border-radius: 10px;
    text-align: center;
    min-width: 250px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    z-index: 1000;
    color: #fff;
}

.max-product-overlay {
    position: absolute; /* inside chat box */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4); /* semi-transparent dark overlay */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 999; /* higher than chat content */
}

/* Modal box */
.max-product-modal {
    background: #fff; /* white box */
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    min-width: 250px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    z-index: 1000;
}

/*popup options css start */
.products-option-container .product-name {
    font-size: 16px;
    text-transform: none;
    font-weight: 700;
    text-align: left;
    top: 2px;
    position: relative;
}
.clear-prompt-overlay .close-popup-product-options {
    position: relative;
    color: #414a51;
    font-size: 35px;
    text-shadow: 0 0 4px rgba(0,0,0,.5);
    top: -58px;
    right: -12px;
    cursor: pointer;
    float: right;
}
.clear-prompt-modal .popup-header > h4 {
    padding-bottom: 5px;
}

.clear-prompt-overlay .product-options-wrapper {
    margin: 15px;
}

.product-options-wrapper .product-option-group {
    display: flex;
    width: 100%;
    margin: 7px;
}

.product-options-wrapper .product-option-group > label {
    position: relative;
    width: 185px;
}

.product-options-wrapper .product-option-group .modern-select {
    position: relative;
    padding: 7px;
    width: 100%;
    text-align: left;
    background: #fff;
    border-radius: 5px;
    border: 1px solid #a0a0a0;
    display: inline-block;
    height: 40px;
}

.clear-prompt-modal .popup-footer {
    display: inline-block;
}

[dir="rtl"] .bulk-cart-btn {
    right: auto;
    left: 10px;
}

[dir="rtl"] .chat-window-extended .bulk-cart-btn {
    right: auto;
    left: 10px;
}

.simple-prod-img {
    margin-top: 15px;
}
.price-box-regular {
    margin-top: 26px;
}

.price-box-price_sp .old-price {
    margin-top: 7px;
}

/*option popup css end*/
/*Mobile device css */
@media (max-width: 768px) {
    #chat-toggle-btn {
        width: 50px;
        height: 50px;
        margin-bottom: -7px;
        margin-right: 8px;
    }
    #chat-toggle-btn span {
        font-size: 12px
    }
    #back-to-top {
        bottom: 121px;
    }
    #modern-chatbot {
        bottom: 69px;
        right: 9px;
    }
    #chat-window {
        position: fixed;
        inset: 7px;
        width: auto;
        height: auto;
        border-radius: 18px;
        box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
    }

    #chat-content {
        max-height: 809px;
    }

    #toggle-extend {
        display: none;
    }

    .bot-msg, .user-msg {
        max-width: 90%;
    }

    [dir="rtl"] #chat-window {
        position: fixed;
        top: 7px;
    }

    .chat-content-section .add-to-cart.add-to-cart-desktop {
        display: block;
    }

    .chat-content-section .add-to-cart-btn span {
        padding-top: 0;
        font-size: 12px;
    }

    .chat-content-section .add-to-cart-btn span::before {
        font-size: 18px;
        top: -3px;
        font-weight: 400;
        content: "\e607";
        position: absolute;
        left: 0;
    }
    .chat-content-section .add-to-cart {
        min-height: 35px;
        padding: 5px 0;
    }
    .chat-content-section .add-to-cart-loading .add-to-cart-added span:before, .chat-content-section .add-to-cart-loading .add-to-cart-btn span:before {
        content: "\f110";
    }

    .bulk-cart-btn {
        bottom: 418px;
    }

    [dir="rtl"] .bulk-cart-btn {
        right: 177px; !important;
    }

    [dir="rtl"] .chat-content-section .add-to-cart-btn span::before {
        left: 70px !important;
    }
}