/********************************************************************/
/*                                                                  */
/*    Ballistic.css                                                 */
/*                                                                  */
/*  This is the Ballistic style. It is used for the main game UI,   */
/*  and can also be used for the map editor BEdit.                  */
/*  It defines styles only - not layout, size of UI elements, etc.  */
/*  See game.css for that.                                          */
/*                                                                  */
/********************************************************************/


* {
    font-family: "Verdana";
    color: rgb(255, 255, 100);
    /* TODO: Have a background image on Dashboard, each Screen will have a slighly
       transparent bg e.g. rgba(80, 80, 80, 80). Other container widgets will be transparent
       so that they don't add to the bg colour.
    background-color: transparent;*/  /* No fill */
    background-color: rgb(80, 80, 80);
    /*text-shadow: grey 0.1em 0.1em 0.1em;   Qt doesn't seem to support this :( */
}


/*** Common gradient style for button-like elements. ***/

/* Horizontal */
/* Normal */
QPushButton,
QPushButton:off,
QToolButton,
QComboBox::drop-down,
QScrollBar::handle:horizontal,
QScrollBar::add-line:horizontal,
QScrollBar::sub-line:horizontal,
QTabBar::tab:selected,
QProgressBar::chunk:horizontal,
QSlider::handle:horizontal {
    background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
                                stop: 0 rgb(186, 26, 26),
                                stop: 0.49 rgb(195, 48, 48),
                                stop: 0.5 rgb(181, 3, 3),
                                stop: 1 rgb(164, 0, 0));
}

/* Hover */
QPushButton:hover,
QToolButton:hover,
QComboBox::drop-down:hover,
QScrollBar::handle:horizontal:hover,
QScrollBar::add-line:horizontal:hover,
QScrollBar::sub-line:horizontal:hover,
QTabBar::tab:hover,
QSlider::handle:horizontal:hover {
    background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
                                stop: 0 rgb(193, 60, 60),
                                stop: 0.49 rgb(198, 70, 70),
                                stop: 0.5 rgb(198, 45, 45),
                                stop: 1 rgb(172, 45, 45));
}

/* Pressed */
QPushButton:pressed,
QPushButton:on,
QToolButton:pressed,
QComboBox::drop-down:pressed,
QScrollBar::handle:horizontal:pressed,
QScrollBar::add-line:horizontal:pressed,
QScrollBar::sub-line:horizontal:pressed,
QSlider::handle:horizontal:pressed {
    background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
                                stop: 0 rgb(126, 14, 14),
                                stop: 0.49 rgb(178, 41, 41),
                                stop: 0.5 rgb(176, 0, 0),
                                stop: 1 rgb(182, 0, 0));
}

/* Vertical */
/* Normal */
QScrollBar::handle:vertical,
QScrollBar::add-line:vertical,
QScrollBar::sub-line:vertical,
QProgressBar::chunk:vertical,
QSlider::handle:vertical {
    background: qlineargradient(x1: 0, y1: 0, x2: 1, y2: 0,
                                stop: 0 rgb(186, 26, 26),
                                stop: 0.49 rgb(195, 48, 48),
                                stop: 0.5 rgb(181, 3, 3),
                                stop: 1 rgb(164, 0, 0));
}

/* Hover */
QScrollBar::handle:vertical:hover,
QScrollBar::add-line:vertical:hover,
QScrollBar::sub-line:vertical:hover,
QSlider::handle:vertical:hover {
    background: qlineargradient(x1: 0, y1: 0, x2: 1, y2: 0,
                                stop: 0 rgb(193, 60, 60),
                                stop: 0.49 rgb(198, 70, 70),
                                stop: 0.5 rgb(198, 45, 45),
                                stop: 1 rgb(172, 45, 45));
}

/* Pressed */
QScrollBar::handle:vertical:pressed,
QScrollBar::add-line:vertical:pressed,
QScrollBar::sub-line:vertical:pressed,
QSlider::handle:vertical:pressed {
    background: qlineargradient(x1: 0, y1: 0, x2: 1, y2: 0,
                                stop: 0 rgb(126, 14, 14),
                                stop: 0.49 rgb(178, 41, 41),
                                stop: 0.5 rgb(176, 0, 0),
                                stop: 1 rgb(182, 0, 0));
}


/*** Common border style. ***/

