//@brand-color
//@accent-1-color
//@accent-2-color


@star-rating-color:       @brand-color;
@like-color:              #fb4b79;
@shadow-color:            #d9dadb;
@code-color:              #4a90e2;
@code-bg:                 #e0efff;
@click:                   #98a6ad;
@yes-color:               #649127;
@no-color:                #d70954;
@azure:                   azure;
@bg-azure:                #d9edf7;
@azure-color:             #31708f;

@taxonomy-in-store:       #29b6f6;
@taxonomy-ending:         #ffd740;
@bg-purple:               #7e57c2;


@white-darker:            #e5e5e5;
@white-dark:              #f0f0f0;
@white:                   #f5f5f5;
@white-light:             #f8f8f8;
@white-lighter:           #ffffff;


@gray-darker:            #999;
@gray-dark:              #aaa;
@gray:                   #bbb;
@gray-light:             #ccc;
@gray-lighter:           #ddd;


@black-darker:            #000;
@black-dark:              #222;
@black:                   #333;
@black-light:             #666;
@black-lighter:           #888;


@font-size-small:         11px;
@font-size-base:          15px;
@font-size-large:         18px;


@menu-height:   62px;
@menu-height-top:   83px;
@menu-item-v-padding:   15px;
@menu-item-h-padding: 21px;

@secondary-menu-height:   33px;
@secondary-menu-item-v-padding:   0px;
@secondary-menu-item-h-padding: 15px;

@input-height: 40px;
@input-padding: 10px;


// 2009 flexbox syntax https://www.w3.org/TR/2009/WD-css3-flexbox-20090723/
.vendor(@property, @value) when (@property = display) and (@value = flex) {
    display: -webkit-box;
}
.vendor(@property, @value) when (@property = display) and (@value = inline-flex) {
    display: -webkit-inline-box;
}
.vendor(@property, @value) when (@property = align-items)  {
    -webkit-box-align: @value;
}

.vendor(@property, @value) when (@property = align-items) and (@value = flex-start) {
    -webkit-box-align: start;
}

.vendor(@property, @value) when (@property = align-items) and (@value = flex-end) {
    -webkit-box-align: end;
}

.vendor(@property, @value) when (@property = justify-content)  {
    -webkit-box-pack: @value;
    -moz-box-pack: @value;
}

.vendor(@property, @value) when (@property = justify-content) and (@value = flex-start)  {
    -webkit-box-pack: start;
    -moz-box-pack: start;
}

.vendor(@property, @value) when (@property = justify-content) and (@value = flex-end)  {
    -webkit-box-pack: end;
    -moz-box-pack: end;
}

.vendor(@property, @value) when (@property = justify-content) and (@value = space-between)  {
    -webkit-box-pack: justify;
    -moz-box-pack: justify;    
}

.vendor(@property, @value) when (@property = order) {
    -webkit-box-ordinal-group: @value + 1;
    -moz-box-ordinal-group: @value + 1;
    -ms-box-ordinal-group: @value + 1;
    -o-box-ordinal-group: @value + 1;
    box-ordinal-group: @value + 1;    
}

.vendor(@property, @value) when (@property = flex-direction) and (@value = row)  {
    -webkit-box-orient: horizontal;
    -moz-box-orient: horizontal;
    -ms-box-orient: horizontal;
    -o-box-orient: horizontal;
    box-orient: horizontal;   
}
.vendor(@property, @value) when (@property = flex-direction) and (@value = row-reverse)  {
    -webkit-box-orient: horizontal;
    -moz-box-orient: horizontal;
    -ms-box-orient: horizontal;
    -o-box-orient: horizontal;
    box-orient: horizontal;
    -webkit-box-direction: reverse;
    -moz-box-direction: reverse;
    -ms-box-direction: reverse;
    -o-box-direction: reverse;
    box-direction: reverse;
}
.vendor(@property, @value) when (@property = flex-direction) and (@value = column)  {
    -webkit-box-orient: vertical;
    -moz-box-orient: vertical;
    -ms-box-orient: vertical;
    -o-box-orient: vertical;
    box-orient: vertical;
}
.vendor(@property, @value) when (@property = flex-direction) and (@value = column-reverse)  {
    -webkit-box-orient: vertical;
    -moz-box-orient: vertical;
    -ms-box-orient: vertical;
    -o-box-orient: vertical;
    box-orient: vertical;
    -webkit-box-direction: reverse;
    -moz-box-direction: reverse;
    -ms-box-direction: reverse;
    -o-box-direction: reverse;
    box-direction: reverse;
}

