$main-background: #222222;
$warning-color: #f39c12;
$danger-color: #d34739;
$ok-color: #008966;
$ok-color1:rgb(1, 109, 86);
$ok-color2:rgb(0, 71, 58);

QMainWindow {
    background: $main-background;
}

QGroupBox {
    color: #FFFFFF;
    background-color: #222222;
    @if $isPortrait {
        font-size: 26px;
    }
    @else {
        font-size: 16px;
    }
    border: 3px solid white;
    border-radius: 5px;
    padding: 20px 0px 0px 0px;
    margin-top: 20px;
}

QGroupBox::Title {
    left: 10px;
    top: -20px;
    padding: 0px 0px 0px 0px;
}

QLabel#StatusError {
    color: #000000;
    background-color: #d34739;
    @if $isPortrait {
        font-size: 26px;
    }
    @else {
        font-size: 16px;
    }
}

QPushButton#Warning {
    background-color: #f39c12;
}

QPushButton#WarningDisabled {
    background-color: #c5a674;
}

QPushButton#AllGood {
    background-color: #008966;
}

QTabWidget {
    background: #222222;
}

QTabWidget::pane {
    background: #222222;
    border: 2px solid #555555;
    border-radius: 3px;
}

QTabBar::tab {
    color: #FFFFFF;
    background: #333333;
    border: 2px solid #555555;
    min-width: 120px;
    min-height: 60px;
    font-size: 22px;
}

QTabBar::tab::selected {
    background: #666666;
}


QComboBox QAbstractItemView {
    background: #444444;;
}

QMessageBox {
    background: #222222;
}

QMessageBox QLabel {
    color: #FFFFFF;
    font-size: 26px;
}

QMessageBox QPushButton {
    color: #FFFFFF;
    background-color: #345475;
    font-size: 30px;
    border-radius: 5px;
    min-width: 150px;
    min-height: 80px;
}

QPlainTextEdit {
    color: #FFFFFF;
    background: #000000;
    font-size: 24px;
}

QTextEdit {
    font-size: 24px;
}

QLabel#ConnectTitle {
    color: #FFFFFF;
    background-color: #222222;
    font-size: 26px;
}

QDialog {
    background: #222222;
}

QWidget#ToolbarSpacer {
    background: #444444;
}

QTextEdit#StreamText {
    color: #FFFFFF;
    background: #2f2f2f;
}

QLineEdit#ToolInfo {
    color: #FFFFFF;
    background-color: #222222;
    font-size: 36px;
}

QInputDialog QLabel {
    color: #FFFFFF;
    font-size: 28px;
}

QInputDialog QDoubleSpinBox {
    color: #FFFFFF;
    background-color: #444444;
    border: 2px solid #888888;
    font-size: 30px;
}

QInputDialog QPushButton {
    color: #FFFFFF;
    background-color: #345475;
    font-size: 30px;
    border-radius: 5px;
    min-width: 150px;
    min-height: 80px;
}

QDoubleSpinBox {
    color: #FFFFFF;
    background-color: #444444;
    border: 2px solid #888888;
    font-size: 30px;
}

/* NumericEntry */

QLabel#KeyPadTitle {
    color: #FFFFFF;
    font-size: 22px;
}

QLineEdit#KeypadLineEdit {
    color: #FFFFFF;
    background-color: #444444;
    border: 2px solid #888888;
    font-size: 30px;
    border-radius: 5px;
}

QPushButton#KeypadButton {
    color: #FFFFFF;
    background-color: #345475;
    border-radius: 5px;
}

QLabel#KeypadButton {
    color: #FFFFFF;
}

QPushButton#KeypadButtonGreen {
    color: #FFFFFF;
    background-color: #008966;
    border-radius: 5px;
}

QPushButton#KeypadButtonRed {
    color: #FFFFFF;
    background-color: #d34739;
    border-radius: 5px;
}

QToolButton#KeypadButtonRed {
    color: #FFFFFF;
    background-color: #d34739;
    border-radius: 5px;
}

QPushButton#KeypadButtonDisabled {
    color: #FFFFFF;
    background-color: #707070;
    border-radius: 5px;
}

QSplashscreen QLabel {
    font-size: 24px;
}

QWidget#TestWidget {
    background-color: #FFFFFF;
}

QScrollBar::vertical{
    border: 1px;
    background: #444444; /* Light grey background for the scrollbar track */
    @if $isPortrait {
        width: 60px;
        margin: 60px 5px 60px 5px;
    }
    @else {
        width: 20px;
        margin: 20px 5px 20px 5px;
    }
    
}

QScrollBar::handle:vertical {
    background-color: #666666;    /* Set the handle color to red */
    min-height: 60px;         /* Set the minimum height of the handle */
    border-radius: 5px;       /* Optional: for slightly rounded corners */
}



/* Style the up-arrow button */
QScrollBar::sub-line:vertical {
    background: #AAAAAA;      /* Grey background for the arrow button */
    subcontrol-position: top;
    subcontrol-origin: margin;
    @if $isPortrait {
        height: 60px;
    }
    @else {
        height: 20px;
    }
}

/* Style the down-arrow button */
QScrollBar::add-line:vertical {
    background: #AAAAAA;      /* Grey background for the arrow button */
    subcontrol-position: bottom;
    subcontrol-origin: margin;
    @if $isPortrait {
        height: 60px;
    }
    @else {
        height: 20px;
    }
}

QScrollBar::up-arrow:vertical, QScrollBar::down-arrow:vertical {
    border: 20px solid #AAAAAA;
    width: 0px;
    height: 0px;
}
QScrollBar::up-arrow:vertical {
    top: -15px;
    border-bottom-color: #222222;
}
QScrollBar::down-arrow:vertical {
    bottom: -15px;
    border-top-color: #222222;
}
QScrollBar::up-arrow:vertical:hover {
    border-bottom-color: #666666;
}
QScrollBar::down-arrow:vertical:hover {
    border-top-color: #666666;
}

QScrollBar::horizontal{
    border: 1px;
    background: #444444; /* Light grey background for the scrollbar track */
    @if $isPortrait {
        height: 60px;
        margin: 5px 60px 5px 60px;
    }
    @else {
        height: 20px;
        margin: 5px 20px 5px 20px;
    }
    
}

QScrollBar::handle:horizontal {
    background-color: #666666;    /* Set the handle color to grey */
    min-width: 60px;         /* Set the minimum width of the handle */
    border-radius: 5px;       /* Optional: for slightly rounded corners */
}

/* Style the left-arrow button */
QScrollBar::sub-line:horizontal {
    background: #AAAAAA;      /* Grey background for the arrow button */
    subcontrol-position: left;
    subcontrol-origin: margin;
    @if $isPortrait {
        width: 60px;
    }
    @else {
        width: 20px;
    }
}

/* Style the right-arrow button */
QScrollBar::add-line:horizontal {
    background: #AAAAAA;      /* Grey background for the arrow button */
    subcontrol-position: right;
    subcontrol-origin: margin;
    @if $isPortrait {
        width: 60px;
    }
    @else {
        width: 20px;
    }
}

QScrollBar::left-arrow:horizontal, QScrollBar::right-arrow:horizontal {
    border: 20px solid #AAAAAA;
    width: 0px;
    height: 0px;
}
QScrollBar::left-arrow:horizontal {
    left: -15px;
    border-right-color: #222222;
}
QScrollBar::right-arrow:horizontal {
    right: -15px;
    border-left-color: #222222;
}
QScrollBar::left-arrow:horizontal:hover {
    border-right-color: #666666;
}
QScrollBar::right-arrow:horizontal:hover {
    border-left-color: #666666;
}
