/*******************************************************************************
 * Copyright (c) 2010, 2015 Andrea Guarinoni and others.
 *
 * This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License 2.0
 * which accompanies this distribution, and is available at
 * https://www.eclipse.org/legal/epl-2.0/
 *
 * SPDX-License-Identifier: EPL-2.0
 *
 * Contributors:
 *     Andrea Guarinoni <andrea.guarinoni.dev@outlook.com> - initial API and implementation
 *     Stefan Winkler <stefan@winklerweb.net> - Bug 434189, 430848
 *     Simon Scholz <simon.scholz@vogella.com> - Bug 431635
 *     Fabio Zadrozny <fabiofz@gmail.com> - Bug 465148, 465711, 430278
 *     Lars Vogel <Lars.Vogel@vogella.com> Bug 463652,466275
 *******************************************************************************/

/*******************************************************************************
 * The following bugs are referred to in this style sheet
 * 2.) Bug 419377 - Setting a property to 'inherit' is not supported
 * 3.) Bug 430051 - Regression for CTabRendering when drawing bottom tabs
 * 5.) Bug 430278 - Add support for styling Scrollbars
 *******************************************************************************/


/* ############################## Global Styles ############################## */

Shell,
Composite, ScrolledComposite, ExpandableComposite, Canvas, TabFolder, CLabel, Label,
CoolBar, Sash, Group, RefactoringLocationControl, ChangeParametersControl, Link, FilteredTree,
ProxyEntriesComposite, NonProxyHostsComposite, DelayedFilterCheckboxTree,
Splitter, ScrolledPageContent, ViewForm, LaunchConfigurationFilteredTree,
ContainerSelectionGroup, BrowseCatalogItem, EncodingSettings,
ProgressMonitorPart, DocCommentOwnerComposite, NewServerComposite,
NewManualServerComposite, ServerTypeComposite, FigureCanvas,
DependenciesComposite, ListEditorComposite, WrappedPageBook,
CompareStructureViewerSwitchingPane, CompareContentViewerSwitchingPane,
QualifiedNameComponent, RefactoringStatusViewer,
MessageLine,
Button /* SWT-BUG: checkbox inner label font color is not accessible */,
Composite > *,
Composite > * > *,
Group > StyledText {
    background-color:#515658;
    color:#eeeeee;
}

/* ############################## Toolbar ############################## */
/* Ensure that the labels in the tabfolder gets updated
   See Bug 552780
*/
TabFolder > *,
CTabFolder > *,
TabFolder > Composite > *, /* Composite > CommitSearchPage$... */
CTabFolder > Composite > *, /* Composite > CommitSearchPage$... */
TabFolder > Composite > * > * { /* [style~='SWT.NO_BACKGROUND'] <- generate E4 non-sense bugs in apparently not related other rules Composite > ContentMergeViewer$... > TextMergeViewer$... */ 
	color:#eeeeee;
}

/* Toolbar should inherit the colors of its container to avoid drawing artifacts*/
ToolBar {
	background-color:inherit;
}

Combo,
List,
Text,
Spinner,
CCombo {
    background-color:#515658;
    color:#eeeeee;
}
Composite > StyledText,
Shell [style~='SWT.DROP_DOWN'] > StyledText, /* for eg. folded code popup (but it's ignored) */
SashForm > StyledText {
	/*	Fix StyledText inside a SashForm */
    background-color:#515658;
    color:#eeeeee;
}

Text[style~='SWT.SEARCH'],
Text[style~='SWT.SEARCH'] + Label /* SWT-BUG: adjacent sibling selector is ignored (CSS2.1) */ {
    /* search boxes */
    background-color: #333;
    color: #F4F7F7;
}

Text[style~='SWT.READ_ONLY'] {
    background-color: #515658;
    color: #bbbbbb;
}

Shell Tree, Shell Table, Shell List {
	background-color: #2F2F2F;
}

DatePicker,
DatePicker > Text,
ScheduleDatePicker,
ScheduleDatePicker > Text {
    background-color:#515658;
    color:#eeeeee;
}


ScrolledFormText,
FormText {
    background-color:#515658;
    color:#eeeeee;
}

Table,
Tree,
RegistryFilteredTree {
    background-color:inherit;
    color:#eeeeee;
}

Hyperlink,
ImageHyperlink {
	background-color: inherit;
    color: #6fc5ee;
}


ViewerPane,
DrillDownComposite {
    background-color: #232323;
    color: #CCC;
}

ProgressInfoItem,
ProgressInfoItem > *,
CompareViewerPane,
CompareViewerPane > * {
    background-color: inherit;
    color: #eeeeee;
}

ProgressIndicator {
    background-color: #777;
    color: #eeeeee;
}

DiscoveryItem,
DiscoveryItem Label,
DiscoveryItem Composite {
    background-color: #383C3E;
    color: #dddddd;
}
DiscoveryItem StyledText {
    background-color: #383C3E;
    color: #aaaaaa;
}
DiscoveryItem Link {
    background-color: #383C3E;
    color: #8B9498;
}

CatalogSwitcher,
CatalogSwitcher > ScrolledComposite > Composite > Composite /* ignored because hard-coded */,
CategoryItem {
    background-color: #515658;
    color: #dddddd;
}
GradientCanvas,
GradientCanvas > Label {
    background-color: #3f4447;
    color: #9ac9d8;
}
GradientCanvas {
    /* SWT-BUG workaround: GradientCanvas background-color is ignored */
    background: #3f4447;
}
CategoryItem > GradientCanvas,
CategoryItem > GradientCanvas > Label {
    /* SWT-BUG workaround: a style for background is not applied on GradientCanvas (CSS engine repaint issue) */
    background-color: #fafafa;
    color: #333;
}
CategoryItem > GradientCanvas {
    /* SWT-BUG workaround: a style for background is not applied on GradientCanvas (CSS engine repaint issue) */
    background: #fafafa;
    background-image: #333;
}

