/* WhatsApp Centering Override */
.floating-wpp {
    left: calc(50% - 65px) !important;
    right: auto !important;
}

.floating-wpp .floating-wpp-popup {
    left: 50% !important;
    right: auto !important;
    transform: translateX(-50%) !important;
}

/* Chatbot Floating Button */
.chatbot-toggler {
    position: fixed;
    left: calc(50% + 5px);
    /* Positioned to the right of the center line */
    bottom: 15px;
    /* Matching floating-wpp.css default bottom */
    height: 60px;
    width: 60px;
    color: #fff;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    outline: none;
    cursor: pointer;
    background: #04af04;
    border-radius: 50%;
    transition: all 0.2s ease;
    z-index: 10001;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.chatbot-toggler:hover {
    transform: scale(1.05);
}

.chatbot-toggler span {
    font-size: 25px;
    position: absolute;
}

.chatbot-toggler span:last-child,
.chatbot-container.show-chatbot .chatbot-toggler span:first-child {
    opacity: 0;
}

.chatbot-container.show-chatbot .chatbot-toggler span:last-child {
    opacity: 1;
}

/* Chatbot Window */
.chatbot-window {
    position: fixed;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    bottom: 82px;
    /* Matching floating-wpp-popup bottom */
    width: 350px;
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
    transform: translateY(20px);
    transition: all 0.3s ease;
    z-index: 10001;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
}

.chatbot-container.show-chatbot .chatbot-window {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0);
}

.chatbot-header {
    background: #04af04;
    padding: 15px;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.chatbot-header .header-info {
    display: flex;
    flex-direction: column;
}

.chatbot-header h2 {
    font-size: 1.1rem;
    margin: 0;
}

.model-tag {
    font-size: 0.75rem;
    opacity: 0.8;
    font-weight: 300;
}

.chatbox {
    height: 400px;
    overflow-y: auto;
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.chat {
    display: flex;
    list-style: none;
}

.chat .message {
    padding: 12px 16px;
    border-radius: 10px;
    max-width: 80%;
    font-size: 0.95rem;
    line-height: 1.4;
}

.chat.incoming .message {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border-bottom-left-radius: 0;
}

.chat.outgoing {
    justify-content: flex-end;
}

.chat.outgoing .message {
    background: #04af04;
    color: #fff;
    border-bottom-right-radius: 0;
}

.chat-input {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 10px 15px;
    display: flex;
    gap: 10px;
    background: rgba(10, 10, 10, 0.5);
}

.chat-input textarea {
    width: 100%;
    border: none;
    outline: none;
    resize: none;
    background: transparent;
    color: #fff;
    font-size: 0.95rem;
    padding: 10px 0;
    font-family: inherit;
}

.chat-input span {
    align-self: flex-end;
    color: #04af04;
    cursor: pointer;
    font-size: 1.5rem;
    padding: 5px;
    transition: transform 0.2s;
}

.chat-input span:hover {
    transform: scale(1.1);
}

/* Scrollbar Styling */
.chatbox::-webkit-scrollbar {
    width: 5px;
}

.chatbox::-webkit-scrollbar-track {
    background: transparent;
}

.chatbox::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}