/**
 * 通用模块化CSS
 * 目标为可复用
 */

/**
 * @brief 全局格式化 Global
 */
*,
*:before,
*:after{
    box-sizing: border-box;
}

body{
    margin: 0;
    padding: 0;
    font-size: 12px;
    font-family: "Microsoft YaHei", "Arial";
}

select{
    background-color: white;
    background-image: linear-gradient(white, #e7e7e7);
    border-radius: 0.3rem;
    border: 1px solid #b5b5b5;
    padding: 0.4rem 0;
    /* position: relative; */
    color: #5b5b5b;
}

select:after{
    content: "";
    border: 1rem solid red;
    top: 0;
    right: 0;
    width: 0;
    height: 0;
    position: absolute;
}

input[type="checkbox"].mac-checkbox{
    display: none;
}

input[type="checkbox"].mac-checkbox + label{
    display: inline-block;
    background-color: #eaa59d;
    color: white;
    font-size: 0.5rem;
    font-weight: bold;
    height: 1.2rem;
    line-height: 1.2rem;
    vertical-align: middle;
    position: relative;
    text-transform: uppercase;
    width: 2.5rem;
    border-radius: 1rem;
    box-shadow: 0 1px 1px 1px rgba(0,0,0,.3) inset;
}

input[type="checkbox"].mac-checkbox + label,
input[type="checkbox"].mac-checkbox + label i{
    transition: all .3s linear;
    -moz-transition: all .3s linear;
    -webkit-transition: all .3s linear;
    -o-transition: all .3s linear;
}

input[type="checkbox"].mac-checkbox:checked + label{
    background-color: #8ae89e;
}

input[type="checkbox"].mac-checkbox + label:before,
input[type="checkbox"].mac-checkbox + label:after,
input[type="checkbox"].mac-checkbox + label i{
    display: inline-block;
    height: 100%;
    text-align: center;
    width: 50%;
}

input[type="checkbox"].mac-checkbox + label:before{
    content: "on";
}

input[type="checkbox"].mac-checkbox + label:after{
    content: "off";
}

input[type="checkbox"].mac-checkbox + label i{
    top: 0;
    background-color: white;
    height: 1.2rem;
    width: 1.2rem;
    left: 0;
    position: absolute;
    border-radius: 100%;
    box-shadow: 0 0 1px 1px rgba(0,0,0,.3);
}

input[type="checkbox"].mac-checkbox:checked + label i{
    left: 1.3rem;
}

/**
 * @brief 组件 Component
 */

.inline{
    display: inline;
}

.progress{
    width: 100%;
    height: 2rem;
    box-sizing: border-box;
    margin-left: 0;
}

.progress > .bar{
    display: inline-block;
    background: #6ecff5;
    width: 100%;
    height: 100%;
    margin-left: 0;
}

.progress.red > .bar{
    background-color: #D93F3F;
}

.progress.green > .bar{
    background-color: #090;
}

.progress.blue > .bar{
    background-color: #00f;
}

.dialog{
    display: none;
}

/**
 * @brief 表单 Form
 */
.form{
    width: 100%;
    border: none;
    margin: 0;
    padding: 0.5rem 0.1rem;
}

.field{
    border: 1px solid #A9A9A9;
    border-top: none;
    border-radius: 0;
    padding: 1rem 0;
}

.field > label{
    text-align: right;
    font-size: 1rem;
    color: #555;
    width: 20%;
    display: inline-block;
}

.field > input{
    text-align: left;
    font-size: 1rem;
    color: #555;
    width: 70%;
    border: none;
    background-color: white;
}

.form .input{
    margin: 1.2rem auto;
    width: 100%;
    display: block;
    border-radius: 6px;
    border: none;
    box-shadow: 0 1px 2px 2px rgba(0,0,0,.3) inset;
    font-size: 1.2rem;
    text-align: left;
    padding: 0.6rem 0 0.5rem 1rem;
}

.field:first-child{
    border-radius: 4px 4px 0 0;
    border: 1px solid #A9A9A9;
}

.field:nth-child(4){
    border-radius: 0 0 4px 4px;
    border-bottom: 1px solid #A9A9A9;
}

.field:last-child{
    border-radius: 0 0 4px 4px;
}

.checkfield{
    margin: 1rem 0;
    padding: 0.1rem 0;
    color: #676767;
}

.checkfield span{
    vertical-align: bottom;
}

.checkfield a{
    color: #784A4A;
}

.radius{
    display: block;
    border-radius: 0;
    border-left: 1px solid #A4A4A4;
    border-right: 1px solid #A4A4A4;
    border-bottom: 1px solid #A4A4A4;
    text-decoration: none;
}

.radius:first-child{
    border-top-left-radius: 4px;
    border-top-right-radius: 4px;
    border-top: 1px solid #A4A4A4;
}

.radius:last-child{
    border-bottom-right-radius: 4px;
    border-bottom-left-radius: 4px;
    border-bottom: 1px solid #A4A4A4;
}

.radius-zone{
    border-radius: 4px;
    border: 1px solid #A4A4A4;
    padding: 0.1rem 0.3rem;
}

/**
 * @brief 按钮 Button
 */
.nav{
    background: #F4F4F4;
    border-bottom: 1px solid #CCC6B6;
    margin: 0;
    padding: 0;
}

.item{
    color: black;
    margin: 0 0 0 -0.335rem;
    padding: 1.3rem .2rem;
    display: inline-block;
    border-bottom-width: 2px;
    border-bottom-style: solid;
    border-bottom-color: transparent;
    /* font-size: 1rem; */
    border-right: 1px solid #E1E1E1;
    text-decoration: none;
    text-align: center;
}

.item.active{
    border-bottom-color: #D93F3F;
}

.nav > .item{
    width: 23.5%;
}

.groups{
    vertical-align: middle;
    display: inline-block;
    clear: both;
}

.groups:after{
    clear: both;
    content: "";
    display: block;
    height: 0;
    visibility: hidden;
    border-spacing: 0;
}

.group > .btn{
    margin: 0 0 0 -0.3rem;
    border: none;
    border-radius: 0;
    box-sizing: border-box;
    display: inline-block;
    cursor: pointer;
}

.btn{
    background-color: #CCC;
    border-radius: 3px;
    border: 1px solid gray;
    padding: 0.3rem 0.5rem;
    font-size: 1rem;
    text-decoration: none;
    color: black;
}

.btn.huge{
    font-size: 2rem;
    padding: 0.5rem 1rem;
}

.btn.radio{
    background-color: #ebebeb;
    padding: 1rem;
    border-bottom: 3px solid #c2c2c2;
    width: 30%;
}

.radio.checked{
    background-color: #D93F3F;
    border-color: #D93F3F;
    border-bottom: 3px solid #c2c2c2;
    color: white;
}

.btn.checkbox{
    width: 30%;
    padding: 1rem;
}

.checkbox.checked{
    border: 1px solid #D93F3F;
    position: relative;
}

.checkbox > .checked{
    position: absolute;
    float: right;
    bottom: 0;
    right: 0;
    color: white;
    z-index: 3;
}

.checkbox > .checked:after{
    border-top-color: transparent;
    border-right-color: #D93F3F;
    border-bottom-color: #D93F3F;
    border-left-color: transparent;
    border-style: solid;
    border-width: .8rem;

    content: "";
    width: 0;
    height: 0;
    position: absolute;
    left: -100%;
    bottom: 0;
    z-index: -1;
}

.btn.btn-radius-h{
    background: white;
    padding: 1rem;
    font-size: 1.2rem;
    border-radius: 0;
    border-top:1px solid #dadada;
    border-right:1px solid #dadada;
    border-bottom:1px solid #dadada;
}

.btn.btn-radius-h:first-child{
    border-radius: 4px 0 0 4px;
    border-left: 1px solid #dadada;
}

.btn.btn-radius-h:last-child{
    border-radius: 0 4px 4px 0;
}

.btn.btn-radius-h.checked{
    background-color: #D93F3F;
    color: white;
}

/**
 * @brief 布局 Layout
 */
.filled{
    width: 100%;
    display: block;
}

.none{
    display: none;
}

.left{
    float: left;
}

.right{
    float: right;
}

.unfloat{
    float: none !important;
}

.rows{
    width: 100%;
    margin: 0;
    padding: 0;
    border-bottom: 1px solid #ddd;
    clear: both;
    background: white;
    display: table;
}

.rows:first-child{
    border-top: 1px solid #ddd;
}

.rows:last-child{
    border-bottom: 1px solid #ddd;
}

.rows a{
    text-decoration: none;
}

.col{
    padding: 1rem;
    margin: 0;
    border-right: 1px solid #ddd;
    border-bottom: 1px solid #ddd;
    float: left;
    position: relative;
    background: white;
    display: table-cell;
    box-sizing: border-box;
}

.col2{
    width: 50% !important;
}

.col3{
    width: 33.333333% !important;
}

.col4{
    width: 25% !important;
}

.col5{
    width: 20% !important;
}

.col6{
    width: 16.666% !important;
}

.col7{
    width: 14.2857% !important;
}

.grid{
    width: 100%;
}

.grid1{
    width: 8.33333%;
    float: left;
}

.grid2{
    width: 16.66667%;
    float: left;
}

.grid3{
    width: 25%;
    float: left;
}

.grid4{
    width: 33.33333%;
    float: left;
}

.grid5{
    width: 41.66667%;
    float: left;
}

.grid6{
    width: 50%;
    float: left;
}

.grid7{
    width: 58.33333%;
    float: left;
}

.grid8{
    width: 66.66667%;
    float: left;
}

.grid9{
    width: 75%;
    float: left;
}

.grid10{
    width: 83.33333%;
    float: left;
}

.grid11{
    width: 91.66667%;
    float: left;
}

/**
 * @brief 字体
 */
.small{
    font-size: 0.8rem !important;
}

.normal{
    font-size: 1rem !important;
}

.large{
    font-size: 1.3rem;
}

.huge{
    font-size: 2rem;
}

.center{
    text-align: center;
}

.justify{
    text-align: justify;
}

.bold{
    font-weight: bold !important;
}

.middle{
    vertical-align: middle;
    text-align: center;
}

.text-left{
    text-align: left;
}

.text-right{
    text-align: right;
}

.red{
    color: #D93F3F;
}

.red.bg{
    background: #D93F3F;
    color: white;
}

.green{
    color: #090;
}

.green.bg{
    background: #090;
    color: white;
}

.blue{
    color: #4343f9;
}

.blue.bg{
    background: #4343f9;
    color: white;
}

.lightblue{
    color: #3f8bd9;
}

.lightblue.bg{
    background: #3f8bd9;
    color: white;
}

.yellow{
    color: #f8b440;
}

.yellow.bg{
    background-color: #f8b440;
    color: white;
}

.orange{
    color: #de4f00;
}

.orange.bg{
    background: #de4f00;
    color: white;
}

.gray{
    color: #666 !important;
}

.gray.bg{
    background: #666;
    color: black;
}

.lightgray{
    color: #DEDEDE;
}

.lightgray.bg{
    color: black;
    background-color: #DEDEDE;
}

.silver{
    color: #f1f2f6;
}

.silver.bg{
    background: #f1f2f6;
    color: black;
}

.white{
    color: white;
}

.white.bg{
    background: white;
    color: black;
}

.brown{
    color: #aba4ac;
}

.brown.bg{
    background: #aba4ac;
    color: white;
}

.black{
    color: #464646;
}

/**
 * @brief 杂项 MICS
 */
.compact{
    margin: 0 !important;
}

.blank{
    padding: 1rem;
}

.noborder:first-child,
.noborder:last-child,
.noborder{
    border: none !important;
}

.noborder:hover{
    cursor: pointer;
}

.pagination{
    display: block;
    width: auto;
    margin: 0.2rem auto;
    padding: 0;
    text-align: center;
    display: table;
}

.pagination .page{
    display: table-cell;
    background-color: white;
    border-radius: 0;
    border-top: 1px solid #999;
    border-right: 1px solid #999;
    border-bottom: 1px solid #999;
    margin: 0;
    padding: 0.3rem 0.5rem;
    font-size: 0.8rem;
    text-decoration: none;
    color: #233;
}

.pagination .page:first-child{
    border-left: 1px solid #999;
    border-radius: 0.3rem 0 0 0.3rem;
}

.pagination .page:last-child{
    border-radius: 0 0.3rem 0.3rem 0;
}

.pagination .page.cur{
    background-color: #D93F3F;
    border-left: none;
    border-right: none;
    color: white;
}

.split{
    display: block;
    height: 1px;
    border: none;
    border-top: 1px solid #CCC;
    width: 100%;
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
}

@media all and (max-width: 480px){
    body{
        font-size: 14px;
        font-size: 62.5%;
    }

    .btn.btn-radius-h{
        font-size: 1rem;
        padding: 0.3rem 0.5rem;
    }

    .field{
        padding: 0.1rem 0;
    }

    .rows .col{
        padding: 0.1rem 0.1rem;
    }

    .miniblock{
        display: block !important;
        text-align: center;
        width: 100%;
    }

    .btn.radio{
        padding: 0.2rem;
    }
}
