@import '../../../styles/core.scss';

.APILog {
  table {
    width: 100%;
    td {
      &:first-child { color: var(--project-color-primary, #{get(color 'blue')}) }  
      > pre:only-child {
        scrollbar-width: none;
        -ms-overflow-style: -ms-autohiding-scrollbar;
        &::-webkit-scrollbar { display: none }
      }
    }
  }
  pre {
    max-height: 25em;
    padding: 1em;
    background-color: get(grays, 1);
    color: get(grays, -1);
    border-radius: 4px;
    border: none;
  }
  &-info {
    padding: .6em 0;
    > * {
      white-space: nowrap;
    }
  }
  &-tabs {
    z-index: 10;
    position: sticky;
    top: 0;
    background: #fff;
  }
  &-tableValue {
    overflow: scroll;
    &:not(:hover) {
      overflow: hidden;
      text-overflow: ellipsis;
    }
    @at-root pre#{&} {
      // hack: prefix this class with a `pre` element selector
      color: get(grays, 1);
      white-space: pre;
      background-color: transparent;
      padding: 0;
      border: none;
    }
  }
  &-copy {
    position: absolute;
    top: 0;
    right: 0;
    margin: 1em;
    display: inline-flex;
    align-items: baseline;
    // line-height: 1.3;
    font-weight: 600;
    &:before,
    &:after {
      display: inline-flex;
      margin-right: 0.4em;
      font-size: 16px;
      line-height: 1;
      font-weight: 600;
      -moz-osx-font-smoothing: grayscale;
      -webkit-font-smoothing: antialiased;
      font-family: FontAwesome, "Font Awesome 5 Free";
      font-style: normal;
      font-variant: normal;
      text-rendering: auto;
      line-height: 1;
      order: -1;
      transition: inherit;
    }
    &:before {
      content: '\f328';
      content: '\f0c5';
      font-weight: 100;
    }
    &:after {
      content: '\f00c';
      top: 0.5em;
      left: 1em;
      position: absolute;
      transform: scale(.5);
      opacity: 0;
    }
    &_OK:after  { content: '\f00c' }
    &_ERR:after { content: '\f00d' }

    &_OK, &_ERR {
      pointer-events: none;
      &:before {
        opacity: 0;
        transform: scale(.5);
        opacity: 0;
      }
      &:after {
        transform: scale(1);
        opacity: 1;
      }
    }
  }
}
