
@mixin border-exclude-top($border-deep, $border-type , $border-color ){
   border-bottom: $border-deep $border-type $border-color ;
   border-left: $border-deep $border-type $border-color ;
   border-right: $border-deep $border-type $border-color ;
}

@mixin border-exclude-bottom($border-deep, $border-type , $border-color ){
   border-top: $border-deep $border-type $border-color ;
   border-left: $border-deep $border-type $border-color ;
   border-right: $border-deep $border-type $border-color ;
}

@mixin border-exclude-left($border-deep, $border-type , $border-color ){
   border-top: $border-deep $border-type $border-color ;
   border-bottom: $border-deep $border-type $border-color ;
   border-right: $border-deep $border-type $border-color ;
}

@mixin border-exclude-right($border-deep, $border-type , $border-color ){
   border-top: $border-deep $border-type $border-color ;
   border-bottom: $border-deep $border-type $border-color ;
   border-left: $border-deep $border-type $border-color ;
}

@mixin rounded-corners ($radius) {
   -webkit-border-radius: $radius;
   -moz-border-radius: $radius;
   -ms-border-radius: $radius;
   -o-border-radius: $radius;
   border-radius: $radius;
}

@mixin clearboxstyle(){
   background: none;
   border:none;
}

@mixin clearfloat(){
   float: none;
   width: 100%;
}
 

@mixin transform-style($transform-style){
   -webkit-transform-style: $transform-style;                    
   -moz-transform-style: $transform-style;                    
   -ms-transform-style: $transform-style;                    
   -o-transform-style: $transform-style;                    
   transform-style: $transform-style;
}

@mixin backface-visibility($backface-visibility){
   backface-visibility: $backface-visibility;  /* W3C */
   -webkit-backface-visibility: $backface-visibility; /* Safari & Chrome */
   -moz-backface-visibility: $backface-visibility; /* Firefox */
   -ms-backface-visibility: $backface-visibility; /* Internet Explorer */
   -o-backface-visibility: $backface-visibility; /* Opera */
}

@mixin animation-theme($animation-duration, $animation-fill-mode, $animation-name){
   -webkit-animation-duration: $animation-duration; 
   -moz-animation-duration: $animation-duration; 
   -ms-animation-duration: $animation-duration; 
   -o-animation-duration: $animation-duration; 
   animation-duration: $animation-duration; 

   -webkit-animation-fill-mode: $animation-fill-mode;
   -moz-animation-fill-mode: $animation-fill-mode;
   -ms-animation-fill-mode: $animation-fill-mode;
   -o-animation-fill-mode: $animation-fill-mode;
   animation-fill-mode: $animation-fill-mode;

   -webkit-animation-name: $animation-name;
   -moz-animation-name: $animation-name; 
   -ms-animation-name: $animation-name; 
   -o-animation-name: $animation-name; 
   animation-name: $animation-name; 
}

@mixin perspective($perspective){
   -webkit-perspective: $perspective;
   -ms-perspective: $perspective;
   -moz-perspective: $perspective;
   -o-perspective: $perspective;
   perspective: $perspective;    
}

/**
* Transition-timing-function property@mixin 
*/
@mixin transition-timing-function($timing-function) {
   -moz-transition-timing-function: $timing-function;
   -o-transition-timing-function: $timing-function;
   -webkit-transition-timing-function: $timing-function;
   transition-timing-function: $timing-function;
}

@mixin transform($arguments){
   -webkit-transform: $arguments;
   -moz-transform:    $arguments;
   -ms-transform:     $arguments;
   -o-transform:      $arguments;
}

@mixin appearance($appearance){
   appearance: $appearance;
   -moz-appearance: $appearance;
   -ms-appearance: $appearance;
   -o-appearance: $appearance;
   -webkit-appearance: $appearance; 
}


/*background RGBA
============================================*/
@mixin rgba($colour, $alpha)
{
   $alphaColour: hsla(hue($colour), saturation($colour), lightness($colour), $alpha);
   $ieAlphaColour: argb($alphaColour);   
   background-color: $colour; 
   background-color: $alphaColour;       
   zoom: 1; 
   background-color: transparent\9;   
   
   
}


@mixin border-rgba($colour, $alpha)
{
   $alphaColour: hsla(hue($colour), saturation($colour), lightness($colour), $alpha);
   $ieAlphaColour: argb($alphaColour);   
   border-color: $colour; 
   border-color: $alphaColour;       
   zoom: 1; 
   border-color: transparent\9;
  
}

//sub heading (h2,h3) define

@mixin sub-heading($sub-heading-bg, $sub-heading-color) {
  color: $sub-heading-color;
  a{
    color: $sub-heading-color;
    &:hover{
      color: $sub-heading-color;
    }
  }
  padding: $base-box-padding;
  position: relative;
  background: $sub-heading-bg;  
}

@mixin sub-heading-before {
  height: 0;
  width: 0;
  @include rtl-right(45%);
  top: 100%;
  content: "";
  position: absolute;
  border: 4px solid transparent;
  border-top-color: $gray-lighter;
}

