QWidget
{
    background: transparent;
}

QLabel, QCheckBox, QRadioButton, QMenu::item
{
    color: @text;
}

QWindow, QMainWindow, QMdiSubWindow, QDialog, QAbstractScrollArea, QFocusFrame, QWizardPage, QDockWidget, QDockWidgetGroupWindow, QTabWidget, QGroupBox
{
    color: @text;
    background-color: @background;
}

QDockWidget, QDockWidgetGroupWindow {
  padding: 0.2em;
}

QWidget:item:selected
{
    background-color: @selection;
    color: @text;
}

QWebView, QTextBrowser
{
    color: @text;
    background-color: @itemdarkbackground;
}

QToolTip
{
    border: 1px solid #222;
}

QMenuBar {
    background-color: @background;
    color: @text;
}

QMenuBar::item
{
    background: transparent;
}

QMenuBar::item:selected
{
    background: @selection;
    color: @text;
}

QMenuBar::item:pressed
{
    background: @selection;
    color: @text;
}

/* ==================================================================================== */
/* SPIN BOX                                                                             */
/* ==================================================================================== */

QAbstractSpinBox {
    padding: 0.12em;
    border: 1px solid @itemdarkbackground;
    background-color: @itembackground;
    selection-background-color: @selection;
    selection-color: @textlight;
    color: @textlight;
}

QAbstractSpinBox:no-frame {
    border-color: transparent;
}

