/**
 *   Box modifiers
 */
@box-margin:10px;
.abs{position:absolute;}
.rel{position:relative;}
.fit{top:0px;bottom:0px;left:0px;right:0px;}
.__cf{
  visibility: hidden;
  display: block;
  font-size: 0;
  content: " ";
  clear: both;
  height: 0;
}
.cf{
  &::after{
    .__cf
  }
}

p{
  margin-bottom: 15px;
  //border-bottom: 1px solid #eee;
  padding-bottom: 15px;
}

.ofh{overflow: hidden;}
.ofv{overflow:visible;}

.border-top(@color:@border-color,@size:@border-size,@type:@border-type){border-top: @color @size @type;}
.border-bottom(@color:@border-color,@size:@border-size,@type:@border-type){border-bottom: @color @size @type;}
.border-left(@color:@border-color,@size:@border-size,@type:@border-type){border-left: @color @size @type;}
.border-right(@color:@border-color,@size:@border-size,@type:@border-type){border-right: @color @size @type;}
.border(@color:@border-color,@size:@border-size,@type:@border-type){
  .border-top(@color,@size,@type);
  .border-bottom(@color,@size,@type);
  .border-left(@color,@size,@type);
  .border-right(@color,@size,@type);
}
.border-radius(@radius: 5px){-webkit-border-radius: @radius;-moz-border-radius: @radius;border-radius: @radius;}
.border-radius-custom(@topleft: 5px, @topright: 5px, @bottomleft: 5px, @bottomright: 5px){
  -webkit-border-radius: @topleft @topright @bottomright @bottomleft;
  -moz-border-radius: @topleft @topright @bottomright @bottomleft;
  border-radius: @topleft @topright @bottomright @bottomleft;
}

.brd-full,.brd{.border();}
.brd-top{.border-top();}
.brd-bottom{.border-bottom();}
.brd-green{.border(@green);}

.brd-grey-right{.border-right(@grey4);}
.brd-grey-left{.border-left(@grey4);}
.brd-grey-bottom{.border-bottom(@grey4);}
.brd-grey-top{.border-top(@grey4);}

.brd-separator-right{.border-right(@grey0,10px);}
.brd-separator-left{.border-left(@grey0,10px);}

.brd-blue-right{.border-right(@blue);}
.brd-blue-left{.border-left(@blue);}
.brd-blue-top{.border-top(@blue);}
.brd-blue-bottom{.border-bottom(@blue,2px);}
.brd-orange-bottom{.border-bottom(@orange,2px);}
.brd-green-bottom{.border-bottom(@green,2px);}
.brd-ui-top{.border-top(@solid-ui);};
.brd-solid-bottom{.border-bottom(@solid-ui,2px);}

.box-size(@mode:border-box){
  box-sizing:@mode;
  -moz-box-sizing:@mode;
}
.box-margin(@margin:@box-margin){
  margin:@margin;
}
.box-margin20{.box-margin(20px);}
.box-margin-auto{margin:auto;}


.hover{
  box-shadow: inset @black-shadow 0px 1000px 0px inset;
}
.active{
  box-shadow: inset  @black-shadow 0px 1000px 0px inset;top: 1px; left:1px;
}
.rounded{.white;}
.full-rounded{.border-radius(100px);}

.box-inline {
  display: inline-block;
  float: none !important;
}

.box-left{float:left;}
.box-right{float:right;}

.box-hauto{height:auto !important;}
.box-h{min-height:600px;}
.box-hmini{min-height:300px;}
.box-hlarge{min-height:900px;}

.box-mini{max-width: 500px;}
.box-medium{max-width: 900px;}
.box-large{max-width: 1200px;}

.box-padded{padding:15px;}
.box-padded-2x{padding:20px;}
.box-padding{padding-left:15px; padding-right: 15px;}
.box-vpadding{padding: 15px 0px;}
.box-vhpadding{padding: 40px 0px;}
.box-hpadding{padding:  0px 15px;}
.box-margin{margin:0 auto;}
.box-bmargin{margin-bottom:15px;}
.box-tmargin{margin-top: 15px;}
.box-lmargin{margin-left:15px;}
.box-rmargin{margin-right: 15px;}

