.filter-sheet {
  display: grid;
  align-content: start;
  gap: var(--space-3);
  min-width: 0;
  padding-block: var(--space-3);
}

.filter-sheet__section {
  display: grid;
  gap: var(--space-2);
  min-width: 0;
}

.filter-sheet__section-title {
  margin: 0;
  color: var(--color-text-secondary);
  font-size: var(--font-size-control-sm);
  font-weight: 700;
  line-height: 1.2;
}

.filter-sheet__options {
  display: grid;
  gap: var(--space-2);
  min-width: 0;
}

.filter-sheet__option {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  min-height: var(--control-height-compact);
  padding: 0 var(--space-2);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: var(--color-surface);
  color: var(--color-text-primary);
  font: inherit;
  font-size: var(--font-size-control-sm);
  font-weight: 600;
  line-height: 1.1;
  text-align: center;
  white-space: normal;
  overflow-wrap: break-word;
  word-break: normal;
  cursor: pointer;
}

.filter-sheet__option--stacked {
  min-height: 52px;
}

.filter-sheet__option-content {
  min-width: 0;
  max-width: 100%;
}

.filter-sheet__option-content--stacked {
  display: inline-grid;
  grid-template-columns: minmax(0, max-content);
  justify-items: center;
  justify-content: center;
  align-content: center;
  row-gap: 3px;
}

.filter-sheet__option-content--horizontal {
  display: inline-grid;
  grid-template-columns: 20px auto;
  column-gap: 4px;
  align-items: center;
  justify-items: start;
  justify-content: center;
  width: max-content;
  max-width: 100%;
}

.filter-sheet__option-icon {
  display: block;
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  object-fit: contain;
  object-position: center;
}

.filter-sheet__option-icon--monochrome {
  filter: brightness(0);
}

:root[data-theme='dark'] .filter-sheet__option-icon--monochrome {
  filter: none;
}

.filter-sheet__option-icon--color {
  filter: none;
}

.filter-sheet__option-label {
  display: block;
  min-width: 0;
  max-width: 100%;
  font-weight: 600;
  line-height: 1.15;
}

.filter-sheet__option-content--stacked .filter-sheet__option-label {
  text-align: center;
}

.filter-sheet__option-content--horizontal .filter-sheet__option-label {
  text-align: start;
}

.filter-sheet__option.is-selected,
.filter-sheet__option[data-selected='true'],
.filter-sheet__option[data-filter-state='include'] {
  border-color: var(--color-control-primary);
  background: var(--color-control-selected);
  color: var(--color-text-primary);
  box-shadow: inset 0 0 0 1px var(--color-control-primary);
}

.filter-sheet__option[data-filter-state='exclude'] {
  border-color: var(--color-control-danger);
  background: var(--color-control-selected-danger);
  color: var(--color-text-primary);
  box-shadow: inset 0 0 0 1px var(--color-control-danger);
}

.filter-sheet__option:focus-visible {
  outline: 2px solid var(--color-control-focus);
  outline-offset: 2px;
}