//background
@mixin background-hover {
  color: $base-text-color;
  background: rgba(228, 50, 40, 0.3);
}




/// button variant outline
@mixin button-variant-outline($color, $background, $border, $colorhover, $bghover, $borderhover ) {
  color: $color;
  background-color: $background;
  border-color: $border;

  &:hover,
  &:focus,
  &:active,
  &.active {
    color: $colorhover;
    background-color: $bghover;
        border-color: $borderhover ;
  }
  .open & { &.dropdown-toggle {
    color: $colorhover;
    background-color: $bghover;
        border-color: $borderhover ;
  } }
  &:active,
  &.active {
    background-image: none;
  }
  .open & { &.dropdown-toggle {
    background-image: none;
  } }
  &.disabled,
  &[disabled],
  fieldset[disabled] & {
    &,
    &:hover,
    &:focus,
    &:active,
    &.active {
      background-color: $background;
          border-color: $border;
    }
  }

  .badge {
    color: $background;
    background-color: $color;
  }
}


// Block
// -------------------------
@mixin block-variant($border, $heading-text-color, $heading-bg-color, $heading-border) {
  border-color: $border;

  & .#{$block-heading-selector} {
    color: $heading-text-color;
    a{
      color: $heading-text-color;
    }
    background-color: $heading-bg-color;
    border-color: $heading-border;
    + .#{$block-prefix}-collapse .#{$block-content-selector} {
      border-top-color: $border;
    }
  }
  & > .#{$block-prefix}-footer {
    + .#{$block-prefix}-collapse .#{$block-prefix}-body {
      border-bottom-color: $border;
    }
  }
}

/****/

@mixin container-layout-variant($color, $background, $linkcolor,  $topbar-link-color-hover ){
    background: $background;
    color: $color;
    a{
        color:$linkcolor;   
    } 
    a:hover{
        color: $topbar-link-color-hover; 
    }     
}  


/* RIGHT TO LEFT */


// BASIC CONVERTER (ignore these)

@mixin rtl-base-simple ($property, $direction) {
  #{$property}:$direction;
  .rtl & {
    @if $direction == $rtl-right {
      #{$property}:$rtl-left;
    }
    @else {
      #{$property}:$rtl-right;
    }
  }
}
@mixin rtl-base-inherit ($property, $direction, $value, $inherit : inherit) {
  #{$property}-#{$direction}: $value;
  .rtl & {
    @if $direction == $rtl-right {
      #{$property}-#{$rtl-left}: $value;
    }
    @else {
      #{$property}-#{$rtl-right}: $value;
    }
    #{$property}-#{$direction}: $inherit;
  }
}

@mixin rtl-base-toprightbottomleft ($property, $t, $r, $b, $l) {
  #{$property}: $t $r $b $l;
  .rtl & {
    #{$property}: $t $l $b $r;
  }
}

// BODY STYLES

@mixin rtl-direction ($forBody : true) {
  direction: ltr;
  @if $forBody {
    &.rtl {
      direction: rtl;
    }
  }
  @else {
    .rtl & {
      direction: rtl;
    }
  }
}
@mixin rtl-font-family ($ltr, $rtl, $forBody : false) {
  font-family: $ltr;
  @if $forBody {
    &.rtl, &.non-latin {
      font-family:$rtl;
    }
  }
  @else {
    .rtl &, .non-latin & {
      font-family:$rtl;
    }
  }
}


// MARGIN

@mixin rtl-margin ($t, $r, $b, $l) {
  @include rtl-base-toprightbottomleft(margin,$t, $r, $b, $l);
}
@mixin rtl-margin-left ($value) {
  @include rtl-base-inherit(margin,$rtl-left,$value);
}
@mixin rtl-margin-right ($value) {
  @include rtl-base-inherit(margin,$rtl-right,$value);
}

// PADDING

@mixin rtl-padding ($t, $r, $b, $l) {
  @include rtl-base-toprightbottomleft(padding,$t, $r, $b, $l);
}
@mixin rtl-padding-left ($value) {
  @include rtl-base-inherit(padding,$rtl-left,$value);
}
@mixin rtl-padding-right ($value) {
  @include rtl-base-inherit(padding,$rtl-right,$value);
}

// BORDER

@mixin rtl-border-width ($t,$r,$b,$l) {
  @include rtl-base-toprightbottomleft(border-width,$t,$r,$b,$l);
}
@mixin rtl-border-style ($t,$r,$b,$l) {
  @include rtl-base-toprightbottomleft(border-style,$t,$r,$b,$l);
}
@mixin rtl-border-left ($value) {
  @include rtl-base-inherit(border,$rtl-left,$value);
}
@mixin rtl-border-right ($value) {
  @include rtl-base-inherit(border,$rtl-right,$value);
}

// POSITION

@mixin rtl-left ($value) {
  #{$rtl-left}: $value;
  .rtl & {
    #{$rtl-right}: $value;
    #{$rtl-left}: auto;
  }
}
@mixin rtl-right ($value) {
  #{$rtl-right}: $value;
  .rtl & {
    #{$rtl-left}: $value;
    #{$rtl-right}: auto;
  }
}

