@import '../../../core/src/style/variables';

.BomModal-share {
  & .placeholder {
    color: $middarkgrey;
  }
  &-table {
    min-height: 150px;
    table {
      margin: 10px 0 0 0;
      width: 99%;
    }
    tr {
      border: 1px solid $grey;
    }
    th {
      width: 70%;
      padding: 0.6em;
      font-weight: 500;
      font-size: 12px;
      text-transform: uppercase;
      background: $evenlightergrey;
      &:last-child {
        width: 30%;
        border-left: 2px solid $grey;
      }
    }
    .email-cell {
      display: flex;
      justify-content: space-between;
    }
    td {
      span {
        cursor: default;
      }
      padding: 9px;
      position: relative;
      &.dropdown-container {
        padding: 0;
      }
      &:last-child {
        border-left: 2px solid $grey;
      }
      .delete {
        cursor: pointer;
        font-size: 10px;
        padding: 5px;
        background: none;
        border: none;
        border-radius: 100%;
        &:hover {
          .BomIcon--cross {
            color: white;
          }
          background: red;
        }
      }
      .undoDelete {
        cursor: pointer;
        font-size: 12px;
        padding: 6px;
        // Flip the arrow so it looks like "go back" instead of "go forward"
        -moz-transform: scaleX(-1);
        -o-transform: scaleX(-1);
        -webkit-transform: scaleX(-1);
        transform: scaleX(-1);
        background: none;
        border: none;
        border-radius: 100%;
        .BomIcon--reload {
          padding-top: 5px;
        }
        &:hover {
          .BomIcon--reload {
            color: white;
          }
          background-color: $middarkgrey;
        }
      }
    }
    & .pending-user-container {
      font-weight: bold;
      & > td {
        padding: 0;
      }
      input {
        border: 0;
        margin: 1px 0;
        &.BomModal-share--pendingAddInput {
          width: 89%;
        }
      }
    }
    & .add-new-user-container {
      font-weight: normal;
    }
    & .row-to-delete {
      td {
        color: $midlightgrey;
        font-style: italic;
      }
      .delete {
        display: none;
      }
      .custom-dropdown {
        select {
          pointer-events: none;
        }
        &:after {
          display: none;
        }
      }
    }
  }
  // hiding owner for now per WPT-11831
  // &--owner {
  //   font-weight: bold;
  //   color: $middarkgrey;
  // }

  .custom-dropdown {
    width: 100%;
    position: relative;
    display: inline-block;
    vertical-align: middle;
    select {
      width: 100%;
      background: white;
      font-size: inherit;
      padding: 0.5em;
      padding-right: 2.5em;
      border: 0;
      margin: 0;
      text-indent: 0.01px;
      text-overflow: '';
      -webkit-appearance: none; /* hide default arrow in chrome OSX, firefox */
      -moz-appearance: none;
      appearance: none;
    }
    &:before,
    &:after {
      content: '';
      position: absolute;
      pointer-events: none;
    }
    &:after {
      content: '\25BC';
      height: 1em;
      font-size: 0.625em;
      line-height: 1;
      right: 1.2em;
      top: 50%;
      margin-top: -0.5em;
    }
    &:before {
      width: 2em;
      right: 0;
      top: 0;
      bottom: 0;
      border-radius: 0 3px 3px 0;
    }
  }

  input {
    cursor: initial !important;
    border: 1px solid $grey;
    width: 98%;
    padding: 2px;
    margin: 2px;
    height: 32px;
    font-size: 16px;
  }

  bom-loader {
    text-align: center;
    line-height: 150px;
  }

  &--pendingAddInput {
    width: 90%;
  }

  &--invalidEmail {
    color: $red;
  }

  &--pendingPermissionChange {
    font-weight: bold;
  }

  &--messagesWrapper {
    margin-top: 20px;
    min-height: 28px;
    position: relative;
  }

  &--msgMaxReached {
    color: $midgrey;
    font-size: 12px;
    clear: both;
    position: absolute;
    top: -18px;
  }

  &--msgUnsavedChanges {
    cursor: default;
    color: $red;
    width: 100%;
    border: 1px dashed $grey;
    text-align: center;
    padding: 3px 0;
    & > .BomIcon--circle {
      background-color: transparent;
      border: 1px solid $red;
      color: $red;
      font-size: 10px;
      padding: 3px;
    }
  }

  &--msgErrorsExist {
    color: $red;
    float: right;
    clear: both;
    width: calc(50% - 7.5px);
    text-align: center;
    font-size: 14px;
    margin-top: 12px;
  }
  .scroll-table {
    max-height: 350px;
    table {
      margin: 0;
      td {
        width: 100%;
        &:last-child {
          width: 30%;
        }
      }
    }
  }

  &--not-collegues {
    text-align: center;
  }

  & .BomModal-share-table {
    & .BomIcon--cross {
      color: $middarkgrey;
      font-size: 12px;
      padding: 5px 0px;
      cursor: pointer;
    }

    & table .BomIcon--cross {
      top: 5px;
    }

    & .autoCompleteWrapper {
      width: 100%;
    }
    & .clear-input-btn {
      position: absolute;
      top: 13px;
      right: 5px;
      padding: 0;
      background: none;
      border: none;
    }
  }
}

//overwrite default styling of angular material autocomplete component
.autoCompleteWrapper .mat-form-field-underline,
.mat-form-field-ripple {
  background-color: white !important;
  color: white !important;
}

.mat-autocomplete-visible {
  max-height: 150px !important;
}
.autoCompleteWrapper .mat-form-field-empty.mat-form-field-label {
  color: white;
}

.autoCompleteWrapper .mat-form-field-label {
  color: $middarkgrey !important;
}

.mat-selected {
  background-color: $white !important;
}

.mat-active{
  background-color: #B9B9B9 !important;
}

.mat-option:hover {
  background-color: #B9B9B9 !important;
}

.mat-autocomplete-panel {
  background-color: $white;

  & .mat-option-text {
    color: $black;
  }
}

.BomModal-container {
  padding-bottom: 20px;
}

.BomModalComponent-buttons {
  display: flex;
  justify-content: space-between;

  button {
    width: calc(50% - 7.5px);
    &:first-child {
      margin-right: 15px;
    }
  }  
}
