@function gtkalpha($c,$a) {
  @return unquote("alpha(#{$c},#{$a})");
}

$ease-out-quad: cubic-bezier(0.25, 0.46, 0.45, 0.94);
$backdrop_transition: 200ms ease-out;
$button_transition: all 200ms $ease-out-quad;
$focus_transition: outline-width 200ms $ease-out-quad, outline-offset 200ms $ease-out-quad;
$button_radius: 5px;
$menu_radius: 5px;
$menu_margin: $menu_radius; //margin around menuitems & sidebar items
$window_radius: $button_radius + 3;
$popover_radius: $button_radius + 4;

$treeview_borders_color: if($variant=='light',mix($borders_color, $base_color,80%),mix($fg_color, $base_color, 20%));

.background {
  color: $fg_color;
  background-color: $bg_color;
}

dnd {
  color: $fg-color;
}

.normal-icons {
  -gtk-icon-size: 16px;
}

.large-icons {
  -gtk-icon-size: 32px;
}

%osd,
.osd {
  color: $osd_fg_color;
  border: none;
  background-color: $osd_bg_color;
  background-clip: padding-box;
}

// catch all extend :)

%selected_items {
  background-color: $selected_bg_color;
  color: $selected_fg_color;

  &:disabled { color: mix($selected_fg_color, $selected_bg_color, 50%); }
}

/* Text selection */

selection {
  background-color: transparentize($text_color, 0.9);
  color: transparent;

  &:focus-within {
    background-color: transparentize($selected_bg_color, 0.7);
  }
}

:not(window):drop(active):focus,
:not(window):drop(active) { // FIXME needs to be done widget by widget, this wildcard should really die
  border-color: $drop_target_color;
  box-shadow: inset 0 0 0 1px $drop_target_color;
  caret-color: $drop_target_color;
}

.navigation-sidebar,
placessidebar,
stackswitcher,
expander-widget {
  :not(window):drop(active):focus,
  :not(window):drop(active) {
    box-shadow: none;
  }
}

/* Outline for low res icons */
.lowres-icon {
    -gtk-icon-shadow: 0 -1px rgba(0,0,0,0.05),
      1px 0 rgba(0,0,0,0.1),
      0 1px rgba(0,0,0,0.3),
      -1px 0 rgba(0,0,0,0.1);
}

/* Drop shadow for large icons */
.icon-dropshadow {
  -gtk-icon-shadow: 0 1px 12px rgba(0,0,0,0.05),
      0 -1px rgba(0,0,0,0.05),
      1px 0 rgba(0,0,0,0.1),
      0 1px rgba(0,0,0,0.3),
      -1px 0 rgba(0,0,0,0.1);
}

@import 'widgets';