// TEXT-ALIGN

@mixin rtl-text-align-left () {
  @include rtl-base-simple(text-align, $rtl-left);
}
@mixin rtl-text-align-right () {
  @include rtl-base-simple(text-align, $rtl-right);
}

// FLOAT

@mixin rtl-float-left () {
  @include rtl-base-simple(float, $rtl-left);
}
@mixin rtl-float-right () {
  @include rtl-base-simple(float, $rtl-right);
}

// BACKGROUND-POSITION

@mixin rtl-background-position-left ($vertical) {
  background-position:$rtl-left $vertical !important;
  .rtl & {
    background-position:$rtl-right $vertical !important;
  }
}
@mixin rtl-background-position-right ($vertical) {
  background-position:$rtl-right $vertical;
  .rtl & {
    background-position:$rtl-left $vertical;
  }
}

@mixin rtl-background-position-percent ($vertical, $horPercent) {
  background-position:$horPercent $vertical;
  .rtl & {
    background-position:100% - $horPercent $vertical;
  }
}

// TEXT-SHADOW & BOX-SHADOW

@mixin rtl-text-shadow ($x, $rest) {
  text-shadow: $x $rest;
  .rtl & {
    text-shadow: -1 * $x $rest;
  }
}
@mixin rtl-box-shadow ($x, $rest) {
  -moz-box-shadow: $x $rest;
  -webkit-box-shadow: $x $rest;
  box-shadow: $x $rest;
  .rtl & {
    -moz-box-shadow: -1 * $x $rest;
    -webkit-box-shadow: -1 * $x $rest;
    box-shadow: -1 * $x $rest;
  }
}

// BORDER-RADIUS

@mixin rtl-border-radius-topright ($tl, $tr, $br, $bl) {
  -moz-border-radius: $tl, $tr, $br, $bl;
  -webkit-border-radius: $tl, $tr, $br, $bl;
  border-top-radius: $tl, $tr, $br, $bl;
  .rtl & {
    -moz-border-radius: $tr, $tl, $bl, $br;
    -webkit-border-radius: $tr, $tl, $bl, $br;
    border-top-radius: $tr, $tl, $bl, $br;
  }
}

@mixin rtl-border-radius-topright ($value) {
  -moz-border-radius-top#{$rtl-right}: $value;
  -webkit-border-top-#{$rtl-right}-radius: $value;
  border-top-#{$rtl-right}-radius: $value;
  .rtl & {
    -moz-border-radius-top#{$rtl-left}: $value;
    -webkit-border-top-#{$rtl-left}-radius: $value;
    border-top-#{$rtl-left}-radius: $value;
    -moz-border-radius-top#{$rtl-right}: inherit;
    -webkit-border-top-#{$rtl-right}-radius: inherit;
    border-top-#{$rtl-right}-radius: inherit;
  }
}

@mixin rtl-border-radius-bottomright ($value) {
  -moz-border-radius-bottom#{$rtl-right}: $value;
  -webkit-border-bottom-#{$rtl-right}-radius: $value;
  border-bottom-#{$rtl-right}-radius: $value;
  .rtl & {
    -moz-border-radius-bottom#{$rtl-left}: $value;
    -webkit-border-bottom-#{$rtl-left}-radius: $value;
    border-bottom-#{$rtl-left}-radius: $value;
    -moz-border-radius-bottom#{$rtl-right}: inherit;
    -webkit-border-bottom-#{$rtl-right}-radius: inherit;
    border-bottom-#{$rtl-right}-radius: inherit;
  }
}

@mixin rtl-border-radius-topleft ($value) {
  -moz-border-radius-top#{$rtl-left}: $value;
  -webkit-border-top-#{$rtl-left}-radius: $value;
  border-top-#{$rtl-left}-radius: $value;
  .rtl & {
    -moz-border-radius-top#{$rtl-right}: $value;
    -webkit-border-top-#{$rtl-right}-radius: $value;
    border-top-#{$rtl-right}-radius: $value;
    -moz-border-radius-top#{$rtl-left}: inherit;
    -webkit-border-top-#{$rtl-left}-radius: inherit;
    border-top-#{$rtl-left}-radius: inherit;
  }
}

@mixin rtl-border-radius-bottomleft ($value) {
  -moz-border-radius-bottom#{$rtl-left}: $value;
  -webkit-border-bottom-#{$rtl-left}-radius: $value;
  border-bottom-#{$rtl-left}-radius: $value;
  .rtl & {
    -moz-border-radius-bottom#{$rtl-right}: $value;
    -webkit-border-bottom-#{$rtl-right}-radius: $value;
    border-bottom-#{$rtl-right}-radius: $value;
    -moz-border-radius-bottom#{$rtl-left}: inherit;
    -webkit-border-bottom-#{$rtl-left}-radius: inherit;
    border-bottom-#{$rtl-left}-radius: inherit;
  }
}
