/* === CHAT CONTAINER === */
.chat-container {
    max-width: 280px;
    margin: 0 auto;
    padding: 20px;
    font-family: Arial, sans-serif;
    position: relative;
    height: 100vh;
    display: flex;
    flex-direction: column;
}

/* === VIDEO CONTAINER - STATIC === */
.video-container {
    position: relative;
    width: 280px;
    height: 280px;
    margin-bottom: 15px;
    z-index: 1;
    border: 2px solid #007bff;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    background: #ebebeb;
    flex-shrink: 0;
}

#avatarVideo {
    width: 100%;
    height: 100%;
    object-fit: cover;
}


/* === CHAT HISTORY AREA - STATIC CONTAINER === */
.chat-history {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    margin-bottom: 15px;
    background: #fafafa;
    flex: 0.7; /* Reduced from 1 to take less space */
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
    max-height: 200px; /* Add maximum height */
}

/* === CHAT MESSAGES - SCROLLABLE CONTENT === */
.chat-messages {
    padding: 10px;
    overflow-y: auto;
    flex: 1;
    min-height: 0;
    scroll-behavior: smooth;
    overflow-y: scroll;
}

.chat-messages::after {
    content: '';
    display: block;
    height: 5px;
}

/* === MESSAGE STYLES === */
.message {
    margin-bottom: 12px;
    padding: 8px 12px;
    border-radius: 14px;
    max-width: 85%;
    word-wrap: break-word;
    line-height: 1.3;
    font-size: 13px;
}

.user-message {
    background: #007bff;
    color: white;
    margin-left: auto;
    border-bottom-right-radius: 4px;
}

.bot-message {
    background: #28a745;
    color: white;
    margin-right: auto;
    border-bottom-left-radius: 4px;
}

.message-time {
    font-size: 9px;
    opacity: 0.7;
    margin-top: 3px;
    display: block;
}

/* === CHAT INTERFACE - STATIC === */
.chat-interface {
    display: block;
    position: relative;
    z-index: 3;
    flex-shrink: 0;
}

#userInput {
    width: 100%;
    padding: 8px;
    border: 1px solid #007bff;
    border-radius: 4px;
    font-size: 13px;
    box-sizing: border-box;
    background: white;
    position: relative;
    z-index: 4;
}

#userInput:focus {
    outline: none;
    border-color: #0056b3;
    box-shadow: 0 0 3px rgba(0, 123, 255, 0.5);
}

/* Scrollbar styling for chat messages only */
.chat-messages::-webkit-scrollbar {
    width: 6px;
}

.chat-messages::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 8px;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 8px;
}

.chat-messages::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Ensure no other elements scroll */
body {
    overflow: hidden;
}

.chat-container {
    overflow: hidden;
}

.controls {
    display: flex;
    gap: 10px;
    padding: 10px;
    justify-content: center;
}

.controls button {
    padding: 8px 16px;
    border: 1px solid #ccc;
    border-radius: 4px;
    background: white;
    cursor: pointer;
}

.controls button:hover {
    background: #f0f0f0;
}