/* ============================================ */
/* CHATBOT INTELIGENTE                          */
/* ============================================ */

.chatbot-toggle {
    position: fixed;
    bottom: 90px;
    right: 20px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #25D366, #128C7E);
    border: none;
    color: white;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
    z-index: 999;
}

.chatbot-toggle i {
    font-size: 28px;
}

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

.chatbot-notification {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ff4444;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chatbot-container {
    position: fixed;
    bottom: 100px;
    right: 20px;
    width: 380px;
    height: 550px;
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: scale(0);
    transform-origin: bottom right;
    transition: transform 0.3s ease;
    z-index: 1000;
}

.chatbot-container.open {
    transform: scale(1);
}

.chatbot-header {
    background: linear-gradient(135deg, #8B4513, #5C2E0B);
    color: white;
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chatbot-header-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.chatbot-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    background: #fff;
}

.chatbot-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.chatbot-header-text h4 {
    margin: 0;
    font-size: 16px;
}

.chatbot-header-text p {
    margin: 0;
    font-size: 11px;
    opacity: 0.8;
}

.online-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #4CAF50;
    margin-right: 5px;
    animation: pulse 1.5s infinite;
}

.chatbot-actions button {
    background: transparent;
    border: none;
    color: white;
    cursor: pointer;
    margin-left: 10px;
    font-size: 14px;
}

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

.chatbot-message {
    display: flex;
    flex-direction: column;
    max-width: 85%;
}

.chatbot-message.user {
    align-self: flex-end;
}

.chatbot-message.bot {
    align-self: flex-start;
}

.message-bubble {
    padding: 10px 14px;
    border-radius: 18px;
    font-size: 14px;
    line-height: 1.4;
}

.chatbot-message.user .message-bubble {
    background: #8B4513;
    color: white;
    border-bottom-right-radius: 4px;
}

.chatbot-message.bot .message-bubble {
    background: white;
    color: #333;
    border-bottom-left-radius: 4px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.message-time {
    font-size: 10px;
    color: #999;
    margin-top: 4px;
    margin-left: 8px;
}

.chatbot-input-area {
    padding: 12px;
    border-top: 1px solid #eee;
    background: white;
}

.quick-replies {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.quick-reply {
    background: #f0f0f0;
    border: none;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.quick-reply:hover {
    background: #8B4513;
    color: white;
}

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

.input-wrapper input {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 25px;
    outline: none;
    font-size: 14px;
}

.input-wrapper input:focus {
    border-color: #8B4513;
}

.send-btn {
    background: #8B4513;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    transition: all 0.2s ease;
}

.send-btn:hover {
    background: #5C2E0B;
}

.typing-indicator .message-bubble {
    background: white;
    padding: 12px 18px;
}

.typing-indicator span {
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #999;
    margin: 0 2px;
    animation: typing 1.4s infinite;
}

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

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

@keyframes typing {
    0%, 60%, 100% { transform: translateY(0); }
    30% { transform: translateY(-8px); }
}

@keyframes pulse {
    0% { opacity: 1; transform: scale(1); }
    100% { opacity: 0; transform: scale(1.5); }
}

@media (max-width: 480px) {
    .chatbot-container {
        width: calc(100% - 40px);
        right: 20px;
        left: 20px;
        height: 500px;
    }
}