.custom-curve {
  display: flex;
  gap: 14px;
  width: 600px;
}

/* Grid: output range | curve, then input range and gamma below the curve. */
.custom-curve__editor {
  display: grid;
  grid-template-columns: auto var(--curve-size);
  grid-template-rows: auto auto auto auto;
  column-gap: 2px;
  align-items: start;
}

.custom-curve__head {
  grid-column: 1 / 3;
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 4px;
}

/* Histogram modes: icon buttons on the right of the head. */
.custom-curve__histogram {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-left: auto;
}

.custom-curve__histogram-label {
  margin-right: 6px;
  color: var(--ui-text-dim);
}

.custom-curve__histogram-mode {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 24px;
  padding: 0;
  color: var(--ui-text-dim);
  background: none;
  border: 0;
  border-radius: 3px;
  cursor: pointer;
}

.custom-curve__histogram-mode:hover {
  color: var(--ui-text);
  background: var(--custom-curve-histogram-mode-hover);
}

.custom-curve__histogram-mode[aria-pressed="true"] {
  color: var(--ui-text);
  background: var(--custom-curve-histogram-mode-active);
}

.custom-curve__histogram-mode svg {
  display: block;
}

.custom-curve__output {
  grid-column: 1;
  grid-row: 2;
}

.custom-curve__curve {
  grid-column: 2;
  grid-row: 2;
}

.custom-curve__input {
  grid-column: 2;
  grid-row: 3;
  margin-top: 2px;
}

.custom-curve__gamma {
  grid-column: 1 / 3;
  grid-row: 4;
}

.custom-curve__points {
  flex: 1;
  min-width: 0;
  padding-top: 2px;
}
