/***************
 * Header bars *
 ***************/

.titlebar,
.header-bar {
  transition: none;
  padding: 4px 6px;
  border-width: 0px 0px 1px 0px;
  border-radius: 3px 3px 0px 0px;
  border-style: solid;
  border-color: $border_color;
  color: t_color(text);
  background-image: linear-gradient(to bottom,t_color(background-light),t_color(background));
  &:backdrop {
    border-color: transparent;
    background-image: none;
    background-color: t_color(backdrop-background);
    color: t_color(backdrop-text);
    box-shadow: none;
  }
.path-bar .button {
  color: t_color(text);
  }
.button {
  transition: none;
  @include button(undecorated, $tc: t_color(text));

  &.flat {
    @include button(undecorated,$tc: t_color(text));
  }
  &:hover {
    @include button(hover, $tc: t_color(text));
    &:backdrop { border-color: t_color(backdrop-background); }
  }
  &:active, &:checked {
    @include button(active);
    &:hover {
	  @include button(active-hover);
    }
    &:backdrop {
      background-image: none;
      background-color: t_color(backdrop-background);
      border-color: t_color(backdrop-background);
      color: t_color(backdrop-text);
    }
  }

  &.suggested-action {
    @extend %suggested-action;
  }

  &:backdrop {
    background-color: t_color(backdrop-background);
    color: t_color(backdrop-text);
    }

  &.flat:backdrop, &.flat:backdrop:insensitive, &:insensitive:backdrop {
    background-image: none;
    background-color: t_color(backdrop-background);
    color: t_color(backdrop-text);
    border-color: transparent;
    }
  &.flat:insensitive {
    @extend %undecorated_button;;
    color: insensitive(t_color(text));
    }
  &:insensitive {
    background-color: transparent;
    background-image: none;
    color: insensitive(t_color(text));
    &:active, &:checked {
      @include button(insensitive-active);
    }
  }
}

  .title {
    font-weight: normal;
    padding: 0px 12px;
  }

  .subtitle {
    font-size: smaller;
    padding: 0 12px;
    @extend .dim-label;
  }

  .header-bar-separator,
  & > GtkBox > .separator.vertical {
    -GtkWidget-wide-separators: true;
    -GtkWidget-separator-width: 1px;
    border-width: 0px;
    background-color: t_color(background);
    border-color: t_color(background);
    &:backdrop {
      background-color: t_color(backdrop-background);
      border-color: t_color(backdrop-background);
    }
  }
  &.selection-mode {

    @extend .info;

    &.suggested-action {
      @extend %suggested-action;
    }

    .subtitle:link { @extend *:link:selected;  }

    .selection-menu {
      padding-left: 10px;
      padding-right: 10px;

      GtkArrow { -GtkArrow-arrow-scaling: 1; }

      .arrow {
        -gtk-icon-source: -gtk-icontheme('arrow-down');
        icon-shadow: none;
      }
    }
  }

  .tiled &, .maximized & {
    border-radius: 0; // squared corners when the window is max'd or tiled
  }

  &.default-decoration {
    padding: 4px;
    .button { padding: 5px; }
  }
}

%suggested-action {
  background-image: none;
  background-color: b_color(active);
  &:hover {
    background-color: b_color(hover);
    color: b_color(text)
    }
  &:insensitive {
    background-color: transparent;
    background-image: none;
    color: insensitive(t_color(text));
    &:active, &:checked {
      @include button(insensitive-active);
      }
    }
  &:backdrop {
    background-color: t_color(backdrop-background);
    border-color: transparent;
    color: t_color(backdrop-text);
    &:insensitive {
      color: insensitive(t_color(backdrop-text));
    }
  }
}
