
/* SenMaa Logistics AI Chatbot */

#senmaa-chatbot {
    font-family: Arial, sans-serif;
    font-size: 14px;
    color: #243447;
    line-height: 1.5;
}

#senmaa-chatbot * {
    box-sizing: border-box;
}

/* Floating Chat Button */

#senmaa-chat-toggle {
    position: fixed;
    right: 25px;
    bottom: 25px;
    width: 65px;
    height: 65px;
    border: none;
    border-radius: 50%;
    background: #12365a;
    color: #ffffff;
    font-size: 28px;
    cursor: pointer;
    box-shadow: 0 5px 20px rgba(0,0,0,0.25);
    z-index: 99999;
}

#senmaa-chat-toggle:hover {
    background: #1d527f;
}

/* Chat Window */

#senmaa-chat-window {
    display: none;
    position: fixed;
    right: 25px;
    bottom: 105px;
    width: 370px;
    height: 500px;
    max-height: calc(100vh - 130px);
    background: #ffffff;
    border-radius: 15px;
    box-shadow: 0 8px 35px rgba(0,0,0,0.25);
    overflow: hidden;
    z-index: 99998;
    flex-direction: column;
}

#senmaa-chat-window.open {
    display: flex;
}

/* Chat Header */

#senmaa-chat-header {
    background: #12365a;
    color: #ffffff;
    padding: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}

.senmaa-chat-title {
    font-size: 17px;
    font-weight: bold;
}

.senmaa-chat-status {
    font-size: 12px;
    color: #b6f4cb;
    margin-top: 4px;
}

#senmaa-chat-close {
    background: transparent;
    border: none;
    color: #ffffff;
    font-size: 25px;
    cursor: pointer;
}

/* Chat Messages */

#senmaa-chat-messages {
    flex: 1;
    min-height: 0;
    padding: 15px;
    overflow-y: auto;
    background: #f1f5f9;
}

.senmaa-message {
    padding: 12px;
    margin-bottom: 12px;
    border-radius: 12px;
    max-width: 90%;
    font-size: 14px;
    line-height: 1.6;
    white-space: pre-wrap;
    overflow-wrap: break-word;
}

.senmaa-bot-message {
    background: #ffffff;
    color: #243447;
    border: 1px solid #e2e8f0;
    margin-right: auto;
}

.senmaa-user-message {
    background: #12365a;
    color: #ffffff;
    margin-left: auto;
}

/* Quick Question Buttons */

#senmaa-quick-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 10px;
    background: #ffffff;
}

.senmaa-quick-btn {
    border: 1px solid #12365a;
    background: #ffffff;
    color: #12365a;
    border-radius: 20px;
    padding: 6px 12px;
    font-size: 12px;
    cursor: pointer;
}

.senmaa-quick-btn:hover {
    background: #12365a;
    color: #ffffff;
}

/* Input Area */

#senmaa-chat-input-area {
    display: flex;
    gap: 8px;
    padding: 12px;
    background: #ffffff;
    border-top: 1px solid #e2e8f0;
}

#senmaa-chat-input {
    flex: 1;
    min-width: 0;
    padding: 10px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 14px;
    color: #243447;
    background: #ffffff;
    outline: none;
}

#senmaa-chat-input:focus {
    border-color: #12365a;
}

#senmaa-chat-send {
    background: #12365a;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    padding: 10px 15px;
    cursor: pointer;
    font-size: 14px;
}

#senmaa-chat-send:hover {
    background: #1d527f;
}

#senmaa-chat-send:disabled,
.senmaa-quick-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

#senmaa-chatbot button:focus-visible {
    outline: 2px solid #2980b9;
    outline-offset: 3px;
}

/* Footer */

#senmaa-chat-footer {
    text-align: center;
    padding: 8px;
    font-size: 11px;
    color: #64748b;
    background: #ffffff;
}

/* Mobile Responsive Design */

@media screen and (max-width: 480px) {

    #senmaa-chat-window {
        width: calc(100% - 20px);
        right: 10px;
        bottom: 85px;
        height: 480px;
        max-height: calc(100vh - 100px);
    }

    #senmaa-chat-toggle {
        right: 15px;
        bottom: 15px;
        width: 55px;
        height: 55px;
        font-size: 24px;
    }

    #senmaa-chat-input {
        font-size: 16px;
    }
}
