%if 0
/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
%endif

@import url("chrome://global/skin/");

@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
@namespace html url("http://www.w3.org/1999/xhtml");

%include ../shared/browser.inc.css

:root {
  --tabs-border: rgba(0,0,0,.3);

  --toolbar-non-lwt-bgcolor: -moz-dialog;
  --toolbar-non-lwt-textcolor: -moz-dialogtext;
  --toolbar-non-lwt-bgimage: linear-gradient(rgba(255,255,255,.15), rgba(255,255,255,.15));
  --toolbar-bgcolor: var(--toolbar-non-lwt-bgcolor);
  --toolbar-bgimage: var(--toolbar-non-lwt-bgimage);

  --toolbarbutton-border-radius: 4px;
  --toolbarbutton-vertical-text-padding: calc(var(--toolbarbutton-inner-padding) - 1px);
  --toolbarbutton-icon-fill-opacity: .85;

  --panel-separator-color: ThreeDShadow;
  --arrowpanel-dimmed: hsla(0,0%,80%,.3);
  --arrowpanel-dimmed-further: hsla(0,0%,80%,.45);
  --arrowpanel-dimmed-even-further: hsla(0,0%,80%,.8);

  --urlbar-separator-color: ThreeDShadow;

  --toolbox-border-bottom-color: ThreeDShadow;
}

:root:-moz-lwtheme {
  --toolbar-bgcolor: rgba(255,255,255,.4);
  --toolbar-bgimage: none;

  --toolbox-border-bottom-color: rgba(0,0,0,.3);
}

#menubar-items {
  -moz-box-orient: vertical; /* for flex hack */
}

#main-menubar {
  -moz-box-flex: 1; /* make menu items expand to fill toolbar height */
}

#navigator-toolbox {
  -moz-appearance: none;
  background-color: transparent;
  border-top: none;
}

#navigator-toolbox > toolbar:not(#toolbar-menubar):not(#TabsToolbar) {
  background-color: var(--toolbar-bgcolor);
  background-image: var(--toolbar-bgimage);
  color: var(--toolbar-color, inherit);
  -moz-appearance: none;
  border-style: none;
}

#TabsToolbar:not([collapsed="true"]) + #nav-bar {
  border-top: 1px solid var(--tabs-border) !important;
  background-clip: padding-box;
  /* Position the toolbar above the bottom of background tabs */
  position: relative;
  z-index: 1;
}

#nav-bar {
  padding-top: 2px;
  padding-bottom: 2px;
}

#browser-bottombox {
  /* opaque for layers optimization */
  background-color: -moz-Dialog;
}

/* Bookmark menus */
menu.bookmark-item,
menuitem.bookmark-item {
  min-width: 0;
  max-width: 32em;
}

.bookmark-item:not(.subviewbutton) > .menu-iconic-left {
  margin-top: 0;
  margin-bottom: 0;
}

.bookmark-item > .menu-iconic-left > .menu-iconic-icon {
  padding-inline-start: 0px;
}

/* Bookmark drag and drop styles */
.bookmark-item[dragover-into="true"] {
  background: Highlight !important;
  color: HighlightText !important;
}

/* rules for menupopup drop indicators */
.menupopup-drop-indicator-bar {
  position: relative;
  /* these two margins must together compensate the indicator's height */
  margin-top: -1px;
  margin-bottom: -1px;
}

.menupopup-drop-indicator {
  list-style-image: none;
  height: 2px;
  margin-inline-end: -4em;
  background-color: Highlight;
}

/* Bookmarks toolbar */
#PlacesToolbarDropIndicator {
  list-style-image: url(chrome://browser/skin/places/toolbarDropMarker.png);
}

/* Bookmark items */
.bookmark-item {
  list-style-image: url("chrome://mozapps/skin/places/defaultFavicon.svg");
}

.bookmark-item[container] {
  list-style-image: url("moz-icon://stock/gtk-directory?size=menu");
}

.bookmark-item[container][livemark] {
  list-style-image: url("chrome://browser/skin/feeds/feedIcon16.png");
}

.bookmark-item[container][livemark] .bookmark-item {
  list-style-image: url("chrome://browser/skin/places/livemark-item.png");
  -moz-image-region: rect(0px, 16px, 16px, 0px);
}

