/* Anaconda gtk style overrides */

/* Define styles to apply to the GtkLevelBar widgets for different values.
 *
 * This stylesheet defines properties for "low", "medium" and "high" level bar
 * levels. The level bars themselves need to define what style applies at what
 * value using gtk_level_bar_add_offset_value. Gtk defines "low" and "high" by
 * default, but it defines them for level bars using a continuous value between
 * 0 and 1, so our discrete level bars are effectively always at the "high"
 * level.
 */

@define-color anaconda_level_bar_low        red;
@define-color anaconda_level_bar_medium     orange;
@define-color anaconda_level_bar_high       green;

levelbar.discrete trough block.filled.low {
    border-color: darker(@anaconda_level_bar_low);
    background: @anaconda_level_bar_low;
}

levelbar.discrete trough block.filled.medium {
    border-color: darker(@anaconda_level_bar_medium);
    background: @anaconda_level_bar_medium;
}

levelbar.discrete trough block.filled.full,
levelbar.discrete trough block.filled.high {
    border-color: darker(@anaconda_level_bar_high);
    background: @anaconda_level_bar_high;
}

/* As of gnome-themes-standard 3.9.90, the Adwaita theme uses the same color
 * for all GtkInfoBars regardless of the MessageType.
 * (https://bugzilla.gnome.org/show_bug.cgi?id=704266, commit 6bfa3aa0). The
 * colors were actually kind of ok, and also the new colors are borderline
 * unreadable, so these rules revert that change and set different colors.
 */

@define-color info_fg_color black;
@define-color info_bg_color rgb (252, 252, 189);
@define-color warning_fg_color black;
@define-color warning_bg_color rgb (250, 173, 61);
@define-color question_fg_color white;
@define-color question_bg_color rgb (138, 173, 212);
@define-color error_fg_color black;
@define-color error_bg_color rgb (237, 54, 54);

infobar.info {
    background-color: @info_bg_color;
    border-color: darker(@info_bg_color);
}

infobar.info label {
    color: @info_fg_color;
}

infobar.warning {
    background-color: @warning_bg_color;
    border-color: darker(@warning_bg_color);
}

infobar.warning label {
    color: @warning_fg_color;
}

infobar.question {
    background-color: @question_bg_color;
    border-color: darker(@question_bg_color);
}
infobar.question label {
    color: @question_fg_color;
}

infobar.error {
    background-color: @error_bg_color;
    border-color: darker(@error_bg_color);
}

infobar.error label {
    color: @error_fg_color;
}

infobar.info,
infobar.warning,
infobar.question,
infobar.error {
    text-shadow: none;
}

/* vendor-specific colors/images */

@define-color redhat #2d2d2d;
@define-color fedora #2f4265;
@define-color centos #00001c;

/* theme colors/images */

@define-color product_bg_color @centos;

/* logo and sidebar classes */

/* The sidebar consists of three parts: a background, a logo, and a product logo,
 * rendered in that order. The product logo is empty by default and is intended
 * to be overridden by a stylesheet in product.img.
 */
.logo-sidebar {
    background-image: url('/usr/share/anaconda/pixmaps/sidebar-bg.png');
    background-color: @product_bg_color;
    background-repeat: no-repeat;
    background-size: contain;
    background-position: top left;
}

/* Add a logo to the sidebar */
.logo {
    background-image: url('/usr/share/anaconda/pixmaps/sidebar-logo.png');
    background-position: 50% 20px;
    background-repeat: no-repeat;
    background-color: transparent;
}

/* This is a placeholder to be filled by a product-specific logo. */
.product-logo {
    background-image: none;
    background-color: transparent;
}

AnacondaSpokeWindow #nav-box {
    background-color: @product_bg_color;
    background-image: url('/usr/share/anaconda/pixmaps/topbar-bg.png');
    background-repeat: no-repeat;
    background-size: contain;
    background-position: top left;
    color: white;
}

/* Remove the box-shadow from buttons in the nav-box because it adds a white stripe
 * below the buttons and makes them look dumb */
AnacondaSpokeWindow #nav-box GtkButton {
    box-shadow: none;
}

/* When multi-column GtkTreeViews set a row separator, the horizontal-separator
 * style property is still applied to the row separator, breaking the row
 * separator up for each column. It looks kind of dumb. Provide a way to not do
 * that.
 */
treeview.solid-separator {
    -GtkTreeView-horizontal-separator: 0;
}

/* Set the layout indicator colors */
AnacondaLayoutIndicator {
    background-color: #fdfdfd;
    color: black;
}

/* Fix the cpu-hogging spinner in progress spoke. This works by overriding the css property
"animation-timing-function". The default Adwaita value "linear" requests infinitely fine-grained
progress of the animation, so the component redraws every time it can. Using "steps(N)" makes the
animation have only N discrete states with no interpolation, so there are effectively N intervals
where the look is constant. This reduces redraws significantly and saves the CPU. See rhbz#1204242
for measurements. */
spinner { animation-timing-function: steps(24); }

/* Set colors for the subscriptions listbox:
 * - disable background color, so that the
 *   list box looks good even if half empty
 * - disable border color as well
 * - only rows should have a distinct background
 */
.subscriptions_listbox {
    background-color: transparent;
    background-image: none;
    border-color: transparent;
    border-image: none;
}

#subscriptions_listbox_row {
    background-color: white;
    border-color: gray;
}

#subscriptions_listbox_row_spacer {
    background-color: transparent;
    border-color: transparent;
}
