/*
  Main widget layout and styling
*/

.jp-extensionmanager-view {
  padding-bottom: 0px;
  color: var(--jp-ui-font-color1);
  background: var(--jp-layout-color1);
  display: flex;
  flex-direction: column;
  font-size: var(--jp-ui-font-size1);
}

.jp-extensionmanager-content {
  overflow: auto;
  overflow-x: hidden;
}

/*
  Jupyter Org
*/

.jp-extensionmanager-is-jupyter-org {
  font-size: var(--jp-ui-font-size0);
  color: var(--jp-ui-font-color2);
}

/*
  List view layout and styling
*/

.jp-extensionmanager-listview-wrapper {
  margin: 0;
  padding: 0;
  padding-bottom: 8px;
  display: flex;
  flex-direction: column;
  flex: 0 0 auto;
}

.jp-extensionmanager-listview {
  list-style-type: none;
  margin: 0;
  padding: 0;
  min-height: 0;
}

/*
  Section headers
*/

.jp-extensionmanager-view .jp-stack-panel-header {
  display: flex;
  justify-content: space-between;
  flex: 0 0 auto;
  margin: 0px;
  padding-bottom: 8px;
  font-weight: 600;
  text-transform: uppercase;
  border-bottom: var(--jp-border-width) solid var(--jp-border-color2);
  letter-spacing: 1px;
  font-size: var(--jp-ui-font-size0);
  line-height: 24px;
  height: 24px;
  padding: 4px;
}

.jp-extensionmanager-view .jp-stack-panel-header > .jp-ToolbarButtonComponent {
  padding: 0px 2px;
}

.jp-extensionmanager-view
  .jp-stack-panel-header
  .jp-extensionmanager-headerText {
  flex: 1 0 auto;
  margin: 0px 4px;
}

.jp-extensionmanager-view
  .jp-stack-panel-header
  .jp-extensionmanager-headerTextDisabled {
  flex: 1 0 auto;
  margin: 0px 4px;
  color: var(--jp-layout-color3);
}

.jp-extensionmanager-view .jp-stack-panel-header > .jp-ToolbarButtonComponent {
  border: 1px solid transparent;
  background-color: var(--jp-layout-color1);
  color: var(--jp-ui-font-color1);
}

.jp-extensionmanager-view
  .jp-stack-panel-header
  > .jp-ToolbarButtonComponent:hover {
  /* border: 1px solid var(--jp-brand-color1); */
}

/*
  Listing messages
*/

.jp-extensionmanager-listingmessage {
  background-color: var(--jp-brand-color1);
  color: var(--jp-ui-inverse-font-color1);
  padding: 4px 8px;
  font-size: var(--jp-ui-font-size1);
  font-weight: 400;
}

/*
  Error messages
*/

.jp-extensionmanager-view .jp-extensionmanager-error pre {
  white-space: pre-wrap;
}

/*
  Search bar layout and styling
*/

.jp-extensionmanager-search-bar {
  padding: 4px;
}

.jp-extensionmanager-disclaimer {
  color: var(--jp-ui-font-color1);
  font-size: var(--jp-ui-font-size1);
  font-weight: normal;
  margin: 8px 8px 8px 32px;
}

.jp-extensionmanager-search-wrapper input {
  background: transparent;
  font-size: var(--jp-ui-font-size1);
  color: var(--jp-ui-font-color0);
  line-height: var(--jp-private-commandpalette-search-height);
  box-sizing: border-box;
  border-radius: 0;
}

.jp-extensionmanager-search-wrapper input:focus {
  box-shadow: inset 0 0 0 1px var(--jp-input-active-box-shadow-color),
    inset 0 0 0 3px var(--jp-input-active-box-shadow-color);
}

/*
  List view pagination styling
*/

.jp-extensionmanager-view ul.pagination {
  display: inline-block;
  padding-left: 0px;
  padding-right: 0px;
}

.jp-extensionmanager-view .pagination li {
  display: inline-block;
}

.jp-extensionmanager-view .pagination li a {
  padding: 0 5px;
  margin: 0 5px;
}

.jp-extensionmanager-view .pagination li.active a {
  background: var(--jp-brand-color1);
  color: #fff;
}

.jp-extensionmanager-view .pagination li a:hover {
  background-color: var(--jp-layout-color2);
  color: unset;
}

