
/* MIZAN12AI — Chat presentation only */

/* Contacts list */
#mzn-v2-chat-contacts {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

#mzn-v2-chat-contacts .mzn-v2-person {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid #dae4ee;
  border-radius: 14px;
  background: white;
}

#mzn-v2-chat-contacts .mzn-chat-contact-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

html:not([dir="rtl"])
#mzn-v2-chat-contacts .mzn-chat-contact-info strong,
html:not([dir="rtl"])
#mzn-v2-peer-name {
  text-transform: capitalize;
}

#mzn-v2-chat-contacts .mzn-chat-contact-seen {
  color: #778da3;
  font-size: 12px;
}

#mzn-v2-chat-contacts .mzn-v2-person > button {
  width: 42px;
  height: 42px;
  min-height: 42px;
  padding: 0;
  display: grid;
  place-items: center;
}

/* Full-screen conversation */
body.mzn-chat-fullscreen {
  overflow: hidden !important;
}

body.mzn-chat-fullscreen .topbar,
body.mzn-chat-fullscreen .mobile-tabs {
  visibility: hidden !important;
}

body.mzn-chat-fullscreen #mzn-v2-chat-view {
  display: flex !important;
  position: fixed !important;
  inset: 0 !important;
  z-index: 9000 !important;
  box-sizing: border-box !important;
  width: 100% !important;
  max-width: none !important;
  height: 100dvh !important;
  margin: 0 !important;
  padding: 0 !important;
  flex-direction: column;
  overflow: hidden;
  background: #edf3fa;
  border: 0 !important;
  border-radius: 0 !important;
}

body.mzn-chat-fullscreen
#mzn-v2-chat-view > :not(#mzn-v2-thread) {
  display: none !important;
}

body.mzn-chat-fullscreen #mzn-v2-thread {
  display: flex !important;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0 !important;
  height: 100% !important;
  width: 100% !important;
  max-width: none !important;
  box-sizing: border-box;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  overflow: hidden !important;
}

/* Conversation header */
body.mzn-chat-fullscreen .mzn-v2-thread-top {
  display: flex !important;
  align-items: center;
  flex: 0 0 auto;
  gap: 8px;
  padding: calc(10px + env(safe-area-inset-top, 0px)) 12px 11px;
  background: #0b2949;
  color: white;
  border-radius: 0;
}

.mzn-chat-peer-avatar {
  display: grid;
  place-items: center;
  width: 39px;
  height: 39px;
  flex: 0 0 39px;
  border-radius: 50%;
  background: #19446b;
  color: #e9bd64;
  font-size: 19px;
  font-weight: 700;
}

.mzn-chat-peer-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.mzn-chat-peer-info strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: white;
  font-size: 16px;
}

.mzn-chat-last-seen {
  color: #b9cadd;
  font-size: 11px;
}

body.mzn-chat-fullscreen
.mzn-v2-thread-top > button {
  display: grid !important;
  place-items: center;
  width: 39px !important;
  height: 39px !important;
  min-height: 39px !important;
  flex: 0 0 39px;
  padding: 0 !important;
  font-size: 0 !important;
  color: white !important;
  background: #17436b !important;
  border: 1px solid #43688a !important;
  border-radius: 11px;
}

body.mzn-chat-fullscreen
.mzn-v2-thread-top > button svg {
  width: 19px;
  height: 19px;
}

/* Messages fill the available screen */
body.mzn-chat-fullscreen #mzn-v2-messages {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  height: auto !important;
  max-height: none !important;
  overflow-y: auto !important;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 15px 12px !important;
  background: #edf3fa;
}

/* Message composer */
body.mzn-chat-fullscreen #mzn-v2-send-form {
  display: flex !important;
  flex: 0 0 auto;
  align-items: center;
  gap: 9px;
  box-sizing: border-box;
  width: 100%;
  margin: 0 !important;
  padding: 10px 12px
    calc(10px + env(safe-area-inset-bottom, 0px)) !important;
  background: white;
  border-top: 1px solid #d6e1ec;
}

body.mzn-chat-fullscreen #mzn-v2-message {
  flex: 1;
  min-width: 0;
  font-size: 16px !important;
}

body.mzn-chat-fullscreen #mzn-v2-send-form button {
  flex: 0 0 auto;
  min-height: 42px;
}

/* Calls must remain above the full-screen conversation */
body.mzn-chat-fullscreen
#mzn-v2-call-dialog:not(.hidden) {
  z-index: 12000 !important;
}
