/*!
 * Licensed to the Apache Software Foundation (ASF) under one
 * or more contributor license agreements.  See the NOTICE file
 * distributed with this work for additional information
 * regarding copyright ownership.  The ASF licenses this file
 * to you 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.
 */

.audit-table-wrapper {
  position: relative;
  width: 100%;
  max-height: calc(100vh - 130px);
  max-height: -moz-calc(100vh - 130px);
  max-height: -webkit-calc(100vh - 130px);
  overflow: visible;
  box-shadow: 0 3px 5px -1px rgba(0, 0, 0, 0.2), 0 6px 10px 0 rgba(0, 0, 0, 0.14), 0 1px 18px 0 rgba(0, 0, 0, 0.12);

  &.scroll {
    overflow: auto;
  }

  .audit {
    width: 100%;
    min-width: 1100px;
    overflow: auto;
    border-collapse: inherit;
    box-shadow: none;

    .mat-cell {
      vertical-align: middle;
    }

    tr {
      .th_user {
        z-index: 9 !important;
        width: 19%;
      }

      .th_action {
        z-index: 8 !important;
        width: 11%;
        max-width: 250px;
      }

      .th_date {
        z-index: 10 !important;
        width: 14%;
        max-width: 240px;
        padding-left: 0;
      }

      .th_project {
        z-index: 7 !important;
        width: 11%;
        max-width: 206px;
      }

      .th_resource {
        z-index: 5 !important;
        width: 14%;
        max-width: 240px;
      }

      .th_resource-type {
        z-index: 6 !important;
        width: 14%;
        max-width: 240px;
      }

      .th_buttons {
        z-index: 4 !important;
        width: 6%;
      }

      th {
        z-index: 2 !important;
        padding-right: 5px;

        &.th_charges {
          z-index: 3 !important;
        }
      }

      td {
        padding-left: 20px;
        font-size: 13px;

        &.info {
          z-index: 1 !important;
          padding: 40px;
          text-align: center;
        }
      }

      &.filter-row {
        th {
          padding: 5px;
          z-index: 103 !important;
          font-size: 13px;
        }

        .filter-field {
          font-size: 13px;
        }
      }

      &.header-row {
        th {
          font-size: 11px;

          .label {
            padding-left: 0;
          }
        }
      }
    }

    .tags {
      .label {
        padding-top: 0;
      }
    }

    .service {
      min-width: 175px;
    }

    .env_name {
      width: 16%;
      min-width: 200px;
    }

    .th_project {
      width: 12%;
    }

    .th_type {
      width: 10%;
      min-width: 150px;
    }

    .th_status {
      width: 8%;
      min-width: 150px;
    }

    .th_charges {
      width: 10%;
      min-width: 155px;
      text-align: right;

      .label {
        padding-top: 0;
      }
    }

    .th_project {
      min-width: 150px;
    }

    .tags-col {
      padding: 5px;

      mat-chip {
        display: inline-block;
        min-height: 20px;
        max-width: 110px !important;
        padding: 5px 10px;
        margin: 2px;
        font-size: 13px;
        white-space: nowrap;
        line-height: 10px;
      }
    }

    .mat-column-charge {
      text-align: right;
    }

    .header-row {
      position: unset;

      .th_charges {
        padding-top: 0;

        .label {
          padding-top: 12px;
        }
      }

      .label {
        display: inline-block;
        padding-top: 13px;
        vertical-align: super !important;

        .text {
          padding-left: 20px;
        }
      }

      .sort {
        position: absolute;
        bottom: 20px;

        &-arrow {
          width: 6px;
          height: 6px;
          border: 3px solid transparent;
          border-bottom: 3px solid rgba(0, 0, 0, 0.54);
          border-left: 3px solid rgba(0, 0, 0, 0.54);
          cursor: pointer;

          &.active {
            border-bottom: 3px solid #35afd5;
            border-left: 3px solid #35afd5;
          }
        }

        .down {
          transform: rotate(-45deg);
        }

        .up {
          transform: rotate(135deg);
        }
      }
    }
  }

  .table-item-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-right: 10px;
    span {
      cursor: default;

      &::after {
        content: "";
        display: block;
      }
    }
  }

  .action-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-right: 10px;
    span {
      max-width: 85%;
    }

    .audit-info {
      color: lightgray;
      cursor: pointer;
      margin-left: 5px;
    }
  }

  .dashboard_table_body {
    td:first-child {
      cursor: default;
    }

    .dropdown-multiselect {
      button {
        height: 34px;
        padding: 7px 20px;
        font-size: 13px;
      }
    }
  }
}

.selected-items-wrapper {
  display: flex;
  align-items: center;

  .select__wrapper {
    margin-left: 20px;
    width: 80px;
  }
}

.pagination-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-right: 30px;

  .not-active {
    .navigation-butts {
      color: lightgray;
    }
  }

  .navigation-butts {
    cursor: pointer;
    color: #35afd5;

    .not-active {
      color: lightgray;
    }
  }
}

.audit-actions {
  text-align: right;
}

.audit-user {
  padding-left: 20px;
}

.table-footer {
  position: sticky;
  position: -webkit-sticky;
  bottom: -1px;
  background: inherit;
  border-top: 1px solid #e0e0e0;
  transform: translateY(-1px);
  border-bottom: none;
}