.bookmark-item[container][livemark] .bookmark-item[visited] {
  -moz-image-region: rect(0px, 32px, 16px, 16px);
}

.bookmark-item[container][query] {
  list-style-image: url("chrome://browser/skin/places/query.png");
}

.bookmark-item[query][tagContainer] {
  list-style-image: url("chrome://browser/skin/places/tag.png");
}

.bookmark-item[query][dayContainer] {
  list-style-image: url("chrome://browser/skin/places/calendar.png");
}

.bookmark-item[query][hostContainer] {
  list-style-image: url("moz-icon://stock/gtk-directory?size=menu");
}

.bookmark-item[query][hostContainer][open] {
  list-style-image: url("moz-icon://stock/gtk-directory?size=menu");
}

.bookmark-item[cutting] > .toolbarbutton-icon,
.bookmark-item[cutting] > .menu-iconic-left > .menu-iconic-icon {
  opacity: 0.5;
}

.bookmark-item[cutting] > .toolbarbutton-text,
.bookmark-item[cutting] > .menu-iconic-left > .menu-iconic-text {
  opacity: 0.7;
}

%include ../shared/bookmarked-notification.inc.css

.unified-nav-back[_moz-menuactive] {
  list-style-image: url("moz-icon://stock/gtk-go-back-ltr?size=menu") !important;
}
.unified-nav-back[_moz-menuactive]:-moz-locale-dir(rtl) {
  list-style-image: url("moz-icon://stock/gtk-go-back-rtl?size=menu") !important;
}
.unified-nav-forward[_moz-menuactive] {
  list-style-image: url("moz-icon://stock/gtk-go-forward-ltr?size=menu") !important;
}
.unified-nav-forward[_moz-menuactive]:-moz-locale-dir(rtl) {
  list-style-image: url("moz-icon://stock/gtk-go-forward-rtl?size=menu") !important;
}

%include ../shared/toolbarbuttons.inc.css
%include ../shared/toolbarbutton-icons.inc.css
%include ../shared/menupanel.inc.css

/* Fullscreen window controls */
#window-controls {
  -moz-box-align: start;
  margin-inline-start: 10px;
}

#minimize-button {
  list-style-image: url("chrome://global/skin/icons/Minimize.gif");
}
#restore-button {
  list-style-image: url("chrome://global/skin/icons/Restore.gif");
}
#close-button {
  list-style-image: url("chrome://global/skin/icons/Close.gif");
}

/* Location bar */

#urlbar {
  /* override textbox[enablehistory="true"] styling: */
  background-color: -moz-field;
}

%include ../shared/urlbar-searchbar.inc.css

#urlbar:not(:-moz-lwtheme):not([focused="true"]),
.searchbar-textbox:not(:-moz-lwtheme):not([focused="true"]) {
  border-color: ThreeDShadow;
}

#urlbar[focused="true"],
.searchbar-textbox[focused="true"] {
  border-color: Highlight;
}

.urlbar-textbox-container {
  -moz-appearance: none;
  -moz-box-align: stretch;
}
.urlbar-input-box {
  margin: 0;
}

/* ::::: URL Bar Zoom Reset Button ::::: */
@keyframes urlbar-zoom-reset-pulse {
  0% {
    transform: scale(0);
  }
  75% {
    transform: scale(1.5);
  }
  100% {
    transform: scale(1.0);
  }
}

#urlbar-zoom-button {
  -moz-appearance: none;
  color: inherit;
}

#urlbar-search-footer {
  border-top: 1px solid var(--panel-separator-color);
  background-color: var(--arrowpanel-dimmed);
}

#urlbar-search-settings {
  -moz-appearance: none;
  -moz-user-focus: ignore;
  color: GrayText;
  margin: 0;
  border: 0;
  padding: 8px 20px;
  background: transparent;
}

#urlbar-search-settings:hover {
  background-color: var(--arrowpanel-dimmed);
}

#urlbar-search-settings:hover:active {
  background-color: var(--arrowpanel-dimmed-further);
}

#urlbar-display-box {
  margin-top: -1px;
  margin-bottom: -1px;
}

.urlbar-display {
  margin-top: 0;
  margin-bottom: 0;
  margin-inline-start: 0;
  color: GrayText;
}

%include ../shared/urlbarSearchSuggestionsNotification.inc.css

