#messageThread {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow-y: auto;
}

#messageContent {
  flex-grow: 1;
  overflow-y: auto;
  position: relative;
}

#messageInputWrapper {
  padding: 10px;
}

#messageInput {
  min-height: 100px;
  width: 100%;
  resize: none;
}
#message_list{
  height:100%;
}

.message_list_item{
background-color:white;
border-bottom: 1px solid #ccc;
padding: 5px;
cursor: pointer;
}

.message_list_item_last{
  font-size: 12px;
}

.message_list_item_participants{
  margin-top: 5px;
  font-size: 12px;
  color:rgb(119, 119, 119)
}

.message_list_item_date{
  color:rgb(119, 119, 119)
}

.member-icon{
  width:16px;
  height:16px;
}

  .football_buddy{
    background-color:var(--affiliBlue);
    padding: 10px;
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
    border-bottom-right-radius: 10px;
    margin-left: 20px;
    margin-top:5px;
    margin-bottom: 5px;
    color:white;
  }


  .football_currentUser{
    background-color:var(--sl-color-gray-300);
    padding: 10px;
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
    border-bottom-left-radius: 10px;
    margin-right: 20px;
    margin-top:5px;
    margin-bottom: 5px;
  }

  .mf_date{
    font-size: 8px;
    color:rgb(119, 119, 119);
  }

  .mf_date_buddy{
    margin-left: 20px;
  }

  .mf_date_current{
    margin-right: 20px;
  }

  .mf_name{
    margin-top: 20px;
    font-size: 10px;
    font-weight: 900;
  }

  #messageThread_toolbar{
    height:40px;
    width:100%;
    border-bottom: 1px solid #ccc;
  }

 .messageBtn{
    margin-top: auto;
    margin-bottom: auto;
  }

.tagify-list-container {
  max-height: 300px;
  overflow-y: auto;
  border: 1px solid #ddd;
  margin-top: 10px;
  padding: 8px;
}

.tagify-list-item {
  display: flex;
  align-items: center;
  padding: 6px;
  cursor: pointer;
}

.tagify-list-item:hover {
  background-color: #f5f5f5;
}

.memberIcon {
  width: 16px;
  height: 16px;
  margin-right: 8px;
}
#memberTags{
  min-width: 400px;
}

.tagify {
  width: 100%; /* or a fixed width like 300px */
  max-width: 500px;
  display: block;
}

.tagify__input {
  flex: 1 1 auto !important;
  min-width: 100px !important;
  width: auto !important;
}


.chat-input-container {
  border-top: 1px solid #ccc;
  padding: 10px;
  background: #f9f9f9;
}

#imagePreviewContainer {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}

.image-preview {
  position: relative;
  display: inline-block;
}

.image-preview img {
  max-height: 80px;
  border-radius: 6px;
}

.remove-preview {
  position: absolute;
  top: -6px;
  right: -6px;
  background: white;
  border-radius: 50%;
  font-size: 12px;
  cursor: pointer;
  padding: 2px;
}

.chat-input-row {
  display: flex;
  align-items: flex-end;
  gap: 8px;
}

#messageInput {
  flex: 1;
  max-height: 150px;
  min-height: 36px;
  resize: none;
  padding: 8px;
  font-size: 14px;
  border-radius: 6px;
  border: 1px solid #ccc;
  line-height: 1.4;
  overflow-y: auto;
}

.message-image {
  display: block;
  max-width: 200px;       /* Maximum width */
  max-height: 200px;      /* Maximum height */
  width: auto;            /* Maintain aspect ratio */
  height: auto;
  margin: 5px 10px 5px 10px;
  border-radius: 8px;
  object-fit: contain;
}

.member-name{
  font-size: 12px;
}
.typing {
  display: flex;
  align-items: center;
  gap: 5px;
  margin: 10px;
}

#typing-indicator{
  margin: 20px;
  position: absolute;
  bottom: 0px;
}

.hidden {
  display: none;
}

.dot {
  height: 8px;
  width: 8px;
  margin: 0 2px;
  background-color: var(--affiliBlue);
  border-radius: 50%;
  display: inline-block;
  animation: blink 1.4s infinite;
}

.dot:nth-child(2) { animation-delay: 0.2s; }
.dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes blink {
  0%, 80%, 100% { opacity: 0; }
  40% { opacity: 1; }
}

#messageThread_mask{
  width:100%;
  height:100%;
  background-color: white;
  position: absolute;
  z-index: 1;
  display: none;
}

.mm-messages-shell {
  display: flex;
  flex-direction: column;
  height: 100vh;
  min-height: 100vh;
  flex: 1;
  width: 100%;
  padding: 24px;
  background: #f6f8fb;
  border-radius: 24px;
  box-shadow: 0 14px 30px rgba(16, 49, 130, 0.08);
  box-sizing: border-box;
}