.vendor(@property, @value) when (@property = flex-wrap) and (@value = wrap) {
    -webkit-lines: multiple;
    -webkit-box-lines: multiple;
    -moz-box-lines: multiple;
    -ms-box-lines: multiple;
    -o-box-lines: multiple;
    box-lines: multiple;
}

.vendor(@property, @value) when (@property = flex-wrap) and (@value = wrap-reverse) {
    -webkit-lines: multiple;
    -webkit-box-lines: multiple;
    -moz-box-lines: multiple;
    -ms-box-lines: multiple;
    -o-box-lines: multiple;
    box-lines: multiple;
    -webkit-box-direction: reverse;
    -moz-box-direction: reverse;
    -ms-box-direction: reverse;
    -o-box-direction: reverse;
    box-direction: reverse;
}

.vendor(@property, @value) when (@property = flex-wrap) and (@value = nowrap) {    
    -webkit-lines: single;
    -webkit-box-lines: single;
    -moz-box-lines: single;
    -ms-box-lines: single;
    -o-box-lines: single;
    box-lines: single;
}

.vendor(@property, @value) when (@property = align-items) and (@value = flex-start) {    
    -webkit-box-align: start;
    -moz-box-align: start;
    -ms-box-align: start;
    -o-box-align: start;
    box-align: start;
}

.vendor(@property, @value) when (@property = align-items) and (@value = flex-end) { 
    -webkit-box-align: end;
    -moz-box-align: end;
    -ms-box-align: end;
    -o-box-align: end;
    box-align: end;
}

.vendor(@property, @value) when (@property = align-items) and (@value = center), (@property = align-items) and (@value = baseline), (@property = align-items) and (@value = stretch){
    -webkit-box-align: @value;
    -moz-box-align: @value;
    -ms-box-align: @value;
    -o-box-align: @value;
    box-align: @value;
}

.vendor(@property, @value) when (@property = flex-grow)  {
    -webkit-box-flex: @value;
}


// 2012 flexbox syntax https://www.w3.org/TR/2012/WD-css3-flexbox-20120322/
.vendor(@property, @value) when (@property = display) and (@value = flex) {
    display: -ms-flexbox;
}

.vendor(@property, @value) when (@property = align-items)  {
    -ms-flex-align: @value;
}

.vendor(@property, @value) when (@property = align-items) and (@value = flex-start) {
    -ms-flex-align: start;
}

.vendor(@property, @value) when (@property = align-items) and (@value = flex-end) {
    -ms-flex-align: end;
}

.vendor(@property, @value) when (@property = align-content) and (@value = flex-start)  {
    -ms-flex-line-pack: start;
}

.vendor(@property, @value) when (@property = align-content) and (@value = flex-end)  {
    -ms-flex-line-pack: end;
}

.vendor(@property, @value) when (@property = align-content) and (@value = space-between)  {
    -ms-flex-line-pack: justify;
}

.vendor(@property, @value) when (@property = align-content) and (@value = space-around)  {
    -ms-flex-line-pack: distribute;
}

.vendor(@property, @value) when (@property = align-content) and (@value = center), (@property = align-content) and (@value = stretch)  {
    -ms-flex-line-pack: @value;
}

.vendor(@property, @value) when (@property = justify-content)  {
    -ms-flex-pack: @value;
}

.vendor(@property, @value) when (@property = justify-content) and (@value = flex-start)  {
    -ms-flex-pack: start;
}

.vendor(@property, @value) when (@property = justify-content) and (@value = flex-end)  {
    -ms-flex-pack: end;
}

.vendor(@property, @value) when (@property = justify-content) and (@value = space-between)  {
    -ms-flex-pack: justify;
}

.vendor(@property, @value) when (@property = justify-content) and (@value = space-around)  {
    -ms-flex-pack: distribute;
}

.vendor(@property, @value) when (@property = order) {
    -ms-flex-order: @value;
}

.vendor(@property, @value) when (@property = align-items) and (@value = flex-start) { 
    -ms-flex-align: start;
}

.vendor(@property, @value) when (@property = align-items) and (@value = flex-end) { 
    -ms-flex-align: end;
}

.vendor(@property, @value) when (@property = align-items) and (@value = center), (@property = align-items) and (@value = baseline), (@property = align-items) and (@value = stretch){
    -ms-flex-align: @value;
}

