/* 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";

// Remove this class from buttons as soon as
// they have been refactored.
// Only use it for default HTML <button> elements
// Otherwise please keep with BrowserButton and
// this class is unecessary.
.normalizeButton {
  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;
}

.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: .12s opacity ease, .12s background ease;
  user-select: none;
  user-select: none;

  // Inhehit from global [*=Button] selector
  background: none;
  outline: none;
  border: none;
  margin: 0;
  white-space: nowrap;


  & + .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;
  }

  &.primaryButton,
  &.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,
  &.subtleButton,
  &.whiteButton {
    padding-right: 16px;
    padding-left: 16px;
  }

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

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

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

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

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