// floating status bar
.floating-bar {
  @extend %osd;

  // @extend .toolbar.osd;

  min-height: 32px;
  padding: 0;
  border-style: solid solid none;
  border-width: 1px;
  border-color: $borders_color;
  border-radius: (2px + 1px) (2px + 1px) 0 0;
  background-color: $base_color;
  background-clip: $extra_background_clip;
  transition: $material_transition, border-width 0;

  &.left {
    margin-right: 8px - 1px;
    border-left-style: none;
    border-top-left-radius: 0;
  }

  &.right {
    margin-left: 8px - 1px;
    border-right-style: none;
    border-top-right-radius: 0;
  }

  button {
    min-height: 24px;
    min-width: 24px;
    margin: 4px;
    padding: 0;
  }
}


/************
 * Nautilus *
 ************/
.nautilus-window,
.nautilus-window notebook,
.nautilus-window notebook > stack {
  background: $base_color;
}

.nautilus-desktop-window,
.nautilus-desktop-window notebook,
.nautilus-desktop-window notebook > stack {
  background: transparent;
}

.nautilus-canvas-item {
  // border-radius: 2px;
}

.nautilus-canvas-item.dim-label,
.nautilus-list-dim-label {
  // @extend .dim-label;
}

.nautilus-canvas-item.dim-label:selected,
.nautilus-list-dim-label:selected {
}

.nautilus-desktop.nautilus-canvas-item {
  // background-color: scale-alpha(#000000, $lower_opacity);
  color: $selected_fg_color;
  text-shadow: $z-depth-1;
}

.nautilus-desktop.nautilus-canvas-item:selected {
  // color: $selected_fg_color;
  text-shadow: none;
}

.nautilus-circular-button {
  @extend %button_basic.image-button;
}

// Toolbar
@keyframes needs_attention_keyframes {
  0% {background-color: transparent; }
  50% {background-color: $track_color; }
  100% {background-color: transparent; }
}

.nautilus-operations-button-needs-attention {
  color: $accent_bg_color;
  animation: needs_attention_keyframes 2s $material_ease;
}

.nautilus-operations-button-needs-attention-multiple {
  color: $accent_bg_color;
  animation: needs_attention_keyframes 2s $material_ease;
  animation-iteration-count: 2;
}

.disk-space-display {
  // border-style: solid;
  // border-width: 2px;
}

.disk-space-display.unknown {
  background-color: $warning_color;
}

.disk-space-display.used {
  background-color: $selected_bg_color;
}

.disk-space-display.free {
  background-color: $track_color;
  color: $insensitive_fg_color;
}

// View
.nautilus-list-view .view {
  // border-bottom: 1px solid $borders_color;
}

// Hide superfluous treeview drop target indication
.nautilus-list-view .view.dnd {
  // border-style: none;
}

// Libgd tag entries in the search. Sadly it requires this copy pasted css style.
// https://git.gnome.org/browse/libgd/tree/libgd/gd-tagged-entry-default.css
.documents-entry-tag {
  // min-height: 24px;
  margin: 3px -2px 3px 8px;
  padding: 0 8px;
  border-radius: 100px;
  box-shadow: none;
  background-color: $selected_bg_color;
  color: $selected_fg_color;

  &:hover { box-shadow: $z-depth-1; }
}

.documents-entry-tag.button {
  // @extend %button_basic.flat;

  // min-height: 24px;
  // min-width: 24px;
  margin: 0 -2px;
  padding: 4px;
  border-radius: 100px;
  box-shadow: none;
  color: $secondary_selected_fg_color;

  &:hover, &:active { color: $selected_fg_color; }
}

// Workaround for the double border of the searchbar since we use a revealer which
// always allocates at least 1 pixel
.nautilus-window searchbar { border-top: 1px solid $borders_color; }

.nautilus-window .searchbar-container { margin-top: -1px; }


/*********
 * gedit *
 *********/
.open-document-selector-treeview:hover {
}

.open-document-selector-treeview:selected:hover {
}

/* Only normal state is handle */
.open-document-selector-name-label {
  font-weight: bold;
}

/* Only normal state is handle */
.open-document-selector-path-label {
  color: gtkalpha(currentColor, $hint_opacity);
  font-size: smaller;

  // @extend .dim-label;
}

.gedit-document-panel {
  background-color: $light_color;
}

.gedit-document-panel row:selected {
}

.gedit-document-panel-group-row,
.gedit-document-panel-group-row:hover {
  border-top: 1px solid gtkalpha(currentColor, 0.3);
}

.gedit-document-panel-group-row:first-child,
.gedit-document-panel-group-row:first-child:hover {
  border-top: 0px;
}

/* Try to look as the notebook tab close button */
.gedit-document-panel row button.flat {
  min-height: $small_size;
  min-width: $small_size;
  padding: 0;
  margin-top: 8px;
  margin-bottom: 8px;

  @extend %button_basic.image-button;
}

statusbar {
  border-top: 1px solid $borders_color;
}

.gedit-search-slider {
  margin: 4px 4px 8px;

  .gedit-search-entry-occurrences-tag {
    all: unset;
    padding: 0 4px;
    color: gtkalpha(currentColor, $hint_opacity);
  }

  entry {
    &:dir(ltr) {
      margin-right: -$medium_size * 2;
      padding-right: $medium_size * 2 + 8px;

      .gedit-search-entry-occurrences-tag { margin-right: -8px; }
    }

    &:dir(rtl) {
      margin-left: -$medium_size * 2;
      padding-left: $medium_size * 2 + 8px;

      .gedit-search-entry-occurrences-tag { margin-left: -8px; }
    }

    &.error ~ button { @extend %button_selected.flat; }
  }

  button {
    @extend %button_basic.flat;

    &:dir(ltr),
    &:dir(rtl) { @extend %linked; }
  }
}

// Yeah this is ugly
.gedit-search-slider .linked:not(.vertical) > entry,
notebook > stack:not(:only-child) revealer .gedit-search-slider .linked:not(.vertical) > entry {
  border-radius: 2px;
}


/***********
 * Firefox *
 ***********/
menubar {
  color: $secondary_selected_fg_color;

  &:hover { color: $selected_fg_color; }
}

separator { color: $borders_color; }

/* FIXME: not working */
window.background > widget > check,
window.background > widget > radio {
  margin: 0;
  padding: 0;
}

window.background > widget > radio:checked {
  -gtk-icon-source: image(-gtk-recolor(url("assets/radio-checked-symbolic.svg")),
                          -gtk-recolor(url("assets/radio-checked-symbolic.png")));
  border-image: none;
}


/***********
 * Synapse *
 ***********/
box > widget > widget:selected { background-color: $selected_bg_color; }

