/* cspell:ignore xxxs */
#project-browser .search__form-container,
#project-browser .pb-layout,
#project-browser .pb-module-page {
  margin-block-start: 0;
  padding: var(--gin-spacing-s);
  border: 1px solid var(--gin-border-color-layer);
  border-radius: var(--gin-border-l);
  background: var(--gin-bg-layer);
  box-shadow: var(--gin-shadow-l1);
}

@media (min-width: 48em) {
  #project-browser .search__form-container,
  #project-browser .pb-layout,
  #project-browser .pb-module-page {
    padding: var(--gin-spacing-l);
  }
}

.gin--dark-mode #project-browser .search__form-container,
.gin--dark-mode #project-browser .pb-layout,
.gin--dark-mode #project-browser .pb-module-page {
  box-shadow: 0 6px 16px var(--gin-border-color-layer);
}

.gin--high-contrast-mode #project-browser .search__form-container,
.gin--high-contrast-mode #project-browser .pb-layout,
.gin--high-contrast-mode #project-browser .pb-module-page {
  box-shadow: none;
}

#project-browser .search__form-container {
  margin-block-start: var(--gin-spacing-l);
}

#project-browser .search__search-bar {
  border: none;
  background: none;
}

#project-browser .search__search-bar .search__search_term {
  padding: var(--gin-spacing-m);
  border: 1px solid var(--gin-border-color-form-element);
}

#project-browser .search__search-icon {
  width: 16px;
  height: 16px;
  inset-inline-end: 20px;
  inset-block-end: 20px;
}

#project-browser .search__search-clear {
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  margin-right: 10px;
  padding: 0;
  border-radius: 50%;
  background: var(--gin-status-bg);
  inset-block-start: 17px;
  inset-inline-end: 16px;
}

#project-browser .search__search-clear img {
  width: 12px;
  height: 12px;
}

.gin--dark-mode #project-browser .search__search-clear img {
  filter: brightness(0) invert(1);
}

#project-browser .search__search-clear + .search__search-icon {
  display: none;
}

#project-browser .search__form-item {
  margin-block-start: 0;
  margin-block-end: var(--gin-spacing-s);
}

#project-browser .search__results-count {
  display: flex;
  flex-wrap: wrap;
  gap: var(--gin-spacing-xs);
}

#project-browser .search__form-filters-container {
  padding: var(--gin-spacing-m);
  border: 1px solid var(--gin-border-color);
  border-radius: var(--gin-border-m);
  background: none;
}

#project-browser .search__form-filters {
  align-items: baseline;
}

#project-browser .search__form-filters .form-item {
  padding-block-start: 0;
  margin-block: 0 var(--gin-spacing-s);
}

#project-browser .search__grid-container,
#project-browser .search__dropdown.dropdown-filters {
  border: none;
  background-color: transparent;
}

#project-browser .search__grid-container {
  grid-gap: 0;
  padding: 0;
}

#project-browser .search__filters {
  margin-block-start: 0;
  padding: 0;
  background: none;
}

#project-browser .search__filter-wrapper {
  gap: var(--gin-spacing-s);
  margin-block-start: var(--gin-spacing-s);
}

@media (min-width: 48em) {
  #project-browser .search__filter-wrapper {
    margin-block-start: 0;
  }
}

#project-browser .search__filter__toggle-container {
  margin-inline-end: 0;
}

#project-browser .search__filter-button {
  color: var(--gin-color-primary);
  font-size: var(--gin-font-size-xs);
}

#project-browser .search__filter__toggle.form-element,
#project-browser .search__sort-select.form-element {
  margin-block-start: 0;
  margin-inline-start: 0;
  transition: var(--gin-transition);
  text-decoration: none;
  color: var(--gin-color-text);
  border: 1px solid var(--gin-border-color-form-element);
  border-radius: var(--gin-border-m);
  background-color: var(--gin-bg-input);
}

#project-browser .search__checkbox-label {
  font-size: var(--gin-font-size-s);
}

#project-browser .search__filter__toggle.form-element .search__filter__toggle-img {
  padding: 0;
}

.gin--dark-mode #project-browser .search__filter__toggle.form-element .search__filter__toggle-img {
  filter: invert(1);
}

#project-browser .search__sort {
  display: flex;
  align-items: center;
  gap: var(--gin-spacing-xs);
}

#project-browser .search__sort label {
  flex-shrink: 0;
}

#project-browser .pb-display {
  gap: var(--gin-spacing-xxxs);
  margin-block-end: 0;
  margin-inline-end: 0;
  padding: var(--gin-spacing-xxs);
  border: 1px solid var(--gin-border-color);
  border-radius: var(--gin-spacing-xl);
  background: var(--gin-bg-layer);
}

#project-browser .pb-display__button {
  padding: var(--gin-spacing-xs) var(--gin-spacing-s);
  color: var(--gin-color-text);
  border-radius: var(--gin-border-xl);
  background: var(--gin-bg-layer);
  box-shadow: none;
  font-size: var(--gin-font-size-s);
}

