/* File: /assets/css/chatbot.css */

#chatbot-launcher {
    position: fixed;
    right: 24px;
    bottom: 24px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #0057d8;
    color: #ffffff;
    font-size: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
    z-index: 9999;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

#chatbot-launcher:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.3);
    background: #0043a5;
}

.chatbot-container {
    position: fixed;
    right: 24px;
    bottom: 96px;
    width: 340px;
    max-height: 520px;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transform: translateY(12px);
    transition: opacity 0.2s ease, transform 0.2s ease;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.chatbot-container.chatbot-open {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.chatbot-header {
    background: linear-gradient(135deg, #0057d8, #0079ff);
    color: #ffffff;
    padding: 12px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.chatbot-title {
    font-size: 15px;
    font-weight: 600;
}

.chatbot-close {
    border: none;
    background: transparent;
    color: #ffffff;
    cursor: pointer;
    font-size: 16px;
    padding: 4px;
}

.chatbot-body {
    padding: 10px 10px 4px 10px;
    overflow-y: auto;
    flex: 1;
    background: #f4f6fb;
    scroll-behavior: smooth;
}

.chatbot-message {
    padding: 8px 10px;
    margin-bottom: 8px;
    border-radius: 10px;
    font-size: 13px;
    line-height: 1.4;
    max-width: 86%;
    word-wrap: break-word;
}

.chatbot-message-bot {
    background: #ffffff;
    border-bottom-left-radius: 2px;
    align-self: flex-start;
}

.chatbot-message-user {
    background: #0057d8;
    color: #ffffff;
    border-bottom-right-radius: 2px;
    align-self: flex-end;
}

.chatbot-input-area {
    display: flex;
    gap: 6px;
    padding: 8px;
    border-top: 1px solid #e1e4f0;
    background: #ffffff;
}

.chatbot-input {
    flex: 1;
    border-radius: 999px;
    border: 1px solid #c9cfe0;
    padding: 6px 12px;
    font-size: 13px;
    outline: none;
}

.chatbot-input:focus {
    border-color: #0057d8;
    box-shadow: 0 0 0 1px rgba(0, 87, 216, 0.2);
}

.chatbot-send-btn {
    border-radius: 999px;
    border: none;
    padding: 6px 12px;
    font-size: 13px;
    background: #0057d8;
    color: #ffffff;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.1s ease;
}

.chatbot-send-btn:hover {
    background: #0043a5;
}

.chatbot-send-btn:active {
    transform: scale(0.97);
}

.chatbot-message-typing {
    font-style: italic;
    opacity: 0.7;
}

@media (max-width: 480px) {
    #chatbot-launcher {
        right: 16px;
        bottom: 16px;
    }

    .chatbot-container {
        right: 8px;
        left: 8px;
        bottom: 84px;
        width: auto;
        max-height: 70vh;
    }
}

/* File: /assets/css/chatbot.css */
/* (add these rules at the end of the file) */

.chatbot-message p {
    margin: 0 0 4px 0;
}

.chatbot-message p:last-child {
    margin-bottom: 0;
}

.chatbot-message ul,
.chatbot-message ol {
    margin: 4px 0 4px 16px;
    padding-left: 16px;
}

.chatbot-message li {
    margin-bottom: 2px;
}

.chatbot-message code {
    font-family: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: 12px;
    background: rgba(15, 23, 42, 0.04);
    padding: 2px 4px;
    border-radius: 4px;
}

.chatbot-message pre {
    font-family: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: 12px;
    background: #0f172a;
    color: #e5e7eb;
    padding: 8px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 4px 0;
}

.chatbot-message pre code {
    background: transparent;
    padding: 0;
}
