.chatbot-container {
    position: fixed;
    width: 300px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    font-family: Arial, sans-serif;
    display: flex;
    flex-direction: column;
    z-index: 9000;
    max-height: 80vh;
    transition: box-shadow 0.2s ease, transform 0.1s ease;
    will-change: transform;
}

.chatbot-container.chatbot-dragging {
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    opacity: 0.95;
    transform: scale(1.01);
    transition: none;
}

.chatbot-container.chatbot-resizing {
    opacity: 0.9;
    transition: none;
}

.chatbot-header {
    background: #003366;
    color: #fff;
    padding: 10px;
    font-weight: bold;
    display: flex;
    justify-content: space-between;
    align-items: center;
    user-select: none;
    cursor: move;
    touch-action: none;
}

.chatbot-header:hover {
    background: #004080;
}

.chatbot-close {
    background: none;
    border: none;
    color: #fff;
    font-size: 18px;
    cursor: pointer;
    z-index: 1001; /* Ensure it's above the header for clicking */
}

.chatbot-close:hover {
    color: #ffc107;
}

.chatbot-body {
    padding: 10px;
    flex-grow: 1;
    overflow-y: auto;
    height: 300px; /* Default height, will be adjusted by JavaScript */
    background-size: cover;
    background-position: center;
}

.chatbot-message {
    padding: 8px;
    margin: 5px 0;
    border-radius: 10px;
    max-width: 80%;
    clear: both;
}

.bot {
    background: #f1f1f1;
    color: #333;
    float: left;
}

.user {
    background: #003366;
    color: white;
    float: right;
}

.chatbot-quick-replies {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin: 10px 0;
    clear: both;
    width: 100%;
}

.chatbot-prompt {
    background: #e6f2ff;
    color: #003366;
    border: 1px solid #003366;
    padding: 8px 12px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s ease;
    margin: 2px;
}

.chatbot-prompt:hover {
    background: #003366;
    color: white;
}

.chatbot-footer {
    display: flex;
    padding: 10px;
    border-top: 1px solid #ddd;
    background: #fff;
}

.chatbot-input {
    flex-grow: 1;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 20px;
    outline: none;
}

.chatbot-input:focus {
    border-color: #003366;
}

.chatbot-send {
    background: #003366;
    color: white;
    border: none;
    padding: 8px 12px;
    margin-left: 5px;
    cursor: pointer;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chatbot-send:hover {
    background: #00264d;
}

/* Clear fix for floating messages */
.chatbot-body::after {
    content: "";
    display: table;
    clear: both;
}

.chatbot-resize-handle {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 15px;
    height: 15px;
    cursor: nwse-resize;
    background: transparent;
    z-index: 1001;
}

.chatbot-resize-handle::before {
    content: "";
    position: absolute;
    bottom: 3px;
    right: 3px;
    width: 9px;
    height: 9px;
    border-right: 2px solid #003366;
    border-bottom: 2px solid #003366;
    opacity: 0.7;
}

.chatbot-resize-handle:hover::before {
    opacity: 1;
}