#project-browser .pb-display__button:hover {
  z-index: 2;
  color: var(--gin-color-primary);
  background: var(--gin-color-primary-light);
}

#project-browser .pb-display__button:active,
#project-browser .pb-display__button:focus,
#project-browser .pb-display__button--selected {
  z-index: 2;
  color: var(--gin-color-button-text);
  background: var(--gin-color-primary);
}

#project-browser .pb-display__button:active img,
#project-browser .pb-display__button:focus img,
#project-browser .pb-display__button--selected img {
  filter: invert(1);
}

.gin--dark-mode #project-browser .pb-display__button:active img,
.gin--dark-mode #project-browser .pb-display__button:focus img,
.gin--dark-mode #project-browser .pb-display__button--selected img {
  filter: none;
}

#project-browser .pb-display__button:focus {
  box-shadow:
    0 0 0 1px var(--gin-color-focus-border),
    0 0 0 4px var(--gin-color-focus);
}

.gin--dark-mode #project-browser .pb-display__button-icon {
  filter: invert(1);
}

#project-browser .pb-layout__header {
  align-items: baseline;
  margin-block: var(--gin-spacing-l) var(--gin-spacing-s);
  border-block-end: none;
}

#project-browser .filter-group__title-wrapper,
#project-browser .pb-filter__heading {
  margin-block-end: 0;
  color: var(--gin-color-title);
  font-size: var(--gin-font-size-s);
  font-weight: var(--gin-font-weight-bold);
}

#project-browser .pb-filter__heading {
  display: inline-flex;
}

@media (min-width: 61em) {
  #project-browser .pb-filter__heading {
    margin-block-end: var(--gin-spacing-s);
  }
}

#project-browser .pb-filter__summary {
  padding: var(--gin-spacing-s);
  border-radius: var(--gin-border-m);
  background: var(--gin-bg-layer2);
}

#project-browser .pb-filter__checkbox-label {
  padding-block-start: 0;
  font-size: var(--gin-font-size-s);
}

#project-browser .filter-applied {
  min-height: 2rem;
  margin: 0;
  color: var(--gin-color-primary-active);
  background: var(--gin-color-primary-light);
  font-size: var(--gin-font-size-xs);
  font-weight: var(--gin-font-weight-semibold);
  padding-block: 0;
  padding-inline: var(--gin-spacing-s) var(--gin-spacing-xs);
}

.gin--dark-mode #project-browser .filter-applied img {
  filter: invert(1);
}

.pb-project.pb-project--grid,
.pb-project.pb-project--list {
  border: 1px solid var(--gin-border-color-layer2);
  border-radius: var(--gin-border-m);
  background: transparent;
  box-shadow: none;
}

.gin--dark-mode .pb-project.pb-project--grid,
.gin--dark-mode .pb-project.pb-project--list {
  background: var(--gin-bg-layer2);
}

.pb-project.pb-project--grid .pb-project__logo,
.pb-project.pb-project--list .pb-project__logo {
  line-height: 0;
}

.pb-project.pb-project--grid .pb-project__logo-image,
.pb-project.pb-project--list .pb-project__logo-image {
  width: 64px;
}

.pb-project.pb-project--grid .pb-project__title,
.pb-project.pb-project--list .pb-project__title {
  margin-block-end: var(--gin-spacing-xxs);
  font-size: var(--gin-font-size-l);
  font-weight: var(--gin-font-weight-bold);
}

.pb-project.pb-project--grid .pb-project__title .pb-project__link,
.pb-project.pb-project--list .pb-project__title .pb-project__link {
  text-decoration: none;
  color: var(--gin-color-primary);
}

.pb-project.pb-project--grid .pb-project__body,
.pb-project.pb-project--list .pb-project__body {
  font-size: var(--gin-font-size-s);
}

.pb-project.pb-project--grid .project__action_button,
.pb-project.pb-project--list .project__action_button {
  border-radius: var(--gin-border-s);
  font-size: var(--gin-font-size-xxs);
  padding-block: calc(var(--gin-spacing-xxs) + 2px);
  padding-inline: var(--gin-spacing-s);
}

.pb-project--list {
  grid-template-columns: 64px 1fr;
}

.pb-project__image--list {
  padding-inline-start: 0;
}

.pb-project__project-usage-container {
  gap: var(--gin-spacing-xxxs);
}

.pb-project__status-icon img {
  width: 24px;
}

.pb-search-results {
  margin: 0;
  margin-block-start: var(--gin-spacing-xs);
  font-size: var(--gin-font-size-h3);
  font-weight: var(--gin-font-weight-bold);
}

.pb-actions .project_status-indicator {
  display: inline-flex;
  border-radius: var(--gin-border-xl);
  font-size: var(--gin-font-size-s);
  font-weight: var(--gin-font-weight-bold);
  gap: var(--gin-spacing-xs);
  padding-block: var(--gin-spacing-xxs);
  padding-inline: var(--gin-spacing-xs) var(--gin-spacing-s);
}

.pb-actions__icon {
  color: var(--gin-status-success-text);
}

