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

::ng-deep .mat-option:first-child .mat-pseudo-checkbox {
  display: none;
}

.caret {
  position: absolute;
  top: 0px;
  right: 0;
  width: 40px;
  height: 36px;
  color: #4ab8dc;
  background-color: #fff;
  border: none;
  border-left: 1px solid #ececec;
  line-height: 1;
  cursor: pointer;

  &.not-allowed {
    background-color: #dcdcdc;
  }
}

.content-box {
  height: 85vh;
  padding: 20px 30px 35px;
  overflow-y: auto;
}

.no-details {
  color: #d8d8d8;
}

.stepper {
  height: 190px;
  margin-top: 10px;

  .inner-step {
    position: relative;
    display: flex;
    justify-content: center;
    flex-direction: column;
    height: 70px;
    padding: 5px;
    text-align: center;

    input {
      width: 490px;
      align-self: center;
    }

    .error {
      position: absolute;
      bottom: 2px;
    }

    .caret {
      i {
        margin-top: 3px;
      }
    }
  }

  .text-center {
    button {
      &:not(:last-child) {
        margin-right: 5px;
      }
    }
  }
}

.mat-horizontal-content-container {
  overflow: visible !important;
}

.selector-wrapper {
  display: flex;
  align-self: center;
  width: 490px;
  height: 32px;
  padding-left: 0;
  font-family: "Open Sans", sans-serif;
  font-size: 15px;
  font-weight: 300;
  box-shadow: 0 3px 1px -2px rgba(0, 0, 0, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.14), 0 1px 5px 0 rgba(0, 0, 0, 0.12);
  multi-level-select-dropdown {
    width: 100%;
  }
  mat-form-field {
    width: 100%;

    .mat-form-field-wrapper {
      padding-bottom: 0;
    }

    .mat-icon {
      font-size: 20px;
    }
  }

  .dropdown-multiselect {
    width: 100% !important;

    > button {
      padding: 6px 22px;
    }
  }
}

.list-header {
  padding: 0 15px;
}

.scrolling-content {
  display: block;
  max-height: 450px;
  padding: 15px 5px;
  overflow-x: hidden;
  overflow-y: auto;

  &.stepper-opened {
    height: 250px;
  }
}

.roles {
  .selector-wrapper-edit {
    position: relative;
    display: flex;
    justify-content: space-between;
    height: 36px;
    padding-left: 10px;
    background: #fff;
    box-shadow: 0 3px 1px -2px rgba(0, 0, 0, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.14), 0 1px 5px 0 rgba(0, 0, 0, 0.12);

    multi-select-dropdown {
      width: 100%;

      .dropdown-multiselect {
        > button {
          padding: 8px 22px 5px;
        }
      }
    }

    .caret {
      &:hover {
        box-shadow: 0 3px 1px -10px rgba(0, 0, 0, 0.2), 0 2px 1px 0 rgba(0, 0, 0, 0.17), 0 1px 5px 0 rgba(0, 0, 0, 0.12);
      }
    }
  }
}

.groups {
  width: 20%;
}

.users {
  width: 30%;
  padding: 0 10px;
}

.users-list {
  position: relative;
  padding: 5px 10px;
  font-family: "Open Sans", sans-serif;
  font-size: 15px;
  font-weight: 300;
  color: #577289;

  i {
    color: #ff5722;
    font-size: 18px;
    cursor: pointer;
  }

  .list-selected {
    width: 100%;
    height: inherit;
    min-height: 0;
    margin-top: 50px;
    overflow: hidden;
  }
}

.expanded-panel {
  display: flex;
  align-items: flex-end;

  .add-input-block {
    display: flex;
    height: 36px;
    padding-right: 0;
    outline: none;
    box-shadow: 0 3px 1px -2px rgba(0, 0, 0, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.14), 0 1px 5px 0 rgba(0, 0, 0, 0.12);

    input {
      height: 36px;
      width: 170px;
      padding: 0;
      padding-left: 10px;
    }

    .caret {
      width: 50px;
    }
  }
}

mat-expansion-panel-header {
  &.mat-expansion-panel-header {
    font-family: "Open Sans", sans-serif;
    font-size: 15px;
    font-weight: 300;
    color: #577289;
  }
}

.mat-step-header {
  .mat-step-icon {
    background-color: #36afd5 !important;
  }

  .mat-step-label {
    font-family: "Open Sans", sans-serif;
    font-size: 16px;
    font-weight: 300;
  }
}

.dashboard_table {
  .dashboard_table_body {
    .actions {
      padding: 10px 0;
    }

    &.filter-row {
      .actions {
        button {
          background: none;

          .mid {
            vertical-align: sub;
          }
        }
      }
    }
  }

  .th_actions {
    width: 10%;
  }
}

.mat-chip-list {
  pointer-events: auto;
}

.mat-chip:not(.mat-basic-chip) {
  position: relative;
  display: inline-block;
  max-width: 100%;
  padding: 7px 25px 7px 10px;
  transition: box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 24px;
  cursor: default;
  white-space: nowrap;
  overflow: hidden;
}

mat-chip.mat-chip a {
  position: absolute;
  right: 15px;
}

mat-form-field.chip-list {
  &.mat-form-field {
    position: absolute;
    top: 2px;
    width: 94%;
    font-size: 16px;
    font-weight: 300;
  }
}

.mat-raised-button {
  &.butt {
    &.butt-success {
      margin-left: 0;
    }
  }
}

.multiple-select {
  border-bottom: 1px solid #dedbdb;
  padding: 0;

  a {
    display: inline-block;
    width: 50%;
    padding: 0 15px;
    vertical-align: middle;
    color: #575757;
    cursor: pointer;

    i {
      vertical-align: sub;
      font-size: 20px;
    }

    &:hover {
      color: #4eaf3e;
      background: #f9fafb;
    }

    &.deselect {
      &:hover {
        color: #f1696e;
      }
    }
  }
}

table {
  width: 100%;

  .name {
    width: 15%;
    max-width: 200px;
    padding-right: 10px;
    overflow: hidden;
    span {
      cursor: default;
    }
  }

  .users {
    width: 35%;
  }

  .actions {
    width: 10%;
    color: #607d8b;
    text-align: center;

    .actions-wrapper {
      display: flex;
      align-items: center;
      justify-content: flex-end;
      height: 41px;
    }

    span {
      transition: all 0.35s ease-in-out;
      cursor: pointer;

      &.action-disabled {
        cursor: not-allowed;
      }

      .mat-icon {
        font-size: 18px;
        padding-top: 12px;
        &.big-icon {
          font-size: 25px;
          padding-top: 10px;
          transition: 0.25s;
        }
      }

      &:hover {
        color: darken(#607d8b, 10%);
      }
    }
  }
}