#search-container {
  min-width: calc(54px + 11ch);
}

/* identity box */

#identity-box:not(:active):-moz-focusring {
  outline: 1px dotted;
  outline-offset: -3px;
}

%include ../shared/identity-block/identity-block.inc.css

%include ../shared/notification-icons.inc.css

.popup-notification-body[popupid="addon-progress"],
.popup-notification-body[popupid="addon-install-confirmation"] {
  width: 28em;
  max-width: 28em;
}

.addon-install-confirmation-name {
  font-weight: bold;
}

html|*.addon-webext-perm-list {
  margin-block-end: 0;
  padding-inline-start: 10px;
}

.addon-webext-perm-text {
  margin-inline-start: 0;
}

.popup-notification-description[popupid="addon-webext-permissions"],
.popup-notification-description[popupid="addon-installed"] {
  display: none;
}

.addon-webext-perm-notification-content,
.addon-installed-notification-content {
  margin-top: 0;
}

#addon-webext-perm-header {
  /* Align the text more closely with the icon by clearing some top line height. */
  margin-top: -1px;
  margin-inline-start: 0;
}

#addon-installed-notification-header {
  /* Align the text more closely with the icon by clearing some top line height. */
  margin-top: -1px;
}

.addon-webext-name {
  display: inline;
  font-weight: bold;
  margin: 0;
}

.addon-addon-icon,
.addon-toolbar-icon {
  width: 14px;
  height: 14px;
  vertical-align: bottom;
  margin-bottom: 1px;
  -moz-context-properties: fill;
  fill: currentColor;
}

.addon-addon-icon {
  list-style-image: url("chrome://mozapps/skin/extensions/extensionGeneric-16.svg");
}

.addon-toolbar-icon {
  list-style-image: url("chrome://browser/skin/menu.svg");
}

/* Notification icon box */

.notification-anchor-icon:-moz-focusring {
  outline: 1px dotted -moz-DialogText;
}

/* Translation infobar */

%include ../shared/translation/infobar.inc.css

notification[value="translation"] {
  min-height: 40px;
}

notification[value="translation"],
notification[value="translation"] button,
notification[value="translation"] menulist {
  min-height: 30px;
  color: #5A5959;
}

notification[value="translation"] {
  background-color: #F2F1F0;
}

notification[value="translation"] button,
notification[value="translation"] menulist {
  padding-inline-end: 1ch;
}

notification[value="translation"] menulist {
  border: 1px solid #C1C1C1;
  background-color: #FFF;
}

notification[value="translation"] button {
  border: 1px solid #C1C1C1;
  background-color: #F2F1F0;
}

notification[value="translation"] button,
notification[value="translation"] menulist,
notification[value="translation"] menulist > .menulist-label-box {
  margin-inline-start: 1ch;
  margin-inline-end: 1ch;
}

notification[value="translation"] button:hover,
notification[value="translation"] button:active,
notification[value="translation"] menulist:hover,
notification[value="translation"] menulist:active {
  background-color: #E2E1E0;
}

