/********
 * Nemo *
 ********/
// based css:
// https://github.com/linuxmint/nemo/blob/master/gresources/nemo-style-fallback-mandatory.css
// https://github.com/linuxmint/nemo/blob/master/gresources/nemo-style-fallback.css
// hard-coded css:
// https://github.com/linuxmint/nemo/blob/master/gresources/nemo-style-application.css

.nemo-window.background {
  .primary-toolbar {
    background-color: $titlebar;
    border-bottom: 1px solid $divider;
    padding: $space-size ($space-size - 2px);

    &:backdrop { background-color: $titlebar-backdrop; }

    // FIXME: workaround for wrong size allocation of Nemo
    entry {
      @extend %titlebar-entry;
      margin: 0 2px;
    }

    button:not(.text-button):not(.suggested-action):not(.destructive-action) {
      @extend %titlebar-button;
      margin: 0 2px;
      border-radius: $corner-radius;
      padding: ($medium-size - 26px) / 2 ($medium-size - 16px) / 2;
    }

    // instead of .path-bar button
    button.text-button {
      padding-left: 8px;
      padding-right: 8px;
      color: $titlebar-text-secondary;
      margin: 0 0;

      &:hover, &:active, &:checked { color: $titlebar-text; }

      &:disabled { color: $titlebar-text-disabled; }
    }

    // instead of .path-bar button.slider-button
    button:not(.text-button):not(.image-button) {
      padding-left: 4px;
      padding-right: 4px;
    }
  }

  // .nemo-places-sidebar { }

  scrolledwindow.frame {
    border-style: none;
  }

  // infobar { margin-top: -6px; }

  // Inactive F3 pane shading
  .nemo-inactive-pane .view:not(:selected):not(:hover) { background-color: $base-alt; }

  // Rename box styling in the icon view.
  .nemo-window-pane {
    widget.entry {
      border-radius: $corner-radius;
      background-color: $fill;

      &:selected { @extend %selected_items_primary; }
    }

    notebook .view {
      &:selected { @extend %selected_items_color; }
    }
  }

  .toolbar button {
    @extend %button-flat;
    border-radius: $corner-radius;
    margin: 0;
    padding: 0 $space-size;
  }

  // For Places Sidebar diskfull indicators
  .places-treeview {
    -NemoPlacesTreeView-disk-full-bg-color: mix($text, $background, percentage(0.3)); // Can't use translucent colors
    -NemoPlacesTreeView-disk-full-fg-color: $primary;
    -NemoPlacesTreeView-disk-full-bar-width: 2px;
    -NemoPlacesTreeView-disk-full-bar-radius: 0;
    -NemoPlacesTreeView-disk-full-bottom-padding: 1px; // There is already hard-coded 1px bottom-padding
    -NemoPlacesTreeView-disk-full-max-length: 80px;
    // padding-top: $space-size / 2;
    // padding-bottom: $space-size / 2;
  }
}

.nemo-desktop.nemo-canvas-item {
  @extend %desktop-canvas-item;
}