.vendor(@property, @value) when (@property = align-self) and (@value = flex-start) { 
    -ms-flex-item-align: start;
    flex-item-align: start;
}

.vendor(@property, @value) when (@property = align-self) and (@value = flex-end) {
    -ms-flex-item-align: end;
    flex-item-align: end;
}

.vendor(@property, @value) when (@property = align-self) and (@value = auto), (@property = align-self) and (@value = center), (@property = align-items) and (@value = baseline), (@property = align-items) and (@value = stretch){
    -ms-flex-item-align: @value;
    flex-item-align: @value;
}


.vendor(@property, @value) when (isstring(@value) = false) {
    -webkit-@{property}: @value;
    -khtml-@{property}: @value;
    -moz-@{property}: @value;
    -ms-@{property}: @value;
    @{property}: @value;
}

.vendor(@property, @value) when (isstring(@value) = true) {
    -webkit-@{property}: e(@value);
    -khtml-@{property}: e(@value);
    -moz-@{property}: e(@value);
    -ms-@{property}: e(@value);
    @{property}: e(@value);
}




.more-button(@color, @bg_color, @br_color, @offset) {
    display: block;
    font-weight: 500;
    letter-spacing: 0;
    background-color: @bg_color;    
    color: @color;
    outline: 0;
    outline-offset: 0;
    width: auto;
    box-sizing: border-box;
    text-align: center;
    white-space: nowrap;
    vertical-align: middle;
    .vendor(touch-action, manipulation);
    cursor: pointer;
    .vendor(user-select, none);
    background-image: none;
    margin: 0;
    text-decoration: none;
    text-transform: none;
    padding: 0 @offset;
    border: none;
    position: relative;
    .vendor(transition, all 0.2s linear 0s);
    border: 1px solid @br_color;
    border-radius: 3px;
    line-height: 34px;
    display: block;
    overflow: hidden;
    font-size: @font-size-base - 1px;
    z-index: 1;
    max-width: 160px;
    height: 36px;
    margin: 0 auto;
    position: relative;
    &:focus {
        outline: 0;
        outline-offset: 0;
    }
}

.button(@color, @bg_color) {
    font-family: "@{google-font-family-1}";
    font-size: @font-size-base - 1;
    font-weight: 400;
    text-transform: Capitalize;
    background-color: @bg_color;    
    color: @color;
    outline: 0;
    outline-offset: 0;
    display: inline-block;
    width: auto;
    box-sizing: border-box;
    text-align: center;
    white-space: nowrap;
    vertical-align: middle;
    .vendor(touch-action, manipulation);
    cursor: pointer;
    .vendor(user-select, none);
    background-image: none;
    margin: 0;
    text-decoration: none;
    box-shadow: none;
    padding: 0 @font-size-base;
    border: none;
    border-radius: 3px !important;
    position: relative;
    line-height: @input-height;
    &:focus {
        outline: 0;
        outline-offset: 0;
    }
}

.solid-hover-button(@color, @bg_color) {
    .button(@color, transparent);
    border: 1px solid @color;    
    line-height: @input-height - 2px;
    .vendor(transition, all .3s);
    &:hover, &:focus {
        color: @white-lighter;
        background-color: @bg_color;
        border: 1px solid @bg_color;
    }
}

.hover-button(@color, @bg_color) {
    .button(@color, transparent);
    border: 1px solid @color;
    line-height: @input-height - 2px;
    .vendor(transition, all .3s);
    &:hover, &:focus {
        color: @bg_color;
        border: 1px solid @bg_color;
    }
}

.container-width() {
    @media (min-width: 786px) {
        max-width: 750px !important;
    }

    @media (min-width: 992px) {
        max-width: 970px !important;
    }

    @media (min-width: 1200px) {
        max-width: 1170px !important;
    }
    @media (min-width: 1370px) {
        max-width: 1340px !important;
    }
}

.container() {
    margin-left: auto !important;
    margin-right: auto !important;
    box-sizing: border-box;    
    @media (max-width: 786px) {
        padding-right: 15px !important;
        padding-left: 15px !important;
    }
    .container-width();
}

