/*
 * InimaServices Meta Platform
 * Fix Conversaciones / Scroll v1.0
 */
@media (min-width: 768px) {
  .card.chat-app {
    height: calc(100vh - 40px) !important;
    height: calc(100dvh - 40px) !important;
    max-height: calc(100vh - 40px) !important;
    max-height: calc(100dvh - 40px) !important;
    min-height: 0 !important;
    margin-bottom: 0 !important;
    overflow: hidden !important;
  }

  .chat-app .people-list,
  #plist.people-list {
    top: 0 !important;
    bottom: 0 !important;
    height: 100% !important;
    max-height: 100% !important;
    min-height: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
  }

  #plist > .d-flex:first-child {
    flex: 0 0 auto !important;
  }

  #contactList,
  .people-list .chat-list {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
    margin-bottom: 0 !important;
    padding-right: 4px !important;
  }

  #noContacts {
    flex: 0 0 auto !important;
  }

  #contactList > li,
  .people-list .chat-list > li {
    width: 100% !important;
    min-width: 0 !important;
  }

  #contactList .about,
  .people-list .chat-list .about {
    min-width: 0 !important;
    flex: 1 1 auto !important;
    overflow: hidden !important;
  }

  #contactList .name,
  #contactList .status,
  .people-list .chat-list .name,
  .people-list .chat-list .status {
    max-width: 100% !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  .chat-app .chat {
    height: 100% !important;
    max-height: 100% !important;
    min-height: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
  }

  .chat-app .chat .chat-header,
  .chat-app .chat #attachBar,
  .chat-app .chat .chat-message {
    flex: 0 0 auto !important;
  }

  .chat-app .chat .chat-history,
  #chatHistory {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    height: auto !important;
    max-height: none !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
  }

  .chat-app .chat .chat-message {
    background: #fff !important;
    position: relative !important;
    z-index: 2;
  }

  #contactList::-webkit-scrollbar,
  #chatHistory::-webkit-scrollbar {
    width: 8px;
  }

  #contactList::-webkit-scrollbar-thumb,
  #chatHistory::-webkit-scrollbar-thumb {
    background: rgba(70, 82, 92, .28);
    border-radius: 10px;
  }

  #contactList::-webkit-scrollbar-track,
  #chatHistory::-webkit-scrollbar-track {
    background: transparent;
  }
}

@media (max-width: 767.98px) {
  .chat-app,
  .chat-app .people-list,
  .chat-app .chat,
  #contactList,
  #chatHistory {
    max-width: 100% !important;
  }
}
