/*
 * 定义各浏览器显示一致的样式
 */
fieldset {
    border: 1px solid #c0c0c0;
    margin: 0 2px;
    padding: 0.35em 0.625em 0.75em;
}


/**
 * 1. 修正 IE 6-9 中颜色不能继承的问题
 * 2. 修正 Firefox3 中文字不换行的问题
 * 3. 修正 IE6-7 中怪异的对齐方式
 */
legend {
    border: 0 none; /* 1 */
    white-space: normal; /* 2 */
    *margin-left: -7px; /* 3 */
}


/**
 * 1. 修正所有浏览器中字体不继承的问题
 * 2. 修正所有浏览器中字号不继承的问题
 * 3. 修正 Firefox 3+， Safari5 和 Chrome 中外边距不同的问题
 * 4. 改善在所有浏览器下的垂直对齐方式
 */
button,
input,
select,
textarea {
    font-family: inherit; /* 1 */
    font-size: 100%; /* 2 */
    margin: 0; /* 3 */
    vertical-align: baseline; /* 4 */
    *vertical-align: middle; /* 4 */
}


/**
 * 统一 IE 8/9/10/11 `overflow`属性为visible
 */
input,
button {
    *overflow: visible;
}

/**
 * 重置按钮禁用时光标样式
 */
button[disabled],
input[disabled] {
    cursor: default;
}

/**
 * 1. 修正 IE 8/9 box-sizing 被设置为「content-box」的问题
 * 2. 移除 IE 8/9 中多余的内边距
 * 3. 移除 IE7 中多余的内边距(IE6 中任然存在)
 */
input[type="checkbox"],
input[type="radio"] {
    box-sizing: border-box; /* 1 */
    padding: 0; /* 2 */
    *height: 13px; /* 3 */
    *width: 13px; /* 3 */
}

/**
 * 1. 修正 Safari 5 和 Chrome 中「appearance」被设置为「searchfield」的问题
 * 2. 修正 Safari 5 和 Chrome 中「box-sizing」被设置为 「border-box」的问题
 */    
input[type="search"] {
    -webkit-appearance: textfield; /* 1 */
    -moz-box-sizing: content-box;
    -webkit-box-sizing: content-box; /* 2 */
    box-sizing: content-box;
}

/*
 * 去除FF3+内补丁和内边框
 */
button::-moz-focus-inner,
input::-moz-focus-inner {
    border:0;
    padding:0;
}

/**
 * 修正 Chrome 中 input [type="number"] 在特定高度和 font-size 时,
 * 下面一个箭头光标变成「cursor: text」
 * @demo: http://jsfiddle.net/FFXEc/
 * 动画演示：http://gtms04.alicdn.com/tps/i4/T18kd8FCtaXXc_FhcF-330-350.gif
 */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
    height: auto;
}


/*
 * 1. 让FF,S5,Chrome下的textarea只能纵向拉伸高度, 避免因拉伸而影响布局
 * 2. 去掉IE下默认的滚动条占位
 * 3. 默认textarea与文本baseline对齐，导致文本沉在下面比较难看，这里统一与文本顶对齐
 */
textarea {
    resize:vertical; /*1*/
    overflow:auto; /*2*/
    vertical-align:top; /*3*/
}


/**
 * 修正 Chrome 30- option 中文字无法显示的问题
 * http://jsbin.com/avujas/1/edit 
 */
select:disabled option:checked,
option:disabled:checked {
    color: #D2D2D2;
}


/**
 * label 元素给予手型，暗示此处可点击
 */
label {
    cursor: pointer;
}

/**
 * 统一 select 样式, Firefox 中有 padding:1px 0
 * http://jsbin.com/avujas/1/edit
 */
select[size],
select[multiple],
select[size][multiple] {
    border: 1px solid #AAA;
    padding:0;
}

/**
 * 重置默认按钮样式 “ui-btn”  可搭配iconfont使用 
 * <button class="ui-btn"><b class="iconfont">&#126;</b>提交</button>
 */
