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

/**
 * Xfce4 Apps
 */

.XfceHeading {
  // background-color: $surface-z1;
}

/**
 * xfce4-panel
 */

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

  button {
    min-height: 16px;
    min-width: 16px;
    padding: 0;
    border-radius: 0;
    color: hint($on-panel);
    @include ink-color($on-panel, $button-style: "flat");

    &:disabled {
      background-color: transparent;
      color: disabled-hint($on-panel);
    }

    &:checked {
      $background-color: overlay("activated", $on-panel);
      color: $on-panel;
      @include ink-color($on-panel, $button-style: "flat", $on: $background-color);

      &:disabled {
        background-color: overlay("activated", $on-panel);
        color: disabled($on-panel);
      }
    }
  }

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

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

    image {
      padding: 4px;
    }
  }

  &.horizontal .tasklist button {
    // margin: 0 1px;
  }

  &.vertical .tasklist button {
    // margin: 1px 0;
  }

  frame > border {
    border-style: none;
    background-color: transparent;
  }

  progressbar {
    progress {
      background-color: primary($on-panel);
    }

    trough {
      background-color: disabled-stroke($on-panel);
    }
  }
}

// Workspace switcher provided by libwnck
wnck-pager {
  &:hover {
    background-color: overlay("hover", $on-panel);
  }

  &:active {
    background-color: overlay("pressed", $on-panel);
  }

  &: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 {
    box-shadow: none;
    background-color: $overlay-selected;
  }

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

  .rubberband {
    @extend %rubberband;

    border-radius: 0;
  }
}

#XfceNotifyWindow {
  border-radius: $corner-radius;
  box-shadow: $shadow-z4, inset 0 1px highlight($surface-z8);
  background-color: $surface-z8;
  color: $on-surface;

  buttonbox button:not(:disabled) {
    color: $primary;
    @include ink-color($primary, $button-style: "flat");
  }

  label#summary {
    font-weight: bold;

    + label {
      color: hint($on-surface);
    }
  }

  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 {
  #location-toolbar {
    border-bottom: 1px solid divider($on-surface);

    // FIXME: This has no .image-button style class :(
    > toolitem > button {
      min-width: 24px;
      padding: ($medium-size - 24px) / 2;
      border-radius: $circular-radius;
    }
  }

  .shortcuts-pane.frame,
  .standard-view.frame {
    border-width: 0;
    background-color: transparent;
  }

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

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