@import './../../../@uppy/core/src/_utils.scss';
@import './../../../@uppy/core/src/_variables.scss';

@import './style/uppy-ProviderBrowser-viewType--grid';
@import './style/uppy-ProviderBrowser-viewType--list';
@import './style/uppy-ProviderBrowserItem-fakeCheckbox';

.uppy-DashboardContent-panelBody {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;

  [data-uppy-theme="dark"] & {
    background-color: $black;
  }
}

.uppy-Provider-auth,
.uppy-Provider-error,
.uppy-Provider-loading,
.uppy-Provider-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-flow: column wrap;
  flex: 1;
  color: $gray-500;
}

.uppy-Provider-empty {
  color: $gray-500;
}

.uppy-Provider-authIcon svg {
  width: 100px;
  height: 75px;
  margin-bottom: 15px;
}

.uppy-Provider-authTitle {
  font-size: 17px;
  line-height: 1.4;
  font-weight: 400;
  margin-bottom: 30px;
  padding: 0 15px;
  max-width: 500px;
  text-align: center;
  color: $gray-600;

  .uppy-size--md & {
    font-size: 20px;
  }

  [data-uppy-theme="dark"] & {
    color: $gray-300;
  }
}

.uppy-Provider-breadcrumbs {
  flex: 1;
  color: $gray-700;
  font-size: 12px;
  margin-bottom: 10px;
  text-align: left;

  .uppy-size--md & {
    margin-bottom: 0;
  }

  [data-uppy-theme="dark"] & {
    color: $white;
  }
}
  .uppy-Provider-breadcrumbsIcon {
    display: inline-block;
    color: $gray-700;
    vertical-align: middle;
    margin-right: 4px;
    line-height: 1;
  }
    .uppy-Provider-breadcrumbsIcon svg {
      width: 13px;
      height: 13px;
      fill: $gray-700;
    }

  .uppy-Provider-breadcrumbs button {
    @include highlight-focus;
    display: inline-block;
    line-height: inherit;
    // for focus
    padding: 4px;
    border-radius: 3px;

    &:hover {
      text-decoration: underline;
      cursor: pointer;
    }
  }
// ...uppy-Provider-breadcrumbs|

.uppy-ProviderBrowser {
  display: flex;
  flex-direction: column;
  flex: 1;
  font-size: 14px;
  font-weight: 400;
  height: 100%;
}

.uppy-ProviderBrowser-user {
  margin: 0 8px 0 0;
  font-weight: 500;
  color: $gray-800;

  [data-uppy-theme="dark"] & {
    color: $white;
  }
}

  .uppy-ProviderBrowser-user:after {
    content: '\00B7';
    position: relative;
    left: 4px;
    color: $gray-500;
    font-weight: normal;
  }

.uppy-ProviderBrowser-header {
  z-index: $zIndex-2;
  border-bottom: 1px solid $gray-200;
  position: relative;

  [data-uppy-theme="dark"] & {
    border-bottom: 1px solid $gray-800;
  }
}

.uppy-ProviderBrowser-headerBar {
  padding: 7px 15px;
  background-color: $gray-50;
  z-index: $zIndex-2;
  color: $gray-600;
  line-height: 1.4;
  font-size: 12px;

  .uppy-size--md & {
    display: flex;
    align-items: center;
  }

  [data-uppy-theme="dark"] & {
    background-color: $gray-900;
  }
}

  .uppy-ProviderBrowser-headerBar--simple {
    text-align: center;
    display: block;
    justify-content: center;
  }

  .uppy-ProviderBrowser-headerBar--simple .uppy-Provider-breadcrumbsWrap {
    flex: none;
    display: inline-block;
    vertical-align: middle;
  }

.uppy-ProviderBrowser-search {
  width: 100%;
  background-color: $white;
  position: relative;
  height: 30px;
  margin-top: 10px;
  margin-bottom: 5px;
  display: flex;
  align-items: center;

  [data-uppy-theme="dark"] & {
    background-color: $black;
  }
}

.uppy-ProviderBrowser-searchIcon {
  position: absolute;
  width: 12px;
  height: 12px;
  left: 16px;
  z-index: $zIndex-3;
  color: $gray-400;
}

.uppy-ProviderBrowser-searchInput {
  width: 100%;
  height: 30px;
  background-color: transparent;
  outline: 0;
  font-family: $font-family-base;
  font-size: 12px;
  line-height: 1.4;
  border: 0;
  margin: 0 8px;
  padding-left: 27px;
  z-index: $zIndex-2;
  border-radius: 4px;

  [data-uppy-theme="dark"] & {
    background-color: $black;
    color: $white;
  }
}

  .uppy-ProviderBrowser-searchInput:focus {
    outline: 0;
    background-color: $gray-100;

    [data-uppy-theme="dark"] & {
      background-color: $gray-800;
    }
  }

.uppy-ProviderBrowser-searchClose {
  position: absolute;
  width: 22px;
  height: 22px;
  padding: 6px;
  right: 12px;
  top: 4px;
  z-index: $zIndex-3;
  color: $gray-500;
  cursor: pointer;

  &:hover {
    color: $gray-600;
  }
}

  .uppy-ProviderBrowser-searchClose svg {
    vertical-align: text-top;
  }

.uppy-ProviderBrowser-searchInput::placeholder {
  color: $gray-500;
  opacity: 1;
}

.uppy-ProviderBrowser-userLogout {
  @include highlight-focus;
  cursor: pointer;
  line-height: inherit;
  color: $blue;
  // for focus
  padding: 4px;
  border-radius: 3px;

  &:hover {
    text-decoration: underline;
  }

  [data-uppy-theme="dark"] & {
    color: $white;
  }
}

.uppy-ProviderBrowser-body {
  flex: 1;
  position: relative;
}

.uppy-ProviderBrowser-list {
  flex: 1;
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  background-color: $white;
  border-spacing: 0;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  list-style: none;
  margin: 0;
  padding: 0;

  [data-uppy-theme="dark"] & {
    background-color: $black;
  }
}

.uppy-ProviderBrowserItem-inner {
  cursor: pointer;
  font-weight: 500;
  font-size: 13px;
}

.uppy-ProviderBrowser-footer {
  display: flex;
  align-items: center;
  background-color: $white;
  height: 65px;
  border-top: 1px solid $gray-200;
  padding: 0 15px;

  & button {
    margin-right: 8px;
  }

  [data-uppy-theme="dark"] & {
    background-color: $gray-900;
    border-top: 1px solid $gray-800;
  }
}