.table(@padding) {
    border-spacing: 0;
    border-width: 1px 0 0 1px;    
    table-layout: auto;
    width: 100%;
    caption {
        margin-bottom: 18px;
        color: @black-darker;
        line-height: 1;
    }
    thead {
        background-color: @black-dark;
        text-transform: uppercase;
        font-family: "@{google-font-family-1}", sans-serif;
        color: @white-lighter;
        font-size: @font-size-small + 2;
        font-weight: 600;
        tr {
            th, td {
                padding: @padding;
                border: 1px solid @white-dark;
            }
        }
    }
    tbody {
        tr {
            th, td {
                padding: @padding;
                border: 1px solid @white-dark;
                a {                                
                    color: @brand-color;
                }
            }
        }
    }
    tfoot {
        tr {
            th, td {
                padding: @padding;
                border: 1px solid @white-dark;
                a {
                    color: @brand-color;
                }
            }
        }
    }
}

.social-bg-colors() {
    &.fa-facebook {
        background-color: #469;
        &:hover {
            background-color: #6c8dbe;
        }
        &:active {
            background-color: #8fa8cd;
        }  
    }
    &.fa-twitter {
        background-color: #09f;
        &:hover {
            background-color: #4db8ff;
        }
        &:active {
            background-color: #80ccff;
        }
    }
    &.fa-pinterest {
        background-color: #c22;
        &:hover {
            background-color: #e35757;
        }
        &:active {
            background-color: #ea8383;
        }                        
    }
    &.fa-linkedin {
        background-color: #07d;
        &:hover {
        }
        &:active {
            background-color: #5eb4ff;
        }                        
    }
    &.fa-google-plus {
        background-color: #d43;
        &:hover {
            background-color: #e88075;
        }
        &:active {
            background-color: #efa8a0;
        }                        
    }
    &.fa{
        &:hover{
            background-color: @black-darker;
            color: @white-lighter;
        }
    }

}


.control() {
    line-height: 1.42857143;
    font-family: "@{google-font-family-1}", sans-serif;
    display: block;
    width: 100%;
    height: @input-height;
    border: 1px solid @white-dark;
    background-color: @white-lighter;
    background-image: none;
    box-shadow: none;
    .placeholder(color, @black-lighter);
    color: @black;
    box-sizing: border-box;
    padding: 9px 10px;
    font-weight: 500;
    font-size: @font-size-small + 3;
    letter-spacing: 0;
    border-radius: 2px;
    .vendor(transition, all .3s linear 0s);
    -webkit-appearance: none;
    -moz-appearance: none;
    -ms-appearance: none;
    appearance: none !important;
    margin: 0;
    &:focus {
        .vendor(box-shadow, none);
        .vendor(outline, none);
        border-color: @gray-lighter;
    }
}

.placeholder(@property, @value) when (isstring(@value) = false) {
    &:placeholder {
        @{property}: @value;
    }
    &::placeholder {
        @{property}: @value;
    }
    &::-webkit-input-placeholder {
        @{property}: @value;
    }
    &::-moz-placeholder {
        @{property}: @value;
    }
    &:-moz-placeholder {
        @{property}: @value;
    }
    &:-ms-input-placeholder {
        @{property}: @value;
    }     
}

.placeholder(@property, @value) when (isstring(@value) = true) {
    &:placeholder {
        @{property}: e(@value);
    }
    &::placeholder {
        @{property}: e(@value);
    }
    &::-webkit-input-placeholder {
        @{property}: e(@value);
    }
    &::-moz-placeholder {
        @{property}: e(@value);
    }
    &:-moz-placeholder {
        @{property}: e(@value);
    }
    &:-ms-input-placeholder {
        @{property}: e(@value);
    }     
}
.absolute(){
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}
.bg-img-wh(){
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}
.trs-trs-full(){
    position: absolute;
    top: 50%;
    left: 50%;
    .vendor(transform, translate(-50%, -50%));
}
.trs-trs-v(){
    position: absolute;
    top: 50%;
    .vendor(transform, translate(0, -50%));
}
.trs-trs-h(){
    position: absolute;
    left: 50%;
    .vendor(transform, translate(-50%, 0));
}
.trs-trs-0(){
    .vendor(transform, translate(0, 0));
}

.meta-field(@font-size){
    letter-spacing: 0.5px;
    display: block;
    line-height: @font-size * 1.8;
    margin-bottom: 19px;
    &:last-child{
        margin-bottom: 0;
    }
    img {
        height: 18px;
        margin-right: 0;
        display: inline-block;
        width: 13px;
        padding:  6px 9px;
        border: 1px solid @brand-color;
        border-radius: 200%;
        vertical-align: middle;
        margin-right: 10px;
        float: left;
        + .value, .links{
            display: inline-block;
            vertical-align: middle;
            width: ~"calc(100% - 45px)";
            float: right;
            padding: 3px 0;     
        }
    }
    label, .value, .links {
        font-size: @font-size-base - 1;
    }
    label {
        margin-bottom: 0;
        margin-right: @font-size / 2;
    }
    .value, .links {
        color: @black-lighter;
        font-weight: 500;
        letter-spacing: 0; 
        float: left;
        a {
            color: @black-lighter; 
            &:hover {
                color: @brand-color; 
            }
        }
    }
    &:after{
        .after-clear();
    }
}



