/*
 * Copyright (C) 2017-2019 Dremio Corporation
 *
 * 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 "~#oss/uiTheme/less/mixins.less";

:global {
  .commitEntryTooltip {
    table {
      table-layout: fixed;
      width: 284px;
    }
    tr > td:first-of-type {
      vertical-align: top;
    }
    td:first-of-type {
      width: 30%;
    }
    td {
      vertical-align: top;
    }
    a {
      color: lighten(#008489, 8%);
    }
  }

  .commitEntry {
    height: 100%;
    padding: 8px 12px;
    border-bottom: 1px solid var(--border--neutral);

    position: relative;

    transition: background-color 0.25s linear;

    &:not(.disabled) {
      &:hover,
      &:focus {
        background-color: var(--fill--primary--hover);
      }
      &:focus-within:has(> button:focus-visible) {
        background-color: var(--fill--primary--hover);
      }
      &.isSelected {
        background-color: var(--fill--primary--selected);
      }
    }

    button {
      all: unset;
      cursor: pointer;
      display: block;
    }

    &-select:after {
      position: absolute;
      left: 0;
      top: 0;
      content: "";
      width: 100%;
      height: 100%;
    }

    a {
      position: relative;
    }

    &.disabled {
      cursor: not-allowed;
      a {
        pointer-events: none;
      }
    }

    &-desc {
      font-size: 12px;
      margin-bottom: 6px;
    }

    &-content {
      .flex-center;
      justify-content: space-between;
      font-size: 14px;
      font-weight: normal;

      & > * {
        width: 33.3%;
        margin-right: 4px;
      }
    }

    .commitEntryHash {
      z-index: 1;
      padding-top: 2px;
    }

    &-userInfo {
      .flex-center;
      line-height: normal;
    }
    &-userName {
      margin-left: var(--dremio--spacing--05);
    }
  }
}