QPushButton,
QToolButton,
QLineEdit,
QComboBox,
QComboBox::drop-down,
QScrollBar::handle,
QScrollBar::add-line,
QScrollBar::sub-line,
QTabBar::tab,
QProgressBar,
QSlider::handle {
    border: 1px solid rgb(86, 0, 0);
}

QScrollArea,
QGroupBox,
QListWidget, QListView,
QTableWidget, QTableView,
QTreeWidget, QTreeView,
QTabWidget::pane {
    border: 1px solid rgb(120, 120, 120);
}


/*** Common styles for disabled elements. ***/

*:disabled {
    color: rgb(206, 206, 91);
}

/* Horizontal */
QPushButton:disabled,
QToolButton:disabled,
QComboBox::drop-down:disabled,
QScrollBar::handle:horizontal:disabled,
QScrollBar::add-line:horizontal:disabled,
QScrollBar::sub-line:horizontal:disabled,
QProgressBar::chunk:horizontal:disabled,
QSlider::handle:horizontal:disabled {
    background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
                                stop: 0 rgb(141, 71, 71),
                                stop: 0.49 rgb(143, 97, 97),
                                stop: 0.5 rgb(143, 44, 44),
                                stop: 1 rgb(130, 34, 34));
}

/* Vertical */
QScrollBar::handle:vertical:disabled,
QScrollBar::add-line:vertical:disabled,
QScrollBar::sub-line:vertical:disabled,
QProgressBar::chunk:vertical:disabled,
QSlider::handle:vertical:disabled {
    background: qlineargradient(x1: 0, y1: 0, x2: 1, y2: 0,
                                stop: 0 rgb(141, 71, 71),
                                stop: 0.49 rgb(143, 97, 97),
                                stop: 0.5 rgb(143, 44, 44),
                                stop: 1 rgb(130, 34, 34));
}


/* Check box */
QCheckBox {
    background-color: transparent;
}

QCheckBox::indicator {
    border-width: 1px;
    border-style: solid;
}

QCheckBox::indicator,
QMenu::indicator:non-exclusive {
    border-color: rgb(195, 49, 49) rgb(179, 3, 3) rgb(179, 3, 3) rgb(195, 49, 49);
    background: qlineargradient(x1: 0, y1: 0, x2: 1, y2: 1,
                                stop: 0 rgb(120, 0, 0),
                                stop: 1 rgb(200, 0, 0));
}

QCheckBox::indicator:hover,
QMenu::indicator:non-exclusive:selected {
    border-color: rgb(253, 65, 65) rgb(206, 51, 51) rgb(206, 51, 51) rgb(253, 65, 65);
    background: qlineargradient(x1: 0, y1: 0, x2: 1, y2: 1,
                                stop: 0 rgb(127, 32, 32),
                                stop: 1 rgb(252, 64, 64));
}

QCheckBox::indicator:pressed,
QMenu::indicator:non-exclusive:pressed {
    border-color: rgb(141, 0, 0) rgb(200, 0, 0) rgb(200, 0, 0) rgb(141, 0, 0);
    background: qlineargradient(x1: 0, y1: 0, x2: 1, y2: 1,
                                stop: 0 rgb(205, 0, 0),
                                stop: 1 rgb(142, 0, 0));
}

QCheckBox::indicator:checked,
QMenu::indicator:non-exclusive:checked {
    image: url("http://ballistic.sourceforge.net/src/styles/Ballistic/styles/Ballistic/img/tick.png");
}

QCheckBox::indicator:checked:hover,
QMenu::indicator:non-exclusive:checked:selected {
    image: url("http://ballistic.sourceforge.net/src/styles/Ballistic/styles/Ballistic/img/tick_hover.png");
}

QCheckBox::indicator:checked:pressed,
QMenu::indicator:non-exclusive:checked:pressed {
    image: url("http://ballistic.sourceforge.net/src/styles/Ballistic/styles/Ballistic/img/tick_pressed.png");
}


/* Radio button */
QRadioButton {
    background-color: transparent;
}

QRadioButton::indicator {
    border-width: 1px;
    border-style: solid;
}

QRadioButton::indicator,
QMenu::indicator:exclusive {
    border-color: rgb(195, 49, 49) rgb(179, 3, 3) rgb(179, 3, 3) rgb(195, 49, 49);
    background: qradialgradient(fx: 0.2, fy: 0.2, cx: 0.7, cy: 0.7, radius: 1,
                                stop: 0 rgb(120, 0, 0),
                                stop: 1 rgb(200, 0, 0));
}

