$variant: 'light';

@import 'colors';

.XfceHeading {
    margin: 0;
    padding: 0;
    border-width: 0;
    background-image: none;
    background-color: shade($bg_color, 1.18);
    color: $text_color;
    text-shadow: 0px 1px $shadow_color;
}

.xfce4-panel.background {
    background-color: $panel_bg_color;
    color: $panel_fg_color;
    font-weight: normal;
    button {
        background-image: none;
        background-color: transparent;
        border-radius: 0;
        border-color: transparent;
        box-shadow: none;
        padding: 0 1px;
        color: $panel_fg_color;
        text-shadow: 0px 1px $shadow_color;
        &:active, &:checked {
            background-image: none;
            background-color: shade($panel_bg_color, 0.7);
            border-color: shade($panel_bg_color, 0.6);
            color: $panel_fg_color;
            transition: none;
        }
        &:hover, &:active:hover, &:checked:hover {
            border-color: shade($mb_selected_bg_color, 0.6);
            background-image: linear-gradient(to bottom,
                                              shade($mb_selected_bg_color, 0.88),
                                              shade($mb_selected_bg_color, 0.85)
                                              );
            color: $panel_fg_color;
            box-shadow: inset 0 -1px gtkalpha(white, 0.0),
                        inset 1px 0 gtkalpha(white, 0.15),
                        inset -1px 0 gtkalpha(white, 0.15),
                        inset 0 1px gtkalpha(white, 0.15);
            transition: none;
        }
    }
    menu {
        -gtk-icon-effect: none;

        text-shadow: none;
        // Theme pulseaudio-plugin's mpris buttons
        .linked button {
            @extend %linked;
            @include button(normal, $menu_color, $text_color);
            &:disabled {
              @include button(insensitive);
              border-color: transparentize($borders_color, 0.5);
            }
        }
    }
    progressbar {
        margin: 0;

        &.horizontal {
          trough { min-height: 6px; padding: 0; }
          progress { min-height: 4px; }
        }

        &.vertical {
          trough { min-width: 6px; padding: 0; }
          progress { min-width: 4px; }
        }
        progress { border-radius: 0px; }
        trough {
            background: shade($panel_bg_color, 0.7);
            border-radius: 0px;
            border-color: shade($panel_bg_color, 0.4);
        }
    }
    .tasklist button {
        margin: 1px;
        border-radius: 3px;
        text-shadow: 0 1px $fg_color;
        color: shade($panel_fg_color, 0.7);
        background-image: linear-gradient(to bottom,
                                          shade($panel_bg_color, 0.65),
                                          shade($panel_bg_color, 0.60),
                                          shade($panel_bg_color, 0.50),
                                          shade($panel_bg_color, 0.45)
                                          );
        border: none;
        &.flat {
            background-image: none;
            border: none;
            box-shadow: none;
        }
        &:active, &:checked {
            background-image: linear-gradient(to bottom,
                                              shade($mb_selected_bg_color, 0.65),
                                              shade($mb_selected_bg_color, 0.60),
                                              shade($mb_selected_bg_color, 0.50),
                                              shade($mb_selected_bg_color, 0.45)
                                              );
            color: shade($panel_fg_color, 1.0);
            box-shadow: inset 0 1px transparentize(white, 0.9),
                        inset 0 -1px transparentize(black, 0.8);
        }
        &:hover, &:active:hover, &:checked:hover {
            background-image: linear-gradient(to bottom,
                                              shade($mb_selected_bg_color, 0.85),
                                              shade($mb_selected_bg_color, 0.80),
                                              shade($mb_selected_bg_color, 0.70),
                                              shade($mb_selected_bg_color, 0.65)
                                              );
            color: shade($panel_fg_color, 1.0);
            box-shadow: inset 0 1px transparentize(white, 0.9),
                        inset 0 -1px transparentize(black, 0.8);
        }
        image {
            padding: 3px;
        }
    }
}

/* Workspace switcher provided by libwnck */
wnck-pager {
  &:selected { background-color: shade($selected_bg_color, 0.88); }
  &:hover { background-color: $selected_bg_color; }
}

/* Thunar's sidebar top border */
.thunar {
  :backdrop { color: $insensitive_fg_color; }
  toolbar {
    border-bottom: none;

    entry { min-height: 24px; }
  }
  .sidebar.frame { border-top: 1px solid $borders_color; }
}

XfdesktopIconView.view {
  background: transparent;
  color: $selected_fg_color;
  border-radius: 3px;
  &:active {
    background: rgba(darken($selected_bg_color, 15%), 0.5);
    text-shadow: 0 1px 1px black;
  }
  .label { text-shadow: 1px 1px 2px black; }
  .rubberband {
    @extend rubberband;
    border-radius: 0;
  }
}

#XfceNotifyWindow {
    background-color: shade($panel_bg_color, 0.3);
    color: $panel_fg_color;
    border-color: shade($panel_bg_color, 0.6);

    buttonbox { padding: 0; }

    button {
        background-image: none;
        border-color: shade($panel_fg_color, 0.35);
        border-radius: 3px;
        box-shadow: none;
    }

    label#summary {
        font-weight: bold;
    }

    progressbar {
        min-height: 6px;
        border-radius: 3px;
        progress {
            background-image: none;
            background-color: $panel_fg_color;
            border: none;
            box-shadow: none;
        }
        trough {
            background-image: linear-gradient(to bottom,
                                              shade($panel_bg_color, 0.65),
                                              shade($panel_bg_color, 1.25)
                                              );
            border: 1px solid shade($panel_bg_color, 0.2);
            border-radius: 3px;
            padding: 1px 0;
        }
    }
}

/* Xfwm4's alt-tab dialog, aka "tabwin" */
#xfwm-tabwin {
    padding: 12px;
    background-image: none;
    background-color: transparentize($selected_bg_color, 0.2);
    color: $selected_fg_color;
    text-shadow: 0px 1px transparentize(black, 0.2);
    border-radius: 12px;
    /* Set the application icon- and preview-size to 64px */
    -XfwmTabwinWidget-icon-size: 64px;
    -XfwmTabwinWidget-preview-size: 64px;

    button {
        background-image: none;
        color: $selected_fg_color;
        font-weight: bold;
        text-shadow: 0px 1px transparentize(black, 0.2);
        border: none;
        border-radius: 6px;
        box-shadow: none;

        &:active, &:checked, &:active:hover, &:checked:hover {
            background: transparentize($selected_bg_color, 0.7);
        }
        &:hover {
            background: mix(black, $mb_selected_bg_color, 40%);
            transition-duration: 50ms;
        }
    }
}
