// IBus Candidate Popup
.candidate-popup-boxpointer {
  -arrow-border-radius: $menu_radius;
  -arrow-background-color: transparent;
  -arrow-border-width: 0;
  -arrow-border-color: transparent;
  -arrow-base: 64px;
  -arrow-rise: 3px;
  border-radius: $menu_radius;
  box-shadow: 0 3px 3px -2px rgba(black, if($variant == 'light', 0.1, 0.18));
}

.candidate-popup-content {
  color: $text-secondary;
  box-shadow: none;
  border: none;
  margin: 0;
  padding: $base_padding;
  spacing: $base_padding;
  background-color: $popover;
  border-radius: $menu_radius;

  @if $rimless == 'false' {
    border: 1px solid $window-border;
    box-shadow: inset 0 0 0 1px highlight($popover);
  } @else { border: none; }
}

.candidate-index {
  padding: 0 0.5em 0 0;
  color: $text-secondary;
  .candidate-box:selected & { color: on($primary, secondary); }
}

.candidate-box {
  padding: 0.3em 0.5em 0.3em 0.5em;
  margin-right: 2px;
  border-radius: $base_radius;
  color: $text-secondary;
  &:hover { background-color: $divider; color: $text; }
  &:active { background-color: $track; color: $text; }
  &:selected { background-color: $primary; color: on($primary); }
  &:last-child { margin-right: 0; }
}

.candidate-page-button-box {
  height: 2em;
  .vertical & { padding-top: 0.5em; }
  .horizontal & { padding-left: 0.5em; }
}

.candidate-page-button {
  padding: 4px 8px;
  @extend %flat_button;
}

.candidate-page-button-previous,
.candidate-page-button-next { border-radius: $base_radius;  }
.candidate-page-button-icon { icon-size: 1em; }
