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

.managment-wrapper {
  position: relative;
  height: calc(100vh - 130px);
  margin-left: -15px;
  margin-right: -15px;
  padding-left: 15px;
  padding-right: 15px;
  scroll-behavior: smooth;

  .scroll-wrapper {
    height: inherit;
    overflow: auto;
    scroll-behavior: smooth;
    box-shadow: 0px 3px 5px -1px rgba(0, 0, 0, 0.2), 
                0px 6px 10px 0px rgba(0, 0, 0, 0.14),
                0px 1px 18px 0px rgba(0, 0, 0, 0.12);
    
    .nav-buttons {
      position: absolute;
      bottom: 0;
      z-index: 1013;
      display: flex;
      justify-content: space-around;
      align-items: center;
      height: 51px;
      background-color: #ffffff;

      &.border {
        border-top: 1px solid #e3e5e8;
      }

      & button {
        display: flex;
        align-items: center;
        justify-content: center;
        height: 25px;
        width: 25px;
        background-color: #fff;
        box-shadow: none;

        mat-icon {
          color: lightgrey;
    
          &.highlight {
            color: #35afd5;
          }
        }
      }
      
      &.border {
        border-top: 1px solid #e3e5e8;
      }
    }
  }

  .ani {
    max-height: calc(100vh - 130px);
    background-color: #ffffff;
    
    .wrapper {
      position: relative;
      display: block;
      width: 100%;
      height: inherit;
      max-height: calc(100vh - 130px);
      overflow: unset;
      scroll-behavior: smooth;
      background-color: #ffffff;
    }
  }
}

.data-grid {
  &.management {
    .filter-row-item {
      padding: 5px;
    }

    .settings {
      min-width: 7%;
    }

    .mat-column-checkbox {
      min-width: 38px;
      padding-left: 10px;
      padding-right: 0px;

      &.label-header {
        .empty-checkbox {
          z-index: 1011;
        }
      }
    }

    .user {
      width: 15%;
      min-width: 180px;
    }

    .name,
    .project {
      width: 9%;
      min-width: 140px;
      .list-menu li {
        text-transform: inherit;
      }
    }

    .shape {
      width: 15% !important;

      .label {
        position: absolute;
      }
      min-width: 150px;
    }

    .endpoint {
      width: 10% !important;
      min-width: 140px;
    }

    .status {
      width: 10% !important;
      min-width: 125px;
    }

    .type {
      width: 10%;
      min-width: 110px;
    }

    .resources {
      width: 27%;
      min-width: 240px;
    }

    .settings {
      padding-right: 14px;
    }

    .actions {
      position: sticky;
      margin-top: 0px;
      padding-right: 10px;
      .label {
        padding-right: 5px;
      }
    }

    .actions-col {
      width: 6%;
    }

    .label-header {
      padding-left: 15px;
      height: 56px;

      .ar {
        left: 20px;
        top: 2px;
        &.checkbox-border {
          left: 18px;
        }
      }

      .settings {
        min-width: 7%;
      }

      &.mat-column-checkbox {
        z-index: 1012 !important;
        padding-left: 10px;

        .ar {
          position: absolute;
          top: 10px;
        }
      }

      &.user {
        z-index: 11 !important;
      }

      &.type {
        z-index: 10 !important;
      }

      &.project {
        z-index: 9 !important;

        .label {
          position: absolute;
        }
      }

      &.endpoint {
        z-index: 8 !important;

        .label {
          position: absolute;
        }
      }

      &.shape {
        z-index: 7 !important;
      }

      &.status {
        z-index: 6 !important;
      }

      &.resources {
        z-index: 5 !important;
      }

      &.actions {
        z-index: 4 !important;
        min-width: 100px !important;
      }
    }

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

    .user-name {
      max-width: 250px;
      padding-right: 22px;
      overflow: hidden;
      word-break: break-all;
      white-space: nowrap;
    }

    .buttons-wrap {
      padding: 0;
      border-top: 1px solid rgba(0, 0, 0, 0.12);
      border-bottom: none;
      transform: translateY(-1px);
    }

    .buttons {
      position: sticky;
      left: 0;
    }

    button {
      background-color: #fff;
      box-shadow: none;
      mat-icon {
        color: lightgrey;
        &.highlight {
          color: #35afd5;
        }
      }
    }
  }
}

table.management {
  width: 100%;

  thead {
    background: transparent !important;
  }

  td:not(.info) {
    padding: 5px;
    padding-left: 20px;
  }

  .header-row {
    height: auto;
    .label {
      display: inline-block;
      padding-top: 14px;
      padding-left: 5px;
      vertical-align: super !important;
    }
    .actions {
      text-align: right;
      .label {
        display: inline-block;
        padding-top: 11px;
      }
    }
  }

  .filter-row {
    background: inherit;

    .filter-row-item {
      left: auto !important;
      &.actions-col {
        right: -15px;
      }
    }

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

  .info {
    padding: 40px;
    text-align: center;
  }

  .no-border {
    border-bottom: none;
  }

  .source .resource-wrap {
    .resource-actions {
      padding-right: 0;
    }
    .resource-name .detailed-link {
      cursor: default !important;
    }
  }
}

.computation {
  cursor: pointer;
  color: #35afd5;
}

.table-footer {
  height: 48px;
}

.header-checkbox {
  margin-top: 7px;
  float: left;
}

@media screen and (max-width: 1550px) {
  .managment-wrapper {
    .source {
      .resource-wrap {
        .resource-name {
          width: 40%;
        }

        .resource-status {
          width: 40%;
        }

        .resource-actions {
          width: 20%;
        }
      }
    }
  }
}
