/* 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/. */

/* all localizable skin settings shall live here */
@import url("chrome://global/locale/intl.css");
@import url("chrome://global/skin/menu.css");

%include shared.inc
@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");

/* ::::: XBL bindings ::::: */

menulist > menupopup {
  -moz-binding: url("chrome://global/content/bindings/popup.xml#popup-scrollbars");
}

/* ::::: Variables ::::: */
:root {
  --arrowpanel-padding: 16px;
  --arrowpanel-background: hsla(0,0%,99%,.975);
  --arrowpanel-color: hsl(0,0%,10%);
  --arrowpanel-border-color: hsla(210,4%,10%,.05);
  --arrowpanel-border-radius: 3.5px;
  --focus-ring-box-shadow: @focusRingShadow@;
}

/* ::::: root elements ::::: */

window,
page,
dialog,
wizard {
  -moz-appearance: dialog;
  background-color: #FFFFFF;
  color: -moz-DialogText;
  font: message-box;
}

/* deprecated */
window.dialog {
  padding-top: 8px;
  padding-bottom: 10px;
  padding-inline-start: 8px;
  padding-inline-end: 10px;
}

/* ::::: alert icons :::::*/

.message-icon,
.alert-icon,
.error-icon,
.question-icon {
  width: 32px;
  height: 32px;
  margin: 6px;
  margin-inline-end: 20px;
}

.message-icon {
  list-style-image: url("chrome://global/skin/icons/info.svg");
}

.alert-dialog #infoIcon,
.alert-icon {
  list-style-image: url("chrome://global/skin/icons/warning-64.png");
}

.error-icon {
  list-style-image: url("chrome://global/skin/icons/error-64.png");
}

.question-icon {
  list-style-image: url("chrome://global/skin/icons/question-64.png");
}

/* ::::: iframe ::::: */

iframe {
  border: none;
  width: 100px;
  height: 100px;
  min-width: 10px;
  min-height: 10px;
}

/* ::::: miscellaneous formatting ::::: */

sidebarheader {
  background-color: -moz-Dialog;
  color: -moz-dialogText;
  text-shadow: none;
}

:root:-moz-lwtheme {
  -moz-appearance: none;
}

:root:-moz-lwtheme-darktext {
  text-shadow: 0 -0.5px 1.5px white;
}

:root:-moz-lwtheme-brighttext {
  text-shadow: 1px 1px 1.5px black;
}

.inset {
  border: 1px solid ThreeDShadow;
  border-right-color: ThreeDHighlight;
  border-bottom-color: ThreeDHighlight;
  margin: 0 5px 5px;
}

.outset {
  border: 1px solid ThreeDShadow;
  border-left-color: ThreeDHighlight;
  border-top-color: ThreeDHighlight;
}

separator:not([orient="vertical"]) {
  height: 1.5em;
}
separator[orient="vertical"] {
  width: 1.5em;
}

separator.thin:not([orient="vertical"]) {
  height: 0.5em;
}
separator.thin[orient="vertical"] {
  width: 0.5em;
}

separator.groove:not([orient="vertical"]) {
  border-top: 1px solid #A3A3A3;
  height: 0;
  margin-top: 0.4em;
  margin-bottom: 0.4em;
}
separator.groove[orient="vertical"] {
  border-left: 1px solid #A3A3A3;
  width: 0;
  margin-left: 0.4em;
  margin-right: 0.4em;
}

.plain {
  -moz-appearance: none;
  margin: 0 !important;
  border: none;
  padding: 0;
}

description,
label {
  cursor: default;
  margin-top: 1px;
  margin-bottom: 2px;
  margin-inline-start: 6px;
  margin-inline-end: 5px;
}

description {
  margin-bottom: 4px;
}

label[disabled="true"] {
  color: GrayText;
}

.tooltip-label {
  margin: 0;
}

.header {
  font-weight: bold;
}

.monospace {
  font-family: monospace;
}

.indent {
  margin-inline-start: 23px;
}

.box-padded {
  padding: 5px;
}

.spaced {
  margin: 3px 5px 4px;
}

.text-link {
  color: -moz-nativehyperlinktext;
  cursor: pointer;
}

.text-link:hover {
  text-decoration: underline;
}

.text-link:-moz-focusring {
  box-shadow: var(--focus-ring-box-shadow);
}

.toolbar-focustarget {
  -moz-user-focus: ignore !important;
}

notification > button {
  margin: 0 3px;
  padding: 1px 10px;
  min-width: 60px;
  min-height: 16px;
  -moz-appearance: none;
  border-radius: 10000px;
  border: @roundButtonBorder@;
  text-shadow: @loweredShadow@;
  color: @roundButtonColor@;
  background: @roundButtonBackground@;
  box-shadow: @roundButtonShadow@;
}

notification > button:active:hover {
  color: @roundButtonColor@;
  background: @roundButtonPressedBackground@;
  box-shadow: @roundButtonPressedShadow@;
}

notification > button:-moz-focusring {
  box-shadow: var(--focus-ring-box-shadow), @roundButtonShadow@;
}

notification > button:active:hover:-moz-focusring {
  box-shadow: var(--focus-ring-box-shadow), @roundButtonPressedShadow@;
}

notification > button > .button-box > .button-text {
  margin: 0 !important;
}

popupnotificationcontent {
  margin-top: .5em;
}

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

/* :::::: autoscroll popup ::::: */

.autoscroller {
  border: none;
  padding: 0;
  background-image: url("chrome://global/skin/icons/autoscroll.svg");
  background-size: contain;
  background-color: transparent;
  background-position: right top;
  background-repeat: no-repeat;
  -moz-appearance: none;
  -moz-window-shadow: none;
}

.autoscroller[scrolldir="NS"] {
  background-image: url("chrome://global/skin/icons/autoscroll-vertical.svg");
}

.autoscroller[scrolldir="EW"] {
  background-image: url("chrome://global/skin/icons/autoscroll-horizontal.svg");
}

/* autorepeatbuttons in menus */

.popup-internal-box > autorepeatbutton {
  height: 15px;
  position: relative;
  list-style-image: none;
  /* Here we're using a little magic.
   * The arrow button is supposed to overlay the scrollbox, blocking
   * everything under it from reaching the screen. However, the menu background
   * is slightly transparent, so how can we block something completely without
   * messing up the transparency? It's easy: The native theming of the
   * "menuitem" appearance uses CGContextClearRect before drawing, which
   * clears everything under it.
   * Without help from native theming this effect wouldn't be achievable.
   */
  -moz-appearance: menuitem;
}

.popup-internal-box > .autorepeatbutton-up {
  padding-top: 1px; /* 4px padding-top from the .popup-internal-box. */
  margin-bottom: -15px;
}

.popup-internal-box > .autorepeatbutton-up > .autorepeatbutton-icon {
  -moz-appearance: button-arrow-up;
}

.popup-internal-box > .autorepeatbutton-down {
  padding-top: 5px;
  margin-top: -15px;
}

.popup-internal-box > .autorepeatbutton-down > .autorepeatbutton-icon {
  -moz-appearance: button-arrow-down;
}

.popup-internal-box > autorepeatbutton[disabled="true"] {
  visibility: collapse;
}

/* :::::: Close button icons ::::: */

%include ../../shared/close-icon.inc.css
