// based css:
// https://github.com/shimmerproject/Greybird/blob/master/gtk-3.0/_xfce.scss

/**************
 * Xfce4 Apps *
 **************/
.XfceHeading {
  background-color: $base;
}


/***************
 * xfce4-panel *
 ***************/
.xfce4-panel.background {
  border: none; // Sadly the border is hard-coded
  background-color: $panel;
  color: on($panel, secondary);
  font-weight: 500;

  button {
    @extend %titlebar-button;
    min-height: 16px;
    min-width: 16px;
    padding: 0;
    border-radius: 0;
  }

  .tasklist button {
    border-radius: 0;
    border-image: image(transparent) 0 0 2 / 0 0 2px;

    &:checked { border-image: image($primary) 0 0 2 / 0 0 2px; }

    image { padding: 4px; }
  }

  frame > border { border: none; }
}

// Workspace switcher provided by libwnck
wnck-pager {
  &:hover { background-color: $overlay-hover; }

  &:active { background-color: $overlay-active; }

  &:selected { background-color: $primary; }
}

XfdesktopIconView.view {
  border-radius: $corner-radius;
  background-color: transparent;
  color: on(dark);
  text-shadow: $text-shadow;

  // XfdesktopIconView uses :active instead of :selected for selection
  &:active {
    @extend %selected_items;

    box-shadow: none;
  }

  // .label { text-shadow: $text-shadow; }

  .rubberband {
    @extend rubberband;

    border-radius: 0;
  }
}

#XfceNotifyWindow {
  box-shadow: none;
  border: none;
  border-radius: $window-radius;

  buttonbox { padding: 0; }

  // button { }

  label#summary { font-weight: bold; }

  // progressbar {
  //   progress { }
  //
  //   trough { }
  // }
}

// Xfwm4's alt-tab dialog, aka "tabwin"
#xfwm-tabwin {
  padding: 12px;
  border-radius: $corner-radius;

  // Set the application icon- and preview-size to 64px
  -XfwmTabwinWidget-icon-size: 64px;
  -XfwmTabwinWidget-preview-size: 64px;

  // button { }
}


/**********
 * Thunar *
 **********/
.thunar {
  paned > scrolledwindow {
    padding: $space-size / 2;

    treeview.view {
      border-radius: $corner-radius;
      min-height: 24px;

      &:not(:hover):not(:selected) {
        background-color: transparent;
        background-image: none;
      }

      &:selected {
        border-left:2px solid $primary;
        transition: background-color $ripple-fade-out-opacity-duration $ease-out;
      }
    }
  }

  toolbar {
    background-color: $titlebar;
    color: $titlebar-text;
    border-bottom: 1px solid $divider;

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

    button { @extend %titlebar-button; }

    entry { @extend %titlebar-entry; }

    @if $topbar == 'dark' and $variant = 'light' {
      .path-bar.linked:not(.vertical) > button {
        color: $titlebar-text-secondary;

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

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

    > toolitem > widget > widget.linked.path-bar > button.path-bar-button:not(.flat) {
      @extend %button-flat;
      border-image: none;
      margin: 0 2px;
    }
  }

  #location-toolbar { border-bottom: 1px solid $divider; }

  .standard-view.frame { border-style: none; }

  .sidebar .view:not(:selected) { background-color: transparent; }

  statusbar {
    margin: 0 -10px;
    padding: 0 4px;
    border-top: 1px solid $divider;
  }

  scrolledwindow.frame.sidebar.shortcuts-pane {
    border-top: none;
  }
}

window.background.csd.thunar {
  scrolledwindow.frame.sidebar.shortcuts-pane {
    border-bottom-left-radius: $window-radius;

    treeview.view:not(:hover):not(:selected) {
      background: none;
    }
  }
}

// Xfce4 logout dialog
.xfsm-logout-dialog {
  border: 2px solid $solid-border;
  box-shadow: none;
}

//
// Xfce4 setting dialog
//

.exoiconview {
  label {
    text-decoration-line: none;
    text-decoration-color: $text-secondary-disabled;
  }

  widget.view {
    border-radius: $corner-radius;

    &, &:checked, &:active, &:selected, &:focus {
      color: $text;
    }
  }
}

//
// xfce4-docklike-plugin

//change these colors according to your color palette
#docklike-plugin button { min-width: $medium-size; min-height: $medium-size + $space-size; }
#docklike-plugin button.hover_group { background-color: on($panel, divider); }
#docklike-plugin button.active_group { background-color: on($panel, track); }
#docklike-plugin button.active_group.hover_group { background-color: rgba($primary, 0.12); }
