/*
 * Copyright (c) 2008-2016 Haulmont.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *
 */

@mixin halo-cuba-contextmenu-button($primary-stylename: c-cm-button) {
  .#{$primary-stylename} {
    @include valo-button-static-style;
    @include valo-button-style($font-color: $v-button-font-color);
    @include valo-button-borderless-style;

    line-height: $v-selection-item-height;
    padding: 0 $v-selection-item-padding-horizontal*2 0 $v-selection-item-padding-horizontal;
    border-radius: $v-selection-item-border-radius;
    font-weight: $v-selection-item-font-weight;
    white-space: nowrap;
    height: $v-selection-item-height;
    display: block; // Firefox 24 needs this to make position: relative; work

    text-decoration: none;
    text-align: left;

    outline: none;
  }

  .#{$primary-stylename} {
    &:after {
      top: 0;
      bottom: 0;
      left: 0;
      right: 0;
    }
  }

  .#{$primary-stylename}:focus {
    &:after {
      @include box-shadow(none);
    }
  }

  .#{$primary-stylename}.#{$primary-stylename}-selected {
    @include valo-selection-item-selected-style;
  }

  .#{$primary-stylename}-selected.v-disabled {
    color: inherit;
    background: transparent;
  }
}