 /**
  * ESUI (Enterprise Simple UI)
  * Copyright 2013 Baidu Inc. All rights reserved.
  *
  * @file 按钮样式
  * @author dbear
  */

/**
 * 基础按钮样式
 */
@import "mixin.less";
@import "variable.less";

.@{ui-class-prefix}-button {
    .user-select();
    overflow:hidden;
    cursor:pointer;

    .linear-gradient-background (top, #ffffff, #f6f6f6, #ffffff);
    border: 1px solid #CCC;
    font-size: 12px;
    text-align: center;
    color: #333;
    padding: 0 10px;
    vertical-align: top;
    .border-radius(2px, 2px, 2px, 2px);
    .interactive-cursor ();
    .inline-block();
    .box-sizing(content-box);

    &:before {
        content: '.';
        visibility: hidden;
        display: inline-block;
        width: 0;
    }

    height: 23px;
    line-height: 23px;
}

button.@{ui-class-prefix}-button {
    // IE7下不支持设置box-sizing，且显示属性是按照border-box的
    // 所以这里做下兼容
    *height: 25px;
}

/**
 * 基础按钮样式状态
 */
.@{ui-class-prefix}-button:hover {
     .interactive-cursor ();
 }
.@{ui-class-prefix}-button:active {
    border: 1px solid #BEBEBE;
    .linear-gradient-background (top, #f6f6f6, #ffffff, #f6f6f6);
}

.@{ui-class-prefix}-button-disabled {
    background: #f6f6f6;
    border-color: #cfcfcf;
    color: #999;
}

.@{ui-class-prefix}-button-lf-icon {
    float: left;
}

.@{ui-class-prefix}-button-rt-icon {
    float: right;
}

/** 春天系列 */
.@{skin-class-prefix}-spring-button,
.@{skin-class-prefix}-spring-add-button {
    border: 1px solid #519D30;
    color: white;
    font-weight: bold;
}
.@{skin-class-prefix}-spring-button {
    .linear-gradient-background (top, #6cbb4c, #519c30, #65b445);
    padding: 0 10px;
    height: 30px;
    line-height: 30px;
}


button.@{skin-class-prefix}-spring-button {
    // IE7下不支持设置box-sizing，且显示属性是按照border-box的
    // 所以这里做下兼容
    *height: 32px;
}


.@{skin-class-prefix}-spring-add-button {
    .linear-gradient-background-with-image (
        top, #6cbb4c, #519c30, url(../img/esui-button-plus.gif), 9px, center, #65b445);
    padding: 0 13px 0 27px;
}

.@{skin-class-prefix}-spring-button:active,
.@{skin-class-prefix}-spring-add-button:active {
    border: 1px solid #509c2f;
}
.@{skin-class-prefix}-spring-button:active {
    .linear-gradient-background (top, #519c30, #6cbb4c, #65b445);
}
.@{skin-class-prefix}-spring-add-button:active {
    .linear-gradient-background-with-image (
        top, #519c30, #6cbb4c, url(../img/esui-button-plus.gif), 9px, center, #65b445);
}

.@{skin-class-prefix}-spring-button:hover,
.@{skin-class-prefix}-spring-add-button:hover {
    border: 1px solid #157106;
}


/** 下载系列 */
.@{skin-class-prefix}-download-button {
    .linear-gradient-background-with-image (
        top, #FFF, #f6f6f6, url(../img/esui-btn-download.png), 40px, center, #65b445);
    padding-left: 12px;
    padding-right: 25px;
}
.@{skin-class-prefix}-download-button:active {
    .linear-gradient-background-with-image (
        top, #f6f6f6, #FFF, url(../img/esui-btn-download.png), 40px, center, #65b445);
}

/** 关闭layer按钮 */
.@{skin-class-prefix}-layerClose-button {
    .background(url(../img/esui.png), repeat, -37px, -88px, transparent);
    border: 0 none;
    height: 12px;
    overflow: hidden;
    position: absolute;
    right: 5px;
    top: 5px;
    width: 12px;
    padding: 0;
}
.@{skin-class-prefix}-layerClose-button:active {
    .background(url(../img/esui.png), repeat, -37px, -88px, transparent);
    border: 1px solid #f6f6f6;
    height: 12px;
    width: 12px;
    right: 4px;
    top: 4px;
}

/** 文字按钮 */
.@{skin-class-prefix}-link-button {
    background: none;
    border: 0 none;
    height: 26px;
    line-height: 26px;
    overflow: hidden;
}

button.@{skin-class-prefix}-link-button {
    *height: 28px;
}

.@{skin-class-prefix}-link-button:active,
.@{skin-class-prefix}-link-button:hover {
    background: none;
    border: 0 none;
    height: 26px;
    line-height: 26px;
    overflow: hidden;
    color: blue;
}

button.@{skin-class-prefix}-link-button:active,
button.@{skin-class-prefix}-link-button:hover {
    height: 28px;
}