.gin--dark-mode .pb-icon--usage {
  filter: invert(1);
}

.pb-icon--module-details {
  width: auto;
  margin-inline: 0;
}

.gin--dark-mode .pb-icon--status.pb-module-page__module-details-icon,
.gin--dark-mode .pb-project__status-icon img {
  mix-blend-mode: plus-lighter;
}

.gin--dark-mode .project-browser-popup .command-box,
.gin--dark-mode .project-browser-popup input {
  background: var(--gin-bg-layer2);
}

.search__form .filter-applied,
.pb-project-categories__item,
.pb-module-page__categories-list-item {
  margin-inline-end: 0.25em;
  border-radius: 2rem;
  font-size: var(--gin-font-size-xs);
  font-weight: var(--gin-font-weight-semibold);
}

.pb-project-categories__item,
.pb-module-page__categories-list-item {
  padding: var(--gin-spacing-xxxs) var(--gin-spacing-xs);
}

.pb-module-page {
  display: flex;
  flex-wrap: wrap;
  gap: var(--gin-spacing-xl);
  margin-block-start: var(--gin-spacing-s) !important;
}

@media (min-width: 61em) {
  .pb-module-page {
    flex-wrap: nowrap;
  }
}

.pb-module-page__sidebar,
.pb-module-page__main {
  flex-basis: 100%;
  padding: var(--gin-spacing-s);
}

@media (min-width: 61em) {
  .pb-module-page__sidebar,
  .pb-module-page__main {
    padding: 0;
  }
}

.pb-module-page__main {
  overflow: auto;
  max-width: 100%;
}

@media (min-width: 61em) {
  .pb-module-page__sidebar {
    flex-basis: 320px;
  }
}

.pb-module-page hr {
  margin-block: var(--gin-spacing-s);
}

.pb-module-page__project-logo {
  max-width: 96px;
  margin-block-end: var(--gin-spacing-xs);
}

.pb-module-page__title {
  color: var(--gin-color-title);
  font-size: var(--gin-font-size-h1);
  font-weight: var(--gin-font-weight-bold);
  margin-block: 0;
}

.pb-module-page__author {
  margin-block-start: 0;
  margin-block-end: var(--gin-spacing-m);
  color: var(--gin-color-text-light);
}

.pb-module-page__details-title {
  position: absolute !important;
  overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px);
  width: 1px;
  height: 1px;
  word-wrap: normal;
}

.pb-module-page__module-details {
  grid-template-columns: 2rem 2fr;
  align-items: start;
}

.pb-module-page__module-details-info {
  margin: 0;
  margin-block-end: var(--gin-spacing-s);
  font-size: var(--gin-font-size-s);
}

.pb-module-page__categories-list {
  display: flex;
  flex-wrap: wrap;
  height: auto;
  margin-block-end: var(--gin-spacing-m);
  gap: var(--gin-spacing-xs);
}

.pb-module-page__categories-label {
  margin-block-end: var(--gin-spacing-xs);
}

.pb-module-page__actions {
  margin: var(--gin-spacing-s) 0;
}

.pb-module-page__categories-list-item {
  margin: 0;
}

/* Prevent the dropbutton from being misaligned within the row of icons. For some
 * reason, this is caused by Gin exacerbating the `inline-flex` display of
 * dropbuttons that is defined by core. */
.pb-actions .dropbutton-wrapper {
  display: inherit;
  /* Move the dropbutton slightly away from the "installed" badge. */
  margin-block-start: 4px;
}

.gin--dark-mode .pb-filter__multi-dropdown__items--visible {
  background-color: var(--gin-bg-layer);
}
.gin--dark-mode .pb-filter__multi-dropdown__items--visible div:hover {
  background-color: var(--gin-bg-layer2);
}
.gin--dark-mode .project_status-indicator__label {
  color: var(--gin-status-success-text);
}

[data-gin-accent="blue"] .pb-layout__main .views-bulk-actions {
  background: rgb(var(--gin-color-sticky-rgb), 0.9);
}

.gin--dark-mode [data-gin-accent="blue"] .pb-layout__main .views-bulk-actions {
  background: rgb(27, 27, 29, 0.8);
}

[data-gin-accent="blue"] .views-bulk-actions__item {
  color: var(--gin-color-text-light);
}

.gin--dark-mode button.project_status-indicator.project_status-indicator {
  margin-bottom: 5px;
  margin-left: 5px;
  background: none;
  font-size: 16px;
  font-weight: 700;
}

.gin--dark-mode .pb-actions .select_button {
  background: transparent;
}

.pb-actions .select_button:hover,
.pb-actions .select_button:focus,
.gin--dark-mode .pb-actions .select_button:hover,
.gin--dark-mode .pb-actions .select_button:focus {
  color: var(--gin-color-button-text);
  border-color: var(--gin-color-primary);
  background: var(--gin-color-primary);
}

.pb-actions .select_button:focus,
.gin--dark-mode .pb-actions .select_button:focus {
  box-shadow:
    0 0 0 1px var(--gin-color-focus-border),
    0 0 0 4px var(--gin-color-focus);
}