.box-round{.border-radius(25px);}
.box-square{.border-radius(0px) !important;}
.box-round-bottom{.border-radius-custom(0px,0px,25px,25px);}
.box-round-top{.border-radius-custom(25px,25px,0px,0px);}

.box-elevation{box-shadow: 0px 9px 27px 0px rgba(0,0,0,0.2);}

.box-cf{
  &::after{.__cf};
}

.box-vcenter{
  .abs;
  top:50%;
  transform: translateY(-50%);
}
.box-hcenter{
  .abs;
  left:50%;
  transform: translateX(-50%);
}
.box-center{
  .abs;
  left:50%;
  top:50%;
  transform: translate(-50%,-50%);
}


.widget-alterned{
  .box-widget{
    .border-bottom();

    &:last-child{
      .border-bottom(@transparent);
    }
  }
}

.widget-bordered{
  .box-widget{
    .border-bottom();
  }
}

.box-widget{
  .rel;
  .box-size();
  padding: 10px;

  &.label{
    padding: 10px;
  }

  .widget-sub{
    .white;
    //.border-radius();
    .border(@grey0);

    &.hltop{
      .border-top(@main-color,3px);

      .gears-toolbar-dock.docked-title{
        padding:2px 10px;
        .t-mini;
        .colored;
        .abs;
        //.border-radius-custom(0px,0px,5px,5px);
        .t-lh(18px);

        top:0px;
        //width:50%;
        left:0px;
        left:50%;
        transform: translateX(-50%);

        &.left{
          left:20px;
          transform: none;
        }
      }
    }

    &.hlleft{
      .border-top(@main-color,3px);
      .border-left(@main-color);

      .gears-toolbar{
        .box-left;
        height:100% !important;
        width: 32px;
        .rel;
        .colored;

        .inner{
          .abs;
          .fit;
          min-width: 100%;
        }
      }

      .gears-toolbar-dock.docked-title{
        padding:2px 10px;
        .t-mini;
        .t-white;
        .abs;

        white-space: nowrap;
        //.border-radius-custom(0px,0px,5px,5px);
        .t-lh(18px);

        left: 0px;
        bottom: 15px;
        top: auto;
        transform: translateY(-50%) rotate(-90deg);

        &.left{
          left:20px;
          transform: none;
        }
      }
    }

    &>.gears-content{
      &>.inner{
        padding: 15px 20px;
      }
    }
  }
}

.box{
  .rel;

  i{
    &.icon-bg{
      .abs;
      opacity: 0.15;
      font-size: 100px;
    }
    &.icon-right{
      top: 20px;
      right: 20px;
    }
  }
}

.box-info{
  .t-mini;

 &.box-text{
   .border-bottom(@transparent);
   padding-left: 10px;
   padding-right: 10px;
   .t-black;
   white-space: normal;
   text-transform: none;
   .box-size;

   &.box-alternative{
     margin-top:20px;
     .t-center;
     margin-bottom:5px;
   }
 }
}

.box-feat{
  .t-mini;

  .radio{
    .box-widget{
      .box-title{
        margin-left: 24px;
        margin-top: -18px;
      }
      .box-content{
        white-space: normal;
      }
    }
  }

  .box-title{
    margin-bottom: 10px;
    .t-strong;
    .t-black;
    .t-normal;
  }
}

.box-sub {
  .rel;
  padding: 15px 20px;
  .white;
  .border-radius();
  .border(@grey0);
  //margin:10px -20px;
  .box-size();

  &.hltop{
    .border-top(@main-color,3px);
  }

  .title{
    padding:2px 10px;
    .t-mini;
    .colored;
    .abs;
    .border-radius-custom(0px,0px,5px,5px);

    top:0px;
    left:50%;
    transform: translateX(-50%);

    &.left{
      left:20px;
      transform: none;
    }
  }
}