@include comp(ai-chat-box) {
  .ai-chat-box-input {
    position: relative;

    .ai-chat-box-send-button {
      position: absolute;
      bottom: 4px;
      right: 4px;
      z-index: 2;

      &.button-loading {
        @include comp(loading) {
          top: 1px;
          left: -0.5px;
        }
      }
    }
  }

  .ai-chat-box-histories {
    .ai-chat-box-history-item {

      word-break: break-all;

      &[data-role=user] {
        text-align: right;

        .ai-chat-box-history-item-inner {
          display: inline-block;
          background-color: plv(secondary-2);
          color: plv(text-1);
        }
      }

      &[data-role=assistant] {

      }
    }
  }

  &.ai-chat-box-fit-height {
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: stretch;

    .ai-chat-box-histories {
      flex: 1;
      overflow: hidden;
    }
  }

  @include sizeMixin(ai-chat-box, ()) {
    .ai-chat-box-history-item {
      &[data-role=user] {
        .ai-chat-box-history-item-inner {
          padding: calc(#{$margin} / 2) $margin;
          border-radius: $border-radius;
        }
      }

      & + * {
        margin-top: $margin;
      }
    }

    .ai-chat-box-histories {
      margin-bottom: $margin;
    }
    .ai-chat-box-history-prepend {
      margin-bottom: $margin;
    }
  }
}
