.cb-resource-index {
  display: block;
  width: 100%;
}

.cb-resource-index [data-resource-index-form] {
  display: block;
  position: relative;
}

.cb-resource-index .cb-resource-index-controls {
  display: block;
  position: relative;
  width: 100%;
}

.cb-resource-index .cb-resource-index-controls [hidden] {
  display: none !important;
}

.cb-resource-index [data-resource-index-table-header][hidden] {
  display: contents !important;
  visibility: collapse;
}

.cb-resource-index .cb-resource-index-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--p-space-200);
}

.cb-resource-index .cb-resource-index-toolbar-main,
.cb-resource-index .cb-resource-index-filter-trigger,
.cb-resource-index .cb-resource-index-bulk-label,
.cb-resource-index .cb-resource-index-setting-row {
  display: flex;
  align-items: center;
}

.cb-resource-index .cb-resource-index-toolbar-main {
  position: relative;
  flex: 1 1 auto;
  gap: var(--p-space-100);
  min-width: 0;
  border-radius: var(--p-border-radius-200);
}

.cb-resource-index .cb-resource-index-view-trigger {
  display: inline-flex;
  flex: 0 0 auto;
}

.cb-resource-index .cb-resource-index-table-divider {
  display: inline-flex;
  flex: 0 0 auto;
  height: var(--p-height-500);
  align-items: stretch;
}

.cb-resource-index .cb-resource-index-filter-trigger {
  flex: 1 1 auto;
  gap: var(--p-space-100);
  min-width: 0;
  min-height: var(--p-height-800);
  cursor: text;
}

.cb-resource-index
  .cb-resource-index-toolbar-main:has([data-resource-index-query]:focus),
.cb-resource-index
  .cb-resource-index-toolbar-main[data-resource-index-filters-open] {
  outline: var(--p-border-width-050) solid var(--p-color-border-focus);
  outline-offset: 0;
}

.cb-resource-index .cb-resource-index-search {
  position: static;
  display: flex;
  flex: 1 1 auto;
  align-items: center;
  gap: var(--p-space-150);
  min-width: 10rem;
  min-height: var(--p-height-800);
  padding-inline: var(--p-space-100);
}

.cb-resource-index .cb-resource-index-search:focus-within {
  border-color: transparent;
  box-shadow: none;
}

.cb-resource-index .cb-resource-index-search input {
  flex: 1 1 auto;
  min-width: 0;
  padding: var(--p-space-100) var(--p-space-0);
  border: 0;
  outline: 0;
  background: transparent;
  color: inherit;
  font: inherit;
}

.cb-resource-index .cb-resource-index-search input::placeholder {
  color: var(--p-color-text-secondary);
  opacity: 1;
}

.cb-resource-index
  .cb-resource-index-search
  input::-webkit-search-cancel-button {
  appearance: none;
}

.cb-resource-index .cb-resource-index-clear-search {
  display: none;
  flex: 0 0 auto;
  margin-inline-start: auto;
}

.cb-resource-index
  .cb-resource-index-toolbar-main:has([data-resource-index-query]:focus)
  .cb-resource-index-clear-search,
.cb-resource-index
  .cb-resource-index-toolbar-main[data-resource-index-filters-open]
  .cb-resource-index-clear-search {
  display: inline-flex;
}

.cb-resource-index
  .cb-resource-index-toolbar-main[data-resource-index-has-filters]
  .cb-resource-index-search
  > s-icon {
  display: none;
}

.cb-resource-index
  .cb-resource-index-toolbar-main[data-resource-index-has-filters]
  .cb-resource-index-search {
  flex: 0 1 auto;
  gap: 0;
  min-width: 0;
  padding-inline: 0;
}

.cb-resource-index
  .cb-resource-index-toolbar-main[data-resource-index-has-filters]
  .cb-resource-index-search
  input {
  field-sizing: content;
  flex: 0 1 auto;
  width: auto;
  min-width: 0;
  max-width: 16rem;
}

