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

.main {
  //   --layout-spacing: var(--layout-medium) !important;
  border-radius: 4px;
  border: 1px solid var(--border-color);
  background: var(--white);
  box-shadow: 0px 0.5px 2px 0px rgba(96, 97, 112, 0.16), 0px 0px 1px 0px rgba(40, 41, 61, 0.08);

  position: relative;

  .showMore {
    position: absolute !important;
    right: 10px;
    top: 12px;
  }

  .layout {
    padding: 10px 14px !important;
    align-items: center !important;
  }

  .checks {
    padding: var(--spacing-medium) !important;
    padding-bottom: var(--spacing-large) !important;
    background: var(--white);
    border-radius: 4px;

    .table {
      border: 1px solid var(--grey-200);
      border-radius: 4px;
      background-color: var(--grey-50);

      .row {
        height: 36px;
        align-items: center;
        display: flex;
        border-bottom: 1px solid var(--grey-100);
        padding: 0 var(--spacing-medium);
        overflow: hidden;

        &:last-child {
          border-bottom: none;
        }

        .rowLayout {
          width: 100%;
          max-width: 100%;
        }

        .status {
          display: flex;
          align-items: center;
          width: 130px;
          min-width: 130px;
        }

        .name {
          width: 250px;
          min-width: 250px;
          color: var(--primary-7) !important;
        }

        .desc {
          flex-grow: 1;
          flex-shrink: 1;
          font-weight: 500 !important;
          color: var(--grey-600) !important;
          padding-left: var(--spacing-xlarge);
        }

        .time {
          width: 80px;
          min-width: 80px;
          text-align: right;
          font-size: 11px;
          font-weight: 500;
          display: flex;
          align-items: normal;
          justify-content: end;
          color: var(--grey-700) !important;
          white-space: nowrap;
        }
      }
    }
  }
}

.codeOwnerTable {
  .row {
    box-shadow: unset !important;
    border-bottom: 1px solid var(--grey-100) !important;
    padding: var(--spacing-small) !important;
    margin-bottom: unset !important;
    &:last-child {
      border-bottom: none !important;
    }
  }

  :global {
    [class*='TableV2--header'] {
      border-bottom: 1px solid var(--grey-100) !important;
      padding-top: var(--spacing-small) !important;
      padding-left: var(--spacing-medium) !important;
      padding-right: var(--spacing-medium) !important;
      padding-bottom: var(--spacing-xsmall) !important;
    }

    .bp3-icon-double-caret-vertical {
      fill: var(--grey-200) !important;
    }
  }
}

.ownerContainer {
  :global {
    [class*='Avatar--Avatar'] {
      cursor: unset !important;
      &:first-child {
        margin-left: unset !important;
      }
    }
  }
}

.ownerTooltip {
  display: flex;
  flex-wrap: wrap;
}

.approvalText {
  font-size: 12px !important;
}

.circle {
  width: 12px; /* Width of the circle */
  height: 12px; /* Height of the circle */
  background-color: var(--orange-50) !important; /* Color of the circle */
  border-radius: 50%; /* The magic to make it round */
  border: 1px solid var(--orange-700) !important;
  display: flex;
  align-items: center;
  margin-right: var(--spacing-small) !important;
}

.waitingContainer {
  justify-content: unset !important;
}

.codeOwner {
  --layout-spacing: 1px !important;
}

.redIcon {
  :global {
    path {
      fill: var(--red-700) !important;
    }
  }
}
