
/* CSS Variables for Theming - Customize these for default values and theme integration */
:root {
    --background-color: #ffffff;
    --font-color: #000000;
    --chat-background: #f0f0f0;
    --user-message-color: #cce7ff;
    --assistant-message-color: #e6ffe6;
    --system-message-color: #ffebcc;
    --settings-background-alternate-1: #e0f7fa;
    --settings-background-alternate-2: #e8f5e9;
    --floating-box-width: 300px;
    --floating-box-height: 200px;
    --floating-box-top: 20px;
    --floating-box-right: 20px;
    --floating-box-font-size: 14px;
    --floating-box-background-color: #ffffff;
    --floating-box-font-color: #000000;
}

/* General Layout and Styling */
body, html {
    margin: 0;
    padding: 0;
    height: 100%;
    font-family: Arial, sans-serif;
    display: flex;
    flex-direction: column;
    background-color: var(--background-color);
    color: var(--font-color);
}
#container { display: flex; flex-grow: 1; }
#settings {
    width: 20%;
    min-width: 150px;
    max-width: 400px;
    padding: 10px;
    border-right: 1px solid #ccc;
    resize: horizontal;
    overflow-y: auto;
    transition: width 0.3s;
}
#settings.hidden { display: none; }
#chat { flex-grow: 1; display: flex; flex-direction: column; background-color: var(--chat-background); }
#messages { flex-grow: 1; overflow-y: auto; border-bottom: 1px solid #ccc; padding: 10px; position: relative; }
#input, #bottom-input { display: flex; padding: 10px; }
#input textarea, #bottom-input textarea, #clipboardTextArea, #copyBox { flex-grow: 1; padding: 5px; resize: vertical; height: 50px; }
#input button, #bottom-input button { padding: 5px 10px; }
.action-buttons { display: flex; gap: 5px; position: absolute; top: 0; right: 0; }
.action-buttons button { cursor: pointer; background: none; border: none; color: blue; font-size: 12px; }
.action-buttons button.delete-button { color: red; }

/* Message Styling */
.message { display: flex; flex-direction: column; justify-content: flex-start; position: relative; margin-bottom: 10px; }
.message-content { display: flex; flex-direction: column; align-items: flex-start; }
.message-content span, .message-content div { margin-right: 10px; cursor: pointer; }
.message-content div { 
    white-space: pre-wrap; 
    word-break: break-word; /* Enables breaking long words */
    max-width: calc(100% - 50px); /* Reserve space for buttons */
}
.user-message { background-color: var(--user-message-color); padding: 5px; border-radius: 5px; }
.assistant-message { background-color: var(--assistant-message-color); padding: 5px; border-radius: 5px; }
.system-message { background-color: var(--system-message-color); padding: 5px; border-radius: 5px; }

/* Settings Sections */
.section { margin-bottom: 20px; padding: 10px; }
.section:nth-child(odd) { background-color: var(--settings-background-alternate-1); }
.section:nth-child(even) { background-color: var(--settings-background-alternate-2); }
.section-title { font-weight: bold; cursor: pointer; margin-bottom: 5px; }
.section-content { display: none; }
.section-content.active { display: block; }

/* Floating Response Styles */
.floating-response {
    position: fixed;
    bottom: var(--floating-box-top);
    right: var(--floating-box-right);
    width: var(--floating-box-width);
    height: var(--floating-box-height);
    overflow-y: auto;
    background-color: var(--floating-box-background-color);
    color: var(--floating-box-font-color);
    font-size: var(--floating-box-font-size);
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    padding: 10px;
    z-index: 100;
    display: none; /* Initially hidden */
}

/* Modal Styles */
.modal { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(0, 0, 0, 0.5); justify-content: center; align-items: center; }
.modal-content { background-color: #fff; padding: 20px; border-radius: 8px; width: 400px; max-width: 90%; }