
/* MFAE EMPLOYEE WORKSPACE PREMIUM V1 */
/* Presentation only — no behaviour changes */

@media (min-width: 901px) {
  .mfae-shell .mfae-chat-layout {
    grid-template-columns: minmax(210px, 260px) minmax(0, 1fr);
    gap: 18px;
  }
}

.mfae-shell .mfae-chat-layout {
  align-items: stretch;
  margin-top: 16px;
}

.mfae-shell .mfae-chat-sidebar {
  padding-right: 16px;
}

.mfae-shell .mfae-chat-sidebar > .primary {
  width: 100%;
  min-height: 40px;
  margin-bottom: 14px;
  border-radius: 9px;
  font-weight: 650;
}

.mfae-shell .mfae-chat-list {
  gap: 8px;
  max-height: 490px;
}

.mfae-shell .mfae-chat-item {
  padding: 11px 12px;
  min-height: 42px;
  border-radius: 9px;
  text-align: left;
  line-height: 1.45;
  white-space: normal;
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.mfae-shell .mfae-chat-item.active {
  outline: none;
  box-shadow: inset 3px 0 0 #2563eb;
  font-weight: 700;
}

.mfae-shell .mfae-chat-main {
  min-width: 0;
}

.mfae-shell .mfae-chat-main > .row:first-child {
  gap: 8px;
  margin-bottom: 12px;
}

.mfae-shell .mfae-chat-main > .row:first-child button {
  min-height: 36px;
  padding: 8px 12px;
  border-radius: 8px;
}

.mfae-shell .mfae-chat-main .chat {
  min-height: 260px;
  height: clamp(260px, 35vh, 430px);
  max-height: 430px;
  overflow-y: auto;
  padding: 18px;
  border-radius: 12px;
  margin: 12px 0 16px;
}

.mfae-shell .mfae-chat-main .bubble {
  max-width: 82%;
  width: fit-content;
  padding: 12px 15px;
  margin: 10px 0;
  border-radius: 13px;
  line-height: 1.6;
  font-size: 13px;
  overflow-wrap: anywhere;
}

.mfae-shell .mfae-chat-main .bubble.mine {
  margin-left: auto;
  margin-right: 0;
  border-bottom-right-radius: 4px;
}

.mfae-shell .mfae-chat-main .bubble:not(.mine) {
  margin-left: 0;
  margin-right: auto;
  border-bottom-left-radius: 4px;
}

.mfae-shell .mfae-chat-main label[for="mfae-chat-file"] {
  font-size: 12px;
  font-weight: 600;
}

.mfae-shell #mfae-chat-file {
  min-width: 180px;
  flex: 1 1 220px;
  max-width: 100%;
  min-height: 39px;
  border-radius: 8px;
}

.mfae-shell .mfae-chat-main form[onsubmit="sendChat(event)"] {
  margin-top: 12px;
}

.mfae-shell .mfae-chat-main form[onsubmit="sendChat(event)"] .row {
  gap: 10px;
}

.mfae-shell .mfae-chat-main textarea[name="message"] {
  min-height: 92px;
  max-height: 210px;
  padding: 13px 15px;
  line-height: 1.55;
  border-radius: 10px;
  resize: vertical;
}

.mfae-shell .mfae-chat-main form[onsubmit="sendChat(event)"] button.primary {
  min-height: 42px;
  min-width: 76px;
  border-radius: 9px;
  font-weight: 650;
}

@media (max-width: 900px) {
  .mfae-shell .mfae-chat-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
  }

  .mfae-shell .mfae-chat-sidebar {
    border-right: 0;
    border-bottom: 1px solid var(--border, #d6dce6);
    padding: 0 0 12px;
  }

  .mfae-shell .mfae-chat-list {
    max-height: 170px;
  }
}

@media (max-width: 600px) {
  .mfae-shell .mfae-chat-main .chat {
    height: 300px;
    min-height: 240px;
    padding: 12px;
  }

  .mfae-shell .mfae-chat-main .bubble {
    max-width: 94%;
    padding: 10px 12px;
  }

  .mfae-shell .mfae-chat-main form[onsubmit="sendChat(event)"] .row {
    flex-wrap: wrap;
  }

  .mfae-shell .mfae-chat-main form[onsubmit="sendChat(event)"] button.primary {
    width: 100%;
  }
}


/* MFAE CONVERSATION TITLE SINGLE-LINE FIX V1 */
.mfae-shell .mfae-chat-list .mfae-chat-item {
  display: block;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  -webkit-line-clamp: unset;
  -webkit-box-orient: initial;
  line-height: 1.4;
}
