/*
 * Copyright (c) 2012 Adobe Systems Incorporated. All rights reserved.
 * 
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * 
 *     http://www.apache.org/licenses/LICENSE-2.0
 * 
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

$baseColorLight: #494D4E /* Slate Gray */;
$baseColorDark: #3B3F41 /* Slate Gray */;
$selectedBg: rgba(0,0,0,.24) /* Slate Gray */;

@mixin prefixProperty($property, $value){
    -webkit-#{$property}: $value;
    -moz-#{$property}: $value;
    -ms-#{$property}: $value;
    -o-#{$property}: $value;
    #{$property}: $value;
}

@mixin prefixValue($property, $value){
    #{$property}: -webkit-#{$value};
    #{$property}: -moz-#{$value};
    #{$property}: -ms-#{$value};
    #{$property}: -o-#{$value};
    #{$property}: #{$value};
}

@mixin flexbox{
    @include prefixValue(display, box);
    /* Flex needs to be last, so that we use the new flex-box when it's available */
    /* FIXME: Disable the new flex box for now. It seems like stable versions of Chromium don't have the whole implementation yet. */
    /* @include prefixValue(display, flex); */
}

@mixin flex($value: 1){
    @include prefixProperty(flex, $value);
    @include prefixProperty(box-flex, $value);
}

@mixin noflex{
    @include prefixProperty(box-flex, 0);
	@include prefixProperty(flex, none);
}

@mixin hbox{
    @include flexbox;
    @include prefixProperty(box-orient, horizontal);
    @include prefixProperty(flex-direction, row);
}

@mixin vbox{
    @include flexbox;
    @include prefixProperty(box-orient, vertical);
    @include prefixProperty(flex-direction, column);
}

@mixin valign{
    @include prefixProperty(box-align, center);
}

@mixin align-end{
    @include prefixProperty(box-align, end);
    margin-bottom: 0;
}   

@mixin user-select($value: auto){
	-webkit-touch-callout: $value;
	-webkit-user-select: $value;
	-khtml-user-select: $value;
	-moz-user-select: $value;
	-ms-user-select: $value;
	user-select: $value;
}

@mixin northstar-bg{
    background: $baseColorDark url("../img/bg_dark.png");
    background-repeat: repeat-x;
}

@mixin list-reset{
    margin: 0;
    padding: 0;
    list-style: none;

    & > li{
        margin: 0;
        padding: 0;
    }
}

@mixin box-shadow{
    box-shadow: 0 3px 15px 3px rgba(0,0,0,.4);
}
