.chatbot-wrapper {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    font-family: 'Poppins', sans-serif;
}

.chatbot-toggle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #25d366, #128c7e);
    color: #fff;
    border: none;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(0,0,0,0.25);
    font-size: 1.5rem;
}

.chatbot-box {
    width: 320px;
    max-height: 480px;
    display: none;
    flex-direction: column;
    border-radius: 15px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 18px 40px rgba(0,0,0,0.35);
    border: 1px solid #e6e6e6;
    transform: translateY(20px);
    opacity: 0;
    transition: transform 0.25s ease, opacity 0.25s ease;
}

.chatbot-box.open {
    display: flex;
}

.chatbot-box.active {
    transform: translateY(0);
    opacity: 1;
}

.chatbot-toggle.hidden {
    display: none !important;
}


.chatbot-header {
    background: linear-gradient(135deg, #25d366, #128c7e);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.25);
    box-shadow: inset 0 -2px 6px rgba(0,0,0,0.2);
}

.chatbot-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.chatbot-header small {
    font-size: 11px;
    opacity: 0.9;
}

.chatbot-close {
    background: transparent;
    border: none;
    color: #fff;
    font-size: 16px;
    cursor: pointer;
}

.chatbot-messages {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
    background: #f7f9fc;
    min-height: 220px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.bot-message,
.user-message {
    display: block;
    max-width: 80%;
    margin-bottom: 10px;
    border-radius: 12px;
    padding: 9px 12px;
    line-height: 1.4;
    font-size: 0.9rem;
    word-wrap: break-word;
}

.bot-message {
    align-self: flex-start;
}

.loader-message {
    align-self: flex-start;
    display: inline-flex;
    align-items: center;
    background: #f1f5f9;
    color: #475569;
    border: 1px dashed #94a3b8;
    padding: 8px 10px;
    border-radius: 12px;
    font-style: italic;
}

.loader-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #475569;
    margin-right: 6px;
    animation: blink 1.2s infinite;
}

@keyframes blink {
    0%, 80%, 100% { opacity: 0.25; }
    40% { opacity: 1; }
}

.user-message {
    align-self: flex-end;
}
.bot-message {
    background: #e9f7f0;
    color: #1e3d34;
    text-align: left;
    margin-right: auto;
    box-shadow: 0 2px 6px rgba(0,0,0,0.07);
}

.user-message {
    background: #2596be;
    color: #fff;
    text-align: right;
    margin-left: auto;
    box-shadow: 0 2px 6px rgba(0,0,0,0.12);
}


.chatbot-form {
    display: flex;
    border-top: 1px solid #ddd;
    padding: 8px;
    background: #fff;
}

.chatbot-form input {
    flex: 1;
    border: 1px solid #ccc;
    border-radius: 8px;
    padding: 8px;
    outline: none;
    font-size: 0.9rem;
}

.chatbot-send {
    margin-left: 8px;
    background: #25d366;
    border: none;
    color: #fff;
    border-radius: 8px;
    padding: 8px 12px;
    cursor: pointer;
    min-width: 70px;
}

.chatbot-send:hover {
    background: #1ebe5c;
}

.chatbot-box a {
    color: #128c7e;
    text-decoration: none;
    font-weight: 600;
}

@media (max-width: 768px) {
    .chatbot-wrapper {
        bottom: 15px;
        right: 15px;
    }

    .chatbot-box {
        width: calc(100vw - 40px);
        max-height: calc(100vh - 100px);
        right: 0;
        left: 0;
        bottom: 0;
        margin: 0 auto;
    }
}