.jp-extensionmanager-view .pagination .break a {
  cursor: default;
}

.jp-extensionmanager-pagination {
  display: flex;
  justify-content: center;
}

/*
  Entry layout and styling
*/

.jp-extensionmanager-entry {
  padding: 8px;
  border-bottom: solid var(--jp-border-width) var(--jp-border-color2);
}

.jp-extensionmanager-entry-description {
  min-width: 0;
  flex-grow: 1;
}

.jp-extensionmanager-entry-title {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
}

.jp-extensionmanager-entry.jp-extensionmanager-entry-should-be-uninstalled {
  background-color: var(--jp-error-color3);
}

/* Precedence order update/error/warning matters! */

.jp-extensionmanager-entry.jp-extensionmanager-entry-update {
  border-left: solid 8px var(--jp-brand-color2);
  padding-left: 4px;
}

.jp-extensionmanager-entry.jp-extensionmanager-entry-error {
  border-left: solid 8px var(--jp-error-color2);
  padding-left: 4px;
}

.jp-extensionmanager-entry.jp-extensionmanager-entry-warning {
}

.jp-extensionmanager-entry-name {
  font-size: var(--jp-ui-font-size1);
  font-weight: 600;
  padding: 0 8px 0 0;
  margin-bottom: 4px;
  overflow-wrap: anywhere;
}

.jp-extensionmanager-entry-name a:link {
  color: var(--jp-content-link-color);
  text-decoration: none;
}

.jp-extensionmanager-entry-name a:visited {
  color: var(--jp-content-link-color);
  text-decoration: none;
}

.jp-extensionmanager-entry-name a:hover {
  color: var(--jp-content-link-color);
  text-decoration: underline;
}

.jp-extensionmanager-entry-description {
  font-size: var(--jp-ui-font-size1);
  color: var(--jp-ui-font-color2);
  font-weight: 400;
}

.jp-extensionmanager-loader,
.jp-extensionmanager-error,
.jp-extensionmanager-listview-message {
  padding: 4px 12px;
}

.jp-extensionmanager-listview-message {
  font-size: var(--jp-ui-font-size1);
}

.jp-extensionmanager-entry-content {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

/*
  Pending entry progress indicator
*/

.jp-extensionmanager-pending {
  height: 4px;
  width: 100%;
  position: relative;
  overflow: hidden;
  flex: 0 0 auto;
  background-color: var(--jp-layout-color1);
}

.jp-extensionmanager-pending.jp-mod-hasPending:before {
  display: block;
  position: absolute;
  content: '';
  left: -200px;
  width: 200px;
  height: 4px;
  border-radius: 4px;
  background-color: var(--jp-brand-color1);
  animation: loading 2s linear infinite;
}

@keyframes loading {
  from {
    left: -200px;
    width: 30%;
  }
  50% {
    width: 30%;
  }
  70% {
    width: 70%;
  }
  80% {
    left: 50%;
  }
  95% {
    left: 120%;
  }
  to {
    left: 100%;
  }
}

/*
  Disclaimer buttons
*/

.jp-extensionmanager-disclaimer-disable {
  background-color: var(--jp-brand-color1) !important;
  color: white !important;
  border: 0;
  background-image: none !important;
}

.jp-extensionmanager-disclaimer-enable {
  background-color: var(--jp-error-color1) !important;
  color: white !important;
  border: 0;
  background-image: none !important;
}

/*
  Entry buttons layout and styling
*/

.jp-extensionmanager-entry-buttons {
  display: flex;
  flex-direction: row;
  padding-top: 4px;
}

/*
  Rebuild prompt dialog
*/

.jp-extensionmanager-buildprompt {
  background-color: var(--jp-brand-color1);
  color: var(--jp-ui-inverse-font-color1);
  padding: 4px 8px;
  font-size: var(--jp-ui-font-size1);
  font-weight: 400;
}

.jp-extensionmanager-buildprompt button {
  border: none;
  background-color: transparent;
  color: var(--jp-ui-inverse-font-color1);
  font-size: var(--jp-ui-font-size1);
  font-weight: 600;
  float: right;
  margin: 4px;
}

/*
  Generic dialog
*/

.jp-extensionmanager-dialog .jp-extensionmanager-dialog-subheader {
  font-size: var(--jp-ui-font-size1);
  font-weight: 600;
  color: var(--jp-ui-font-color0);
}
