/**
 * Copyright (c) 2021 Alban Fichet <alban dot fichet at gmx dot fr>
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 *
 *  * Redistributions of source code must retain the above copyright
 * notice, this list of conditions and the following disclaimer.
 *  * Redistributions in binary form must reproduce the above
 * copyright notice, this list of conditions and the following
 * disclaimer in the documentation and/or other materials provided
 * with the distribution.
 *  * Neither the name of the organization(s) nor the names of its
 * contributors may be used to endorse or promote products derived
 * from this software without specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
 * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
 * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
 * OF THE POSSIBILITY OF SUCH DAMAGE.
 */

QWidget
{
    color: white;
    background-color: rgb(50, 50, 50);
}

QWidget:disabled
{
    color: rgb(125, 125, 125);
}

QWidget:item:hover
{
    background-color: rgb(54, 169, 228);
}

QTabBar::tab
{
    border: 0px;
    border-radius: 0px;
    padding-left: 10px;
    padding-right: 10px;
    padding-top: 10px;
    padding-bottom: 10px;
    margin-right: -1px;
    margin-left: -1px;
}

QTabBar::tab:selected
{
    background-color: rgb(50, 50, 50);
    border: 0px;
    border-top: 2px solid rgb(54, 169, 228);
    border-left:0.5px solid black;
    border-right:0.5px solid black;
    margin-right: 0px;
    margin-left: 0px;
}


QTabBar::tab:!selected
{
    background-color: rgb(70, 70, 70);
    border-left: 1px solid rgb(125, 125, 125);
    border-right: 1px solid rgb(125, 125, 125);
}

QTabBar::tab:!selected:hover
{
    background-color: rgb(60, 60, 60);
}

QMenu
{
    border: 1px solid rgb(80, 80, 80);
}

QMenu::item
{
    background-color: transparent;
}

QMenuBar::item:selected
{
    background-color: rgb(80, 80, 80);
}

QMenu::item::selected,
QMenuBar::item:pressed
{
    background-color: rgb(54, 169, 228);
}

QMenu::separator
{
    background-color: rgb(80, 80, 80);
    height: 1px;
    margin-left: 0;
    margin-right: 0;
}


QTreeView {
    alternate-background-color: rgb(55, 55, 55);
}


QComboBox
{
    selection-background-color: rgb(54, 169, 228);
}



QPushButton
{
    border-radius: 4px;
    padding-left:10px;
    padding-right:10px;
    padding-top:2px;
    padding-bottom:2px;
    min-height: 18px;
}

QPushButton:disabled
{
    border: 1px solid rgb(80, 80, 80);
    background-color: rgb(50, 50, 50);
}

QPushButton:enabled
{
    border: 1px solid rgb(125, 125, 125);
    background-color: rgb(80, 80, 80);
}

QPushButton:enabled:hover
{
    border: 1px solid rgb(255, 255, 255);
    background-color: rgb(125, 125, 125);
}

QPushButton:enabled:pressed
{
    border: 1px solid rgb(255, 255, 255);
    background-color: rgb(200, 200, 200);
}




QSpinBox,
QDoubleSpinBox,
QComboBox
{
    border-radius: 4px;
    padding-left:10px;
    padding-right:10px;
    padding-top:1px;
    padding-bottom:1px;
    height: 18px;
}

QSpinBox:disabled
QDoubleSpinBox:disabled,
QComboBox:disabled
{
    border: 1px solid rgb(80, 80, 80);
}

QSpinBox:enabled,
QDoubleSpinBox:enabled,
QComboBox:enabled
{
    border: 1px solid rgb(125, 125, 125);
}

QSpinBox:enabled:hover,
QDoubleSpinBox:enabled:hover,
QComboBox:enabled:hover
{
    border: 1px solid rgb(255, 255, 255);
}

QSpinBox:pressed,
QDoubleSpinBox:pressed,
QComboBox:pressed
{
    border: 1px solid rgb(255, 255, 255);
}

QComboBox::drop-down
{
    border-top-right-radius: 2px;
    border-bottom-right-radius: 2px;
    image: url(:/dark_flat/icons/down-scroll.svg);
    margin-top:-1px;
    margin-bottom:-1px;
    margin-right:-1px;
    padding-left:6px;
    padding-right:6px;
    height:20px;
    width:10px;
}

QSpinBox::up-button,
QDoubleSpinBox::up-button
{
    border-top-right-radius: 2px;
    image: url(:/dark_flat/icons/up-scroll.svg);
    width:8px;
    height:7px;
    padding:1px;
    margin-top: -1px;
    margin-right:-1px;
}

QSpinBox::down-button,
QDoubleSpinBox::down-button
{
    border-bottom-right-radius: 2px;
    image: url(:/dark_flat/icons/down-scroll.svg);
    width:8px;
    height:7px;
    padding:1px;
    margin-bottom: -1px;
    margin-right:-1px;
}


