/* 
  CartaNova Chat Styling
  This stylesheet contains all chat-related styling including
  message appearance and component positioning
*/

/* --------------------
   CHAT LAYOUT & POSITIONING
   -------------------- */

.chat-window {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.system-prompt-panel {
    flex: 0 0 auto;
}

.chat-messages-container {
    flex: 1 1 auto;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    position: relative;
    max-height: none !important; /* Adjust the default max-height to use available space */
}

.speech-to-text-container {
    flex: 0 0 auto;
    position: relative;
    bottom: 0;
    width: 100%;
    margin-top: auto;
}

/* Ensure chat window takes full available height */
.main-content {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.action-buttons-container {
    flex: 0 0 auto;
}

.chat-message {
    padding: 10px;
    border-radius: 8px;
    margin-bottom: 1.6px;
    position: relative;
    max-width: 100%;
}

/* Add extra spacing before user messages (follow-up messages) */
.chat-message.user {
    margin-top: 3.2px;
}

/* Remove extra spacing for the first message in chat */
.chat-message:first-child {
    margin-top: 0;
}

/* Dark theme message styles */
html[data-theme='dark'] .chat-message.system {
    background-color: #333;
    border-left: 4px solid #666;
    color: #e1e1e1;
}
