/* Wrap all rules in a unique parent class for higher specificity */
.my-chatbot .chat-container {
    position: fixed !important;
    bottom: 20px !important;
    right: 20px !important;
    width: 350px;
    height: 500px;
    background-color: #ffffff;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    border-radius: 16px;
    display: none;
    flex-direction: column;
    overflow: hidden;
    animation: slideIn 0.3s ease-out;
    z-index: 99999 !important;
    border: 1px solid #ddd;
}

.my-chatbot .chat-container.open {
    display: flex !important;
}

@keyframes slideIn {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.my-chatbot .chat-header {
    background-color: #3f8efc !important;
    color: #ffffff !important;
    padding: 10px;
    font-size: 16px;
    font-weight: bold;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: move; /* optional */
}

.my-chatbot .chat-title {
    margin: 0;
}

.my-chatbot .chat-close-btn {
    background: none;
    border: none;
    color: #ffffff !important;
    font-size: 20px;
    cursor: pointer;
}

.my-chatbot .chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
    background-color: #f9f9f9;
    font-size: 14px;
    line-height: 1.5;
}

.my-chatbot .chat-form {
    display: flex;
    padding: 10px;
    border-top: 1px solid #ddd;
}

.my-chatbot .chat-input {
    flex: 1;
    padding: 8px;
    font-size: 14px;
    border: 1px solid #ccc;
    border-radius: 8px;
    margin-right: 5px;
}

.my-chatbot .chat-send-btn {
    background-color: var(--primary-color, #3f8efc) !important;
    color: #ffffff !important;
    border: none;
    border-radius: 8px;
    padding: 8px 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.my-chatbot .chat-send-btn:hover {
    background-color: var(--primary-hover-color, #3f8efc) !important;
}

.my-chatbot .chat-launcher {
    position: fixed !important;
    bottom: 20px !important;
    right: 20px !important;
    width: 60px;
    height: 60px;
    background-color: #3f8efc !important;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    z-index: 99999 !important;
    animation: fadeIn 0.3s ease-out;
}

.my-chatbot .chat-launcher svg {
    fill: #ffffff;
    width: 32px;
    height: 32px;
}

.my-chatbot .chat-launcher:hover {
    background-color: var(--primary-hover-color, #3f8efc) !important;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.my-chatbot .message {
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    animation: fadeIn 0.3s ease;
}

.my-chatbot .message .bubble {
    word-wrap: break-word;
    overflow-wrap: break-word;
    white-space: pre-wrap;
    display: inline-block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    padding: 12px;
    border-radius: 16px;
    margin: 0;
    line-height: 1.5;
}

.my-chatbot .message .bubble ul,
.my-chatbot .message .bubble ol {
    padding-left: 20px;
    margin: 10px 0;
}

.my-chatbot .message .bubble ul + br,
.my-chatbot .message .bubble ol + br {
    display: none;
}

.my-chatbot .message .bubble li {
    margin-bottom: 5px;
    line-height: 1.6;
}

.my-chatbot .message .bubble ul + p,
.my-chatbot .message .bubble ol + p {
    margin-top: 10px;
}

.my-chatbot .message.user .bubble {
    background-color: #3f8efc !important;
    color: #ffffff !important;
    margin-left: auto;
    border-radius: 16px 16px 0 16px;
}

.my-chatbot .message.bot .bubble {
    background-color: #e7e7e7 !important;
    color: #333333 !important;
    margin-right: auto;
    border-radius: 16px 16px 16px 0;
}

.my-chatbot .typing-indicator {
    display: flex;
    justify-content: flex-start;
    align-items: center;
}

.my-chatbot .typing-indicator .bubble {
    background-color: #e7e7e7 !important;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px;
}

.my-chatbot .typing-indicator .bubble span {
    width: 8px;
    height: 8px;
    background-color: #333333;
    border-radius: 50%;
    animation: bounce 1.4s infinite ease-in-out both;
}

.my-chatbot .typing-indicator .bubble span:nth-child(1) {
    animation-delay: -0.32s;
}
.my-chatbot .typing-indicator .bubble span:nth-child(2) {
    animation-delay: -0.16s;
}
.my-chatbot .typing-indicator .bubble span:nth-child(3) {
    animation-delay: 0s;
}

@keyframes bounce {
    0%, 80%, 100% {
        transform: scale(0);
    }
    40% {
        transform: scale(1);
    }
}

.my-chatbot .chat-suggestions {
    display: flex;
    gap: 8px;
    padding: 10px;
    background-color: #f9f9f9;
    justify-content: center;
    flex-wrap: wrap;
}

.my-chatbot .chat-suggestions button {
    background-color: var(--user-bubble-color, #272727) ;
    color: #ffffff !important;
    padding: 8px 12px;
    border: none;
    border-radius: 20px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.my-chatbot .chat-suggestions button:hover {
    background-color: var(--user-bubble-color, #272727);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.my-chatbot .chat-suggestions button:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}