.cb-resource-index
  .cb-resource-index-toolbar-main[data-resource-index-has-filters]:not(
    [data-resource-index-has-query]
  )
  .cb-resource-index-search:not(:focus-within)
  input {
  width: 0;
  padding-inline: 0;
}

.cb-resource-index
  .cb-resource-index-toolbar-main[data-resource-index-has-filters]
  .cb-resource-index-search:focus-within
  input {
  min-width: var(--p-width-800);
}

.cb-resource-index
  .cb-resource-index-toolbar-main[data-resource-index-has-filters]
  .cb-resource-index-search
  input::placeholder {
  color: transparent;
}

.cb-resource-index .cb-resource-index-filter-token {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: var(--p-space-025);
  border: 0;
  font-size: var(--p-font-size-300);
  line-height: var(--p-font-line-height-400);
}

.cb-resource-index .cb-resource-index-filter-token-main,
.cb-resource-index .cb-resource-index-filter-token-value-label,
.cb-resource-index .cb-resource-index-filter-token-remove-icon {
  all: unset;
  box-sizing: border-box;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

.cb-resource-index
  .cb-resource-index-filter-token
  button.cb-resource-index-filter-token-main {
  display: inline-flex;
  align-items: center;
  padding: var(--p-space-050) var(--p-space-100);
  padding-inline-start: var(--p-space-150);
  border-radius: var(--p-border-radius-200) var(--p-border-radius-050)
    var(--p-border-radius-050) var(--p-border-radius-200);
  background: var(--p-color-bg-surface-tertiary);
}

.cb-resource-index .cb-resource-index-filter-token-main:hover {
  background: var(--p-color-bg-surface-tertiary-hover);
}

.cb-resource-index .cb-resource-index-filter-token-main:active {
  background: var(--p-color-bg-surface-tertiary-active);
}

.cb-resource-index
  .cb-resource-index-filter-token
  .cb-resource-index-filter-token-value {
  display: inline-flex;
  align-items: center;
  gap: 0;
  padding: var(--p-space-050) var(--p-space-100);
  padding-inline-end: var(--p-space-150);
  border-radius: var(--p-border-radius-050) var(--p-border-radius-200)
    var(--p-border-radius-200) var(--p-border-radius-050);
  background: var(--p-color-bg-surface-info);
  color: var(--p-color-text-highlight);
  transition: border-radius var(--p-motion-duration-200)
    var(--p-motion-ease-in-out);
}

.cb-resource-index .cb-resource-index-filter-token-value:hover {
  border-radius: var(--p-border-radius-050) var(--p-border-radius-150)
    var(--p-border-radius-150) var(--p-border-radius-050);
  background: var(--p-color-bg-surface-info-hover);
  color: var(--p-color-text-highlight-hover);
}

.cb-resource-index .cb-resource-index-filter-token-value:active {
  background: var(--p-color-bg-surface-info-active);
  color: var(--p-color-text-highlight-active);
}

.cb-resource-index .cb-resource-index-filter-token-value-label {
  display: inline-flex;
  align-items: center;
}

.cb-resource-index .cb-resource-index-filter-token-remove-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 0;
  height: var(--p-height-400);
  margin-inline: 0;
  overflow: hidden;
  opacity: 0;
  line-height: 1;
  pointer-events: none;
  transition:
    width var(--p-motion-duration-200) var(--p-motion-ease-in-out),
    margin-inline var(--p-motion-duration-200) var(--p-motion-ease-in-out),
    opacity var(--p-motion-duration-200) var(--p-motion-ease-in-out);
}

.cb-resource-index .cb-resource-index-filter-token-remove-icon s-icon {
  display: block;
  flex: 0 0 var(--p-width-500);
  width: var(--p-width-500);
  height: var(--p-height-500);
  transform: scale(0.625);
  transform-origin: center;
}

.cb-resource-index
  .cb-resource-index-filter-token-value:hover
  .cb-resource-index-filter-token-remove-icon {
  width: var(--p-width-400);
  margin-inline: var(--p-space-050) calc(var(--p-space-100) * -1);
  opacity: 1;
  pointer-events: auto;
}