WebSite {
    background-color: #41464A;
    color: #dddddd;
}

CTabFolder {
    /* Set the styles for the inner tabs: */
    color: '#org-eclipse-ui-workbench-INACTIVE_TAB_TEXT_COLOR';
    swt-tab-renderer: url('bundleclass://org.eclipse.e4.ui.workbench.renderers.swt/org.eclipse.e4.ui.workbench.renderers.swt.CTabRendering');
    padding: 0px 2px 2px;
    swt-tab-outline: '#org-eclipse-ui-workbench-ACTIVE_TAB_OUTLINE_COLOR'; /* border color for selected tab */
    swt-outer-keyline-color: '#org-eclipse-ui-workbench-ACTIVE_TAB_OUTER_KEYLINE_COLOR'; /* border color for whole tabs container */
    swt-unselected-tabs-color: '#org-eclipse-ui-workbench-ACTIVE_UNSELECTED_TABS_COLOR_START' '#org-eclipse-ui-workbench-ACTIVE_UNSELECTED_TABS_COLOR_END' 100% 100%; /* title background for unselected tab */
    swt-selected-tab-fill: '#org-eclipse-ui-workbench-ACTIVE_TAB_BG_END'; /* title background for selected tab */
    swt-shadow-visible: false;
    swt-corner-radius: 16px;
    swt-unselected-hot-tab-color-background: #161616; /* Bug 465711 */
}
CTabFolder[style~='SWT.DOWN'][style~='SWT.BOTTOM'] {
    /* Set the styles for the bottom inner tabs (Bug 430051): */
    swt-tab-renderer: url('bundleclass://org.eclipse.e4.ui.workbench.renderers.swt/org.eclipse.e4.ui.workbench.renderers.swt.CTabRendering');
    swt-unselected-hot-tab-color-background: #161616; /* Bug 465711 */
}

Form,
FormHeading {
    background: #505f70;
    background-color: #505F70;
    color: #9AC9D8;
}

Form {
	/* Bug 465148: Additional styling for the Form */
    text-background-color: #505F70;

	tb-toggle-hover-color: #313538;
	tb-toggle-color: #313538;
	h-hover-full-color: #313538;
	h-hover-light-color: #313538;
	h-bottom-keyline-2-color: #313538;
	h-bottom-keyline-1-color: #313538;

	/* We also have to force the background mode (the
	 * Label/ToolBar in the heading should inherit it).
	 */
    swt-background-mode: 'force';
}

Section {
    background-color: #4F5355;
    color: #AEBED0;
    background-color-titlebar: #4F5355;
    background-color-gradient-titlebar: #4F5355;
    border-color-titlebar: #4F5355;
    swt-titlebar-color: #cccccc;
	tb-toggle-hover-color: #F4F7F7;
	tb-toggle-color: #F4F7F7;
}

Table,
Tree {
	swt-header-color: #CCC;
	swt-header-background-color: #383D3F;
}

Twistie {
    color: #E8E4DF;
}

.MPartSashContainer {
    background-color: #515658;
    color: #EEEEEE;
}

HeapStatus {
	background-color: #4F5355;
	color: #EEEEEE;
}

PageSiteComposite, PageSiteComposite > CImageLabel {
    color: #EEEEEE;
}
PageSiteComposite > PropertyTable {
    background-color: #333;
    color: #EEEEEE;
}
PageSiteComposite > PropertyTable:disabled {
/* SWT-BUG: event is triggered but styles for PropertyTable are hard-coded */
    background-color: #444;
    color: #EEEEEE;
}

/* See Bug 430848: We need to override the theme of the Eclipse splash screen, because
 * otherwise the splash screen would be partly switched to the dark theme during startup,
 * which does not look very nice.
 */
Label#org-eclipse-ui-splash-progressText {
	background-color: inherit; /* transparent */
	color: #9c9696; /* see property startupForegroundColor in the product */
}

Label#org-eclipse-ui-buildid-text {
	background-color: inherit; /* transparent */
}

ProgressIndicator#org-eclipse-ui-splash-progressIndicator {
	background-color: #e1e1e1;
}

Link {
	swt-link-foreground-color: '#org-eclipse-ui-workbench-LINK_COLOR'
}

ExpandableComposite {
    swt-titlebar-color: #cccccc;
	tb-toggle-hover-color: #F4F7F7;
	tb-toggle-color: #F4F7F7;
}

TabbedPropertyTitle > CLabel{
	color: #9AC9D8;
}

TabbedPropertyTitle {
	swt-backgroundGradientStart-color:  #505F70;
	swt-backgroundGradientEnd-color:    #505F70;
	swt-backgroundBottomKeyline1-color: #505F70;
	swt-backgroundBottomKeyline2-color: #505F70;
}

TabbedPropertyList {
	swt-tabAreaBackground-color : #515658;   /*same as canvas*/
	swt-tabBackground-color     : '#org-eclipse-ui-workbench-ACTIVE_NOFOCUS_TAB_BG_START';
	swt-tabNormalShadow-color   : '#org-eclipse-ui-workbench-INACTIVE_TAB_OUTLINE_COLOR';             /* color of shadow lines around the tabs */
	swt-tabDarkShadow-color     : '#org-eclipse-ui-workbench-ACTIVE_NOFOCUS_TAB_SELECTED_TEXT_COLOR'; /* line color of the tiny scroll triangle (at top / at bottom) */
	color                       : '#org-eclipse-ui-workbench-ACTIVE_NOFOCUS_TAB_SELECTED_TEXT_COLOR'; /* text color in the tab / tab area */
}