notification[value="translation"] button[anonid="translate"] {
  color: #FFF;
  background-image: linear-gradient(#9FB938, #8DA726);
  box-shadow: none;
  border: 1px solid #829C1C;
}

notification[value="translation"] button[anonid="translate"]:hover,
notification[value="translation"] button[anonid="translate"]:active {
  background-image: linear-gradient(#8DA726, #8DA726);
}

notification[value="translation"] button > .button-box,
notification[value="translation"] button[type="menu"] > .button-box > .button-menu-dropmarker {
  padding: 0;
  margin-inline-start: 3ch;
}

notification[value="translation"] button:not([type="menu"]) > .button-box {
  margin-inline-end: 3ch;
}

notification[value="translation"] menulist > .menulist-dropmarker {
  display: block;
}

/* AutoComplete */

%include ../shared/autocomplete.inc.css
%include ../shared/urlbar-autocomplete.inc.css

#PopupAutoComplete > richlistbox > richlistitem[originaltype~="datalist-first"] {
  border-top: 1px solid ThreeDShadow;
}

.ac-title {
  font-size: 1.05em;
}

.ac-separator,
.ac-url,
.ac-action,
.ac-tags {
  font-size: 0.9em;
}

html|span.ac-tag {
  background-color: MenuText;
  color: Menu;
  border-radius: 2px;
  border: 1px solid transparent;
  padding: 0 1px;
}

.ac-separator:not([selected=true]),
.ac-url:not([selected=true]),
.ac-action:not([selected=true]) {
  color: -moz-nativehyperlinktext;
}

.ac-tags-text[selected] > html|span.ac-tag {
  background-color: HighlightText;
  color: Highlight;
}

html|span.ac-emphasize-text-title,
html|span.ac-emphasize-text-tag,
html|span.ac-emphasize-text-url {
  font-weight: 600;
}

.ac-type-icon[type=bookmark] {
  list-style-image: url("chrome://browser/skin/bookmark.svg");
  -moz-context-properties: fill;
  fill: #b2b2b2;
}

.ac-type-icon[type=bookmark][selected][current] {
  fill: white;
}

.ac-type-icon[type=keyword],
.ac-site-icon[type=searchengine] {
  list-style-image: url(chrome://global/skin/icons/autocomplete-search.svg);
  -moz-context-properties: fill;
  fill: GrayText;
}

.ac-type-icon[type=keyword][selected],
.ac-site-icon[type=searchengine][selected] {
  fill: highlighttext;
}

.ac-type-icon[type=switchtab],
.ac-type-icon[type=remotetab] {
  list-style-image: url("chrome://browser/skin/urlbar-tab.svg");
  -moz-context-properties: fill;
  fill: #b2b2b2;
}

.ac-type-icon[type=switchtab][selected],
.ac-type-icon[type=remotetab][selected] {
  fill: white;
}

.autocomplete-treebody::-moz-tree-cell-text(treecolAutoCompleteComment) {
  color: GrayText;
}

.autocomplete-treebody::-moz-tree-cell-text(suggesthint, treecolAutoCompleteComment),
.autocomplete-treebody::-moz-tree-cell-text(suggestfirst, treecolAutoCompleteComment) {
  color: GrayText;
  font-size: smaller;
}

.autocomplete-treebody::-moz-tree-cell(suggesthint) {
  border-top: 1px solid GrayText;
}

/* Bookmarking panel */
#editBookmarkPanelStarIcon {
  list-style-image: url("chrome://browser/skin/places/starred48.png");
  width: 48px;
  height: 48px;
}

#editBookmarkPanelTitle {
  font-size: 130%;
}

#editBookmarkPanelHeader,
#editBookmarkPanelContent {
  margin-bottom: .5em;
}

/* Implements editBookmarkPanel resizing on folderTree un-collapse. */
#editBMPanel_folderTree {
  min-width: 27em;
}

/* Content area */

%include ../shared/sidebar.inc.css

#sidebar-box {
  background-color: -moz-Field;
  color: -moz-FieldText;
}

#sidebar-header {
  border-bottom: 1px solid ThreeDShadow;
}

.sidebar-splitter {
  -moz-appearance: none;
  width: 6px;
  background-color: -moz-dialog;
  border: 1px ThreeDShadow;
  border-style: none solid;
}

.browserContainer > findbar {
  background-color: -moz-dialog;
  color: -moz-DialogText;
  text-shadow: none;
}

/* Tabstrip */

%include ../shared/tabs.inc.css

#tabbrowser-tabs {
  /* override the global style to allow the selected tab to be above the nav-bar */
  z-index: auto;
}

#TabsToolbar {
  min-height: 0;
  padding: 0;
  margin-bottom: calc(-1 * var(--tab-toolbar-navbar-overlap));
}

#TabsToolbar:not(:-moz-lwtheme) {
  -moz-appearance: menubar;
  color: -moz-menubartext;
}

#toolbar-menubar:not([autohide="true"]):not(:-moz-lwtheme):-moz-system-metric(menubar-drag),
#TabsToolbar:not(:-moz-lwtheme):-moz-system-metric(menubar-drag) {
  -moz-binding: url("chrome://browser/content/customizableui/toolbar.xml#toolbar-drag");
}

.tabbrowser-tab:focus > .tab-stack > .tab-content {
  outline: 1px dotted;
  outline-offset: -6px;
}

#context_reloadTab {
  list-style-image: url("moz-icon://stock/gtk-refresh?size=menu");
}

#context_closeOtherTabs {
  list-style-image: url("moz-icon://stock/gtk-clear?size=menu");
}

