/**
 * 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.
 */

/* --- check button & radio button --- */

checkbutton {
	margin: 1px;
}

checkbutton label {
	margin: -1px -1px 0 -2px;
	padding: 1px;
	border: 1px solid transparent;
	border-radius: 3px;
}

checkbutton label:dir(rtl) {
	margin: -1px -2px 0 -1px;
}

checkbutton check:dir(rtl), checkbutton radio:dir(rtl) {
	margin: 1px 0 0 5px;
}

checkbutton:hover {
	background-color: @checkbutton_hover_bg;
}

checkbutton:focus label {
	border-color: @theme_outline;
	background-color: @checkbutton_focus_bg;
}

checkbutton:hover:focus label {
	/* @todo border-color: @checkbutton_focus_hover_border; */
	background-color: @checkbutton_focus_hover_bg;
}

/* --- checkbox --- */

check {
	margin: 1px 5px 0 0;
	-gtk-icon-source: url("../images/checkbox-unchecked.svg");
}

check:disabled {
	-gtk-icon-source: url("../images/checkbox-unchecked-insensitive.svg");
}

check:checked {
	-gtk-icon-source: url("../images/checkbox-checked.svg");
}

check:checked:active:not(.view),
check.view:selected:checked:not(:disabled) { /* treeview */
	-gtk-icon-source: url("../images/checkbox-checked-active.svg");
}

check:checked:disabled {
	-gtk-icon-source: url("../images/checkbox-checked-insensitive.svg");
}

check:indeterminate {
	-gtk-icon-source: url("../images/checkbox-mixed.svg");
}

check:indeterminate:active:not(.view),
check.view:selected:indeterminate:not(:disabled) { /* treeview */
	-gtk-icon-source: url("../images/checkbox-mixed-active.svg");
}

check:indeterminate:disabled {
	-gtk-icon-source: url("../images/checkbox-mixed-insensitive.svg");
}

/* --- radio --- */

radio {
	margin: 1px 5px 0 0;
	-gtk-icon-source: url("../images/radio-unchecked.svg");
}

radio:disabled {
	-gtk-icon-source: url("../images/radio-unchecked-insensitive.svg");
}

radio:checked {
	-gtk-icon-source: url("../images/radio-checked.svg");
}

radio:checked:active:not(.view),
radio.view:selected:checked:not(:disabled) { /* treeview */
	-gtk-icon-source: url("../images/radio-checked-active.svg");
}

radio:checked:disabled {
	-gtk-icon-source: url("../images/radio-checked-insensitive.svg");
}

radio:indeterminate {
	-gtk-icon-source: url("../images/radio-mixed.svg");
}

radio:indeterminate:active:not(.view),
radio.view:selected:indeterminate:not(:disabled) { /* treeview */
	-gtk-icon-source: url("../images/radio-mixed-active.svg");
}

radio:indeterminate:disabled {
	-gtk-icon-source: url("../images/radio-mixed-insensitive.svg");
}

/* --- check & radio menu items --- */

popover check,
popover radio {
	margin: 2px 5px 0;
}

popover check,
popover check:disabled {
	-gtk-icon-source: none;
}

popover check:checked,
popover check:checked:active {
	-gtk-icon-source: url("../images/menu-checkbox-checked.svg");
}

popover check:checked:hover,
popover check:checked:focus,
popover check:checked:hover:active {
	-gtk-icon-source: url("../images/menu-checkbox-checked-hover.svg");
}

popover check:checked:disabled {
	-gtk-icon-source: url("../images/menu-checkbox-checked-insensitive.svg");
}

popover check:indeterminate,
popover check:indeterminate:active {
	-gtk-icon-source: url("../images/menu-checkbox-mixed.svg");
}

popover check:indeterminate:hover,
popover check:indeterminate:focus,
popover check:indeterminate:hover:active {
	-gtk-icon-source: url("../images/menu-checkbox-mixed-hover.svg");
}

popover check:indeterminate:disabled {
	-gtk-icon-source: url("../images/menu-checkbox-mixed-insensitive.svg");
}

popover radio,
popover radio:disabled {
	-gtk-icon-source: none;
}

popover radio:checked,
popover radio:checked:active {
	-gtk-icon-source: url("../images/menu-radio-checked.svg");
}

popover radio:checked:hover,
popover radio:checked:focus,
popover radio:checked:hover:active {
	-gtk-icon-source: url("../images/menu-radio-checked-hover.svg");
}

popover radio:checked:disabled {
	-gtk-icon-source: url("../images/menu-radio-checked-insensitive.svg");
}

popover radio:indeterminate,
popover radio:indeterminate:active {
	-gtk-icon-source: url("../images/menu-radio-mixed.svg");
}

popover radio:indeterminate:hover,
popover radio:indeterminate:focus,
popover radio:indeterminate:hover:active {
	-gtk-icon-source: url("../images/menu-radio-mixed-hover.svg");
}

popover radio:indeterminate:disabled {
	-gtk-icon-source: url("../images/menu-radio-mixed-insensitive.svg");
}

/* --- check & radio in treeviews --- */

check:not(:selected),
radio:not(:selected),
check:selected,
radio:selected {
	/* lol */
	background-color: transparent;
}
