/* Chatbot FIT - Integrado en FAB */
#fit-chatbot-container {
    width: 100%;
    display: flex;
    justify-content: center;
    position: relative;
}

#fit-chatbot-bubble {
    width: 48px;
    height: 48px;
    background: #611232;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(97, 18, 50, 0.3);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid #a57f2c;
    overflow: hidden;
}

#fit-chatbot-bubble img {
    width: 70%;
    height: 70%;
    object-fit: contain;
}

#fit-chatbot-bubble:hover {
    transform: scale(1.1);
    background: #7a173e;
    box-shadow: 0 8px 20px rgba(97, 18, 50, 0.4);
}

#chatbot-suggestion {
    position: absolute;
    right: 60px;
    top: 50%;
    transform: translateY(-50%);
    background: #ffffff;
    padding: 8px 15px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 800;
    color: #611232;
    white-space: nowrap;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    border: 1px solid #a57f2c;
    opacity: 0;
    pointer-events: none;
    transition: all 0.5s ease;
}

#chatbot-suggestion.show {
    opacity: 1;
    right: 55px;
}

#chatbot-suggestion::after {
    content: '';
    position: absolute;
    right: -6px;
    top: 50%;
    transform: translateY(-50%) rotate(45deg);
    width: 10px;
    height: 10px;
    background: white;
    border-right: 1px solid #a57f2c;
    border-top: 1px solid #a57f2c;
}

@keyframes pulse-suggestion {
    0%, 100% { transform: translateY(-50%) scale(1); }
    50% { transform: translateY(-50%) scale(1.05); }
}

.suggestion-active {
    animation: pulse-suggestion 2s infinite ease-in-out;
}

#fit-chatbot-window {
    position: absolute;
    bottom: 85px;
    right: 0;
    width: 380px;
    height: 550px;
    background: #ffffff;
    border-radius: 28px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
    display: none;
    flex-direction: column;
    overflow: hidden;
    transform-origin: bottom right;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid rgba(0,0,0,0.05);
}

#fit-chatbot-window.active {
    display: flex;
    animation: slideUp 0.4s ease forwards;
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(30px) scale(0.8); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

#fit-chatbot-header {
    background: #611232;
    padding: 25px;
    color: white;
    display: flex;
    align-items: center;
    gap: 15px;
    position: relative;
    border-bottom: 2px solid #a57f2c;
}

.chatbot-avatar {
    width: 45px;
    height: 45px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 5px;
    border: 2px solid #a57f2c;
}

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

#fit-chatbot-body {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    background: #ffffff;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.chat-msg {
    max-width: 80%;
    padding: 12px 18px;
    border-radius: 18px;
    font-size: 14px;
    line-height: 1.5;
    position: relative;
    animation: fadeIn 0.3s ease;
}

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

.chat-msg.bot {
    background: #ffffff;
    color: #334155;
    align-self: flex-start;
    border-bottom-left-radius: 4px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.02);
    border: 1px solid #e2e8f0;
}

.chat-msg.user {
    background: #2563eb;
    color: white;
    align-self: flex-end;
    border-bottom-right-radius: 4px;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
}

#fit-chatbot-input-container {
    padding: 20px;
    background: white;
    border-top: 1px solid #f1f5f9;
    display: flex;
    gap: 10px;
}

#fit-chatbot-input {
    flex: 1;
    border: 1px solid #e2e8f0;
    padding: 12px 18px;
    border-radius: 14px;
    outline: none;
    font-size: 14px;
    transition: all 0.3s;
}

#fit-chatbot-input:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}

#fit-chatbot-send {
    background: #2563eb;
    color: white;
    border: none;
    width: 45px;
    height: 45px;
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

#fit-chatbot-send:hover {
    background: #1e40af;
    transform: scale(1.05);
}

/* Scrollbar Style */
#fit-chatbot-body::-webkit-scrollbar {
    width: 6px;
}
#fit-chatbot-body::-webkit-scrollbar-thumb {
    background: #e2e8f0;
    border-radius: 10px;
}

/* Typing Indicator */
.chat-msg.typing {
    display: flex;
    gap: 4px;
    padding: 12px 20px;
    width: fit-content;
}

.chat-msg.typing .dot {
    width: 6px;
    height: 6px;
    background: #611232;
    border-radius: 50%;
    opacity: 0.4;
    animation: typingAnimation 1.4s infinite ease-in-out;
}

.chat-msg.typing .dot:nth-child(2) { animation-delay: 0.2s; }
.chat-msg.typing .dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes typingAnimation {
    0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
    30% { transform: translateY(-4px); opacity: 1; }
}

/* Fix mobile height */
@media (max-width: 640px) {
    #fit-chatbot-window {
        width: calc(100vw - 40px);
        height: 60vh;
        max-width: 380px;
        right: -10px;
        bottom: 75px;
    }
}

