#vx-chatbot-widget {
    position: fixed;
    z-index: 999999;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

#vx-chatbot-widget.vx-chatbot-bottom-right {
    bottom: 24px;
    right: 24px;
}

#vx-chatbot-widget.vx-chatbot-bottom-left {
    bottom: 24px;
    left: 24px;
}

.vx-chatbot-toggle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.vx-chatbot-toggle:hover {
    transform: scale(1.08);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

.vx-chatbot-toggle .vx-chatbot-icon-close {
    display: none;
}

#vx-chatbot-widget.vx-chatbot-open .vx-chatbot-toggle .vx-chatbot-icon-open {
    display: none;
}

#vx-chatbot-widget.vx-chatbot-open .vx-chatbot-toggle .vx-chatbot-icon-close {
    display: block;
}

.vx-chatbot-panel {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 380px;
    max-width: calc(100vw - 48px);
    height: 520px;
    max-height: calc(100vh - 120px);
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    display: none;
    flex-direction: column;
    overflow: hidden;
}

.vx-chatbot-bottom-left .vx-chatbot-panel {
    right: auto;
    left: 0;
}

#vx-chatbot-widget.vx-chatbot-open .vx-chatbot-panel {
    display: flex;
}

.vx-chatbot-header {
    background: var(--vx-primary, #6366f1);
    color: #fff;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.vx-chatbot-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
}

.vx-chatbot-header-info {
    display: flex;
    flex-direction: column;
}

.vx-chatbot-name {
    font-weight: 600;
    font-size: 15px;
}

.vx-chatbot-status {
    font-size: 12px;
    opacity: 0.85;
}

.vx-chatbot-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: #f8f9fb;
}

.vx-chatbot-message {
    max-width: 80%;
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 14px;
    line-height: 1.5;
    word-wrap: break-word;
}

.vx-chatbot-message-user {
    align-self: flex-end;
    background: var(--vx-primary, #6366f1);
    color: #fff;
    border-bottom-right-radius: 4px;
}

.vx-chatbot-message-bot {
    align-self: flex-start;
    background: #fff;
    color: #1f2937;
    border-bottom-left-radius: 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.vx-chatbot-typing {
    display: none;
    padding: 12px 20px;
    gap: 4px;
    align-items: center;
}

.vx-chatbot-typing.vx-chatbot-typing-active {
    display: flex;
}

.vx-chatbot-typing span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #9ca3af;
    animation: vx-typing-bounce 1.4s infinite ease-in-out;
}

.vx-chatbot-typing span:nth-child(2) {
    animation-delay: 0.2s;
}

.vx-chatbot-typing span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes vx-typing-bounce {
    0%, 80%, 100% { transform: scale(0); }
    40% { transform: scale(1); }
}

.vx-chatbot-form {
    display: flex;
    padding: 12px 16px;
    gap: 8px;
    border-top: 1px solid #e5e7eb;
    background: #fff;
}

.vx-chatbot-input {
    flex: 1;
    border: 1px solid #e5e7eb;
    border-radius: 24px;
    padding: 10px 16px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
}

.vx-chatbot-input:focus {
    border-color: var(--vx-primary, #6366f1);
}

.vx-chatbot-send {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: none;
    background: var(--vx-primary, #6366f1);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s;
}

.vx-chatbot-send:hover {
    transform: scale(1.05);
}

.vx-chatbot-inline {
    position: relative;
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
}

.vx-chatbot-inline .vx-chatbot-panel {
    position: relative;
    bottom: auto;
    right: auto;
    left: auto;
    width: 100%;
    display: flex;
    max-width: 100%;
    height: 500px;
}

@media (max-width: 480px) {
    .vx-chatbot-panel {
        width: calc(100vw - 32px);
        right: -8px;
    }

    .vx-chatbot-bottom-left .vx-chatbot-panel {
        left: -8px;
    }
}
