@import 'modules/app/viewports';

.open-close-container {
  @include viewport_mobile {
    top: 61px;
    right: 0 !important;
    bottom: 60px;

    width: 100vw;
    height: calc(100vh - 61px - 60px);

    border-radius: 0;
  }

  position: fixed;
  z-index: 1;
  right: 10px;
  bottom: 20px;

  overflow: hidden;

  width: 22%;
  min-width: 320px;
  height: 86%;

  background-color: var(--color-gray-fff);
  border-radius: 10px;

  &.fullscreenChat {
    @include viewport_mobile {
      width: 100vw;
    }

    width: 66%;
  }
}

.fullscreen-btn,
.mute-btn,
.close-btn {
  cursor: pointer;

  position: absolute;
  z-index: 10;
  top: 10px;

  display: flex;
  justify-content: flex-end;
}

.fullscreen-btn {
  right: 40px;
}

.mute-btn {
  right: 65px;
}

.close-btn {
  right: 15px;
}

.box-shadow {
  box-shadow: 0 0 2px 2px var(--chat-shadow-color);
}

.chat {
  @include viewport_mobile {
    transition: width 300ms ease;
  }

  display: flex;
  width: 100%;
  height: 100%;

  .chat-list {
    @include viewport_mobile {
      overflow: hidden;
      width: 0%;
      max-width: 100%;

      &.opened {
        width: 100%;
      }
    }

    width: 100%;
    max-width: 30%;
  }

  .chat-dialog,
  .chat-dialog__notify {
    @include viewport_mobile {
      overflow: hidden;
      width: 0%;
      max-width: 100%;

      &.opened {
        width: 100%;
      }
    }

    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 70%;

    .chat-dialog-header {
      display: flex;
      padding: 13px 30px 8px;
      background-color: var(--chat-dialog-header-bg-color);
    }

    .p2p-chat-dialog-header {
      border-bottom: 1px solid rgb(0 0 0 / 12%);
    }

    .chat-dialog-body {
      overflow: hidden;
      flex-grow: 2;
    }
  }

  .chat-dialog__notify {
    max-width: 100%;
  }

  .chat-dialog__notify__component {
    height: 100%;
  }

  &.slim {
    ::ng-deep .chat-list .cmf-feed-sidenav .app-toolbar {
      .tabs {
        width: 75%;
      }
    }

    .chat-list,
    .chat-dialog {
      max-width: 100%;
    }
  }
}
