/************
 * Ubiquity *
 ************/

#live_installer > #wizard {

  #page_mode #title_section label#page_title { //Page Title text
    color: $almost_white;
  }

  #progress_eventbox #progress_mode { //Progress dots at the bottom
    progressbar *{
      border-radius: $circular_radius;
    }

    label { //Installation text
      color: $almost_white;
    }
  }
}

/*********
 * Tilix *
 *********/
overlay > revealer {
  &.left > scrolledwindow.frame,
  &.right > scrolledwindow.frame {
    border-style: none;
    box-shadow: $shadow_4;
  }

  &.left > scrolledwindow.frame { margin-right: 32px; }

  &.right > scrolledwindow.frame { margin-left: 32px; }
}

.terminix-session-sidebar, // for backwards compatibility
.tilix-session-sidebar { background-image: image($lighter_bg_color); }

button.image-button.session-new-button { min-width: $large_size - 4px; }


/***********
 * Eclipse *
 ***********/
window.background > box.vertical > scrolledwindow > widget toolbar {
  padding: 2px;

  separator,
  button { margin: 2px; }

  button { border-radius: 2px; }
}


/***********
 * Firefox *
 ***********/
$firefox_border_color: rgba($black, 0.2);

window.background:not(.csd) {
  > widget {
    // for the bookmark toolbar's separators
    > separator { color: $firefox_border_color; }

    // avoid black border
    > scrollbar { background-clip: border-box; }

    // emphasize borders color
    > scrollbar,
    > frame > border { border-color: $firefox_border_color; }

    > entry,
    > button > button {
      border: 1px solid $firefox_border_color;
      border-radius: 2px + 1px;
      box-shadow: none;
    }

    > entry {
      min-height: 32px - 2px;

      &:focus { border-color: $accent_color; }
    }

    > button > button {
      padding: 4px 8px;
      background-size: auto;
      // color: $fg_color;

      &:hover { background-image: image(gtkalpha(currentColor, 0.1 / 2)); }

      &:active { background-image: image(gtkalpha(currentColor, 0.1)); }
    }

    // use 16px assets for hard-coded sizing
    > checkbutton > check { @extend %small_check; }

    > radiobutton > radio { @extend %small_radio; }
  }

  // remove ugly border around the menus
  > window > menu,
  > menu > menu { border: none; }

  button label {
//    color: rgba($fg_color, 1.0); This is overriding all labels including the panel
  }
}

// Firefox now uses this for selected items
text:selected { @extend %selected_items; }

// for backwards compatibility
window.background:not(.csd) {
  > widget {
    > menubar {
      color: $titlebar_secondary_fg_color;

      &:hover { color: $titlebar_fg_color; }

      &:disabled { color: $titlebar_disabled_secondary_fg_color; }
    }

    > frame { color: $firefox_border_color; }

    > checkbutton > check,
    > radiobutton > radio {
      margin: 0;
      padding: 0;
    }
  }

  > window.background > menu > separator { color: $border_color; }
}


/************
 * Inkscape *
 ************/
#ToolboxCommon {
  > #AuxToolbox {
    #StyleSwatch { font-size: smaller; }

    #Kludge { padding: 0; }

    spinbutton,
    entry { min-height: 32px; }

    button:not(.up):not(.down) {
      min-height: 24px;
      min-width: 16px;
      padding: 4px 8px;
      border-radius: 2px;
      -gtk-outline-radius: 2px;
    }

    spinbutton button { border-width: 4px; }
  }

  > toolbar.vertical {
    margin-top: -4px;

    button {
      min-height: 24px;
      min-width: 24px;
      padding: 4px;
      border-radius: 2px;
      -gtk-outline-radius: 2px;
    }
  }
}

#CanvasTable {
  button {
    min-height: 16px;
    min-width: 16px;
    padding: 0;
  }

  #HorizontalScrollbar { border-top: 1px solid $border_color; }

  #VerticalScrollbar {
    &:dir(ltr) { border-left: 1px solid $border_color; }

    &:dir(rtl) { border-right: 1px solid $border_color; }
  }
}

#Canvas_and_Dock {
  frame > border { border: none; }

  // each canvases' titlebar
  widget > widget {
    > button.flat {
      min-height: 16px;
      min-width: 16px;
      padding: 4px;
    }

    > box.horizontal image { padding: 4px; }
  }

  // vertical dock buttons
  box.horizontal > box.vertical > button.flat {
    min-height: 16px;
    min-width: 24px;
    padding: 8px 4px;
  }
}


/***********
 * Synapse *
 ***********/
box.vertical > widget > widget:selected { background-color: $primary_color; }


/****************
 * Libre-Office *
 ****************/
window.background:not(.solid-csd) {
  // for 'Notebookbar' toolbar
  > notebook:not(.frame) {
    border: 0 none transparent; // unset borders
    background-color: $bg_color;

    > stack {
      border: none;
      background-color: $bg_color;
      box-shadow: none;
    }

    > header.top {
      border: 0 none transparent; // unset borders
      background-color: $bg_color;
      box-shadow: $shadow_2;

      tabs {
        &, > tab {
          background-color: transparent;

          &,
          label,
          image { color: $secondary_fg_color; }

          &:hover,
          &:checked {
            &,
            label,
            image { color: $fg_color; }
          }
        }
      }
    }
  }
}


/*********************
 * Chrome / Chromium *
 *********************/

tooltip.chromium { background-color: $base_color; }

window.background.chromium {
  // checked-tab & toolbar & button widgets
  background-color: if($variant == 'light', $bg_color, $base_color);
  color: if($variant == 'light', $secondary_fg_color, $fg_color);

  button { // for active-tab borders
    border-width: 1px;
    border-style: solid;
    border-color: if($variant == 'light',
                     rgba($dark_fg_color, 0.3),
                     rgba($light_fg_color, 0.3));
  }

  *:backdrop button { // outdated? let's unset borders
    border-color: transparent;
  }

  /*entry.chromium {
    &, &:focus { // overrides standard borders
      border-image: none;
      border: 1px solid rgba($dark_fg_color, 0.3);
    }
  }*/

  entry.chromium {
    // overrides standard borders
    border-image: none;
    border: 1px solid rgba($dark_fg_color, 0.3);
    background-color: $dark_fg_color;
    color: if($variant == 'light', $secondary_fg_color, $fg_color);

    &:focus {
      border-color: $primary_color;
    }
  }

  // internal region of toolbar's entry widget
  > textview.view {
    background-color: transparent;
  }

  // spinner colour
  > spinner {
    color: $dark_fg_color;
    &:disabled { color: mix($dark_fg_color, $bg_color, 30%); }
  }

  menu menuitem {
    color: $fg_color;
    &:hover { // 61.0.3159 or higher
      // revive hovered backgrounds
      background-color: mix($fg_color, $base_color, 10%);
    }
    &:disabled { color: $disabled_fg_color; }
  }
}
