@import "../../../../styles/variables";

.profiles-header {
  padding-bottom: 0;
}

.profiles-search {
  display: flex;
  margin: 18px 0 14px;
  flex-direction: row;
  width: 100%;

  &.active {
    box-shadow: 0px 0px 0px 1px $chef-primary-bright; // Mimic default outline
  }

  input {
    width: 100%;
    font-size: 14px;
    border-radius: 4px 0px 0px 4px;
    transition: 0s; // Remove default transition

    &:focus {
      border: 0; // Accessibility is being noted around containing form
    }
  }

  button {
    background: #E6EBEE;
    width: 45px;
    box-shadow: 0 1px 14px #E6EBEE;
    border: 0px solid transparent;
    border-radius: 0px 4px 4px 0px;
    cursor: pointer;
    font-size: 16px;

    &:focus {
      outline: none;
      border: 1px solid $chef-primary-bright;
    }

    &[disabled] {
      cursor: auto;
    }

    .hidden {
      display: none;
    }
  }
}

chef-subheading {
  padding-bottom: 14px;
}

.profiles-content {
  padding: 35px;
}

a {
  cursor: pointer;
  text-decoration: underline;
}

.empty-state {
  text-align: center;

  chef-button {
    margin: 0;
    left: 50%;
  }

  p {
    font-size: 18px;
    font-weight: 400;
    margin-top: 42px;
  }
}

chef-loading-spinner {
  z-index: 199;
}

.profiles-table {
  chef-loading-spinner {
    display: block;
    margin: 100px auto;
    width: 100px;
  }

  chef-clipboard {
    margin-left: -0.5em;
  }

  &.installed {
    chef-th:first-child,
    chef-td:first-child {
      width: 120%;
    }

    chef-td:last-child {
      chef-button {
        margin: -0.5em 0;
      }
    }

    chef-td {
      chef-clipboard {
        margin-left: -0.5em;

        ::ng-deep {
          chef-button {
            margin: -0.5em 0;
          }
        }
      }
    }
  }

  &.available {
    chef-th:first-child,
    chef-td:first-child {
      width: 350%;
    }

    chef-td:last-child {
      chef-button {
        margin: -0.5em 0;
        margin-left: auto;
      }
    }
  }
}

#upload-modal {
  .file-upload-list {
    margin: 1em 0 -0.5em 0;

    chef-td {
      flex-basis: auto;

      &:first-child {
        chef-icon,
        chef-loading-spinner {
          margin-right: 1em;
        }
      }

      &:last-child {
        flex-grow: 0;
      }
    }
  }

  .actions {
    display: flex;
    margin: 1em 0;
    justify-content: center;
    align-items: center;
  }

  .upload-percent {
    color: $chef-dark-grey;
  }

  .failed {
    color: $chef-critical;
  }

  .passed {
    color: $chef-success;
  }
}

#upload-modal-title,
#upload-modal-subtitle {
  text-align: center;
}

.result-detail {
  background: $chef-lightest-grey;
  border: 1px solid $chef-grey;
  border-top: none;
  transform: translateY(-0.5em);

  pre {
    margin: 0;
    padding: 1em;
    font-size: 14px;
  }
}

// TODO need a reusable input[file] chef-button
.custom-file-input {
  display: inline-block;
  margin: 8px;
  padding: 0 8px;
  background-color: $chef-primary-bright;
  border: 1px solid $chef-primary-bright;
  border-radius: $global-radius;
  color: $chef-white;
  cursor: pointer;
  font-size: 13px;
  line-height: 32px;
  text-align: center;
  font-weight: 400;

  &:hover {
    background-color: darken($chef-primary-bright, 7%);
  }

  &:active {
    background-color: darken($chef-primary-bright, 14%);
  }

  input[type='file'] {
    position: absolute;
    left: -999em;
  }
}
