/*
 * Copyright 2023 Harness, Inc.
 *
 * 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.
 */

@import 'src/utils/utils';

.main {
  --code-editor-border-color: var(--grey-200);

  .codeViewer {
    flex-grow: 1;

    :global {
      .cm-gutter {
        background-color: var(--grey-50);
      }

      .cm-editor {
        border: none !important;

        .cm-scroller {
          padding: 0 !important;

          .cm-line {
            &,
            * {
              @include mono-font;
            }
          }
        }

        .cm-content {
          padding: 0;
        }
      }
    }

    .lineNo {
      min-width: 70px !important;
      text-align: right;
      padding-right: 10px;
      height: 100%;
      color: var(--grey-400);
    }
  }

  .layout {
    overflow: hidden;
    border: 1px solid var(--code-editor-border-color);
    border-radius: 4px;

    .blameColumn {
      width: 450px;
      background: var(--grey-50);
      flex-shrink: 0;
      position: relative;
      border-right: 1px solid var(--code-editor-border-color);

      .blameBox {
        position: absolute;
        width: 100%;

        &[data-block-top='-1'] {
          display: none;
        }

        &::before {
          position: absolute;
          z-index: 2;
          content: '';
          width: 100vw;
          height: 1px;
          background-color: var(--code-editor-border-color);
        }

        &:first-of-type::before {
          display: none;
        }

        .blameBoxLayout {
          padding: var(--spacing-medium);
          align-items: center;
        }
      }
    }
  }
}

.blameCommitPortalClass {
  :global {
    .bp3-popover-content {
      padding: var(--spacing-large);
      max-width: 600px;
    }
  }
}

.commitTitle {
  font-size: 13px !important;
  font-style: normal !important;
  font-weight: 600 !important;
  color: var(--grey-900) !important;
}

.commitDate {
  font-size: 13px !important;
}
