/* ViewletExtensions.css */
/* progress bar based on the vscode progress bar https://github.com/microsoft/vscode/blob/main/src/vs/base/browser/ui/progressbar/progressbar.css */

.Extensions {
  display: flex;
  flex-direction: column;
  cursor: default;
  flex: 1;
}

/* TODO extract progress since it is used also elsewhere -> no copy paste code */
@keyframes progress {
  from {
    transform: translateX(0%) scaleX(1);
  }
  50% {
    transform: translateX(2500%) scaleX(3);
  }
  to {
    transform: translateX(4900%) scaleX(1);
  }
}

/* TODO use html element as placeholder so that it can be trimmed and has other size as input text */

.ExtensionHeader {
  padding: 5px 12px 0 20px;
  height: 41px;
  contain: strict;
}

.ExtensionInput {
  background-color: rgb(36, 41, 42);
  color: rgb(225, 225, 225);
  border-width: 1px;
  border-style: solid;
  border-color: rgb(55, 65, 63);
  padding: 2px 4px;
  width: 100%;
  font-size: 80%;
  line-height: 100%;
  height: 26px;
}

/* clears the 'X' from Chrome */
.ExtensionInput::-webkit-search-decoration,
.ExtensionInput::-webkit-search-cancel-button,
.ExtensionInput::-webkit-search-results-button,
.ExtensionInput::-webkit-search-results-decoration {
  display: none;
}

.ViewletExtensionMessage {
  color: rgb(188, 190, 190);
  font-size: 13px;
  padding: 5px 9px 5px 20px;
}

.ExtensionListWrapper {
  flex: 1;
  contain: strict;
  position: relative;
}

.ExtensionList {
  flex: 1;
  contain: strict;
  position: relative;

  /* TODO investigate whether or not it makes sense to create another layer here */
  /* transform: translate3d(0px, 0px, 0px);
  will-change: top; */
}

.ExtensionListItem {
  text-decoration: none;
  padding-left: 16px;
  display: flex;
  gap: 14px;
  height: 72px;
  align-items: center;
  contain: strict;
  position: absolute;
  color: var(--ListForeground, var(--WorkbenchForeground, rgb(188, 190, 190)));
  width: 100%;
}

.ExtensionListItem:where(:hover) {
  background: var(--ListHoverBackground, color-mix(in srgb, var(--WorkbenchForeground) 8%, transparent));
  color: var(--ListHoverForeground, var(--WorkbenchForeground, rgb(188, 190, 190)));
}

.ExtensionActive {
  background: var(--ListActiveSelectionBackground, color-mix(in srgb, var(--FocusBorder, var(--WorkbenchForeground)) 34%, transparent));
  color: var(--ListActiveSelectionForeground, var(--WorkbenchForeground, white));
}

.ExtensionListItem[data-state='disabled'] {
  color: var(--DisabledForeground, color-mix(in srgb, var(--WorkbenchForeground) 48%, transparent));
}

.ExtensionListItem[data-state='disabled'] .ExtensionIcon {
  opacity: 0.5;
}

.ExtensionListItemDetail {
  flex: 1;
  height: 100%;
  overflow: hidden;
  contain: strict;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.ExtensionListItemIcon {
  width: 42px;
  height: 42px;
  flex-shrink: 0;
  pointer-events: none;
  contain: strict;
}

.ExtensionListItemName {
  text-overflow: ellipsis;
  white-space: nowrap;
  /* color: rgb(188, 190, 190); */
  font-weight: 700;
  font-size: 13px;
  padding-right: 11px;
  contain: content;
}

.ExtensionListItemDescription {
  height: 18px;
  font-size: 13px;
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
  padding-right: 11px;
  contain: strict;
}

.ExtensionListItemFooter {
  display: flex;
  align-items: center;
  gap: 8px;
  contain: content;
}

.ExtensionListItemAuthorName {
  /* TODO compute automatically like vscode (opacity 0.9) */
  /* const authorForeground = foregroundColor.transparent(.9).makeOpaque(WORKBENCH_BACKGROUND(theme));
  collector.addRule(`.extensions-list .monaco-list .monaco-list-row:not(.disabled) .author { color: ${authorForeground}; }`);
  const disabledExtensionForeground = foregroundColor.transparent(.5).makeOpaque(WORKBENCH_BACKGROUND(theme));
  collector.addRule(`.extensions-list .monaco-list .monaco-list-row.disabled { color: ${disabledExtensionForeground}; }`); */
  /* color: #909593; */
  font-size: 90%;
  font-weight: 600;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ExtensionListItemMetadata {
  color: var(--DescriptionForeground, color-mix(in srgb, var(--WorkbenchForeground) 76%, transparent));
  display: flex;
  flex-shrink: 0;
  gap: 8px;
  margin-left: auto;
}

.ExtensionListItemStatistic {
  align-items: center;
  display: inline-flex;
  font-size: 11px;
  gap: 2px;
}

.ExtensionListItemDownloadCount::before {
  content: '↓';
}

.ExtensionListItemRating::before {
  color: var(--ExtensionIconStarForeground, #ffcc00);
  content: '★';
}

.ExtensionListItemActionInstall {
  background: var(
    --ButtonBackground,
    var(--SplitButtonBackground, color-mix(in srgb, var(--FocusBorder, var(--WorkbenchForeground)) 34%, var(--MainBackground)))
  );
  color: var(--ButtonForeground, var(--SplitButtonForeground, var(--WorkbenchForeground)));
  border: none;
  cursor: inherit;
  height: 16px;
  line-height: 14px;
  padding: 0 4px;
  /* padding: 4px; */
  /* contain: strict; */
}

.ExtensionListItemActionInstall:hover {
  background: var(
    --ButtonHoverBackground,
    var(--SplitButtonHoverBackground, color-mix(in srgb, var(--FocusBorder, var(--WorkbenchForeground)) 44%, var(--MainBackground)))
  );
}

.ExtensionListItemActionManage {
  all: unset;
  width: 16px;
  height: 16px;
  contain: strict;
  background: #c5c5c5;
  mask: url(/icons/settings-gear.svg) 50% 50% / 16px no-repeat;
}

.Extensions.Small .ExtensionListItemIcon {
  display: none;
}

.MultilineInputBox::-webkit-search-decoration,
.MultilineInputBox::-webkit-search-cancel-button,
.MultilineInputBox::-webkit-search-results-button,
.MultilineInputBox::-webkit-search-results-decoration {
  -webkit-appearance: none;
}

.NoExtensionsFoundMessage {
  padding: 5px 9px 5px 20px;
}
