.chatbot-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
    font-family: 'Inter', sans-serif;
}

.chatbot-toggle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--bs-primary), #0056b3);
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(0, 123, 255, 0.3);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.chatbot-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 25px rgba(0, 123, 255, 0.4);
}

.chatbot-toggle::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: all 0.6s ease;
}

.chatbot-toggle:hover::before {
    width: 100%;
    height: 100%;
}

.chatbot-window {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 350px;
    height: 500px;
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    transform: scale(0) translateY(20px);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.chatbot-window.active {
    transform: scale(1) translateY(0);
    opacity: 1;
}

.chatbot-header {
    background: linear-gradient(135deg, var(--bs-primary), #0056b3);
    color: white;
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.chatbot-header h5 {
    margin: 0;
    font-weight: 600;
}

.chatbot-close {
    background: none;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
}

.chatbot-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.chatbot-messages {
    height: 350px;
    overflow-y: auto;
    padding: 20px;
    background: #f8f9fa;
}

.chatbot-message {
    margin-bottom: 15px;
    animation: messageSlide 0.3s ease;
}

@keyframes messageSlide {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.message-bot {
    display: flex;
    align-items: flex-start;
}

.message-user {
    display: flex;
    justify-content: flex-end;
}

.message-avatar {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background: var(--bs-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 14px;
    margin-right: 10px;
    flex-shrink: 0;
}

.message-content {
    background: white;
    padding: 12px 16px;
    border-radius: 18px;
    max-width: 80%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    position: relative;
}

.message-user .message-content {
    background: var(--bs-primary);
    color: white;
    margin-left: auto;
}

.message-time {
    font-size: 11px;
    color: #6c757d;
    margin-top: 5px;
    text-align: right;
}

.chatbot-input {
    
    padding: 7px;
    background: white;
    border-top: 1px solid #e9ecef;
}

.input-group {
    display: flex;
    gap: 10px;
}

.chatbot-input input {
    flex: 1;
    border: 1px solid #e9ecef;
    border-radius: 25px;
    padding: 12px 20px;
    outline: none;
    font-size: 14px;
    transition: border-color 0.2s ease;
}

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

.send-button {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: var(--bs-primary);
    border: none;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.send-button:hover {
    background: #0056b3;
    transform: scale(1.05);
}

.send-button:disabled {
    background: #6c757d;
    cursor: not-allowed;
    transform: none;
}

.typing-indicator {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    background: white;
    border-radius: 18px;
    margin-left: 45px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.typing-dots {
    display: flex;
    gap: 4px;
}

.typing-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #6c757d;
    animation: typingBounce 1.4s infinite ease-in-out;
}

.typing-dot:nth-child(1) { animation-delay: -0.32s; }
.typing-dot:nth-child(2) { animation-delay: -0.16s; }

@keyframes typingBounce {
    0%, 80%, 100% {
        transform: scale(0.8);
        opacity: 0.5;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .chatbot-window {
        width: 300px;
        height: 450px;
        right: -10px;
    }
    
    .chatbot-container {
        bottom: 15px;
        right: 15px;
    }
}

/* Tema oscuro */
[data-bs-theme="dark"] .chatbot-window {
    background: #212529;
    border-color: #495057;
}

[data-bs-theme="dark"] .chatbot-messages {
    background: #343a40;
}

[data-bs-theme="dark"] .message-content {
    background: #495057;
    color: white;
}

[data-bs-theme="dark"] .chatbot-input {
    background: #212529;
    border-color: #495057;
}

[data-bs-theme="dark"] .chatbot-input input {
    background: #343a40;
    border-color: #495057;
    color: white;
}

[data-bs-theme="dark"] .chatbot-input input::placeholder {
    color: #adb5bd;
}