.mm-messages-panel {
  flex: 1;
  min-height: 0;
  height: 100%;
}

#main_base > .mm-messages-shell {
  flex: 1;
  min-height: 0;
}

#main_base {
  position: relative;
}

#main_base > .mm-messages-shell {
  position: absolute;
  inset: 0;
  height: auto;
}

.mm-messages-shell .lm_goldenlayout,
.mm-messages-shell .lm_row,
.mm-messages-shell .lm_stack,
.mm-messages-shell .lm_items {
  height: 100%;
}

.mm-messages-shell .lm_header {
  display: none;
}

.mm-messages-shell .lm_content,
.mm-messages-shell .lm_item {
  background: transparent;
  border: none;
  padding: 0;
  height: 100%;
}

.mm-messages-shell .lm_splitter {
  background: transparent;
}

.mm-messages-shell .lm_splitter.lm_vertical {
  width: 24px;
}

.mm-messages-shell .lm_splitter.lm_horizontal {
  height: 24px;
}

.mm-messages-shell .mm-messages-sidebar {
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 16px;
  background: #ffffff;
  border-radius: 20px;
  padding: 20px;
  box-shadow: inset 0 0 0 1px rgba(16, 49, 130, 0.06);
  min-width: 280px;
}

.mm-messages-shell .mm-messages-sidebar-header {
  display: flex;
  justify-content: center;
}

.mm-messages-shell .mm-messages-new-button::part(base) {
  background: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
  border: none;
  border-radius: 14px;
  color: #ffffff;
  font-weight: 600;
  box-shadow: 0 12px 24px rgba(37, 99, 235, 0.35);
  transition: background 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.mm-messages-shell .mm-messages-new-button::part(label),
.mm-messages-shell .mm-messages-new-button sl-icon {
  color: inherit;
}

.mm-messages-shell .mm-messages-new-button:hover::part(base) {
  background: linear-gradient(135deg, #1d4ed8 0%, #6d28d9 100%);
  box-shadow: 0 16px 30px rgba(37, 99, 235, 0.4);
  transform: translateY(-1px);
}

.mm-messages-shell .mm-messages-new-button:active::part(base) {
  transform: translateY(0);
}

.mm-messages-shell .mm-messages-button::part(base) {
  border-radius: 999px;
  font-weight: 600;
  gap: 8px;
  align-items: center;
}

.mm-messages-shell .mm-messages-button--toolbar::part(base) {
  background: #ffffff;
  border: 1px solid rgba(16, 49, 130, 0.15);
  color: #103182;
  box-shadow: none;
}

.mm-messages-shell .mm-messages-button--toolbar:hover::part(base) {
  background: rgba(16, 49, 130, 0.08);
  border-color: rgba(16, 49, 130, 0.24);
}

.mm-messages-search{
  margin-right: 20px;
}

.mm-messages-shell .mm-messages-search-input::part(base) {
  border-radius: 999px;
  background: rgba(16, 49, 130, 0.05);
  border: none;
  padding: 6px 12px;
  height: 36px;
}

.mm-messages-shell .mm-messages-search-input::part(input) {
  font-size: 0.9rem;
  color: #1b1f3a;
}

.mm-messages-shell .mm-messages-search-input::part(prefix) {
  color: rgba(16, 49, 130, 0.5);
}

.mm-messages-shell .mm-messages-search-input {
  width: 100%;
}

.mm-messages-shell .mm-messages-search-field {
  display: flex;
  align-items: center;
  gap: 10px;
  border-radius: 999px;
  background: rgba(16, 49, 130, 0.05);
  padding: 8px 14px;
}

.mm-messages-shell .mm-messages-search-field sl-icon {
  font-size: 1rem;
  color: rgba(16, 49, 130, 0.5);
}

.mm-messages-shell .mm-messages-search-field input {
  border: none;
  background: transparent;
  flex: 1;
  font-size: 0.9rem;
  color: #1b1f3a;
  outline: none;
}

.mm-messages-shell .mm-messages-threads {
  flex: 1;
  overflow-y: auto;
  padding-right: 4px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.mm-messages-shell .message_list_item {
  border: none;
  background: transparent;
  border-radius: 16px;
  padding: 14px 12px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: background 0.2s ease, box-shadow 0.2s ease;
}

.mm-messages-shell .message_list_item:hover {
  background: rgba(16, 49, 130, 0.08);
}

.mm-messages-shell .message_list_item--active {
  background: linear-gradient(120deg, rgba(36, 119, 248, 0.12), rgba(36, 119, 248, 0.05));
  box-shadow: inset 0 0 0 1px rgba(36, 119, 248, 0.35);
}

.mm-messages-shell .message_list_item_lastname {
  font-weight: 600;
  color: #103182;
}

.mm-messages-shell .message_list_item_last {
  font-size: 0.85rem;
  line-height: 1.3;
}

.mm-messages-shell .message_list_item_participants {
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.mm-messages-shell .message_list_item_date {
  font-size: 0.75rem;
}

.mm-messages-shell .message_list_item_date,
.mm-messages-shell .message_list_item_participants,
.mm-messages-shell .message_list_item_last {
  color: rgba(16, 49, 130, 0.7);
}

.mm-messages-shell #messageThread.mm-messages-conversation {
  height: 100%;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
  background: #ffffff;
  border-top-right-radius: 20px;
  border-bottom-right-radius: 20px;
  padding: 24px;
  box-shadow: inset 0 0 0 1px rgba(16, 49, 130, 0.06);
  position: relative;
  overflow: hidden;
}

.mm-messages-shell #messageThread_toolbar.mm-messages-conversation-header {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  row-gap: 10px;
  border-bottom: 1px solid rgba(16, 49, 130, 0.08);
  padding-bottom: 8px;
  min-height: 48px;
}

.mm-messages-shell #messageContent.mm-messages-conversation-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-right: 4px;
  position: relative;
}

.mm-messages-shell .football_buddy,
.mm-messages-shell .football_currentUser {
  max-width: 70%;
  border-radius: 18px;
  padding: 12px 16px;
  line-height: 1.4;
}

.mm-messages-shell .football_buddy {
  background: rgba(16, 49, 130, 0.07);
  color: #1b1f3a;
  margin: 0 0 6px 0;
}

.mm-messages-shell .football_currentUser {
  background: linear-gradient(120deg, #2477f8, #1b53d0);
  color: #ffffff;
  margin: 0 0 6px 0;
}

.mm-messages-shell .mf_name {
  font-size: 0.75rem;
  font-weight: 600;
  color: rgba(16, 49, 130, 0.8);
  margin-top: 12px;
}

.mm-messages-shell .mf_date {
  font-size: 0.75rem;
  color: rgba(16, 49, 130, 0.6);
}

.mm-messages-shell .mf_date_current,
.mm-messages-shell .mf_date_buddy {
  margin-left: 0;
  margin-right: 0;
}

.mm-messages-shell .mm-messages-composer {
  display: flex;
  flex-direction: column;
  gap: 12px;
  border-top: 1px solid rgba(16, 49, 130, 0.08);
  padding-top: 12px;
  background: transparent;
}

.mm-messages-shell .chat-input-row {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  background: rgba(16, 49, 130, 0.05);
  border-radius: 16px;
  padding: 10px 12px;
}

.mm-messages-shell #messageInput {
  flex: 1;
  border: none;
  resize: none;
  background: transparent;
  font-size: 0.95rem;
  line-height: 1.4;
  color: #1b1f3a;
  max-height: 180px;
  min-height: 36px;
  overflow-y: auto;
  padding: 0;
}

.mm-messages-shell #messageInput:focus {
  outline: none;
}