.cb-resource-index
  .cb-resource-index-filter-token-value:active
  .cb-resource-index-filter-token-remove-icon {
  width: 1.125rem;
  margin-inline: var(--p-space-050) calc(var(--p-space-050) * -1);
  opacity: 1;
  pointer-events: auto;
}

.cb-resource-index .cb-resource-index-filter-token-remove-icon:focus-visible {
  width: 1.125rem;
  margin-inline: var(--p-space-050) calc(var(--p-space-050) * -1);
  opacity: 1;
  pointer-events: auto;
  outline: var(--p-border-width-050) solid var(--p-color-border-focus);
  border-radius: var(--p-border-radius-150);
}

.cb-resource-index .cb-resource-index-filter-token-main:focus-visible,
.cb-resource-index .cb-resource-index-filter-token-value-label:focus-visible {
  outline: var(--p-border-width-050) solid var(--p-color-border-focus);
  outline-offset: calc(var(--p-border-width-050) * -1);
}

.cb-resource-index .cb-resource-index-picker {
  position: absolute;
  z-index: 50;
  inset-block-start: 0;
  inset-inline-start: 0;
  width: min(19rem, calc(100vw - 4rem));
  max-height: 20rem;
  overflow-y: auto;
  padding: var(--p-space-150);
  border: var(--p-border-width-025) solid var(--p-color-border);
  border-radius: var(--p-border-radius-300);
  background: var(--p-color-bg-surface);
  box-shadow: var(--p-shadow-popover);
}

.cb-resource-index .cb-resource-index-settings {
  min-width: 17rem;
  max-height: min(31rem, calc(100vh - 5rem));
  overflow-y: auto;
  padding: var(--p-space-150);
}

.cb-resource-index .cb-resource-index-setting-row {
  justify-content: space-between;
  gap: var(--p-space-300);
  padding: var(--p-space-200);
}

.cb-resource-index .cb-resource-index-view-check {
  display: inline-flex;
  width: var(--p-width-500);
  min-width: var(--p-width-500);
}

.cb-resource-index .cb-resource-index-bulk-bar {
  min-height: var(--p-height-1000);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.cb-resource-index .cb-resource-index-bulk-label {
  gap: var(--p-space-250);
}

.cb-resource-index .cb-resource-index-table s-table-cell {
  white-space: nowrap;
}

.cb-resource-index [data-resource-index-column][hidden] {
  display: none !important;
}

.cb-resource-index [data-resource-index-row][selected] {
  background: rgba(0, 91, 211, 0.08);
}

.cb-resource-index .cb-resource-index-empty-shell {
  border: var(--p-border-width-025) solid var(--p-color-border);
  border-radius: var(--p-border-radius-300);
  background: var(--p-color-bg-surface);
  box-shadow: var(--p-shadow-section);
}

.cb-resource-index .cb-resource-index-empty-shell .cb-resource-index-controls {
  padding-inline: var(--p-space-200);
  border-bottom: var(--p-border-width-025) solid var(--p-color-border);
}

.cb-resource-index .cb-resource-index-empty {
  min-height: 15.75rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--p-space-400);
  padding: var(--p-space-600);
  text-align: center;
}

.cb-resource-index .cb-resource-index-empty-icon {
  width: 4.5rem;
  height: 4.5rem;
  display: grid;
  place-items: center;
  color: var(--p-color-icon-secondary);
}

.cb-resource-index .cb-resource-index-empty-icon s-icon {
  transform: scale(3.25);
}

.cb-resource-index .cb-resource-index-empty s-heading {
  font-size: var(--p-font-size-450);
}

.cb-resource-index .cb-resource-index-footer {
  display: block;
  padding-top: var(--p-space-300);
}

@media (max-width: 900px) {
  .cb-resource-index .cb-resource-index-search {
    min-width: var(--p-width-3200);
  }
}

@media (max-width: 560px) {
  .cb-resource-index .cb-resource-index-toolbar-main {
    gap: 0;
  }

  .cb-resource-index .cb-resource-index-search {
    min-width: var(--p-width-2400);
  }
}
