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

@import "variables.less";

button[class*="Button"] {
  background: none;
  outline: none;
  border: none;
  margin: 0;
  white-space: nowrap;
}

span.buttonSeparator {
  width: 1px;
  border-left: 1px solid #e2e2e2;
  margin: 4px 3px 4px 3px;
}

.menuButton {
  background-color: @buttonColor;
  display: inline-block;
  width: 20px;
  height: 13px;
  margin: 9px 4px 0 0;
  cursor: default;
  -webkit-mask-image: url('../img/toolbar/menu_btn.svg');
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-position: center;

  &:hover {
    background-color: black;
  }
}

.browserButton {
  cursor: default;
  display: inline-block;
  line-height: 25px;
  width: 25px;
  height: 25px;
  font-size: 13px;
  color: @buttonColor;
  border-radius: @borderRadius;
  margin: 0 3px;
  text-align: center;
  transition: .1s opacity, .1s background;
  user-select: none;
  -webkit-user-select: none;

  & + .browserButton {
    margin-left: 5px;
  }

  &:not([disabled]):hover {
    color: black;
  }

  &[disabled] {
    pointer-events: none;
    // prevent titleMode animation from overriding opacity
    animation: none !important;
    opacity: .25 !important;
  }

  &.smallButton {
    line-height: 18px;
    width: 18px;
    height: 18px;
    font-size: 24px;
  }

  &.primaryButton,
  &.actionButton,
  &.wideButton,
  &.subtleButton,
  &.whiteButton {
    color: #fff;
    line-height: 1.25;
    padding-top: 5px;
    padding-bottom: 5px;
    width: auto;
    height: auto;
    min-width: calc(@defaultFontSize * 6); // issue #6384
  }

  &.primaryButton,
  &.actionButton,
  &.subtleButton,
  &.whiteButton {
    padding-right: 16px;
    padding-left: 16px;
  }

  &.primaryButton {
    background: linear-gradient(@braveLightOrange, @braveOrange);
    border: 1px solid transparent;
    border-top: 1px solid @braveLightOrange;
    border-bottom: 1px solid @braveOrange;
    box-shadow: @buttonShadow;
    font-weight: 500;

    &:hover {
      border: 1px solid white;
      color: white;
      cursor: pointer;
    }
  }

  &.actionButton {
    background-color: #4099FF;
  }

  &.wideButton {
    width: auto;
    padding-right: 35px;
    padding-left: 35px;
  }

  &.whiteButton {
    background: linear-gradient(white, @lightGray);
    border: 1px solid white;
    box-shadow: @buttonShadow;
    cursor: pointer;
    color: @darkGray;

    &:hover {
      border: 1px solid @gray;
    }
  }

  &.inlineButton {
    display: inline;
  }

  &.subtleButton {
    background-color: #ccc;
    font-size: 14px;
  }
}

// for about:preferences
.prefBody {
  .settingsList > .settingItem + button,
  .settingItem > span + button,
  .paymentsContainer button:not(.close) {
    font-size: 0.9rem;
    padding: 8px 20px;
    margin: 0;
  }

  .settingsList > .settingItem + button {
    margin-top: 20px;
  }

  .settingItem > span + button {
    margin-top: 5px;
  }

  .paymentsContainer {
    .browserButton + .browserButton {
      margin-left: 8px;
    }
  }

}
