/**
 * Copyright 2020-2026 | Fabrice Creuzot (luigifab) <code~luigifab~fr>
 * https://github.com/luigifab/human-theme
 *
 * Forked from
 *  Copyright 2020 | Mike Kazantsev (mk-fg) <mk~fraggod~gmail~com>
 *  https://github.com/mk-fg/clearlooks-phenix-humanity
 *
 * Forked from
 *  Copyright 2011-2014 | Jean-Philippe Fleury
 *  Copyright 2013-2014 | Andrew Shadura
 *  https://github.com/jpfleury/clearlooks-phenix
 *
 * This program is free software, you can redistribute it or modify
 * it under the terms of the GNU General Public License (GPL) as published
 * by the free software foundation, either version 3 of the license, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but without any warranty, without even the implied warranty of
 * merchantability or fitness for a particular purpose. See the
 * GNU General Public License (GPL) for more details.
 */

box:dir(ltr) label + switch {
	margin-left: 7px;
}

box:dir(rtl) switch + label {
	margin-left: 7px;
}

/* --- desktop icon --- */
/* @see https://forum.xfce.org/viewtopic.php?pid=73595#p73595 */

XfdesktopIconView.view {
	color: @theme_selected;
	border-radius: 4px;
	background: transparent;
	text-shadow: 0.5px 1px @theme_text;
}

XfdesktopIconView.view:active {
	color: @theme_selected_bg;
	background: @theme_selected_bg;
}

XfdesktopIconView.label:active {
	color: @theme_selected;
}

/* --- xfwm4 tabwin alttab alt-tab osd --- */
/* @see https://github.com/RolKau/old-ubuntu-human-theme/commit/6cda3c995c3bad169898a41b8c83ac881547a6ad */

#xfwm-tabwin {
	padding: 12px;
	border: 1px solid @menu_border;
	border-radius: 0;
	-XfwmTabwinWidget-icon-size: 64px;
	-XfwmTabwinWidget-preview-size: 64px;
}

#xfwm-tabwin button {
	color: @theme_text;
	border: 0;
	border-radius: 0;
	background: @theme_bg;
	box-shadow: none;
}

#xfwm-tabwin button:hover,
#xfwm-tabwin button:focus,
#xfwm-tabwin button:active,
#xfwm-tabwin button:checked,
#xfwm-tabwin button:focus:hover,
#xfwm-tabwin button:active:hover,
#xfwm-tabwin button:checked:hover {
	color: @theme_selected_fg;
	background: @theme_selected_bg;
}

/* --- panel --- */

.xfce4-panel {
	/* @todo not working */
	/* @see https://github.com/xfce-mirror/xfce4-panel/blob/3a86f3242cbad66b3090e4da9dbf0a90ae2df386/panel/panel-base-window.c#L718 */
	border: 0;
	background: @theme_bg;
}

.xfce4-panel #applicationmenu-button:checked,
.xfce4-panel #whiskermenu-button:checked,
.xfce4-panel #clock-button:checked,
window.whiskermenu button:checked,
window.whiskermenu button:hover,
window.whiskermenu treeview.view.launchers:hover:selected {
	/* this is the menuitem hover */
	color: @menuitem_hover;
	border-color: @menuitem_hover_border;
	background:
		radial-gradient(ellipse 110% 50%,
			@menuitem_hover_glaze_glow_center,
			@menuitem_hover_glaze_glow_edge),
		linear-gradient(to bottom,
			@menuitem_hover_glaze_top,
			@menuitem_hover_glaze_mida 50%,
			@menuitem_hover_glaze_midb 50%,
			@menuitem_hover_glaze_bot);
}

/* --- main menu applet --- */

.xfce4-panel #applicationmenu-button {
	margin: 0;
	border: 1px solid transparent;
	border-radius: 0;
}

.xfce4-panel #applicationmenu-button:hover:not(:checked) {
	border-color: transparent;
	background: transparent;
}

.xfce4-panel #applicationmenu-button image {
	margin: 0 4px 0 11px;
}

.xfce4-panel #applicationmenu-button label {
	margin: 1px 4px 0 0;
}

/* --- virtual desktop selector applet --- */

.xfce4-panel wnck-pager,
.xfce4-panel wnck-applet {
	color: @theme_fg; /* the border color of windows */
	background-color: @theme_bg; /* the left/right border color and background color */
}

.xfce4-panel wnck-pager:selected,
.xfce4-panel wnck-applet wnck-pager:selected {
	background-color: shade(@theme_selected_bg, 0.7);
}

/* --- clock applet --- */

.xfce4-panel #clock-button {
	border-radius: 0;
}

/* --- whisker menu applet --- */

.xfce4-panel #whiskermenu-button {
	margin: 0;
	border: 1px solid transparent;
	border-radius: 0;
}