QAbstractSpinBox::up-button {
    subcontrol-origin: border;
    subcontrol-position: top right;
    margin-top:2px;
    margin-right:2px;
    margin-bottom:-1px;
    width: 0.8em;
    background-color: QLinearGradient( x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #565656, stop: 0.1 #525252, stop: 0.5 #4e4e4e, stop: 1 #4e4e4e);
    border: 0;
}

QAbstractSpinBox::down-button {
    subcontrol-origin: border;
    subcontrol-position: bottom right;
    margin-bottom:2px;
    margin-right:2px;
    margin-top:-1px;
    width: 0.8em;
    background-color: QLinearGradient( x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #4e4e4e, stop: 0.9 #4a4a4a, stop: 1 #464646);
    border: 0;
}

QAbstractSpinBox::up-arrow
{
    width: 0.8em;
    height: 1.2em;
}

QAbstractSpinBox::down-arrow
{
    width: 0.8em;
    height: 1.2em;
}

QAbstractSpinBox::up-button:hover, QAbstractSpinBox::down-button:hover {
    background-color: @darkalternativegradient;
}
QAbstractSpinBox::up-button:disabled, QAbstractSpinBox::down-button:disabled {
     background-color: transparent !important;
}

QAbstractSpinBox::drop-down {
     subcontrol-origin: border;
     subcontrol-position: top right;
     margin-top:1px;
     margin-right:1px;
     margin-bottom:1px;
     width: 0.8em;
     background-color: @darkgradient;
     color:@itembackground;
     border: 1px solid #888;
}
QAbstractSpinBox::drop-down:hover {
    background-color: @darkalternativegradient;
}
QAbstractSpinBox::drop-down:disabled {
    background-color: transparent !important;
}
/* ==================================================================================== */
/* CALENDAR                                                                             */
/* ==================================================================================== */

/* header row */
QCalendarWidget QWidget {
    color: @itembackground;
    alternate-background-color: @background;
}

QCalendarWidget QWidget#qt_calendar_navigationbar
{
    color: @text;
    background-color: @background; 
}

QCalendarWidget QWidget#qt_calendar_navigationbar QWidget
{
    color: @text;
}

/* normal days */
QCalendarWidget QAbstractItemView:enabled
{
    color: @text;
    background-color: @itembackground;
    selection-background-color: @selection;
    selection-color: @text;
}

QCalendarWidget QAbstractItemView:disabled
{
    color: @background;
}

/* ==================================================================================== */
/* MENU                                                                                 */
/* ==================================================================================== */

QMenu
{
    background: #444;
    border: 1px solid #222;
    padding: 0.2em;
    padding-right: 0em;
}

QMenu::icon
{
    padding-left: 0.3em;
}

QMenu::item
{
    background: transparent;
    padding: 0.2em 1.3em 0.2em 0.4em;
}

QMenu::item:disabled
{
    color: #555;
    background: transparent;
    padding: 0.2em 1.3em 0.2em 0.4em;
}

QMenu::item:selected
{
    background-color: @selection;
    color: @text;
}

QMenu::item:checked
{
    font-weight:bold;
    text-decoration:underline;
}

QMenu::indicator
{
    width: 0em;
}

QMenu::item:selected
{
    background-color: @selection;
    color: @itembackground;
}

QMenu::item:hover
{
    background-color: @selection;
    color: @itembackground;
}

QWidget:disabled, QWidget:editable:disabled, QWidget:read-only:disabled
{
    color: @itemdarkbackground;
    background-color: @background;
}

QLineEdit
{
    padding: 0.12em;
    border: 1px solid @itemdarkbackground;
    background-color: @itembackground;
    selection-background-color: @selection;
    selection-color: @textlight;
}

QLineEdit:read-only
{
    color: @textlight;
}

QLineEdit:no-frame
{
    border-color: transparent;
}

QTextEdit, QPlainTextEdit
{
    padding: 0.12em;
    border-width: 1px;
    border-color: @itemdarkbackground;
    border-style: solid;
    border-radius: 0px;
    background-color:@itembackground;
    color:@text;
    selection-background-color: @selection;
    selection-color: @text;
}

QPushButton 
{
    padding: 0.21em;
    border-width: 1px;
    border-color: @itembackground;
    border-style: solid;
    border-radius: 0px;
    background-color:@darkgradient;
    color:@text;
}

QToolButton
{
    padding: 0.12em;
    border-width: 1px;
    border-color: @itembackground;
    border-style: solid;
    border-radius: 0px;
    background-color:@itemdarkbackground;
    color:@text;
}

QPushButton[flat=true], QPushButton[autoRaise=true], QToolButton[autoRaise=true] {
    border:1px solid rgba(0,0,0,0);
    background-color:transparent;
}

QToolButton[popupMode="1"]
{
    padding-right: 0.9em;
}
QToolButton::menu-button {
    width: 0.8em;
    border: 1px solid rgba(0,0,0,0);
    background:@itemdarkbackground;
}
QToolButton::hover, QToolButton::menu-button::hover
{
    border-width: 1px;
    border-color: #1e1e1e;
    border-style: solid;
    border-radius: 0px;
    background-color: transparent;
}
QToolButton:checked
{
    border: 1px solid @focus;
}
QToolButton:checked:disabled
{
    border: 1px solid rgba(215,128,26,100);
}
QToolButton::menu-arrow
{
    width: 0.8em;
    height: 1.2em;
}
QToolButton::menu-arrow:disabled
{
    width: 0.8em;
    height: 1.2em;
}
QToolButton::menu-indicator
{
    top: 0.2em;
    right: -0.2em;
    width: 0.8em;
    height: 1.2em;
}
QToolButton::menu-indicator:disabled
{
    top: 0.2em;
    right: -0.2em;
    width: 0.8em;
    height: 1.2em;
}

QToolBox::tab {
    color: @text;
}

QToolBar QToolButton, QToolButton::menu-button
{
    border-color: rgba(0,0,0,0);
    background-color: none;
}

QPushButton:hover {
    background-color: @darkgradient;
}

QToolButton:hover {
    background-color: @itemdarkbackground;
}

QPushButton:pressed, QPushButton:open, QToolButton:pressed {
    background-color: @darkalternativegradient;
}

/* ==================================================================================== */
/* COMBO BOX                                                                            */
/* ==================================================================================== */

QComboBox {
    selection-background-color: @selection;
    selection-color: @text;
    background-color: @darkgradient;
    color:@text;
    border-style: solid;
    border: 1px solid @itembackground;
    border-radius: 0px;
    padding: 0.12em 1.2em 0.12em 0.2em;
}

QComboBox:disabled {
    border-color: @itemdarkbackground;
}

QComboBox:hover {
    background-color: @darkalternativegradient;
}

QComboBox:on {
    padding: 0.12em;
    padding-left: 0.2em;
    background-color: QLinearGradient( x1: 0, y1: 0, x2: 0, y2: 1,
        stop: 0     #555,
        stop: 0.1   #4C4C4C,
        stop: 0.5   #464646,
        stop: 0.9   #414141,
        stop: 1     #444);
    selection-background-color: @selection;
    selection-color: @text;
}

QComboBox::icon {
    padding-left:0.3em;
}

QComboBox QAbstractItemView, QComboBox QListView {
    border: none;
    border-radius: 0px;
    padding: 0.12em;
    background: @itemdarkbackground;
    color: @text;
    selection-background-color: @selection;
    selection-color: @text;
}
QComboBox::separator {
    height: 1px;
    background-color: @background;
}
QComboBox::drop-down {
     subcontrol-origin: border;
     subcontrol-position: top right;
     margin-right: 2px;
     width: 0.8em;
     border: 0px;
}
QComboBox::drop-down:editable {
     subcontrol-origin: border;
     subcontrol-position: top right;
     margin-top:1px;
     margin-right:1px;
     margin-bottom:1px;
     width: 0.8em;
     background-color: @darkgradient;
     color:@itembackground;
     border: 1px solid @itembackground;
}
QComboBox::drop-down:editable:hover {
    background-color: @darkalternativegradient;
}
QComboBox::drop-down:editable:disabled {
     background-color: transparent !important;
     border-color: transparent !important;
}
QComboBox::down-arrow
{
    width: 0.8em;
    height: 1.2em;
}

QComboBox:item {
    padding-left: 0.1em;
    height:1.25em;
}
QComboBox:item:selected {
    padding-left: 0.1em;
    height:1.25em;
}
QComboBox:item:checked {
    padding-left: 0.1em;
    height:1.25em;
    font-weight: bold;
    text-decoration:underline;
}

QComboBox::indicator {
    background-color:transparent;
    selection-background-color:transparent;
    color:transparent;
    selection-color:transparent;
}

QComboBox:editable {
    padding: 0.12em;
    border: 1px solid @itemdarkbackground;
    background-color: @itembackground;
    selection-background-color: @selection;
    selection-color: @textlight;
    color: @textlight;
}

/* ==================================================================================== */
/* SCROLL BAR                                                                           */
/* ==================================================================================== */

QScrollBar:horizontal {
    background-color: @itemdarkbackground;
    height: 0.5em;
    margin: 0px;
    padding: 0px;
}

QScrollBar::handle:horizontal {
    border: 1px solid @itemdarkbackground;
    background: @background;
    min-width: 0.8em;
}

QScrollBar::add-line:horizontal, QScrollBar::sub-line:horizontal,
QScrollBar::add-page:horizontal, QScrollBar::sub-page:horizontal {
    width: 0px;
    background: transparent;
}

QScrollBar:vertical {
    background-color: @itemdarkbackground;
    width: 0.5em;
    margin: 0;
}

QScrollBar::handle:vertical {
    border: 1px solid @itemdarkbackground;
    background: @background;
    min-height: 0.8em;
}

QScrollBar::add-line:vertical, QScrollBar::sub-line:vertical,
QScrollBar::add-page:vertical, QScrollBar::sub-page:vertical {
    height: 0px;
    background: transparent;
}


QSizeGrip
{
  width: 0.1em;
}

QDockWidget::separator
{
    border: 1px solid red;
}

QDockWidget::title
{
    text-align: center;
    spacing: 0.1em; /* spacing between items in the tool bar */
    background-color: @background;
    font-weight: bold;
}

QDockWidget::close-button, QDockWidget::float-button
{
    text-align: center;
    spacing: 1px; /* spacing between items in the tool bar */
}

QDockWidget::close-button:hover, QDockWidget::float-button:hover
{
    background: #242424;
}

QDockWidget::close-button:pressed, QDockWidget::float-button:pressed
{
    padding: 1px -1px -1px 1px;
}

QMainWindow::separator
{
    /*background-color: QLinearGradient(x1:0, y1:0, x2:0, y2:1, stop:0 #161616, stop: 0.5 #151515, stop: 0.6 #212121, stop:1 #343434);*/
    color: white;
    padding-left: 0.2em;
    border: 0px solid #4c4c4c;
    spacing: 0.1m; /* spacing between items in the tool bar */
}

QMainWindow::separator:hover
{

    /*background-color: QLinearGradient(x1:0, y1:0, x2:0, y2:1, stop:0 #d7801a, stop:0.5 #b56c17 stop:1 #ffa02f);*/
    color: white;
    padding-left: 0.2em;
    border: 1px solid #6c6c6c;
    spacing: 0.1em; /* spacing between items in the tool bar */
}

QToolBar {
    background: @plotbackground;
}

QToolBar::handle:horizontal
{
    width: 0.2em;
    height: 0.5em;
}

QToolBar::handle:vertical
{
    width: 0.5em;
    height: 0.2em;
}

QToolBar::separator:horizontal
{
    width: 0.2em;
    height: 0.5em;
}

QToolBar::separator:vertical
{
    width: 0.5em;
    height: 0.2em;
}

QMenu::separator
{
    height: 2px;
    border:none;
    border-bottom:1px solid @itemdarkbackground;
    padding-left: 4px;
    margin-left: 10px;
    margin-right: 5px;
}

QProgressBar
{
    color: @textlight;
    height: 1.3em;
    border-width: 1px;
    border-color: @itemdarkbackground;
    border-style: solid;
    text-align: center;
}

QProgressBar::chunk
{
    background-color: @focus;
    width: 3px;
}

QTabWidget
{
    color: @text;
    background-color: @plotbackground;
}

QTabWidget::pane {
    background-color: @plotbackground;
    top:-1px;
}

QTabBar::tab {
    color: @text;
    border: 1px solid @itemdarkbackground;
    border-bottom: none;
    background-color: @plotbackground;
    padding-left: 0.8em;
    padding-right: 0.8em;
    padding-top: 0.1em;
    padding-bottom: 0.1em;
    margin-right: -0.05em;
}

QTabBar::tab:disabled {
    color: @itemdarkbackground;
}

QTabBar::tab:last, QTabBar::tab::only-one
{
    margin-right: 0;
}

QTabBar::tab:first:!selected
{
    margin-left: 0px;
}

QTabBar::tab:bottom {
    border-top: none;
    border-bottom: 1px solid @itemdarkbackground;
}

QTabBar::tab:!selected
{
    margin-top: 0.3em;
}

QTabBar::tab:selected
{
    margin-bottom: 0px;
    background-color: @plotbackground;
}

QTabBar::tab:bottom:!selected
{
    margin-top: 0;
}

QTabBar::tab:bottom:selected
{
    margin-top: 0px;
    background-color: @background;
}

QGroupBox::indicator:hover,
QCheckBox::indicator:hover,
QRadioButton::indicator:hover
{
    border: 1px solid @selection;
}

/* ==================================================================================== */
/* GROUP / FRAME                                                                        */
/* ==================================================================================== */

QGroupBox {
    padding-top: 1.05em;
    border:1px solid rgba(0,0,0,0);
}

QGroupBox::title { 
    color: @textlight;
}

QGroupBox::title:disabled { 
    color: @itemdarkbackground;
}

QGroupBox::indicator {
    border:1px solid @itembackground;
    background-color: @toggleoff;
    width: 0.8em;
    height: 0.8em;
}

QGroupBox::indicator:unchecked {
    background-color: @toggleoff;
}

QGroupBox::indicator:unchecked:disabled {
    border-color: @itemdarkbackground;
    background-color: rgba(0, 0, 0, 0);
}

QGroupBox::indicator:checked {
    background-color: @toggleon;
}

QGroupBox::indicator:checked:disabled {
    border-color: @itemdarkbackground;
    background-color: rgba(0, 0, 0, 0);
}

QFrame, QFrame:disabled {
    border:1px solid rgba(0,0,0,0);
}

/* ==================================================================================== */
/* RADIO BUTTON                                                                         */
/* ==================================================================================== */

QRadioButton::indicator {
    border: 1px solid @itembackground;
    border-radius:0.4em;
    background-color: @toggleoff;
    width:0.8em;
    height:0.8em;
}

QRadioButton::indicator:unchecked {
    background-color: @toggleoff;
}

QRadioButton::indicator:unchecked:disabled {
    border-color: @itemdarkbackground;
    background-color: rgba(0, 0, 0, 0);
}

QRadioButton::indicator:checked {
    background-color: @toggleon;
}

QRadioButton::indicator:checked:disabled {
    border-color: @itemdarkbackground;
    background-color: rgba(0, 0, 0, 0);
}

QRadioButton:disabled {
    background-color: transparent;
}

/* ==================================================================================== */
/* CHECKBOX                                                                             */
/* ==================================================================================== */

QCheckBox::indicator {
    border: 1px solid @itembackground;
    background-color: @toggleoff;
    width:0.8em;
    height:0.8em;
}

QCheckBox::indicator:intermediary {
    background-color: @toggleoff;
}

QCheckBox::indicator:unchecked {
    background-color: @toggleoff;
    image: none;
}

QCheckBox::indicator:unchecked:disabled {
    border-color: @itemdarkbackground;
    background-color: rgba(0, 0, 0, 0);
    image: none;
}

QCheckBox::indicator:checked {
    background-color: @toggleon;
}

QCheckBox::indicator:checked:disabled {
    border-color: @itemdarkbackground;
    background-color: rgba(0, 0, 0, 0);
}

QCheckBox:disabled {
    background-color: transparent;
}

/* ==================================================================================== */
/* SLIDER                                                                               */
/* ==================================================================================== */

QSlider::groove:horizontal {
    border: 1px solid @itembackground;
    height: 0.4em; /* the groove expands to the size of the slider by default. by giving it a height, it has a fixed size */
    background-color: @itembackground;
    margin: 0.15em 1px;
}

QSlider::groove:horizontal:disabled {
    border-color: @itemdarkbackground;
    background-color: @background;
}

QSlider::groove:horizontal[invertedAppearance="true"] {
    border-color: @selection;
    background-color: @selection;
}

QSlider::groove:horizontal[invertedAppearance="true"]:disabled {
    border-color: @itemdarkbackground;
    background-color: @itemdarkbackground;
}

QSlider::groove:vertical {
    border: 1px solid @selection;
    width: 0.4em; /* the groove expands to the size of the slider by default. by giving it a height, it has a fixed size */
    background-color: @selection;
    margin: 1px 0.15em;
}

QSlider::groove:vertical:disabled {
    border-color: @itemdarkbackground;
    background-color: @itemdarkbackground;
}

QSlider::groove:vertical[invertedAppearance="true"] {
    border-color: @itembackground;
    background-color: @itembackground;
}

QSlider::groove:vertical[invertedAppearance="true"]:disabled {
    border-color: @itemdarkbackground;
    background-color: @background;
}

QSlider::handle:horizontal {
    background: @darkgradient;
    border: 1px solid @itembackground;
    width: 1.3em;
    margin: -0.15em -1px; /* handle is placed by default on the contents rect of the groove. Expand outside the groove */
}

QSlider::handle:horizontal:disabled {
    background: @darkalternativegradient;
    border-color: @itemdarkbackground;
}

QSlider::handle:vertical {
    background: @darkgradient;
    border: 1px solid @itembackground;
    height: 1.3em;
    margin: -1px -0.15em; /* handle is placed by default on the contents rect of the groove. Expand outside the groove */
}

QSlider::handle:vertical:disabled {
    background: @darkalternativegradient;
    border-color: @itemdarkbackground;
}

QSlider::sub-page:horizontal {
    border: 1px solid @selection;
    height: 0.4em; /* the groove expands to the size of the slider by default. by giving it a height, it has a fixed size */
    background-color: @selection;
    margin: 0.15em 1px;
}

QSlider::sub-page:horizontal:disabled {
    border-color: @itemdarkbackground;
    background-color: @itemdarkbackground;
}

QSlider::sub-page:horizontal[invertedAppearance="true"] {
    border-color: @itembackground;
    background-color: @itembackground;
}

QSlider::sub-page:horizontal[invertedAppearance="true"]:disabled {
    border-color: @itemdarkbackground;
    background-color: @background;
}

QSlider::sub-page:vertical {
    border: 1px solid @itembackground;
    height: 0.4em; /* the groove expands to the size of the slider by default. by giving it a height, it has a fixed size */
    background-color: @itembackground;
    margin: 1px 0.15em;
}

QSlider::sub-page:vertical:disabled {
    border-color: @itemdarkbackground;
    background-color: @background;
}

QSlider::sub-page:vertical[invertedAppearance="true"] {
    border-color: @selection;
    background-color: @selection;
}

QSlider::sub-page:vertical[invertedAppearance="true"]:disabled {
    border-color: @itemdarkbackground;
    background-color: @itemdarkbackground;
}

/* ==================================================================================== */
/* OTHER                                                                                */
/* ==================================================================================== */

QAbstractItemView, QListView
{
  background-color: @itembackground;
  alternate-background-color: @background;
  color: @textlight;
  border: 1px solid @itemdarkbackground;
  border-radius: 0px;
  padding: 1px;
  selection-color: @textlight;
  selection-background-color: @selection;
}

QAbstractItemView::item:selected, QListView::item:selected
{
    background-color: @selection;
    color: @textlight;
}

QAbstractItemView:disabled, QListView:disabled
{
    color: @itemdarkbackground;
    border: 1px solid @itemdarkbackground;
    border-radius: 0px;
}

QAbstractItemView::selected, QListView::selected {
    border: 0px;
    outline: none;
}

QAbstractItemView::indicator:checked, QListView::indicator:checked {
    background-color: @toggleon;
}
QAbstractItemView::indicator:checked:disabled, QListView::indicator:checked:disabled {
    border: 1px solid @itemdarkbackground;
    background-color: rgba(0, 0, 0, 0);
}
QAbstractItemView::indicator:unchecked, QListView::indicator:unchecked {
    background-color: @toggleoff;
    image: none;
}
QAbstractItemView::indicator:unchecked:disabled, QListView::indicator:unchecked:disabled {
    border: 1px solid @itemdarkbackground;
    background-color: rgba(0, 0, 0, 0);
    image: none;
}


/* ==================================================================================== */
/* TREE VIEW                                                                            */
/* ==================================================================================== */

QTreeView {
    border: 1px solid @itemdarkbackground;
    alternate-background-color: @background;
}

QTreeView::item, QTreeView::branch {
    background: transparent;
    color: @textlight;
}

QTreeView::item:disabled {
    color: @itemdarkbackground;
}

QTreeView::item:selected, QTreeView::branch:selected {
    background-color: @selection;
    color: @textlight;
}

QTreeView::branch:has-children:!has-siblings:closed,
QTreeView::branch:closed:has-children:has-siblings {
    border-image: none;
}

QTreeView::branch:open:has-children:!has-siblings,
QTreeView::branch:open:has-children:has-siblings {
     border-image: none;
}

QTreeView::indicator {
    border: 1px solid @itembackground;
    background-color: @toggleoff;
    width:0.8em;
    height:0.8em;
}
QTreeView::indicator:disabled {
    border-color: @itemdarkbackground;
    background-color: rgba(0, 0, 0, 0);
}
QTreeView::indicator:intermediary {
    background-color: @toggleoff;
}
QTreeView::indicator:checked {
    background-color: @toggleon;
}
QTreeView::indicator:checked:disabled {
    border-color: @itemdarkbackground;
    background-color: rgba(0, 0, 0, 0);
}
QTreeView::indicator:unchecked {
    background-color: @toggleoff;
    image: none;
}
QTreeView::indicator:unchecked:disabled {
    border-color: @itemdarkbackground;
    background-color: rgba(0, 0, 0, 0);
    image: none;
}


QgsLayerTreeView::item,
QTreeView#viewGraduated::item,
QTreeView#viewCategories::item,
QTreeView#viewRules::item,
QTreeView#mSubDiagramsView::item
{
    border-top: 0.5px solid rgba(108,108,108,50);
    border-bottom: 0.5px solid rgba(108,108,108,50);
    padding: 0.1em 0em 0.1em 0em;
}

QgsLayerTreeView::item:hover, QgsLayerTreeView::branch:hover,
QTreeView#viewGraduated::item:hover, QTreeView#viewGraduated::branch:hover,
QTreeView#viewCategories::item:hover, QTreeView#viewCategories::branch:hover,
QTreeView#viewRules::item:hover, QTreeView#viewRules::branch:hover,
QTreeView#mSubDiagramsView::item:hover, QTreeView#mSubDiagramsView::branch:hover
{
    background-color: @hover;
    color: @itembackground;
}

QgsLayerTreeView::item:selected:hover, QgsLayerTreeView::branch:selected:hover,
QTreeView#viewGraduated::item:selected:hover, QTreeView#viewGraduated::branch:selected:hover,
QTreeView#viewCategories::item:selected:hover, QTreeView#viewCategories::branch:selected:hover,
QTreeView#viewRules::item:selected:hover, QTreeView#viewRules::branch:selected:hover,
QTreeView#mSubDiagramsView::item:selected:hover, QTreeView#mSubDiagramsView::branch:selected:hover
{
    background-color: @selection;
    color: @textlight;
}

QgsLayerTreeView::indicator:unchecked,
QTreeView#viewGraduated::indicator:unchecked,
QTreeView#viewCategories::indicator:unchecked,
QTreeView#viewRules::indicator:unchecked,
QTreeView#mSubDiagramsView::indicator:unchecked
{
    border: none;
    background-color: transparent;
}

QgsLayerTreeView::indicator:checked,
QTreeView#viewGraduated::indicator:checked, 
QTreeView#viewCategories::indicator:checked, 
QTreeView#viewRules::indicator:checked,
QTreeView#mSubDiagramsView::indicator:checked
{
    border: none;
    background-color: transparent;
}

/* ==================================================================================== */
/* TABLE VIEW                                                                           */
/* ==================================================================================== */

QTableView {
    color: @text;
    selection-background-color: @selection;
    selection-color: @text;
}

QTableView:disabled {
    color: @itemdarkbackground;
    border: 1px solid @itemdarkbackground;
    border-radius: 0px;
}

QTableView::indicator {
    border: 1px solid @itembackground;
    background-color: @toggleoff;
    width:0.8em;
    height:0.8em;
}
QTableView::indicator:disabled {
    border-color: @itemdarkbackground;
    background-color: rgba(0, 0, 0, 0);
}
QTableView::indicator:intermediary {
    background-color: @toggleoff;
}
QTableView::indicator:checked {
    background-color: @toggleon;
}
QTableView::indicator:checked:disabled {
    border-color: @itemdarkbackground;
    background-color: rgba(0, 0, 0, 0);
}
QTableView::indicator:unchecked {
    background-color: @toggleoff;
    image: none;
}
QTableView::indicator:unchecked:disabled {
    border-color: @itemdarkbackground;
    background-color: rgba(0, 0, 0, 0);
    image: none;
}

QTableView QTableCornerButton::section {
    background-color: @background;
    border: 1px solid @itembackground;
}

QHeaderView {
    background-color:transparent;
    border:0;
}

QHeaderView:disabled {
    background-color:transparent;
    border:0;
}

QHeaderView::section, QHeaderView::section:vertical {
    padding: 0.1m 0.2em 0.1em 0.2em;
    background: transparent;
    background-color: @background;
    color: @text;
    border: 1px solid @itemdarkbackground;
    border-left: 0;
    border-top: 0;
}

QHeaderView::section:vertical {
    border: 1px solid @itemdarkbackground;
    border-left: 0;
    border-top: 0;
}

QHeaderView::section:last:vertical {
    border-bottom: 0;
}

QHeaderView::section:last:horizontal {
    border-right: 0;
}

QHeaderView::down-arrow {
    width: 1.2em;
}

QHeaderView::up-arrow {
    width: 1.2em;
}

/* ==================================================================================== */
/* FOCUS                                                                                */
/* ==================================================================================== */

QToolButton:focus, QPushButton:focus, QCheckBox:focus, QRadioButton:focus, QGroupBox:focus {
    outline:1px solid @focusdark;
    outline-radius: 0;
}

QPushButton[flat=true], QPushButton[autoRaise=true], QToolButton[autoRaise=true] {
    outline:1px solid rgba(0,0,0,0);
    outline-radius: 0;
}

QComboBox:focus, QAbstractSpinBox:focus, QLineEdit:focus, QPlainTextEdit:focus, QTextEdit:focus {
    border:1px solid @focusdark;
}

QComboBox:editable:focus:read-only, QAbstractSpinBox:focus:read-only, QLineEdit:focus:read-only, QPlainTextEdit:focus:read-only, QTextEdit:focus:read-only {
    border-color: transparent;
}

QToolButton[autoRaise=true]:focus:!pressed {
    border:1px solid @focusdark;
}

QToolButton[autoRaise=false]:focus:!pressed {
    border:1px solid @focusdark;
}

QSlider::handle:horizontal:focus, QSlider::handle:vertical:focus {
    border: 1px solid @focus;
}

QVideoWidget QWidget {
    background-color: #000000 !important;
}

/* ==================================================================================== */
/* QGIS-SPECIFIC TWEAKS                                                                 */
/* ==================================================================================== */

QgsColorButton, QgsColorRampButton, QgsSymbolButton, QgsFontButton {
    background-color: @darkgradient;
    color:@text;
    border: 1px solid @itembackground;
}

QgsColorButton:hover, QgsColorRampButton:hover, QgsSymbolButton:hover, QgsFontButton:hover {
    background-color: @darkalternativegradient;
    color:@itembackground;
}

QgsColorButton:focus, QgsColorRampButton:focus, QgsSymbolButton:focus, QgsFontButton:focus {
    border:1px solid @focusdark;
}

QgsMessageBar QLabel, QgsMessageBar QTextEdit, QMessageBar QToolButton, QMessageBar QToolButton::menu-button {
    background: transparent;
    border: none;
    padding: 0px;
}

QgsMessageBar QScrollBar:vertical {
    border-left:1px solid #000000;
    border-right:1px solid #000000;
    background-color: rgba(0,0,0,0);
    width: 0.7em;
    margin: 0.7em 0px 0.7em 0px;
}

QgsMessageBar QScrollBar::add-line:vertical {
    height: 0.7em;
    border:1px solid #000000;
    background-color: rgba(0,0,0,0);
    color: #000000;
    subcontrol-position: bottom;
    subcontrol-origin: margin;
} 

QgsMessageBar QScrollBar::sub-line:vertical {
    height: 0.7em;
    border:1px solid #000000;
    background-color: rgba(0,0,0,0);
    color: #000000;
    subcontrol-position: top;
    subcontrol-origin: margin;
}

QgsMessageBar QScrollBar::up-arrow:vertical {
    height: 0.7em;
}

QgsMessageBar QScrollBar::down-arrow:vertical {
    height: 0.7em;
}

QListWidget#mOptionsListWidget {
    background-color: @itembackground;
    color: @text;
}

QListWidget#mOptionsListWidget::item {
    padding: 0.1em;
}

QListWidget#mOptionsListWidget::item:hover
{
    background-color: @hover;
    color: @itembackground;
}

QListWidget#mOptionsListWidget::item:selected:hover {
    background-color: @selection;
    color: @textlight;
}

QWidget#QgsTextFormatWidgetBase QTabWidget#mOptionsTab QTabBar::tab,
QWidget#QgsRendererMeshPropsWidgetBase QTabWidget#mStyleOptionsTab QTabBar::tab {
    width: 1.2em;
}

QWidget#QgsRasterCalcDialogBase QWidget#mOperatorsGroupBox QPushButton {
    min-width:2.3em;
}

QFrame#mUserInputContainer { 
    background-color: @background;
}

QgsLayoutRuler {
    color: @textlight;
}

QgsAttributeFormWidget QComboBox:disabled {
    border: none;
    background-color: @itembackground;
    color: @textlight;
}

QgsAttributeFormWidget QComboBox::down-arrow:disabled {
     image: none;
}

QWidget#mCadWidget QLineEdit {
    color: @textlight;
}

QWidget#mCadWidget QLineEdit:disabled {
    color: @text;
}