.ui-btn {
    -webkit-box-sizing: content-box;
    -moz-box-sizing: content-box;
    box-sizing: content-box;
    display: inline-block;
    border: 1px solid #ddd;
    *border: 0 none;
    -webkit-border-radius: 2px;
    -moz-border-radius: 2px;
    border-radius: 2px;
    *margin-right: .3em;
    margin-bottom: 0;
    padding: 0 10px;
    *padding: 1px 10px;
    width: auto;
    height: 21px;
    line-height: 21px;
    font-size: 12px;
    font-weight: bold;
    cursor: pointer;
    border-bottom-color: #bbb !important;
    background-color: #f4f4f4;
    background-image: -moz-linear-gradient(top, #f8f8f8, #eeeeee);
    background-image: -ms-linear-gradient(top, #f8f8f8, #eeeeee);
    background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#f8f8f8), to(#eeeeee));
    background-image: -webkit-linear-gradient(top, #f8f8f8, #eeeeee);
    background-image: -o-linear-gradient(top, #f8f8f8, #eeeeee);
    background-image: linear-gradient(top, #f8f8f8, #eeeeee);
    background-repeat: repeat-x;
    filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#f8f8f8', endColorstr='#eeeeee', GradientType=0);
}

.ui-btn,
.ui-btn:hover,
.ui-btn:visited {
    color: #333!important;
}

.ui-btn:hover {
    -webkit-box-shadow: none;
    -moz-box-shadow: none;
    box-shadow: none;
    background-color: #ededed;
    background-image: -moz-linear-gradient(top, #f2f2f2, #e6e6e6);
    background-image: -ms-linear-gradient(top, #f2f2f2, #e6e6e6);
    background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#f2f2f2), to(#e6e6e6));
    background-image: -webkit-linear-gradient(top, #f2f2f2, #e6e6e6);
    background-image: -o-linear-gradient(top, #f2f2f2, #e6e6e6);
    background-image: linear-gradient(top, #f2f2f2, #e6e6e6);
    background-repeat: repeat-x;
    filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#f2f2f2', endColorstr='#e6e6e6', GradientType=0);
}

.ui-btn:active {
    background-color: #ebebeb;
    background-image: -moz-linear-gradient(top, #e6e6e6, #f2f2f2);
    background-image: -ms-linear-gradient(top, #e6e6e6, #f2f2f2);
    background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#e6e6e6), to(#f2f2f2));
    background-image: -webkit-linear-gradient(top, #e6e6e6, #f2f2f2);
    background-image: -o-linear-gradient(top, #e6e6e6, #f2f2f2);
    background-image: linear-gradient(top, #e6e6e6, #f2f2f2);
    background-repeat: repeat-x;
    filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#e6e6e6', endColorstr='#f2f2f2', GradientType=0);
}


/**
 * 错误样式 “ui-btn ui-btn-error”
 */
.ui-btn-error {
    border-color: transparent;
    border-bottom-color: #c21b1b !important;
    background-color: #ff3636;
    background-image: -moz-linear-gradient(top, #ff4444, #ff2222);
    background-image: -ms-linear-gradient(top, #ff4444, #ff2222);
    background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ff4444), to(#ff2222));
    background-image: -webkit-linear-gradient(top, #ff4444, #ff2222);
    background-image: -o-linear-gradient(top, #ff4444, #ff2222);
    background-image: linear-gradient(top, #ff4444, #ff2222);
    background-repeat: repeat-x;
    filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff4444', endColorstr='#ff2222', GradientType=0);
}

.ui-btn-error,
.ui-btn-error:hover,
.ui-btn-error:visited {
    color: #FFF!important;
}

.ui-btn-error:hover {
    background-color: #e41b1b;
    background-image: -moz-linear-gradient(top, #ee2020, #d51314);
    background-image: -ms-linear-gradient(top, #ee2020, #d51314);
    background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ee2020), to(#d51314));
    background-image: -webkit-linear-gradient(top, #ee2020, #d51314);
    background-image: -o-linear-gradient(top, #ee2020, #d51314);
    background-image: linear-gradient(top, #ee2020, #d51314);
    background-repeat: repeat-x;
    filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ee2020', endColorstr='#d51314', GradientType=0);
}

.ui-btn-error:active {
    background-color: #df1819;
    background-image: -moz-linear-gradient(top, #d51314, #ee2020);
    background-image: -ms-linear-gradient(top, #d51314, #ee2020);
    background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#d51314), to(#ee2020));
    background-image: -webkit-linear-gradient(top, #d51314, #ee2020);
    background-image: -o-linear-gradient(top, #d51314, #ee2020);
    background-image: linear-gradient(top, #d51314, #ee2020);
    background-repeat: repeat-x;
    filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#d51314', endColorstr='#ee2020', GradientType=0);
}

/**
 * 警告样式 “ui-btn ui-btn-warning
 */
.ui-btn-warning {
    border-color: transparent;
    border-bottom-color: #cf370c !important;
    background-color: #ff4e00;
    background-image: -moz-linear-gradient(top, #ff5500, #ff4400);
    background-image: -ms-linear-gradient(top, #ff5500, #ff4400);
    background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ff5500), to(#ff4400));
    background-image: -webkit-linear-gradient(top, #ff5500, #ff4400);
    background-image: -o-linear-gradient(top, #ff5500, #ff4400);
    background-image: linear-gradient(top, #ff5500, #ff4400);
    background-repeat: repeat-x;
    filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5500', endColorstr='#ff4400', GradientType=0);
}

.ui-btn-warning,
.ui-btn-warning:hover,
.ui-btn-warning:visited {
    color: #FFF!important;
}

.ui-btn-warning:hover {
    background-color: #ef4000;
    background-image: -moz-linear-gradient(top, #ff4400, #d73900);
    background-image: -ms-linear-gradient(top, #ff4400, #d73900);
    background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ff4400), to(#d73900));
    background-image: -webkit-linear-gradient(top, #ff4400, #d73900);
    background-image: -o-linear-gradient(top, #ff4400, #d73900);
    background-image: linear-gradient(top, #ff4400, #d73900);
    background-repeat: repeat-x;
    filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff4400', endColorstr='#d73900', GradientType=0);
}

.ui-btn-warning:active {
    background-color: #e73d00;
    background-image: -moz-linear-gradient(top, #d73900, #ff4400);
    background-image: -ms-linear-gradient(top, #d73900, #ff4400);
    background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#d73900), to(#ff4400));
    background-image: -webkit-linear-gradient(top, #d73900, #ff4400);
    background-image: -o-linear-gradient(top, #d73900, #ff4400);
    background-image: linear-gradient(top, #d73900, #ff4400);
    background-repeat: repeat-x;
    filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#d73900', endColorstr='#ff4400', GradientType=0);
}



/**
 * 主要样式 “ui-btn ui-btn-primary
 */
.ui-btn-primary {
    border-color: transparent;
    border-bottom-color: #0960ab !important;
    background-color: #4288c5;
    background-image: -moz-linear-gradient(top, #488fcd, #3a7db8);
    background-image: -ms-linear-gradient(top, #488fcd, #3a7db8);
    background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#488fcd), to(#3a7db8));
    background-image: -webkit-linear-gradient(top, #488fcd, #3a7db8);
    background-image: -o-linear-gradient(top, #488fcd, #3a7db8);
    background-image: linear-gradient(top, #488fcd, #3a7db8);
    background-repeat: repeat-x;
    filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#488fcd', endColorstr='#3a7db8', GradientType=0);
}

.ui-btn-primary,
.ui-btn-primary:hover,
.ui-btn-primary:visited {
    color: #FFF!important;
}

.ui-btn-primary:hover {
    background-color: #3579b5;
    background-image: -moz-linear-gradient(top, #4087c6, #25659c);
    background-image: -ms-linear-gradient(top, #4087c6, #25659c);
    background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#4087c6), to(#25659c));
    background-image: -webkit-linear-gradient(top, #4087c6, #25659c);
    background-image: -o-linear-gradient(top, #4087c6, #25659c);
    background-image: linear-gradient(top, #4087c6, #25659c);
    background-repeat: repeat-x;
    filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#4087c6', endColorstr='#25659c', GradientType=0);
}

.ui-btn-primary:active {
    background-color: #3073ad;
    background-image: -moz-linear-gradient(top, #25659c, #4087c6);
    background-image: -ms-linear-gradient(top, #25659c, #4087c6);
    background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#25659c), to(#4087c6));
    background-image: -webkit-linear-gradient(top, #25659c, #4087c6);
    background-image: -o-linear-gradient(top, #25659c, #4087c6);
    background-image: linear-gradient(top, #25659c, #4087c6);
    background-repeat: repeat-x;
    filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#25659c', endColorstr='#4087c6', GradientType=0);
}

.ui-btn-disabled {
    border: 1px solid #e0e0e0;
    border-bottom-color: #ccc !important;
    cursor: default;
}

.ui-btn-disabled,
.ui-btn-disabled:hover,
.ui-btn-disabled:visited {
    color: #ccc !important;
    background-color: #ededed;
    background-image: -moz-linear-gradient(top, #f2f2f2, #e6e6e6);
    background-image: -ms-linear-gradient(top, #f2f2f2, #e6e6e6);
    background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#f2f2f2), to(#e6e6e6));
    background-image: -webkit-linear-gradient(top, #f2f2f2, #e6e6e6);
    background-image: -o-linear-gradient(top, #f2f2f2, #e6e6e6);
    background-image: linear-gradient(top, #f2f2f2, #e6e6e6);
    background-repeat: repeat-x;
    filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#f2f2f2', endColorstr='#e6e6e6', GradientType=0);
}

/**
 * 按钮组合
 */
.ui-btn-group{
    overflow: hidden;
}
.ui-btn-group .ui-btn {
    float: left;
    margin: 0;
    -webkit-border-radius: 0;
    -moz-border-radius: 0;
    border-radius: 0;
    border-left-width: 0;
}

.ui-btn-group .ui-btn:first-child {
    border-left-width: 1px;
    -webkit-border-radius: 2px 0 0 2px;
    -moz-border-radius: 2px 0 0 2px;
    border-radius: 2px 0 0 2px;
}

.ui-btn-group .ui-btn:last-child {
    -webkit-border-radius: 0 2px 2px 0;
    -moz-border-radius: 0 2px 2px 0;
    border-radius: 0 2px 2px 0;
}

/**
 * 按钮尺寸
 */
.ui-btn-xlarge {
    padding: 0 20px;
    height: 43px;
    line-height: 43px;
    font-size: 18px;
}

.ui-btn-xlarge .iconfont {
    font-size: 18px!important;
}

.ui-btn-large {
    padding: 0 20px;
    height: 38px;
    line-height: 38px;
    font-size: 14px;
}

.ui-btn-medium {
    height: 28px;
    line-height: 28px;
    padding: 0 20px;
}

.ui-btn-small {
    height: 26px;
    line-height: 26px;
    padding: 0 20px;
}

.ui-btn-xsmall {
    height: 23px;
    line-height: 23px;
}

.ui-btn-block {
    display: block;
    width: 100%;
    padding-right: 0;
    padding-left: 0;
}

.ui-btn .iconfont {
    font-size: 12px;
    font-weight: normal;
    margin-right: 5px;
}

.ui-btn-small .iconfont {
    font-size: 14px;
}

.ui-btn-medium .iconfont,
.ui-btn-large .iconfont {
    font-size: 16px;
}

