:root.light {
    --primary-color: #8a95ea;
    --secondary-color: #545da4;
    --text-color:#000;
    --bot-bg: #eef6fb;
    --user-bg: #ffffff;
    --font-color: #032D6A;
    --bubble-radius: 20px;
    --shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    --chat-bg: #fdfefe;
    --header-text: #fff;
    --background-color: #fff;
}

:root.dark {
    --primary-color: #8a95ea;
    --secondary-color: #545da4;
    --text-color:#000;
    --bot-bg: #344964;
    --user-bg: #2c3e50;
    --font-color: #e3e8ef;
    --bubble-radius: 20px;
    --shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
    --chat-bg: #131c26;
    --header-text: #f1f5f9;
    --background-color: #444659;
}


#chatbot-close{
    font-size: 18px;
}

/* Container */
#chatbot-widget {
    position: fixed;
    bottom: 24px;
    right: 24px;
    font-family: 'Segoe UI', sans-serif;
    z-index: 9999;
}

/* Toggle button */
#chatbot-toggle {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: #fff;
    border: none;
    border-radius: 50px;
    padding: 14px 24px;
    cursor: pointer;
    box-shadow: var(--shadow);
    font-weight: 600;
    transition: all 0.3s ease;
}

#chatbot-toggle:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(34, 169, 224, 0.4);
}

/* Chatbox */
#chatbot-box {
    width: 340px;
    height: 500px;
    display: none;
    flex-direction: column;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    border-radius: 18px;
    overflow: hidden;
    box-shadow: var(--shadow);
    animation: fadeInUp 0.4s ease;
}

/* Header */
#chatbot-header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: #fff;
    padding: 14px 16px;
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    align-items: center;
    letter-spacing: 0.5px;
    font-size: 15px;
}

/* Messages area */
#chatbot-messages {
    flex: 1;
    padding: 14px;
    overflow-y: auto;
    background: var(--background-color);
    scrollbar-width: thin;
    scrollbar-color: var(--primary-color) #f0f4f8;
}

#chatbot-messages::-webkit-scrollbar {
    width: 6px;
}
#chatbot-messages::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 10px;
}

/* Messages */
.chat-msg {
    margin-bottom: 12px;
    display: flex;
    align-items: flex-start;
    animation: fadeIn 0.3s ease;
}

.chat-msg.bot .msg-text {
    background: var(--bot-bg);
    color: var(--font-color);
    border-radius: var(--bubble-radius) var(--bubble-radius) var(--bubble-radius) 6px;
    padding: 10px 14px;
    margin-left: 6px;
    max-width: 80%;
    box-shadow: 0 2px 6px rgba(34, 169, 224, 0.15);
}

.chat-msg.user {
    justify-content: flex-end;
}

.chat-msg.user .msg-text {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: var(--bubble-radius) 6px var(--bubble-radius) var(--bubble-radius);
    padding: 10px 14px;
    margin-right: 6px;
    color: #fff;
    font-weight: 500;
    max-width: 80%;
    box-shadow: 0 2px 6px rgba(34, 169, 224, 0.15);
}

/* Input area */
#chatbot-input-area {
    display: flex;
    border-top: 1px solid #eee;
    background: #fff;
}

#chatbot-input {
    flex: 1;
    padding: 14px;
    border: none;
    outline: none;
    font-size: 14px;
    background: #fff;
    color: var(--text-color);
}

#chatbot-send {
    background: var(--secondary-color);
    color: #fff;
    border: none;
    padding: 0 18px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

#chatbot-send:hover {
    background: var(--secondary-color);
}

/* Animations */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

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

/* Avatar */
.chat-avatar {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid var(--secondary-color);
    margin: 0;
}


.msg-buttons {
    margin-top: 8px;
}

.msg-buttons ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px; /* spacing between buttons */
}

.msg-buttons li {
    margin: 0;
}

.msg-buttons .chat-btn {
    background: var(--secondary-color);
    color: #fff;
    border: none;
    border-radius: 20px; /* pill shape */
    padding: 6px 14px;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.msg-buttons .chat-btn:hover {
    background: #1d94c7; /* slightly darker shade */
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.msg-buttons .chat-btn:active {
    transform: scale(0.96);
}
