#wp-chatbot-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 999999;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}
#wp-chatbot-toggle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    background-color: var(--wp-chatbot-theme-color, #0073aa);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
#wp-chatbot-toggle:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}
#wp-chatbot-toggle svg {
    width: 28px;
    height: 28px;
}
#wp-chatbot-window {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 360px;
    height: 500px;
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 5px 25px rgba(0,0,0,0.15);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid #f0f0f0;
}
@media (max-width: 400px) {
    #wp-chatbot-window {
        width: calc(100vw - 40px);
        height: calc(100vh - 120px);
    }
}
#wp-chatbot-header {
    padding: 15px;
    color: white;
    font-size: 16px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: var(--wp-chatbot-theme-color, #0073aa);
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}
.wp-chatbot-header-title {
    display: flex;
    align-items: center;
    gap: 8px;
}
.wp-chatbot-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #2ecc71;
    display: inline-block;
}
#wp-chatbot-messages {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
    background-color: #f9f9fb;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.wp-chatbot-msg {
    max-width: 80%;
    display: flex;
    flex-direction: column;
}
.wp-chatbot-msg.bot {
    align-self: flex-start;
}
.wp-chatbot-msg.user {
    align-self: flex-end;
}
.wp-chatbot-msg-content {
    padding: 10px 14px;
    border-radius: 14px;
    font-size: 14px;
    line-height: 1.4;
    word-wrap: break-word;
}
.wp-chatbot-msg.bot .wp-chatbot-msg-content {
    background-color: white;
    color: #333;
    border-bottom-left-radius: 4px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
    border: 1px solid #eee;
}
.wp-chatbot-msg.user .wp-chatbot-msg-content {
    background-color: var(--wp-chatbot-theme-color, #0073aa);
    color: white;
    border-bottom-right-radius: 4px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}
#wp-chatbot-input-container {
    display: flex;
    padding: 10px;
    border-top: 1px solid #eee;
    background-color: white;
    gap: 8px;
}
#wp-chatbot-input {
    flex: 1;
    border: 1px solid #ddd;
    border-radius: 20px;
    padding: 10px 15px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
}
#wp-chatbot-input:focus {
    border-color: var(--wp-chatbot-theme-color, #0073aa);
}
#wp-chatbot-send {
    border: none;
    color: white;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    background-color: var(--wp-chatbot-theme-color, #0073aa);
    transition: opacity 0.2s;
}
#wp-chatbot-send:hover {
    opacity: 0.9;
}
#wp-chatbot-send svg {
    width: 16px;
    height: 16px;
}
.wp-chatbot-typing-indicator {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 10px 14px;
    background: white;
    border-radius: 14px;
    border-bottom-left-radius: 4px;
    border: 1px solid #eee;
    align-self: flex-start;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}
.wp-chatbot-typing-indicator span {
    width: 6px;
    height: 6px;
    background-color: #aaa;
    border-radius: 50%;
    display: inline-block;
    animation: wpChatbotBlink 1.4s infinite both;
}
.wp-chatbot-typing-indicator span:nth-child(2) { animation-delay: .2s; }
.wp-chatbot-typing-indicator span:nth-child(3) { animation-delay: .4s; }
@keyframes wpChatbotBlink {
    0% { opacity: .2; }
    20% { opacity: 1; }
    100% { opacity: .2; }
}

/* --- Markdown-rendered content styles --- */
.wp-chatbot-msg-content p {
    margin: 0 0 6px 0;
}
.wp-chatbot-msg-content p:last-child {
    margin-bottom: 0;
}
.wp-chatbot-msg-content ul,
.wp-chatbot-msg-content ol {
    margin: 4px 0;
    padding-left: 20px;
}
.wp-chatbot-msg-content li {
    margin-bottom: 3px;
}
.wp-chatbot-msg-content code {
    background: rgba(0,0,0,0.06);
    padding: 2px 5px;
    border-radius: 3px;
    font-size: 13px;
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
}
.wp-chatbot-msg-content pre {
    background: rgba(0,0,0,0.06);
    border-radius: 6px;
    padding: 10px;
    overflow-x: auto;
    margin: 6px 0;
}
.wp-chatbot-msg-content pre code {
    background: none;
    padding: 0;
    border-radius: 0;
    font-size: 13px;
}
.wp-chatbot-msg-content a {
    color: var(--wp-chatbot-theme-color, #0073aa);
    text-decoration: underline;
}
.wp-chatbot-msg.user .wp-chatbot-msg-content a {
    color: rgba(255,255,255,0.9);
    text-decoration: underline;
}
.wp-chatbot-msg-content h1,
.wp-chatbot-msg-content h2,
.wp-chatbot-msg-content h3,
.wp-chatbot-msg-content h4,
.wp-chatbot-msg-content h5,
.wp-chatbot-msg-content h6 {
    margin: 8px 0 4px 0;
    font-size: inherit;
    font-weight: 600;
}

/* --- Quick-chip hover styles --- */
.wp-chatbot-chip:hover {
    background: var(--wp-chatbot-theme-color, #0073aa) !important;
    color: white !important;
}

/* --- Department chip styles --- */
.wp-chatbot-dept-chips {
    display: flex;
    gap: 8px;
    margin-top: 8px;
    flex-wrap: wrap;
    padding: 0 15px;
}
.wp-chatbot-dept-chip {
    background: white;
    border: 1px solid var(--wp-chatbot-theme-color, #0073aa);
    color: var(--wp-chatbot-theme-color, #0073aa);
    padding: 6px 12px;
    border-radius: 16px;
    font-size: 12px;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}
.wp-chatbot-dept-chip:hover {
    background: var(--wp-chatbot-theme-color, #0073aa) !important;
    color: white !important;
}
