main.chats {
  background: linear-gradient(to bottom, var(--chat-background-color-top), var(--chat-background-color-bottom));
  display: flex;
  flex-direction: row;
  overflow: hidden;

  section.chat-sidebar,
  section.active-chat {
    display: flex;
    flex-direction: column;
    min-height: calc(100vh - var(--navbar-height));
    max-height: calc(100vh - var(--navbar-height));
    overflow: clip;

    &.chat-sidebar {
      min-width: 30vw;
      max-width: 30vw;
    }

    &.active-chat {
      box-shadow: inset 0px 2px 10px rgba(200, 200, 200, 0.25);
      background-image: var(--chat-background-icons);
      background-size: contain;
      flex-grow: 1;
      position: relative;

      &:has(.announcement-page) {
        align-items: center;
      }

      .scroll-to-bottom {
        position: fixed;
        right: 0.5rem;
        z-index: 1;

        & svg {
          fill: var(--theme-color-darker)
        }
      }

      .active-chat-container {
        display: flex;
        flex-direction: column;
        min-height: calc(100vh - var(--navbar-height));
        max-height: calc(100vh - var(--navbar-height));

        .chat-info-menu.menu__container {

          .menu__wrapper {
            max-height: calc(100vh - (var(--navbar-height) + 4rem));

            .cards-container {
              overflow-y: unset;
              
              @media (max-height: 1024px) {
                /* set max-height to account for the height of the menu's upper tier (settings) */
                max-height: calc(100vh - (var(--navbar-height) + 20rem));
              }

              .cards-wrapper {

                .user__preview {
                  align-items: center;
                  display: inline-flex;
                  gap: 0.5rem;
                  padding: 0.5rem;
                }
              }
            }
          }
        }
      }
    }
  }

  &.mobile {
    .chats-container {
      section {
        &.chat-sidebar {
          min-width: 100vw;
          max-width: 100vw;
        }
      }
    }
  }
}

.active-chat-section {
  background-color: var(--off-white);
  padding: 0.5rem 1rem;
  height: 3.5rem;

  .section-content-wrapper {
    align-items: center;
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 1rem;
    height: 100%;
    justify-content: space-between;
  }

  @media screen and (max-width: 768px) {
    padding: 0.25rem 0.5rem;

    .section-content-wrapper {
      gap: 0.5rem;
    }
  }
}

.active-chat-size-query {
  margin: 0 auto;
  max-width: var(--container-xl);
  width: 100%;
}

.active-chat,
.messages-frame {
  .active-chat-message {
    margin-left: 3rem;
  }
}