/* Container for the whole widget, positioned fixed */
#ppid-chatbot-widget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

/* Launcher Button */
#ppid-chatbot-launcher {
    background-color: #0073aa;
    color: white;
    border: none;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    cursor: pointer;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s, background-color 0.2s;
}

#ppid-chatbot-launcher:hover {
    background-color: #005177;
    transform: scale(1.05);
}

#ppid-chatbot-launcher svg {
    width: 30px;
    height: 30px;
}

/* Chat Window Container */
#ppid-chatbot-container {
    width: 350px;
    height: 500px;
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    display: flex;
    flex-direction: column;
    position: absolute;
    bottom: 80px; /* Above the button */
    right: 0;
    overflow: hidden;
    animation: ppidFadeIn 0.3s ease-out;
}

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

/* Header */
.ppid-chat-header {
    background-color: #0073aa;
    color: #fff;
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ppid-chat-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

#ppid-chatbot-close {
    background: none;
    border: none;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    line-height: 1;
    padding: 0 5px;
}

#ppid-chatbot-close:hover {
    color: #e0e0e0;
}

/* Messages Area */
#ppid-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
    background-color: #f9f9f9;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ppid-message {
    padding: 10px 14px;
    border-radius: 12px;
    max-width: 85%;
    line-height: 1.4;
    font-size: 14px;
    word-wrap: break-word;
}

.bot-message {
    background-color: #f0f2f5;
    color: #333;
    align-self: flex-start;
    border-bottom-left-radius: 2px;
}

.user-message {
    background-color: #0073aa;
    color: #fff;
    align-self: flex-end;
    border-bottom-right-radius: 2px;
}

/* Input Area */
.ppid-chat-input-area {
    padding: 15px;
    border-top: 1px solid #eee;
    display: flex;
    gap: 10px;
    background-color: #fff;
}

#ppid-chat-input {
    flex: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 20px;
    font-size: 14px;
    outline: none;
}

#ppid-chat-input:focus {
    border-color: #0073aa;
}

#ppid-chat-send {
    padding: 8px 18px;
    background-color: #0073aa;
    color: #fff;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
}

#ppid-chat-send:hover {
    background-color: #005177;
}

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

/* Responsive */
@media (max-width: 480px) {
    #ppid-chatbot-container {
        width: calc(100vw - 40px);
        height: 80vh;
        bottom: 80px;
        right: 0;
    }
}