.after-clear(){
    content: " ";
    display: table;
    clear: both;
}



.price(){
    font-size: @font-size-base - 2;
    font-family: "@{google-font-family-1}";
    color: @black-dark;
    background-color: transparent;
    border-radius: 3px;
    line-height: 23px;
    padding: 0 14px;
    font-weight: 500;
    letter-spacing: 0;
    display: inline-block;
    margin: 7px 0 0;

    .prefix {
    }
    del {
        margin-right: 5px;
        .currency {
        }
    }
    ins, > span.amount {
        background-color: transparent;    
        .currency {
        }
    }
}


.taxonomy-field(){
    display: block;
    
    .links{
        display: block;
        span{
            display: none;
        }
        a{

            font-size: @font-size-small - 1px;
            font-family: "@{google-font-family-1}";
            color: @black-dark;
            background-color: @white-lighter;
            border-radius: 3px;
            line-height: 29px;
            padding: 0 20px;
            font-weight: 700;
            letter-spacing: 0;
            display: inline-block;
            text-transform: capitalize;
            margin-right: 11px;
            margin-bottom: 5px;
            border: 1px solid @white-dark;
            .vendor(transition, all 0.3s linear 0s);
            float: left;
            &:hover{
                border-color: @brand-color;
                color: @white-lighter;
                background-color: @brand-color;
            }
        }
        &:after{
            .after-clear();
        }
    }
    
}

.taxonomy-product-class(){
    display: block;
    .links{
        display: block;
    }
    .ending, .in-store, .online, .promo-code, .sale{
        padding: 6px 0 8px;
        color: @white-lighter;
        font-size: @font-size-small - 1px;
    }
    .ending, .in-store, .online, .promo-code, .sale, .verified{
        display: inline-block;
        padding-right: 5px;
        padding-left: 5px;
        line-height: 7px;
        vertical-align: middle;
        border-radius: 2px;
        margin-bottom: 5px;
    }
    .verified{
        font-size: @font-size-small + 2px;
        background: transparent;
        color: @accent-2-color;
        &:before{
            .icons-timi();
            content: "\e71f";
            margin-right: 5px;
        }
    }
    .delimiter{
        display: none;
    }
    .promo-code, .sale{
        background-color: @brand-color;
    }
    .in-store{
        background-color: @taxonomy-in-store;
    }
    .online{
        background-color: @accent-2-color;
    }
    .ending{
        background-color: @taxonomy-ending;
    }
    &:after{
        .after-clear();
    }
}



.icons-timi(){
    font-family: 'themify';
    speak: none;
    font-style: normal;
    font-weight: 400;
    font-variant: normal;
    text-transform: none;
    line-height: 1;
    -webkit-font-smoothing: antialiased;
}

.arms(){
    display: inline-block;
    width: 100%;
    > a{
        display: inline-block;
        width: 23px;
    }
    a.up{

    }
    span.voting-votes{
        display: none;
    }
    span.voting-loader{
        > span{
            display: none;
        }
    }
    &.up{

        ~ .icons-timi.left{
            background: @white-dark;
            border-color: @white-dark;
        }

    }
    &.down{
        ~ .icons-timi.right{
            background: @white-dark;
            border-color: @white-dark;

        }
    }
    ~ .icons-timi{
        padding: 1px 5px;
        font-size: @font-size-small + 1px;
        line-height: 1.5;
        border: 1px solid @white-dark;
        background-color: @white-lighter;
        display: inline-block;
        position: absolute;
        top: 0;
        bottom: 0;
        border-radius: 2px;
        border-top-right-radius: 0;
        border-bottom-right-radius: 0;
        pointer-events: none;
        &.left{
            border-radius: 2px;
            left: 0;
            color: @brand-color;
            border-top-right-radius: 0;
            border-bottom-right-radius: 0;
        }
        &.right{
            border-radius: 2px;
            right: 0;
            color: @accent-2-color;
            border-top-left-radius: 0;
            border-bottom-left-radius: 0;
        }
    }
}


