/* .message{
 margin: 10px 0px;
 padding: 5px 5px;
 border-radius: 10px;
 border: 1px solid gray;
 width: 80%;
}

.message-left{
 float: left;
 clear: both;
 background-color:#ffffff;
}

.message-right{
float: right;
clear: both;
background-color: rgb(199, 196, 196);
} */
/*
.message-name{
  border-top: 1px solid black;
  padding-top: 5px;
  color: #3498db;
}
.message-send{
  position: fixed;
  bottom: 45px;
  width: 100%;
}
#message-messageInp{
  width:40%;
  height: 40px;
  margin-left: 10px;
  margin-right: 10px;
}
*/

/* For public/js/modules/overlay.js */

/* ==========================================================================
   MESSAGING SYSTEM COMPONENT
   ========================================================================== */

/* --- Layout Frame Containers --- */
#message-editor-wrapper {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-sizing: border-box;
}

#message-editor-body {
  flex: 1;
  width: 100%;
  overflow-y: auto !important;
  min-height: 0;
  box-sizing: border-box;
}

#message-editor-header,
#message-editor-footer,
.message-compose {
  flex-shrink: 0;
  box-sizing: border-box;
}

/* --- Component Block: Header --- */
#message-editor-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  background-color: inherit;
}

#message-editor-header h1 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 600;
  color: #1f2937;
  line-height: 1.2;
}

.header-text-container {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.message-editor-subtitle {
  font-size: 0.85rem;
  color: #6b7280;
  margin-top: 0.15rem;
}

/* --- Component Block: Status Markers --- */
/*
.status-dot {
  width: 6px;
  height: 6px;
  display: inline-block;
  margin-bottom: 0.1rem;
  border-radius: 50%;
}
.status-dot.online { background-color: #22c55e; }
.status-dot.offline { background-color: #9ca3af; }
*/

/* --- Component Block: Timeline Splitters --- */
.chat-timeline-divider {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 1.5rem 0 1rem;
  width: 100%;
}

.chat-timeline-divider span {
  background-color: rgba(0, 0, 0, 0.06);
  color: #6b7280;
  padding: 0.35rem 0.75rem;
  font-size: 0.8rem;
  font-weight: 500;
  border-radius: 20px;
}

/* --- Component Block: Messages Grid Layout --- */
.m-rows-styles {
  display: flex;
  margin-bottom: 1.25rem;
  max-width: 100%;
  box-sizing: border-box;
  align-items: flex-start;
  gap: 0.65rem;
}

.chat-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.message-bubble-wrapper {
  display: flex;
  flex-direction: column;
  max-width: 70%;
}

.message-bubble {
  padding: 0.75rem 1rem;
  border-radius: 12px;
  font-size: 0.95rem;
  line-height: 1.4;
  word-break: break-word;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.message-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.25rem;
  font-size: 0.8rem;
}

.meta-author { font-weight: 600; color: #4b5563; }
.meta-time { color: #9ca3af; }

/* --- Chat Variation Modifiers --- */
.message-row-left {
  flex-direction: row;
  justify-content: flex-start;
}
.message-row-left .message-bubble {
  background-color: #ffffff;
  color: #1f2937;
  border: 1px solid #e5e7eb;
  border-top-left-radius: 2px;
}

.message-row-right {
  flex-direction: row-reverse;
  justify-content: flex-start;
}
.message-row-right .message-bubble-wrapper { align-items: flex-end; }
.message-row-right .message-bubble {
  background-color: #e0f2fe;
  color: var(--dark-color); /* Reusing your global root variables */
  border-top-right-radius: 2px;
}
.message-row-right .message-meta { flex-direction: row-reverse; }

/* --- Component Block: Footer Composer --- */
#message-editor-footer {
  padding: 1rem;
  background-color: #ffffff;
  border-top: 1px solid #e5e7eb;
  overflow: hidden; 
}

.message-compose {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  padding: 8px;
  background-color: #ffffff;
  width: 100%; 
}

.message-input {
  flex: 1;
  min-height: 38px;
  max-height: 180px;
  resize: none;
  overflow-y: auto !important;
  line-height: 1.4;
  padding: 0.75rem;
  border-radius: 18px;
  font: inherit;
  outline: none;
  border: 1px solid #ccc;
  box-sizing: border-box;
  background-color: #efefef;
  font-size: 1rem;
}
.message-input:focus { border-color: #888; }

.compose-icon-button,
.compose-send-button {
  width: 38px;
  height: 38px;
  border: none;
  border-radius: 50%;
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background-color: transparent;
}
.compose-send-button { font-size: 18px; color: #0284c7; }
.compose-icon-button:hover { background-color: #f3f4f6; }