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

/**
 * Legacy `devtools-toolbarbutton` styles, extracted from common.css because
 * we're only using them in Style Editor,
 * and it makes maintaining the newer `devtools-button` styles easier.
 */

.devtools-toolbarbutton {
  appearance: none;
  background: transparent;
  border: none;
  border-radius: 2px;
  color: var(--theme-body-color);
  text-shadow: none;
  padding: 2px 6px;
  margin: 1px;
  white-space: nowrap;

  &[disabled] {
    opacity: 0.5 !important;
  }

  &:is([open],:hover,:hover:active) {
    background: var(--toolbarbutton-hover-background);
  }

  & .toolbarbutton-icon {
    width: 16px;
    height: 16px;
    -moz-context-properties: fill;
    fill: currentColor;
    color: var(--theme-icon-color);
    direction: ltr;
    font-size: 11px;
  }

  & > .toolbarbutton-icon {
    margin: 0 3px;
  }

  &[open=true] > .toolbarbutton-icon {
    color: var(--theme-icon-checked-color);
  }
}
