/*
 * 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 "theme-mixin";

.themeMixin({
  .revisions-comparator {
    padding: 10px 15px 15px;
  }

  .commit-tree {
    margin-bottom: 10px;

    ::ng-deep .ant-table-body {
      overflow-y: auto !important;
    }
  }

  .cursor-hand {
    cursor: pointer;
  }

  .selected-revision {
    background-color: fade(@primary-6, 15%) !important;
  }

  .revisions-comparator-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-bottom: 12px;
    flex-wrap: wrap;

    .revision-select {
      flex: 1;
      min-width: 100px;
      display: block;
    }

    .compare-label {
      white-space: nowrap;
    }
  }

  .diff-panel {
    border: 1px solid @border-color-base;
    border-radius: 4px;
  }

  .paragraphs-div {
    overflow: auto;
    max-height: 35vh;
  }

  .paragraph-item {
    transition: background-color 200ms ease-out;
    border-bottom: 1px solid @border-color-split;
    cursor: pointer;

    &:hover {
      background-color: fade(@primary-6, 8%);
    }

    &.paragraph-item-selected {
      background-color: fade(@primary-6, 15%);
    }
  }

  .paragraph-item-heading {
    padding: 8px 12px;
  }

  .paragraph-id {
    font-family: monospace;
    font-size: 12px;
    color: @text-color-secondary;
  }

  .paragraph-title {
    padding: 0 5px;
  }

  .paragraph-first-string {
    display: block;
    height: 1.8em;
    overflow: hidden;
    padding-top: 4px;
    white-space: nowrap;
    text-overflow: ellipsis;
    font-size: 12px;
    color: @text-color-secondary;
  }

  .empty-paragraph-message {
    font-size: 1.5em;
    color: @text-color-secondary;
    text-align: center;
    padding: 40px 0;
  }

  .code-panel-col {
    display: flex;
    flex-direction: column;
  }

  .code-panel-title {
    font-size: 14px;
    padding: 5px 0 8px;
  }

  .code-panel {
    flex: 1;
    width: 100%;
    min-height: 50vh;
    max-height: 70vh;
    overflow-y: auto;
    border: 1px solid @border-color-base;
    border-radius: 4px;
    padding: 8px;
    margin: 0;
    font-size: 13px;
  }

  .empty-code-panel {
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: @text-color-secondary;
  }

  ::ng-deep {
    .color-green-row {
      background-color: fade(@green-6, 15%);
      display: block;
      color: @green-6;
    }

    .color-red-row {
      background-color: fade(@red-6, 15%);
      display: block;
      color: @red-6;
    }

    .color-black {
      color: inherit;
    }
  }
});
