/* Chatbot Root Container (Buttons) */
#chatbot-widget {
    position: fixed;
    bottom: 80px;
    right: 24px;
    z-index: 9999;
    font-family: 'Outfit', sans-serif;
    display: flex;
    align-items: center;
    gap: 15px;
}

/* WhatsApp Direct Button */
#whatsapp-direct {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #25D366;
    box-shadow: 0 8px 20px rgba(37, 211, 102, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    color: white;
    text-decoration: none;
}

#whatsapp-direct:hover {
    transform: scale(1.1);
    background: #128C7E;
}

/* Chat Toggle Button */
#chatbot-toggle {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #3b82f6; /* Solid Blue */
    box-shadow: 0 10px 25px rgba(59, 130, 246, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    color: white;
    position: relative;
}

#chatbot-toggle:hover {
    transform: scale(1.05);
}

/* Notification Badge with Pulse */
#chatbot-notification {
    position: absolute;
    top: -2px;
    right: -2px;
    width: 18px;
    height: 18px;
    background: #ef4444;
    color: white;
    border-radius: 50%;
    font-size: 10px;
    font-weight: 900;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    opacity: 0;
    transform: scale(0);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 5;
}


#chatbot-notification.active {
    opacity: 1;
    transform: scale(1);
}

#chatbot-notification.active::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: #ef4444;
    border-radius: 50%;
    z-index: -1;
    animation: badge-pulse 1.5s infinite;
}

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

/* Header */
#chatbot-window {
    position: fixed;
    bottom: 145px;
    right: 24px;
    width: 380px;
    height: 600px;
    max-height: calc(100vh - 170px);
    background: #ffffff;
    border-radius: 24px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: translateY(20px);
    opacity: 0;
    pointer-events: none;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(226, 232, 240, 0.8);
    z-index: 10000;
}

#chatbot-window.active {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
}

/* Header */
.chatbot-header {
    padding: 20px;
    background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

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

.chatbot-logo {
    width: 35px;
    height: 35px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    padding: 5px;
}

.chatbot-title h4 {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
}

.chatbot-title span {
    font-size: 12px;
    opacity: 0.8;
}

/* Body / Messages */
.chatbot-body {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    background: #f8fafc;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.message {
    max-width: 80%;
    padding: 12px 16px;
    border-radius: 15px;
    font-size: 14px;
    line-height: 1.5;
    animation: fadeIn 0.3s ease-out;
}

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

.message.bot {
    align-self: flex-start;
    background: white;
    color: #334155;
    border-bottom-left-radius: 2px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.message.user {
    align-self: flex-end;
    background: #3b82f6;
    color: white;
    border-bottom-right-radius: 2px;
}

.timestamp {
    font-size: 10px;
    opacity: 0.6;
    margin-top: 5px;
    display: block;
}

/* Options/Buttons */
.options-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}

.option-btn {
    padding: 8px 16px;
    background: #eff6ff;
    border: 1px solid #dbeafe;
    color: #2563eb;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.option-btn:hover {
    background: #3b82f6;
    color: white;
}

/* Typing Indicator */
.typing {
    display: flex;
    gap: 4px;
    padding: 12px 16px;
}

.typing span {
    width: 6px;
    height: 6px;
    background: #94a3b8;
    border-radius: 50%;
    animation: typing 1s infinite ease-in-out;
}

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

@keyframes typing {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

/* Mobile Responsiveness */
@media (max-width: 480px) {
    #chatbot-widget {
        gap: 0;
    }
    #whatsapp-direct {
        display: none;
    }
    #chatbot-window {
        width: calc(100vw - 40px);
        right: 20px;
        bottom: 90px;
        height: 500px;
        max-height: calc(100vh - 110px);
    }
}