.xfce4-panel #whiskermenu-button:hover:not(:checked) {
	border-color: transparent;
	background: transparent;
}

.xfce4-panel #whiskermenu-button image {
	margin: 0 4px 0 11px;
}

.xfce4-panel #whiskermenu-button label {
	margin-right: 4px;
}

window.whiskermenu {
	border: 0;
	background-color: @menu_bg;
}

window.whiskermenu frame border {
	border-radius: 0;
	box-shadow: none;
}

window.whiskermenu scrolledwindow,
window.whiskermenu scrolledwindow viewport {
	border: 0;
}

window.whiskermenu button {
	border-radius: 4px;
}

window.whiskermenu treeview.view.launchers {
	border-radius: 4px;
	background-color: @menu_bg;
}

window.whiskermenu scrolledwindow.launchers-pane {
	margin-top: 1px;
}

window.whiskermenu scrolledwindow.launchers-pane scrollbar.vertical {
	margin: -29px 0;
	border: 0;
	background: inherit;
}

/* --- thunar --- */

window.thunar scrolledwindow.frame.sidebar {
	margin: 5px 0 1px;
	border-right: 1px solid @menu_border; /* @todo not working */
}

window.thunar paned paned notebook {
	margin-top: 5px;
}

window.thunar paned paned notebook stack {
	padding: 0;
	border: 0;
	background-color: @theme_bg;
}

window.thunar paned paned notebook:dir(ltr) stack {
	border-left: 1px solid @menu_border;
}

window.thunar paned paned notebook:dir(rtl) stack {
	border-right: 1px solid @menu_border;
}

window.thunar paned paned notebook:dir(ltr) tabs {
	padding-right: 21px; /* scrollbar width */
}

window.thunar paned paned notebook:dir(rtl) tabs {
	padding-left: 21px; /* scrollbar width */
}

window.thunar.maximized:not(.scrollfix) paned paned notebook:dir(ltr) tabs {
	/* without gtk3-classic (scrollbar_extra_zone.patch) */
	padding-right: 20px; /* scrollbar width - maximized css scroll fix */
}

window.thunar.maximized:not(.scrollfix) paned paned notebook:dir(rtl) tabs {
	/* without gtk3-classic (scrollbar_extra_zone.patch) */
	padding-left: 20px; /* scrollbar width - maximized css scroll fix */
}

window.thunar paned paned notebook:dir(ltr) tab {
	padding: 0 2px 0 0;
}

window.thunar paned paned notebook:dir(rtl) tab {
	padding: 0 0 0 2px;
}

window.thunar paned paned notebook tab {
	margin-top: -1px;
	padding: 0;
}

window.thunar paned paned notebook tab image {
	padding-top: 1px;
}

window.thunar paned paned notebook stack scrolledwindow.frame.standard-view:dir(ltr) scrollbar.vertical {
	margin-right: 0;
	background-color: @theme_bg;
}

window.thunar paned paned notebook stack scrolledwindow.frame.standard-view:dir(rtl) scrollbar.vertical {
	/* @todo */
	margin: -1px -3px -30px 0;
	padding: 0 3px 29px 0;
	border-left: 0;
	border-right: 1px solid @menu_border;
	background-color: @theme_bg;
}

window.thunar paned paned notebook stack scrolledwindow.frame.standard-view:dir(ltr) scrollbar.horizontal {
	margin-left: -1px;
	background-color: @theme_bg;
}

window.thunar paned paned notebook stack scrolledwindow.frame.standard-view:dir(rtl) scrollbar.horizontal {
	margin-right: -1px;
	background-color: @theme_bg;
}

/* window.thunar ... disabled paned view @todo {
	@see https://github.com/xfce-mirror/thunar/blob/bb960fb6647ecb05fbb988f062c198a95c6512cc/thunar/thunar-application.c#L714
	background-color: lighter(darker(@theme_base));
} */

window.thunar statusbar {
	border-top: 0;
}

window.thunar statusbar frame {
	margin-top: 1px;
	border-top: 0;
}

/* --- xfce4-terminal --- */

#xfce4-terminal-notebook {
	margin: 0;
}

#xfce4-terminal-notebook stack {
	border: 0;
	border-radius: 0;
}

#xfce4-terminal-notebook header tabs tab {
	padding: 0;
}

#xfce4-terminal-notebook header tabs tab label {
	margin: 0 -1px;
	padding: 0;
}

#xfce4-terminal-notebook header.top {
	margin: 0 0 1px;
}

/* --- ristretto --- */

window box #main-toolbar + grid + statusbar frame,
window box #main-toolbar + infobar + grid + statusbar frame {
	padding: 4px 12px 5px;
}

window.maximized box #main-toolbar + grid + statusbar frame,
window.maximized box #main-toolbar + infobar + grid + statusbar frame {
	padding: 4px 13px 5px;
}
