@use "../../assets/mixins.scss" as *;

.pl-log-view {
  --log-background: var(--bg-base-light);
  --contour-color: var(--txt-01);
  --contour-border-width: 1px;
  --label-offset-left-x: 8px;
  --label-offset-right-x: 8px;
  --border-color-log-view: var(--border-color-div-grey);

  height: 100%;
  max-height: calc(100% - var(--contour-offset));
  max-width: calc(100% - var(--contour-offset));
  border-radius: 6px;
  background: var(--log-background);
  display: flex;
  position: relative;
  min-height: 44px;
  padding-right: 40px;

  &__contour {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: var(--border-radius-control);
    border-width: var(--contour-border-width);
    border-color: var(--border-color-log-view);
    border-style: solid;
    box-shadow: none;
    z-index: 0;
    pointer-events: none;
  }

  label {
    @include outlined-control-label();
  }

  &.has-error {
    --log-background: linear-gradient(90deg, #ffebeb 0%, #ffffff 100%);
    --border-color-log-view: var(--border-color-error);
  }

  &__copy {
    position: absolute;
    top: 12px;
    right: 12px;
    cursor: pointer;

    --icon-color: var(--ic-02);

    > *:hover {
      --icon-color: var(--txt-01);
    }
  }

  &__content {
    margin: 12px;
    max-height: 100%;
    max-width: 100%;
    flex: 1;
    color: var(--txt-01);
    font-feature-settings:
      "ss11" on,
      "ss15" on,
      "ss17" on;
    font-family: var(--font-family-monospace);
    white-space: pre;
    font-size: 14px;
    font-weight: 400;
    line-height: 20px;
    @include scrollbar(true, true);
  }

  &__error {
    margin: 12px;
    max-height: 100%;
    max-width: 100%;
    flex: 1;
    color: var(--txt-01);
    font-feature-settings:
      "ss11" on,
      "ss15" on,
      "ss17" on;
    font-family: var(--font-family-monospace);
    white-space: pre;
    font-size: 14px;
    font-weight: 400;
    line-height: 20px;
    @include scrollbar(true, true);
  }
}
