/****************
 * File chooser *
 ****************/
placessidebar {
  > viewport.frame { border-style: none; }

  list { padding: $mini_padding 0 $tiny_padding; }

  row {
    // Needs overriding of the GtkListBoxRow padding
    min-height: $large_size;
    margin: -1px 0; // Remove unknown margins
    padding: 0;
    color: $fg_color;

    // Using margins/padding directly in the SidebarRow
    // will make the animation of the new bookmark row jump
    > revealer { padding: 0 $standard_padding; }

    &:selected {
      color: $inverse_fg_color;
      background-color: $accent_color;
      
      &:backdrop { background-color: backdrop($accent_color); }
    }

    &:disabled { color: $disabled_fg_color; }

    image.sidebar-icon {
      color: $fg_color; // dim the device icons

      &:dir(ltr) { padding-right: $small_padding; }
      &:dir(rtl) { padding-left: $small_padding; }
    }

    &:selected image.sidebar-icon { color: $inverse_fg_color; }

    label.sidebar-label {
      &:dir(ltr) { padding-right: $mini_padding; }
      &:dir(rtl) { padding-left: $mini_padding; }
    }

    @at-root button.sidebar-button {
      @extend %simple_flat_button;

      @extend %small_button;

      row:selected & { @extend %button_selected_flat; }
    }

    &.sidebar-placeholder-row {
      min-height: $sidebar_placeholder_size;
      padding: 0 $small_padding;
      background-image: image($accent_color);
      background-clip: content-box;
    }

    &.sidebar-new-bookmark-row { color: $accent_color; }

    &:drop(active):not(:disabled) {
      box-shadow: inset 0 0 0 2px $accent_color;

      &:selected {
        background-color: $accent_color;
        color: $inverse_fg_color;
      }
    }
  }
}

placesview {
  .server-list-button > image { -gtk-icon-transform: rotate(0turn); }

  .server-list-button:checked > image { -gtk-icon-transform: rotate(-0.5turn); }

  // this selects the "connect to server" label
  > actionbar > revealer > box > label {
    padding-left: $small_padding;
    padding-right: $small_padding;
  }
}
