/**
 * Variables
 */
// Colors
@color_links:       #2ab6d6;                                    // Links / Main theme colour
@color_alt:         #f37324;
@color_body:        darken(desaturate(@color_links,56%),26%);   // Body Copy
@border_main:       @bg_light - #111;                           // The 1px grey rules used throughout the WF
@bg_light:          lighten(desaturate(@color_links,95%),47%);
@bg_dark:           #d3d3d3;
@success:           #89b93f;
@info:              #3c8bae;
@error:             #e01c1f;

// Fonts
@sans:              "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif;
@serif:             Georgia, serif;
// Google fonts - These are also defined in Theme Setup (theme-actions.php)
@sans_google:       "Droid Sans", sans-serif;
@serif_google:      "Droid Serif", sans-serif;
// Paths
@imagepath:         'images';
@fontpath:          'includes/fonts/';

// FUNCTIONS
.iconafter() {
    font-family: 'FontAwesome';
    display: inline-block;
    font-size:100%;
    margin-left:.618em;
    font-weight: normal;
    line-height: 1em;
    width:1em;
}

.iconbefore() {
    font-family: 'FontAwesome';
    display: inline-block;
    font-size:100%;
    margin-right:.618em;
    font-weight: normal;
    line-height: 1em;
    width:1em;
}

.content() {
    background: @bg_light + #111;
    //.box_shadow;
    .border_radius;
    padding:1em;
}

// MIXINS
.clearfix() {
	&:after {
		content: "\0020";
		display: block;
		height: 0;
		overflow: hidden;
		clear: both;
	}
}
.border_radius(@radius:.382em)
{
    -webkit-border-radius:@radius;
    border-radius:@radius;
    -moz-background-clip: padding; -webkit-background-clip: padding-box; background-clip: padding-box;
}

.border_radius_right(@radius:.382em)
{
    -webkit-border-top-right-radius: @radius;
    -webkit-border-bottom-right-radius: @radius;
    border-top-right-radius: @radius;
    border-bottom-right-radius: @radius;
    -moz-background-clip: padding; -webkit-background-clip: padding-box; background-clip: padding-box;
}

.border_radius_left(@radius:.382em)
{
    -webkit-border-top-left-radius: @radius;
    -webkit-border-bottom-left-radius: @radius;
    border-top-left-radius: @radius;
    border-bottom-left-radius: @radius;
    -moz-background-clip: padding; -webkit-background-clip: padding-box; background-clip: padding-box;
}

.border_radius_bottom(@radius:.382em)
{
    -webkit-border-bottom-left-radius: @radius;
    -webkit-border-bottom-right-radius: @radius;
    border-bottom-left-radius: @radius;
    border-bottom-right-radius: @radius;
    -moz-background-clip: padding; -webkit-background-clip: padding-box; background-clip: padding-box;
}

.border_radius_top(@radius:.382em)
{
    -webkit-border-top-left-radius: @radius;
    -webkit-border-top-right-radius: @radius;
    border-top-left-radius: @radius;
    border-top-right-radius: @radius;
    -moz-background-clip: padding; -webkit-background-clip: padding-box; background-clip: padding-box;
}

.box_shadow(@shadow_x:0px, @shadow_y:1px, @shadow_rad:1px, @shadow_in:0px, @shadow_color:rgba(0,0,0,0.15))
{
    box-shadow:@shadow_x @shadow_y @shadow_rad @shadow_in @shadow_color;
    -webkit-box-shadow:@shadow_x @shadow_y @shadow_rad @shadow_in @shadow_color;
}

.inset_box_shadow(@shadow_x:3px, @shadow_y:3px, @shadow_rad:3px, @shadow_in:3px, @shadow_color:#888)
{
    box-shadow:inset @shadow_x @shadow_y @shadow_rad @shadow_in @shadow_color;
    -webkit-box-shadow:inset @shadow_x @shadow_y @shadow_rad @shadow_in @shadow_color;
}

.text_shadow(@shadow_x:3px, @shadow_y:3px, @shadow_rad:3px, @shadow_color:#fff)
{
    text-shadow:@shadow_x @shadow_y @shadow_rad @shadow_color;
}

.vertical_gradient(@from: #000, @to: #FFF) {
	background-color: @from;
	background-image: -webkit-gradient(linear, left top, left bottom, from(@from), to(@to)); /* Saf4+, Chrome */
	background-image: -webkit-linear-gradient(top, @from, @to); /* Chrome 10+, Saf5.1+, iOS 5+ */
	background-image:    -moz-linear-gradient(top, @from, @to); /* FF3.6+ */
	background-image:     -ms-linear-gradient(top, @from, @to); /* IE10 */
	background-image:      -o-linear-gradient(top, @from, @to); /* Opera 11.10+ */
	background-image:         linear-gradient(to bottom, @from, @to);
}

.transition(@selector:all, @animation:ease-in-out, @duration:.2s) {
    -webkit-transition:@selector @animation @duration;
    -moz-transition:@selector @animation @duration;
    -ms-transition:@selector @animation @duration;
    -o-transition:@selector @animation @duration;
    transition:@selector @animation @duration;
}

.opacity(@opacity:0.75) {
    opacity: @opacity;
    filter:~"alpha(opacity=@opacity * 100)";
}

.rotate(@degree:1deg) {
	-webkit-transform: rotate(@degree);  /* Saf3.1+, Chrome */
	-moz-transform: rotate(@degree);  /* FF3.5+ */
	-ms-transform: rotate(@degree);  /* IE9 */
	-o-transform: rotate(@degree);  /* Opera 10.5 */
	transform: rotate(@degree);
	zoom: 1;
}

.scale(@ratio:1.5){
  -webkit-transform:scale(@ratio);
  -moz-transform:scale(@ratio);
  -ms-transform:scale(@ratio);
  -o-transform:scale(@ratio);
  transform:scale(@ratio);
}

.radial_gradient(@from: #000, @to: #FFF) {
	background: @from;
    background: -webkit-gradient(radial, 50% 10%, 0, 50% 10%, 1000, from(@from), to(@to));
    background: -moz-radial-gradient(center top, @from 0%, @to 100%);
}

.borderbox () {
	-webkit-box-sizing: border-box; /* Safari/Chrome, other WebKit */
    -moz-box-sizing: border-box;    /* Firefox, other Gecko */
    box-sizing: border-box;         /* Opera/IE 8+ */
}

// ANIMATIONS
@-webkit-keyframes spin-360 {
    from { .rotate(0); }
    50% { .rotate(180deg); }
    to { .rotate(0); }
}
@-webkit-keyframes popin {
    from { .scale(0); }
    60% { .scale(0.005); }
    95% { .scale(1.05); }
    to { .scale(1); }
}
@-webkit-keyframes salepulse {
    from { .scale(1); }
    70% { .scale(1.1); }
    to { .scale(1); }
}
@-webkit-keyframes glowbutton {
    from { background-color:@color_links; }
    50% { background-color:@color_links + #222; }
    to { background-color:@color_links; }
}
@-webkit-keyframes slidedown {
    from { top:-500px; }
    95% { top:1em; }
    to { top:0; }
}