/*
 * 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.
 */

.container {
  margin-top: 0 !important;
  box-shadow: 0px 0px 1px rgba(40, 41, 61, 0.08), 0px 0.5px 2px rgba(96, 97, 112, 0.16);
  border-radius: 4px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;

  :global {
    .highlight {
      background-color: var(--yellow-300);
    }
  }

  .heading {
    box-shadow: 0px 0px 1px rgba(40, 41, 61, 0.08), 0px 0.5px 2px rgba(96, 97, 112, 0.16);
    align-items: center;
    padding-left: var(--spacing-large) !important;
    background-color: var(--grey-100);
  }

  .content {
    padding: var(--spacing-xxlarge) 0 var(--spacing-large) var(--spacing-medium) !important;
    flex-grow: 1;
  }
}

.fileContent {
  padding: var(--spacing-small) var(--spacing-xlarge) var(--spacing-xlarge) var(--spacing-xlarge) !important;
  flex-grow: 1;
  display: flex;

  > div {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
  }
}

.gitBlame {
  padding: var(--spacing-xlarge) !important;
}

.gitCommit {
  padding: var(--spacing-xlarge) var(--spacing-xlarge) 0 var(--spacing-xlarge) !important;

  :global {
    [class*='TableV2--row'] {
      height: 45px !important;
    }
    [class*='TableV2--row']:last-child {
      border-bottom-left-radius: 4px !important;
    }
  }
}

.gitHistory {
  padding: var(--spacing-small) var(--spacing-xlarge) !important;
}

.tabsContainer {
  flex-grow: 1;
  display: flex;
  background-color: var(--primary-bg) !important;

  > div {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
  }

  > div > div[role='tablist'] {
    background-color: var(--white) !important;
    padding-left: var(--spacing-large) !important;
    padding-right: var(--spacing-xlarge) !important;
    border-bottom: 1px solid var(--grey-200) !important;
  }

  > div > div[role='tabpanel'] {
    margin-top: 0;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
  }

  [aria-selected='true'] {
    .tabTitle,
    .tabTitle:hover {
      color: var(--grey-900) !important;
      font-weight: 600 !important;
    }
  }

  .tabTitle {
    font-weight: 500;
    color: var(--grey-700);
    display: flex;
    align-items: center;
    height: 24px;
    margin-top: var(--spacing-8);

    > svg {
      display: inline-block;
      margin-right: 5px;
    }

    .count {
      margin-left: var(--spacing-small);
      display: inline-block;
      border-radius: 8px;
      font-weight: 500;
      font-size: var(--font-size-small);
      color: var(--primary-7) !important;
      background-color: var(--primary-1) !important;
      padding: 3px 6px !important;
    }
  }

  .tabTitle:not:first-child {
    margin-left: var(--spacing-8) !important;
  }
}
