/************
 * Toolbars *
 ************/
toolbar {
  -GtkWidget-window-dragging: true;
  padding: $mini_padding;
  background-color: $bg_color;
  
  &:backdrop { background-color: backdrop($bg_color); }

  button { @extend %flat_button; }

  // on OSD
  .osd & { background-color: transparent; }

  // stand-alone OSD toolbars
  @at-root %toolbar_osd,
  &.osd {
    transition: $shadow_transition;
    padding: $tiny_padding;
    border-radius: $other_radius;
    box-shadow: $shadow_2, inset 0 1px $highlight_color;
    background-color: $base_color;

    &:backdrop { box-shadow: $shadow_1, inset 0 1px $highlight_color; }

    &.left,
    &.right,
    &.top,
    &.bottom { border-radius: 0; } // positional classes for `attached` osd toolbars
  }

  // toolbar separators
  &.horizontal > separator { margin: $mini_padding; }
  &.vertical > separator { margin: $mini_padding; }

  &:not(.inline-toolbar):not(.osd) {
    scale,
    spinbutton,
    button { margin: $mini_padding; }

    .linked spinbutton,
    .linked button {
      &:not(:first-child) { margin-left: 0; }
      &:not(:last-child) { margin-right: 0; }
    }

    spinbutton {
      button { margin: 0; }
    }

    switch { margin: $small_padding $mini_padding; }
  }
}

// searchbar, location-bar & inline-toolbar
.inline-toolbar {
  padding: $tiny_padding;
  border-style: solid;
  border-width: 0 $border_size $border_size;
  border-color: $border_color;
  background-color: $alt_base_color;
  
  &:backdrop { background-color: backdrop($alt_base_color); }
}

searchbar,
.location-bar {
  padding: $container_padding;
  border-style: solid;
  border-width: 0 0 $border_size;
  border-color: $border_color;
  background-color: $bg_color;
  background-clip: border-box;
  
  &:backdrop { background-color: backdrop($bg_color); }
}