.mm-messages-shell .mm-messages-icon-button::part(base) {
  background: rgba(16, 49, 130, 0.1);
  border-radius: 12px;
  padding: 10px;
  color: #103182;
}

.mm-messages-shell .mm-messages-icon-button:hover::part(base) {
  background: rgba(16, 49, 130, 0.18);
}

.mm-messages-shell .mm-messages-icon-button--primary::part(base) {
  background: linear-gradient(120deg, #2477f8, #1b53d0);
  color: #ffffff;
}

.mm-messages-shell .mm-messages-icon-button--primary:hover::part(base) {
  background: linear-gradient(120deg, #1e64df, #153fb0);
}

.mm-messages-shell #imagePreviewContainer {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.mm-messages-shell .image-preview img {
  max-height: 90px;
  border-radius: 10px;
  box-shadow: 0 8px 16px rgba(16, 49, 130, 0.15);
}

.mm-messages-shell #messageThread_mask {
  background: rgba(246, 248, 251, 0.9);
  backdrop-filter: blur(2px);
  border-radius: 20px;
}

.mm-messages-shell #typing-indicator {
  position: absolute;
  bottom: 12px;
  left: 12px;
  margin: 0;
}

@media (max-width: 1100px) {
  .mm-messages-shell {
    padding: 16px;
    border-radius: 20px;
  }

  .mm-messages-shell .lm_splitter.lm_vertical {
    width: 16px;
  }
}

