/* Chatbot Widget Styles */
:root {
    --chatbot-primary: #0860f8;
    --chatbot-bg: rgba(255, 255, 255, 0.95);
    --chatbot-text: #333;
    --chatbot-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
}

#kb-chatbot-widget {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 9999;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

.chatbot-toggle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--chatbot-primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 5px 20px rgba(8, 96, 248, 0.4);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: none;
    font-size: 24px;
}

.chatbot-toggle:hover {
    transform: scale(1.1);
}

.chatbot-container {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 380px;
    height: 600px;
    background: var(--chatbot-bg);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    box-shadow: var(--chatbot-shadow);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: translateY(20px);
    opacity: 0;
    pointer-events: none;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.chatbot-container.active {
    transform: translateY(0);
    opacity: 1;
    pointer-events: all;
}

.chatbot-header {
    background: var(--chatbot-primary);
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chatbot-header h4 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: white;
}

.chatbot-close {
    background: none;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    opacity: 0.8;
}

.chatbot-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.chat-msg {
    max-width: 85%;
    padding: 12px 16px;
    border-radius: 15px;
    font-size: 14px;
    line-height: 1.5;
}

.chat-msg.bot {
    background: #f0f2f5;
    color: var(--chatbot-text);
    align-self: flex-start;
    border-bottom-left-radius: 2px;
}

.chat-msg.user {
    background: var(--chatbot-primary);
    color: white;
    align-self: flex-end;
    border-bottom-right-radius: 2px;
}

.chatbot-input-area {
    padding: 20px;
    border-top: 1px solid #eee;
    display: flex;
    gap: 10px;
}

.chatbot-input {
    flex: 1;
    border: 1px solid #ddd;
    border-radius: 25px;
    padding: 10px 20px;
    outline: none;
    font-size: 14px;
    transition: border-color 0.3s;
}

.chatbot-input:focus {
    border-color: var(--chatbot-primary);
}

.chatbot-send {
    background: var(--chatbot-primary);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.search-result-card {
    background: white;
    border: 1px solid #eee;
    border-radius: 12px;
    padding: 12px;
    margin-top: 8px;
    transition: all 0.2s;
    text-decoration: none;
    color: inherit;
    display: block;
}

.search-result-card:hover {
    border-color: var(--chatbot-primary);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.result-badge {
    font-size: 10px;
    text-transform: uppercase;
    font-weight: bold;
    color: var(--chatbot-primary);
    margin-bottom: 4px;
}

.result-title {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 4px;
    display: block;
}

.result-desc {
    font-size: 12px;
    color: #666;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.category-suggestions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.cat-suggestion {
    font-size: 12px;
    background: white;
    border: 1px solid var(--chatbot-primary);
    color: var(--chatbot-primary);
    padding: 6px 12px;
    border-radius: 15px;
    text-decoration: none;
    transition: all 0.2s;
}

.cat-suggestion:hover {
    background: var(--chatbot-primary);
    color: white;
}

@media (max-width: 480px) {
    .chatbot-container {
        width: calc(100vw - 40px);
        height: min(500px, 80vh);
        right: -10px;
    }
}