//
// Copyright (c) Tiny Technologies, Inc. All rights reserved.
// Licensed under the LGPL or a commercial license.
// For LGPL see License.txt in the project root for license information.
// For commercial licenses see https://www.tiny.cloud/
//

//
// Naked button
// Extends button.less and button-icon-less
// Note: button--naked is for removing button chrome on button--icon
//

@button-naked-icon-color: @text-color;

@button-naked-hover-background-color: @button-secondary-hover-background-color;
@button-naked-hover-border-color: @button-secondary-hover-border-color;
@button-naked-hover-box-shadow: @button-secondary-hover-box-shadow;
@button-naked-hover-icon-color: @button-secondary-hover-text-color;

@button-naked-disabled-background-color: @button-secondary-disabled-background-color;
@button-naked-disabled-border-color: @button-secondary-disabled-border-color;
@button-naked-disabled-box-shadow: @button-secondary-disabled-box-shadow;
@button-naked-disabled-icon-color: fade(@button-naked-icon-color, 50%);

@button-naked-focus-background-color: @button-naked-hover-background-color;
@button-naked-focus-border-color: @button-naked-hover-border-color;
@button-naked-focus-box-shadow: @button-naked-hover-box-shadow;
@button-naked-focus-icon-color: @button-naked-hover-icon-color;

@button-naked-active-background-color: @button-secondary-active-background-color;
@button-naked-active-border-color: @button-secondary-active-border-color;
@button-naked-active-box-shadow: @button-secondary-active-box-shadow;
@button-naked-active-icon-color: @button-secondary-active-text-color;

.tox {
  .tox-button--naked {
    background-color: transparent;
    border-color: transparent;
    box-shadow: unset;
    color: @button-naked-icon-color;

    &[disabled] {
      background-color: @button-naked-disabled-background-color;
      border-color: @button-naked-disabled-border-color;
      box-shadow: @button-naked-disabled-box-shadow;
      color: @button-naked-disabled-icon-color;
    }

    &:hover:not(:disabled) {
      background-color: @button-naked-hover-background-color;
      border-color: @button-naked-focus-border-color;
      box-shadow: @button-naked-hover-box-shadow;
      color: @button-naked-hover-icon-color;
    }

    &:focus:not(:disabled) {
      background-color: @button-naked-focus-background-color;
      border-color: @button-naked-focus-border-color;
      box-shadow: @button-naked-focus-box-shadow;
      color: @button-naked-focus-icon-color;
    }

    &:active:not(:disabled) {
      background-color: @button-naked-active-background-color;
      border-color: @button-naked-active-border-color;
      box-shadow: @button-naked-active-box-shadow;
      color: @button-naked-active-icon-color;
    }

    .tox-icon svg {
      fill: currentColor;
    }
  }

  .tox-button--naked.tox-button--icon {
    &:hover:not(:disabled) {
      color: @button-naked-hover-icon-color;
    }
  }
}
