/* General Styling */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f4f4f4;
}

/* Chatbot Container */
.loom-chatbot-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 300px;
    border-radius: 15px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    background: #fff;
    z-index: 1000;
    transition: all 0.4s ease;
    overflow: hidden;
}

.loom-chatbot-container.minimized {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    cursor: pointer;
}

.loom-chatbot-container.minimized .loom-chatbot-body,
.loom-chatbot-container.minimized .loom-chatbot-footer {
    display: none;
}

.loom-chatbot-container.maximized {
    width: 300px;
}

/* Header */
.loom-chatbot-header {
    display: flex;
    flex-direction: column; /* Stack elements vertically */
    align-items: center;
    padding: 12px;
    background: linear-gradient(to right, #0D424D, #106f82);
    color: #fff;
    border-bottom: 2px solid #0D424D;
    border-radius: 15px 15px 0 0;
    position: relative;
}

.loom-chatbot-header .icon-container {
    display: flex;
    align-items: center;
    margin-bottom: 8px; /* Space between icon and title */
}

.loom-chatbot-header .icon-container img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: #fff;
    border: 2px solid #fff;
    margin-right: 10px;
}

.loom-chatbot-header .header-title {
    font-weight: bold;
    font-size: 18px;
    margin-bottom: 5px; /* Space between title and online status */
}

.loom-chatbot-header .online-status {
    display: flex;
    align-items: center;
    color: #4CAF50; /* Green color for the text */
    font-size: 14px;
    font-weight: normal;
}

.loom-chatbot-header .online-status .status-icon {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: #4CAF50;
    border: 2px solid #fff;
    margin-right: 5px; /* Space between icon and text */
}

/* Minimize Button */
.loom-chatbot-header .minimize-button {
    font-size: 24px;
    cursor: pointer;
    color: #fff;
    position: absolute;
    top: 12px;
    right: 12px;
}

/* Messages */
.loom-chatbot-body {
    max-height: 400px;
    overflow-y: auto;
    padding: 15px;
}

.loom-chatbot-messages {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.user-message, .bot-message {
    padding: 12px 15px;
    border-radius: 15px;
    max-width: 80%;
    word-wrap: break-word;
}

.user-message {
    background: #e0f7fa;
    align-self: flex-end;
}

.bot-message {
    background: #f5f5f5;
    align-self: flex-start;
}

/* Loading Indicator */
.loom-chatbot-loading {
    display: none; /* Ensure it's hidden initially */
    justify-content: center;
    align-items: center;
    height: 40px;
}

.loom-chatbot-loading img {
    width: 24px;
    height: 24px;
    animation: spin 1.5s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Footer */
.loom-chatbot-footer {
    display: flex;
    padding: 10px;
    border-top: 1px solid #ddd;
    background: #f9f9f9;
    border-radius: 0 0 15px 15px;
}

#loom-chatbot-input {
    flex: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 10px 0 0 10px;
    outline: none;
    font-size: 16px;
}

#loom-chatbot-send {
    width: 50px;
    height: 50px;
    border: none;
    border-radius: 50%;
    background: #0D424D;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: background 0.3s;
}

#loom-chatbot-send img {
    width: 24px;
    height: 24px;
}

#loom-chatbot-send:hover {
    background: #127285;
}

/* Animations */
.loom-chatbot-container.minimized {
    animation: bounce 1s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40%, 60% { transform: translateY(-15px); }
}

.loom-chatbot-container.maximized {
    animation: expand 0.4s ease-in-out;
}

@keyframes expand {
    0% { width: 60px; }
    100% { width: 300px; }
}