QSpinBox::up-button:enabled,
QSpinBox::down-button:enabled,
QDoubleSpinBox::up-button:enabled,
QDoubleSpinBox::down-button:enabled,
QComboBox::drop-down:enabled
{
    border: 1px solid rgb(125, 125, 125);
    background-color: rgb(80, 80, 80);
}

QSpinBox::up-button:enabled:hover,
QSpinBox::down-button:enabled:hover,
QDoubleSpinBox::up-button:enabled:hover,
QDoubleSpinBox::down-button:enabled:hover,
QComboBox::drop-down:enabled:hover
{
    border: 1px solid rgb(255, 255, 255);
    background-color: rgb(125, 125, 125);
}


QHeaderView:section
{
    border: 1px solid rgb(125, 125, 125);
    background-color: rgb(80, 80, 80);
    padding-left:3px;
    padding-right:3px;
    margin-bottom:5px;
}




QScrollBar:vertical,
QScrollBar:horizontal
{
    background-color: QLinearGradient(
        x1: 0, y1: 0,
        x2: 0, y2: 1,
        stop: 0 #2d2d2d,
        stop: 0.1 #2b2b2b,
        stop: 0.5 #292929,
        stop: 0.9 #282828,
        stop: 1 #252525);
}

QScrollBar:handle::horizontal,
QScrollBar:add-line:horizontal,
QScrollBar:sub-line:horizontal
{
    background-color: QLinearGradient(
        x1: 0, y1: 0,
        x2: 0, y2: 1,
        stop: 0 #565656,
        stop: 0.2 #525252,
        stop: 1 #4e4e4e);
}

QScrollBar:handle::vertical,
QScrollBar::add-line:vertical,
QScrollBar::sub-line:vertical
{
    background-color: QLinearGradient(
        x1: 0, y1: 0,
        x2: 1, y2: 0,
        stop: 0 #565656,
        stop: 0.2 #525252,
        stop: 1 #4e4e4e);
}

QScrollBar:horizontal
{
    height: 15px;
    margin: 0px 15px 0 15px;
}

QScrollBar::handle:horizontal:pressed,
QScrollBar::add-line:horizontal:pressed,
QScrollBar::sub-line:horizontal:pressed
{
    background: QLinearGradient(
        x1: 0, y1: 0,
        x2: 0, y2: 1,
        stop: 0 #1880b4,
        stop: 0.5 #1c90ca,
        stop: 1 #1880b4);
}

QScrollBar:vertical
{
    width: 15px;
    margin: 15px 0 15px 0;
}

QScrollBar::handle:vertical:pressed,
QScrollBar::add-line:vertical:pressed,
QScrollBar::sub-line:vertical:pressed
{
    background: QLinearGradient(
        x1: 0, y1: 0,
        x2: 1, y2: 0,
        stop: 0 #36a9e4,
        stop: 0.5 #4bb3e7,
        stop: 1 #36a9e4);
}

QScrollBar:horizontal,
QScrollBar:vertical
{
    border: 1px solid #1e1e1e;
}

QScrollBar::handle:horizontal,
QScrollBar::handle:horizontal::pressed,
QScrollBar::handle:vertical,
QScrollBar::handle:vertical::pressed
{
    border-radius: 0px;
}

QScrollBar::add-line:horizontal,
QScrollBar::sub-line:horizontal,
QScrollBar::add-line:vertical,
QScrollBar::sub-line:vertical
{
    border-radius:0;
    border: 1px solid #1e1e1e;
    width: 13px;
    height: 13px;
    subcontrol-origin: margin;
}

QScrollBar::add-line:horizontal
{
    subcontrol-position: right;
}

QScrollBar::sub-line:horizontal
{
    subcontrol-position: left;
}

QScrollBar::add-line:vertical
{
    subcontrol-position: bottom;
}

QScrollBar::sub-line:vertical
{
    subcontrol-position: top;
}

QScrollBar::add-page:horizontal,
QScrollBar::sub-page:horizontal
{
    background: none;
}

QScrollBar::right-arrow:horizontal
{
    width:7px;
    height:7px;
    image: url(:/dark_flat/icons/right-scroll.svg);
}

QScrollBar::left-arrow:horizontal
{
    width:7px;
    height:7px;
    image: url(:/dark_flat/icons/left-scroll.svg);
}

QScrollBar::up-arrow:vertical
{
    width:7px;
    height:7px;
    image: url(:/dark_flat/icons/up-scroll.svg);
}

QScrollBar::down-arrow:vertical
{
    width:7px;
    height:7px;
    image: url(:/dark_flat/icons/down-scroll.svg);
}

QScrollBar::add-page:vertical, QScrollBar::sub-page:vertical
{
    background: none;
}