QRadioButton::indicator:hover,
QMenu::indicator:exclusive:selected {
    border-color: rgb(253, 65, 65) rgb(206, 51, 51) rgb(206, 51, 51) rgb(253, 65, 65);
    background: qradialgradient(fx: 0.2, fy: 0.2, cx: 0.7, cy: 0.7, radius: 1,
                                stop: 0 rgb(127, 32, 32),
                                stop: 1 rgb(252, 64, 64));
}

QRadioButton::indicator:pressed,
QMenu::indicator:exclusive:pressed {
    border-color: rgb(141, 0, 0) rgb(200, 0, 0) rgb(200, 0, 0) rgb(141, 0, 0);
    background: qradialgradient(fx: 0.2, fy: 0.2, cx: 0.7, cy: 0.7, radius: 1,
                                stop: 0 rgb(205, 0, 0),
                                stop: 1 rgb(142, 0, 0));
}

QRadioButton::indicator:checked,
QMenu::indicator:exclusive:checked {
    image: url("http://ballistic.sourceforge.net/src/styles/Ballistic/styles/Ballistic/img/dot.png");
}

QRadioButton::indicator:checked:hover,
QMenu::indicator:exclusive:checked:selected {
    image: url("http://ballistic.sourceforge.net/src/styles/Ballistic/styles/Ballistic/img/dot_hover.png");
}

QRadioButton::indicator:checked:pressed,
QMenu::indicator:exclusive:checked:pressed {
    image: url("http://ballistic.sourceforge.net/src/styles/Ballistic/styles/Ballistic/img/dot_pressed.png");
}


/* Text box */
QLineEdit {
    background-color: rgb(166, 141, 141);
}


/* Group box */
QGroupBox {
    margin-top: 1ex;
    padding-top: 0.5ex;
}

QGroupBox::title {
    subcontrol-origin: margin;
    subcontrol-position: top left;
    left: 1em;
    margin-top: -0.5em;
}


/* Combo box */
QComboBox {
    background-color: rgb(166, 141, 141);
}

QComboBox::down-arrow          { image: url("http://ballistic.sourceforge.net/src/styles/Ballistic/styles/Ballistic/img/arrow_down.png");         }
QComboBox::down-arrow:hover    { image: url("http://ballistic.sourceforge.net/src/styles/Ballistic/styles/Ballistic/img/arrow_down_hover.png");   }
QComboBox::down-arrow:pressed  { image: url("http://ballistic.sourceforge.net/src/styles/Ballistic/styles/Ballistic/img/arrow_down_pressed.png"); }

QComboBox QAbstractItemView {
    border: 1px solid rgb(86, 0, 0);
    background-color: rgb(166, 141, 141);
    selection-color: rgb(20, 20, 200);
    selection-background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
                                stop: 0 rgb(255, 182, 43),
                                stop: 0.49 rgb(255, 200, 94),
                                stop: 0.5 rgb(255, 185, 49),
                                stop: 1 rgb(255, 176, 25));
}

/*QComboBox QAbstractItemView::item {      This should work, but it doesn't :(
    height: 30px;
}*/


/* Menu */
QMenu {
    border: 1px solid rgb(153, 0, 0);
    background-color: rgb(120, 120, 120);
}

QMenu::separator {
    background-color: rgb(150, 150, 150);
}

QMenu::item:selected {
    color: rgb(20, 20, 200);
    background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
                                stop: 0 rgb(255, 182, 43),
                                stop: 0.49 rgb(255, 200, 94),
                                stop: 0.5 rgb(255, 185, 49),
                                stop: 1 rgb(255, 176, 25));
}

QMenu::item:disabled {
    color: rgb(160, 160, 80);
}

QMenu::item:selected:disabled {
    color: rgb(40, 40, 100);
    background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
                                stop: 0 rgba(220, 196, 132, 120),
                                stop: 0.49 rgba(230, 215, 169, 120),
                                stop: 0.5 rgba(220, 197, 134, 120),
                                stop: 1 rgba(216, 187, 117, 120));
}


/* Scroll box and scrollbar */
QScrollBar::add-line, QScrollBar::sub-line {
    subcontrol-origin: margin;
}

QScrollBar::sub-line:vertical {
    subcontrol-position: top;
}
QScrollBar::add-line:vertical {
    subcontrol-position: bottom;
}
QScrollBar::sub-line:horizontal {
    subcontrol-position: left;
}
QScrollBar::add-line:horizontal {
    subcontrol-position: right;
}

