﻿#chatbot-trigger {
    z-index: 1050;
    bottom: 60px
}

/* --- Slide in/out (from right, fully hidden) --- */


#chatbot-widget {
    position: fixed;
    bottom: 40px; /* adjust to match your design */
    right: 0;
    width: 350px; /* must match your actual widget width */
    transform: translateX(calc(100% + 30px)); /* push extra 20px to hide any shadow/edges */
    transition: transform 0.3s ease;
    max-height: 520px;
    z-index: 1051;
}

    #chatbot-widget.is-open {
        transform: translateX(0);
    }

/* --- Bouncing attention line beside trigger --- */
.chatbot-bounce-line {
    position: absolute;
    left: -10px;
    top: 50%;
    width: 4px;
    height: 26px;
    background: #4CAF50;
    border-radius: 2px;
    transform: translateY(-50%);
    animation: bounceLine 1.1s ease-in-out infinite;
    box-shadow: 0 0 8px rgba(76, 175, 80, 0.55);
}

@keyframes bounceLine {
    0%, 100% {
        transform: translateY(-65%) scaleY(0.6);
        opacity: .5;
    }

    50% {
        transform: translateY(-35%) scaleY(1.7);
        opacity: 1;
    }
}

/* --- Chat bubbles --- */
.bot-message {
    background: #fff;
    color: #333;
    padding: 10px 14px;
    border-radius: 18px 18px 18px 4px;
    max-width: 85%;
    margin-bottom: 10px;
    border: 1px solid #e9ecef;
}

.user-message {
    background: var(--bs-success);
    color: #fff;
    padding: 10px 14px;
    border-radius: 18px 18px 4px 18px;
    max-width: 85%;
    margin-left: auto;
    margin-bottom: 10px;
}

/* --- Timestamp --- */
.message-time {
    font-size: .75rem;
    color: #6c757d;
    margin-top: .25rem;
}

/* --- Typing indicator --- */
.typing-indicator {
    display: inline-flex;
    gap: 4px;
    align-items: center;
    color: #6c757d;
    font-style: italic;
}

.typing-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
    opacity: .4;
    animation: typingBlink 1s infinite;
}

    .typing-dot:nth-child(2) {
        animation-delay: .15s;
    }

    .typing-dot:nth-child(3) {
        animation-delay: .3s;
    }

@keyframes typingBlink {
    0%, 100% {
        opacity: .2;
        transform: translateY(0);
    }

    50% {
        opacity: 1;
        transform: translateY(-2px);
    }
}

@media (max-width: 768px) {
    #chatbot-widget {
        width: 305px; 
    }
    #chatbot-widget.is-open {
        right: -10px;
        transform: translateX(15px);
    }
}