.chatbot-widget {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9999;
    font-family: var(--font-body, 'Inter', sans-serif);
}

.chatbot-toggle {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--color-primary, #7F56D9);
    color: #fff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(127, 86, 217, 0.3);
    transition: transform 0.2s, box-shadow 0.2s;
}

.chatbot-toggle:hover {
    transform: scale(1.08);
    box-shadow: 0 6px 24px rgba(127, 86, 217, 0.4);
}

.chatbot-toggle.active {
    display: none;
}

.chatbot-panel {
    display: none;
    position: absolute;
    bottom: 72px;
    right: 0;
    width: 380px;
    max-height: 520px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 8px 40px rgba(16, 24, 40, 0.16);
    flex-direction: column;
    overflow: hidden;
}

.chatbot-panel.open {
    display: flex;
}

.chatbot-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: var(--color-primary, #7F56D9);
    color: #fff;
}

.chatbot-header-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.chatbot-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
}

.chatbot-header-title {
    font-size: 15px;
    font-weight: 600;
}

.chatbot-header-status {
    font-size: 11px;
    opacity: 0.8;
}

.chatbot-close {
    background: none;
    border: none;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    padding: 0 4px;
    line-height: 1;
    opacity: 0.8;
    transition: opacity 0.15s;
}

.chatbot-close:hover {
    opacity: 1;
}

.chatbot-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-height: 280px;
    max-height: 340px;
}

.chatbot-msg {
    max-width: 85%;
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 13px;
    line-height: 1.5;
    word-wrap: break-word;
}

.chatbot-msg.bot {
    align-self: flex-start;
    background: #F2F4F7;
    color: #344054;
    border-bottom-left-radius: 4px;
}

.chatbot-msg.user {
    align-self: flex-end;
    background: var(--color-primary, #7F56D9);
    color: #fff;
    border-bottom-right-radius: 4px;
}

.chatbot-msg.typing {
    align-self: flex-start;
    background: #F2F4F7;
    color: #98A2B3;
    font-style: italic;
}

.chatbot-input-area {
    display: flex;
    gap: 8px;
    padding: 12px 16px;
    border-top: 1px solid #EAECF0;
    background: #FCFCFD;
}

.chatbot-input {
    flex: 1;
    border: 1px solid #D0D5DD;
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 13px;
    outline: none;
    transition: border-color 0.15s;
}

.chatbot-input:focus {
    border-color: var(--color-primary, #7F56D9);
    box-shadow: 0 0 0 3px rgba(127, 86, 217, 0.1);
}

.chatbot-send {
    width: 38px;
    height: 38px;
    border-radius: 8px;
    background: var(--color-primary, #7F56D9);
    color: #fff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
    flex-shrink: 0;
}

.chatbot-send:hover {
    background: var(--color-primary-dark, #6941C6);
}

.chatbot-send:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Mobile */
@media (max-width: 480px) {
    .chatbot-widget {
        bottom: 16px;
        right: 16px;
    }

    .chatbot-panel {
        width: calc(100vw - 32px);
        right: 0;
        bottom: 68px;
        max-height: 70vh;
    }

    .chatbot-toggle {
        width: 48px;
        height: 48px;
    }
}