QScrollBar::up-arrow            { image: url("http://ballistic.sourceforge.net/src/styles/Ballistic/styles/Ballistic/img/arrow_up.png");           }
QScrollBar::up-arrow:hover      { image: url("http://ballistic.sourceforge.net/src/styles/Ballistic/styles/Ballistic/img/arrow_up_hover.png");     }
QScrollBar::up-arrow:pressed    { image: url("http://ballistic.sourceforge.net/src/styles/Ballistic/styles/Ballistic/img/arrow_up_pressed.png");   }
QScrollBar::down-arrow          { image: url("http://ballistic.sourceforge.net/src/styles/Ballistic/styles/Ballistic/img/arrow_down.png");         }
QScrollBar::down-arrow:hover    { image: url("http://ballistic.sourceforge.net/src/styles/Ballistic/styles/Ballistic/img/arrow_down_hover.png");   }
QScrollBar::down-arrow:pressed  { image: url("http://ballistic.sourceforge.net/src/styles/Ballistic/styles/Ballistic/img/arrow_down_pressed.png"); }
QScrollBar::left-arrow          { image: url("http://ballistic.sourceforge.net/src/styles/Ballistic/styles/Ballistic/img/arrow_left.png");         }
QScrollBar::left-arrow:hover    { image: url("http://ballistic.sourceforge.net/src/styles/Ballistic/styles/Ballistic/img/arrow_left_hover.png");   }
QScrollBar::left-arrow:pressed  { image: url("http://ballistic.sourceforge.net/src/styles/Ballistic/styles/Ballistic/img/arrow_left_pressed.png"); }
QScrollBar::right-arrow         { image: url("http://ballistic.sourceforge.net/src/styles/Ballistic/styles/Ballistic/img/arrow_right.png");        }
QScrollBar::right-arrow:hover   { image: url("http://ballistic.sourceforge.net/src/styles/Ballistic/styles/Ballistic/img/arrow_right_hover.png");  }
QScrollBar::right-arrow:pressed { image: url("http://ballistic.sourceforge.net/src/styles/Ballistic/styles/Ballistic/img/arrow_right_pressed.png");}

QScrollBar::add-page:vertical,
QScrollBar::sub-page:vertical {
    background: qlineargradient(x1: 0, y1: 0, x2: 1, y2: 0,
                                stop: 0 rgb(140, 100, 100),
                                stop: 1 rgb(164, 124, 124));
}
QScrollBar::add-page:horizontal,
QScrollBar::sub-page:horizontal {
    background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
                                stop: 0 rgb(140, 100, 100),
                                stop: 1 rgb(164, 124, 124));
}
QScrollBar::add-page:vertical:pressed,
QScrollBar::sub-page:vertical:pressed {
    background: qlineargradient(x1: 0, y1: 0, x2: 1, y2: 0,
                                stop: 0 rgb(110, 80, 80),
                                stop: 1 rgb(180, 140, 140));
}
QScrollBar::add-page:horizontal:pressed,
QScrollBar::sub-page:horizontal:pressed {
    background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
                                stop: 0 rgb(110, 80, 80),
                                stop: 1 rgb(180, 140, 140));
}


/* Tab bar */
QTabWidget::tab-bar {
    left: 2px;
}

QTabBar::tab {
    border-bottom-color: transparent;
    background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
                                stop: 0 rgb(156, 26, 26),
                                stop: 0.49 rgb(165, 48, 48),
                                stop: 0.5 rgb(151, 3, 3),
                                stop: 1 rgb(134, 0, 0));
}

QTabBar::tab:!selected {
    margin-top: 2px;
}

QTabBar::tab:selected {
    margin-left: -2px;
    margin-right: -2px;
}

QTabBar::tab:first:selected { margin-left: 0; }
QTabBar::tab:last:selected { margin-right: 0; }
QTabBar::tab:only-one { margin: 0; }


/* Progress bar */
QProgressBar {
    text-align: center;
    background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
                                stop: 0 rgb(140, 100, 100),
                                stop: 1 rgb(164, 124, 124));
}

/* Slider */
QSlider::groove:horizontal {
    border: 1px inset rgb(60, 60, 60);
    background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
                                stop: 0 rgb(110, 110, 109),
                                stop: 0.45 rgb(112, 112, 109),
                                stop: 0.46 rgb(70, 70, 70),
                                stop: 0.54 rgb(90, 90, 90),
                                stop: 0.55 rgb(112, 112, 108),
                                stop: 1 rgb(115, 115, 108));
}