:root.sl-theme-dark .mm-messages-shell {
  background: var(--mm-dark-bg, #0b1120);
  box-shadow: 0 18px 40px rgba(2, 6, 23, 0.7);
  color: var(--mm-dark-body, #cbd5e1);
}

:root.sl-theme-dark .mm-messages-shell .mm-messages-sidebar {
  background: var(--mm-dark-surface, #0f172a);
  box-shadow: inset 0 0 0 1px var(--mm-dark-border, rgba(148, 163, 184, 0.2));
}

:root.sl-theme-dark .mm-messages-shell .mm-messages-new-button::part(base) {
  background: #1c2530;
  border: 1px solid rgba(148, 163, 184, 0.25);
  color: #f8fafc;
  box-shadow: 0 12px 24px rgba(2, 6, 23, 0.6);
}

:root.sl-theme-dark .mm-messages-shell .mm-messages-new-button:hover::part(base) {
  background: #273241;
  border-color: rgba(148, 163, 184, 0.4);
  box-shadow: 0 16px 30px rgba(2, 6, 23, 0.7);
}

:root.sl-theme-dark .mm-messages-shell .mm-messages-button--toolbar::part(base) {
  background: #1c2530;
  border: 1px solid rgba(148, 163, 184, 0.25);
  color: #f8fafc;
}

:root.sl-theme-dark .mm-messages-shell .mm-messages-button--toolbar:hover::part(base) {
  background: #273241;
  border-color: rgba(148, 163, 184, 0.4);
}

:root.sl-theme-dark .mm-messages-shell .mm-messages-search-field {
  background: var(--mm-dark-surface-2, #111827);
}

:root.sl-theme-dark .mm-messages-shell .mm-messages-search-field sl-icon {
  color: var(--mm-dark-muted, #94a3b8);
}

:root.sl-theme-dark .mm-messages-shell .mm-messages-search-field input {
  color: var(--mm-dark-text, #f8fafc);
}

:root.sl-theme-dark .mm-messages-shell .mm-messages-search-field input::placeholder {
  color: var(--mm-dark-muted, #94a3b8);
}

:root.sl-theme-dark .mm-messages-shell .message_list_item:hover {
  background: rgba(148, 163, 184, 0.1);
}

:root.sl-theme-dark .mm-messages-shell .message_list_item--active {
  background: var(--mm-dark-surface-3, #1f2937);
  box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.35);
}

:root.sl-theme-dark .mm-messages-shell .message_list_item_lastname {
  color: var(--mm-dark-text, #f8fafc);
}

:root.sl-theme-dark .mm-messages-shell .message_list_item_date,
:root.sl-theme-dark .mm-messages-shell .message_list_item_participants,
:root.sl-theme-dark .mm-messages-shell .message_list_item_last {
  color: var(--mm-dark-muted, #94a3b8);
}

:root.sl-theme-dark .mm-messages-shell #messageThread.mm-messages-conversation {
  background: var(--mm-dark-surface, #0f172a);
  box-shadow: inset 0 0 0 1px var(--mm-dark-border, rgba(148, 163, 184, 0.2));
  color: var(--mm-dark-body, #cbd5e1);
}

:root.sl-theme-dark .mm-messages-shell #messageThread_toolbar.mm-messages-conversation-header {
  border-bottom: 1px solid var(--mm-dark-border-soft, rgba(148, 163, 184, 0.12));
}

:root.sl-theme-dark .mm-messages-shell .football_buddy {
  background: var(--mm-dark-surface-2, #111827);
  color: var(--mm-dark-body, #cbd5e1);
}

:root.sl-theme-dark .mm-messages-shell .mf_name {
  color: var(--mm-dark-muted, #94a3b8);
}

:root.sl-theme-dark .mm-messages-shell .mf_date {
  color: var(--mm-dark-muted, #94a3b8);
}

:root.sl-theme-dark .mm-messages-shell .mm-messages-composer {
  border-top: 1px solid var(--mm-dark-border-soft, rgba(148, 163, 184, 0.12));
}

:root.sl-theme-dark .mm-messages-shell .chat-input-row {
  background: var(--mm-dark-surface-2, #111827);
}

:root.sl-theme-dark .mm-messages-shell #messageInput {
  color: var(--mm-dark-text, #f8fafc);
}

:root.sl-theme-dark .mm-messages-shell #messageInput::placeholder {
  color: var(--mm-dark-muted, #94a3b8);
}

:root.sl-theme-dark .mm-messages-shell .mm-messages-icon-button::part(base) {
  background: var(--mm-dark-surface-3, #1f2937);
  color: var(--mm-dark-text, #f8fafc);
}

:root.sl-theme-dark .mm-messages-shell .mm-messages-icon-button:hover::part(base) {
  background: rgba(148, 163, 184, 0.25);
}

:root.sl-theme-dark .mm-messages-shell #messageThread_mask {
  background: rgba(15, 23, 42, 0.75);
}
