/*
Copyright 2019-2026 The Tekton Authors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
    http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

@use '@carbon/react/scss/config' as *;
@use '@carbon/react/scss/theme' as *;
@use '@carbon/react/scss/type' as *;


.tkn--scroll-buttons {
  position: fixed;
  inset-inline-end: .75rem;
  inset-block-end: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  z-index: 10000;
}
.tkn--scroll-buttons--maximized{
   inset-inline-end: 2rem;
}

pre.tkn--log {
  --tkn-log-inline-padding: 1.6rem;
  position: relative;
  padding-block-start: 2rem;
  padding-block-end: 1.3rem;
  padding-inline: var(--tkn-log-inline-padding);
  @include font-family('mono');
  // @include type-style('code-01');
  font-size: 0.75rem;
  @media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 2dppx) {
    font-size: 0.6875rem;
  }

  line-height: 1rem; // Update the react-window List itemSize if changing this
  background-color: $background;
  color: $text-primary;

  word-break: normal;
  word-wrap: normal;

  .#{$prefix}--skeleton__text {
    background-color: $skeleton-background;

    &::before {
      background-color: $skeleton-element;
    }
  }

  a {
    color: $link-primary;
  }

  code {
    white-space: pre;
    overflow-wrap: normal;
    display: block;
    inline-size: auto;
    min-inline-size: max-content;
  }

  .#{$prefix}--btn-set {
    position: absolute;
    inset-block-start: 0;
    inset-inline-end: 0.5rem; // var(--tkn-log-inline-padding);
  }

  .tkn--log-trailer {
    font-family: 'IBM Plex Sans', sans-serif;
    // @include type-style('helper-text-01');
    font-weight: bold;

    &[data-status='Completed'] {
      color: $support-success;
    }
    &[data-status='Error'] {
      color: $support-error;
    }
  }

  .tkn--log-container {
    overflow-x: auto;

    .tkn--log-filtered {
      display: flex;
      margin-block-end: 1rem;

      svg {
        margin-inline-end: 0.5rem;
      }
    }
  }

  .tkn--log-container:has(code:not(:empty)) + .tkn--log-trailer {
    margin-block-start: 1rem;
  }
}

.tkn--log-settings-menu {
  // needs to appear over sticky headers
  z-index: 4998;
}

.#{$prefix}--popover-content.tkn--log-settings-menu-content {
  padding-block-end: .5rem;
  padding-block-start: 1rem;
  padding-inline: 1rem;
  font-family: 'IBM Plex Sans', sans-serif;
  color: $text-secondary;
  background-color: $layer-02;

  hr {
    border: none;
    margin-block: 1rem;
    background: $border-subtle-01;
    block-size: 1px;
  }
}