#context_closeOtherTabs[disabled] {
  list-style-image: url("moz-icon://stock/gtk-clear?size=menu&state=disabled");
}

#context_undoCloseTab {
  list-style-image: url("moz-icon://stock/gtk-undelete?size=menu");
}

#context_closeTab {
  list-style-image: url("moz-icon://stock/gtk-close?size=menu");
}

/* Tab drag and drop */
.tab-drop-indicator {
  list-style-image: url(chrome://browser/skin/tabbrowser/tabDragIndicator.png);
  margin-bottom: -9px;
  z-index: 3;
}

/* Tab bar scroll arrows */

.tabbrowser-arrowscrollbox > .scrollbutton-up > .toolbarbutton-icon,
.tabbrowser-arrowscrollbox > .scrollbutton-down > .toolbarbutton-icon {
  -moz-appearance: none;
}

/* All tabs menupopup */

.alltabs-item[selected="true"] {
  font-weight: bold;
}

/* Status panel */

.statuspanel-label {
  margin: 0;
  padding: 2px 4px;
  background-color: -moz-dialog;
  border: 1px none ThreeDShadow;
  border-top-style: solid;
  color: -moz-dialogText;
  text-shadow: none;
}

.statuspanel-label:-moz-locale-dir(ltr):not([mirror]),
.statuspanel-label:-moz-locale-dir(rtl)[mirror] {
  border-right-style: solid;
  border-top-right-radius: .3em;
  margin-right: 1em;
}

.statuspanel-label:-moz-locale-dir(rtl):not([mirror]),
.statuspanel-label:-moz-locale-dir(ltr)[mirror] {
  border-left-style: solid;
  border-top-left-radius: .3em;
  margin-left: 1em;
}

%include ../shared/fullscreen/warning.inc.css
%include ../shared/ctrlTab.inc.css
%include ../shared/plugin-doorhanger.inc.css

.gcli-panel {
  padding: 0;
}

.gclitoolbar-input-node > .textbox-input-box > html|*.textbox-input::-moz-selection {
  color: hsl(210,11%,16%);
}

/* Error counter */

#developer-toolbar-toolbox-button[error-count]:before {
  color: #FDF3DE;
  min-width: 16px;
  text-shadow: none;
  background-image: linear-gradient(#B4211B, #8A1915);
  border-radius: 1px;
  margin-inline-end: 2px;
}

/* Customization mode */

%include ../shared/customizableui/customizeMode.inc.css

/* End customization mode */


#main-window[privatebrowsingmode=temporary] #private-browsing-indicator {
  background: url("chrome://browser/skin/privatebrowsing-mask.png") center no-repeat;
  width: 40px;
}

%include ../shared/UITour.inc.css

#UITourHighlight {
  /* Below are some fixes for people without an X compositor on Linux.
     This is why we can't have nice things: */
  /* Animations don't repaint properly without an X compositor. */
  animation-name: none !important;
  /* Opacity rounds to 0 or 1 on Linux without an X compositor, making the
     background color not visible. Anti-aliasing is not available either. Make a
     thicker outline and cancel border-radius for that case. */
     outline: 4px solid rgb(0,200,215);
     border-radius: 0 !important;
}

#UITourTooltipDescription {
  font-size: 1.05rem;
}

#UITourTooltipClose {
  margin-inline-end: -4px;
  height: 16px;
  width: 16px;
}

/**
 * Override the --arrowpanel-padding so the background extends
 * to the sides and bottom of the panel.
 */
#UITourTooltipButtons {
  margin-left: -10px;
  margin-bottom: -10px;
}

%include ../shared/contextmenu.inc.css

#context-navigation > .menuitem-iconic > .menu-iconic-left {
  /* override toolkit/themes/linux/global/menu.css */
  padding-inline-end: 0 !important;
  margin-inline-end: 0 !important;
}

.browser-extension-panel > .panel-arrowcontainer > .panel-arrowcontent {
  padding: 0;
  overflow: hidden;
}

.webextension-popup-browser,
.webextension-popup-stack {
  border-radius: inherit;
}

/* Prevent movement in the restore-tabs-button when it's clicked. */
.restore-tabs-button:hover:active:not([disabled="true"]) {
  padding: 3px;
}
