.lbaic {
  &-message {
    &-history {
      animation: none;

      &-group {
        padding-block-end: 20px;

        &-date {
          padding-block-end: 4px;
          text-align: right;

          &-in {
            font-size: var(--lbaic-fs-12);
            font-weight: var(--lbaic-fw-500);
            color: var(--lbaic-message-code-color);
          }
        }
      }

      &-empty {
        position: absolute;
        top: 50%;
        left: 50%;
        width: 100%;
        padding-inline: 16px;
        text-align: center;
        transform: translate3d(-50%, -50%, 0);

        &-label {
          font-size: var(--lbaic-fs-12);
          font-weight: var(--lbaic-fw-500);
          color: var(--lbaic-message-fast-color);
        }
      }

      &-menu {
        position: absolute;
        top: 7px;
        right: 8px;

        &-in {
          position: absolute;
          top: 100%;
          right: 0;
          min-width: 170px;
          background-color: var(--lbaic-message-history-menu-bg);
          border: 1px solid var(--lbaic-message-history-menu-border);
          border-radius: 8px;
          box-shadow: var(--lbaic-chat-shadow);
          overflow: hidden;
          z-index: 10;
        }

        &-item {
          &:not(:last-child) {
            border-bottom: 1px solid var(--lbaic-message-history-menu-border);
          }

          &-in, &-in:not(:hover):not(:active):not(.has-background) {
            width: 100%;
            padding-block: 8px;
            padding-inline: 8px;
            color: var(--lbaic-message-fast-color);
            text-align: left;
            transition: background-color 180ms ease-in-out;

            &.delete {
              color: var(--lbaic-red-100);
            }
          }

          &-in {
            display: flex;
            align-items: center;

            &:hover {
              background-color: rgba(var(--lbaic-button-bg-hover), 0.1);
            }
          }

          &-i {
            width: 20px;
            height: auto;
            display: block;
            fill: currentColor;
          }

          &-label {
            flex: 1 0 0;
            font-size: var(--lbaic-fs-14);
            color: inherit;

            &:not(:first-child:last-child):not(:first-child) {
              padding-inline-start: 6px;
            }
          }
        }
      }

      &-load-more {
        display: flex;
        justify-content: center;
        padding-block-start: 8px;

        &-in, &-in:not(:hover):not(:active):not(.has-background) {
          position: relative;
          padding-block: 8px;
          padding-inline: 24px;
        }

        &-in {
          &:before {
            content: '';
            position: absolute;
            top: 0;
            right: 0;
            bottom: 0;
            left: 0;
            background-color: var(--lbaic-message-fast-bg);
            border-radius: 8px;
            opacity: var(--lbaic-message-history-load-more-bg-opacity, 0.5);
            transition: opacity 360ms ease-in-out;
          }

          &:hover {
            --lbaic-message-history-load-more-bg-opacity: 1;
          }

          &:active {
            --lbaic-message-history-load-more-bg-opacity: 1;
            transform: scale(0.9);
          }
        }

        &-label {
          font-size: var(--lbaic-fs-14);
          color: var(--lbaic-message-fast-color);
        }
      }

      .lbaic-message {
        position: relative;
        min-width: 0;
        width: 50%;
        margin-inline-start: auto;

        &-in {
          width: 100%;
          min-height: 36px;
          padding-block: 8px;
          padding-inline: 16px 48px;
          background-color: var(--lbaic-message-fast-bg-default, transparent);
          border: 1px solid var(--lbaic-message-fast-border);
          border-radius: 8px;
          font-size: var(--lbaic-fs-12);
          font-weight: var(--lbaic-fw-500);
          color: var(--lbaic-message-fast-color);
          transition: background-color 180ms ease-in-out;
          cursor: pointer;

          &:hover {
            --lbaic-message-fast-bg-default: var(--lbaic-message-fast-bg);
          }

          &:active {
            transform: scale(0.9);
          }
        }

        &-info {
          white-space: nowrap;
          word-break: keep-all;
          text-overflow: ellipsis;
          overflow: hidden;

          & * {
            color: currentColor;
          }
        }

        &-input {
          width: 100%;
          font-size: var(--lbaic-fs-14);
          font-weight: var(--lbaic-fw-500);
          color: var(--lbaic-message-fast-color);
          line-height: var(--lbaic-lh-24);
        }
      }
    }
  }
}
