.super-db-tools {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  margin: 0 0 12px 0;
  position: relative;
  z-index: 5;

  font: inherit;
  color: inherit;
}

.super-db-tools__bar {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  min-height: 36px;
}

.super-db-tools__count {
  margin-right: 4px;
  white-space: nowrap;
  line-height: 1;

  font-family: inherit;
  font-size: 0.9em;
  font-style: inherit;
  color: inherit;
  opacity: 0.62;
}

.super-db-tools__icon,
.super-db-tools__clear,
.super-db-tools__direction {
  appearance: none;
  height: 32px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: inherit;
  cursor: pointer;

  font: inherit;
  opacity: 0.68;

  transition:
    background-color 160ms ease,
    color 160ms ease,
    border-color 160ms ease,
    box-shadow 160ms ease,
    opacity 160ms ease;
}

.super-db-tools__icon {
  width: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.super-db-tools__clear,
.super-db-tools__direction {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 10px;

  font-family: inherit;
  font-size: 0.9em;
  font-style: inherit;
  font-weight: 500;
}

.super-db-tools__icon:hover,
.super-db-tools__clear:hover,
.super-db-tools__direction:hover,
.super-db-tools__icon.is-active {
  background: color-mix(in srgb, currentColor 8%, transparent);
  border-color: color-mix(in srgb, currentColor 10%, transparent);
  color: inherit;
  opacity: 1;
}

.super-db-tools__icon.is-active {
  box-shadow: 0 0 0 2px color-mix(in srgb, currentColor 6%, transparent);
}

.super-db-tools__panel {
  width: min(520px, 100%);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 12px;

  background: color-mix(in srgb, canvas 96%, transparent);
  border: 1px solid color-mix(in srgb, currentColor 14%, transparent);
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(15, 15, 15, 0.08);

  font: inherit;
  color: inherit;
}

.super-db-tools__panel[hidden] {
  display: none !important;
}

.super-db-tools__panel label {
  display: grid;
  gap: 6px;

  font-family: inherit;
  font-size: 0.85em;
  font-style: inherit;
  font-weight: 600;
  color: inherit;
  opacity: 0.78;
}

.super-db-tools__panel input,
.super-db-tools__panel select {
  width: 100%;
  height: 36px;
  padding: 0 10px;
  border: 1px solid color-mix(in srgb, currentColor 18%, transparent);
  border-radius: 8px;
  background: canvas;
  color: inherit;
  outline: none;

  font-family: inherit;
  font-size: 1em;
  font-style: inherit;
}

.super-db-tools__panel input:focus,
.super-db-tools__panel select:focus {
  border-color: color-mix(in srgb, currentColor 42%, transparent);
  box-shadow: 0 0 0 3px color-mix(in srgb, currentColor 12%, transparent);
}

.super-db-row-hidden {
  display: none !important;
}

@media (max-width: 640px) {
  .super-db-tools {
    align-items: stretch;
  }

  .super-db-tools__bar {
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .super-db-tools__panel {
    grid-template-columns: 1fr;
  }

  .super-db-tools__count {
    margin-right: auto;
  }
}

.super-db-tools__highlight {
  border-radius: 3px;
  padding: 0 2px;
  background: #fdff8a;
  color: inherit;
}
