/*******************************************************************************
 * Copyright (c) 2018 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
 *     Lars Vogel - initial API and implementation
 *******************************************************************************/


/* ################################ CSS for Tabs ########################## */

#org-eclipse-ui-editorss {
	swt-tab-height: 8px;
}

.MPartStack {
    font-family: '#org-eclipse-ui-workbench-TAB_TEXT_FONT';
    swt-tab-renderer: url('bundleclass://org.eclipse.e4.ui.workbench.renderers.swt/org.eclipse.e4.ui.workbench.renderers.swt.CTabRendering');
    padding: 2px 2px;
    swt-shadow-visible: false;
    swt-mru-visible: true;
}

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: 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-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 */
}

CTabFolder.MArea {
    swt-tab-renderer: url('bundleclass://org.eclipse.e4.ui.workbench.renderers.swt/org.eclipse.e4.ui.workbench.renderers.swt.CTabRendering');
    padding: 0px;
    background-color: #515658;
    swt-selected-tab-fill: #515658;
    swt-unselected-tabs-color: #515658;
    swt-outer-keyline-color: #515658;
    swt-inner-keyline-color: #515658;
    swt-tab-outline: #515658;
}

CTabItem,
CTabItem CLabel {
    background-color: '#org-eclipse-ui-workbench-ACTIVE_TAB_BG_END'; /* HACK for background of CTabFolder inner Toolbars */
    color: '#org-eclipse-ui-workbench-INACTIVE_TAB_UNSELECTED_TEXT_COLOR';
}

CTabItem:selected,
CTabItem:selected CLabel {
    color: '#org-eclipse-ui-workbench-INACTIVE_TAB_SELECTED_TEXT_COLOR';
}

.MPartStack.active > CTabItem,
.MPartStack.active > CTabItem CLabel {
    background-color: '#org-eclipse-ui-workbench-ACTIVE_TAB_BG_END'; /* HACK for background of CTabFolder inner Toolbars */
    color: '#org-eclipse-ui-workbench-ACTIVE_TAB_UNSELECTED_TEXT_COLOR';
}
.MPartStack.active > CTabItem:selected,
.MPartStack.active > CTabItem:selected CLabel {
    color: '#org-eclipse-ui-workbench-ACTIVE_TAB_SELECTED_TEXT_COLOR';
}

.MPartStack.active.noFocus > CTabItem:selected {
    color: '#org-eclipse-ui-workbench-ACTIVE_NOFOCUS_TAB_SELECTED_TEXT_COLOR';
}

CTabFolder > Composite#ToolbarComposite {
  background-color: '#org-eclipse-ui-workbench-ACTIVE_TAB_BG_END'; /* HACK for background of CTabFolder inner Toolbars */
}

CTabFolder.MArea CTabItem, 
CTabFolder.MArea CTabItem CLabel {
    background-color: #515658; /* Disable HACK for background of CTabFolder inner Toolbars */
}

CTabItem.busy {
    color: #888888;
}

CTabFolder.MArea .MPartStack,CTabFolder.MArea .MPartStack.active {
    swt-shadow-visible: false;
}

