/* chatbot.css - PINK-PURPLE MESSENGER CHATBOT UI */

#chatbot-container, #chatbot-container * {
    box-sizing: border-box !important;
}

#chatbot-container {
    position: fixed !important;
    bottom: 30px !important;
    right: 30px !important;
    z-index: 10000 !important;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-end !important;
    gap: 15px !important;
}

/* --- Floating Contact Icons --- */
#floating-contact-wrap {
    display: flex !important;
    flex-direction: column !important;
    gap: 15px !important;
}

.contact-icon {
    width: 55px !important;
    height: 55px !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: white !important;
    font-size: 1.6rem !important;
    cursor: pointer !important;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1) !important;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
    text-decoration: none !important;
}

.contact-icon:hover {
    transform: scale(1.1) rotate(5deg) !important;
    box-shadow: 0 8px 25px rgba(0,0,0,0.2) !important;
}

.fb-icon { background: #1877F2 !important; }
.zalo-icon { background: #0068ff !important; }

.bot-icon { 
    background: linear-gradient(135deg, #FF0080 0%, #7928CA 100%) !important;
    box-shadow: 0 4px 15px rgba(255, 0, 128, 0.3) !important;
}

/* --- Chat Window --- */
#chatbot-window {
    position: absolute !important;
    bottom: 0 !important;
    right: 70px !important; /* Positioned to the LEFT of the icon stack */
    width: 360px !important;
    height: 520px !important;
    background: #FFFFFF !important;
    border-radius: 20px !important;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.12), 0 2px 4px rgba(0, 0, 0, 0.05) !important;
    display: none;
    flex-direction: column !important;
    overflow: hidden !important;
    border: 1px solid rgba(0, 0, 0, 0.08) !important;
    animation: messengerFadeIn 0.3s ease !important;
}

@keyframes messengerFadeIn {
    from { opacity: 0; transform: translateY(15px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- Header --- */
#chatbot-header {
    padding: 16px 20px !important;
    background: white !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
}

.bot-info-wrapper {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
}

.bot-avatar-active {
    width: 42px !important;
    height: 42px !important;
    background: #f3f4f6 !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: #7928CA !important;
    font-size: 1.5rem !important;
    position: relative !important;
}

.status-dot-active {
    width: 12px !important;
    height: 12px !important;
    background: #31A24C !important;
    border: 2px solid white !important;
    border-radius: 50% !important;
    position: absolute !important;
    bottom: 1px !important;
    right: 1px !important;
}

.bot-name-status h4 {
    margin: 0 !important;
    font-size: 1rem !important;
    font-weight: 700 !important;
    color: #1c1e21 !important;
}

#close-chat {
    color: #7928CA !important;
    font-size: 1.3rem !important;
    cursor: pointer !important;
    padding: 4px !important;
    transition: transform 0.2s ease !important;
}

/* --- Content Messages --- */
#chatbot-messages {
    flex: 1 !important;
    padding: 20px !important;
    overflow-y: auto !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 14px !important;
    background: #FFFFFF !important;
}

#chatbot-messages .message {
    display: flex !important;
    width: 100% !important;
    align-items: flex-end !important;
}

#chatbot-messages .bot-message { justify-content: flex-start !important; }
#chatbot-messages .user-message { justify-content: flex-end !important; }

#chatbot-messages .msg-wrapper {
    display: flex !important;
    flex-direction: column !important;
    max-width: 75% !important;
}

#chatbot-messages .sender-name {
    font-size: 0.72rem !important;
    font-weight: 700 !important;
    color: #bcc0c4 !important;
    margin-bottom: 4px !important;
}

#chatbot-messages .bot-avatar-small {
    width: 30px !important;
    height: 30px !important;
    background: #f0f2f5 !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: #1c1e21 !important;
    margin-right: 8px !important;
}

#chatbot-messages .bubble {
    padding: 10px 16px !important;
    font-size: 0.95rem !important;
    line-height: 1.4 !important;
}

#chatbot-messages .bot-message .bubble {
    background: #f1f1f1 !important;
    border: 1px solid #e2e4e7 !important;
    color: #1c1e21 !important;
    border-radius: 18px 18px 18px 4px !important;
}

#chatbot-messages .user-message .bubble {
    background: linear-gradient(135deg, #FF0080 0%, #7928CA 100%) !important;
    color: white !important;
    border-radius: 18px 18px 4px 18px !important;
}

/* --- Typing Indicator --- */
.typing-dots span {
    width: 6px !important; height: 6px !important;
    background: #90949a !important;
    border-radius: 50% !important;
    display: inline-block;
    animation: messengerDot 1.3s infinite ease-in-out both !important;
}

@keyframes messengerDot {
    0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
    40% { transform: scale(1); opacity: 1; }
}

/* --- Input Area --- */
#chatbot-input-area {
    padding: 16px 20px !important;
    background: white !important;
    border-top: 1px solid rgba(0, 0, 0, 0.08) !important;
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
}

#chatbot-input {
    flex: 1 !important;
    background: #f0f2f5 !important;
    border: none !important;
    padding: 10px 15px !important;
    border-radius: 22px !important;
    font-size: 0.95rem !important;
    outline: none !important;
}

#chatbot-send {
    background: none !important;
    border: none !important;
    color: #FF0080 !important;
    font-size: 1.4rem !important;
    cursor: pointer !important;
}
