//Utilities

@import "mixins/transparency";
@import "mixins/vendor-prefixes";
@import "mixins/chartist";
@import "mixins/sidebar";

// Placeholder text
@mixin material-placeholder {
  &::-moz-placeholder {@content; } // Firefox
  &:-ms-input-placeholder {@content; } // Internet Explorer 10+
  &::-webkit-input-placeholder  {@content; } // Safari and Chrome
}

@mixin toolbar-colors($variation-color){
  background-color: $variation-color !important;
  @include shadow-navbar-color($variation-color);

  .md-title,
  .md-list .md-list-item-content,
  .md-toolbar-toggle .icon-bar,
  &,
  &:hover,
  &:focus{
    color: $white-color !important;
  }
}

@mixin dropdown-color {

}

@mixin md-progress-bar($color) {
  &:not(.md-buffer){
    background: rgba($color,.2);
  }

  .md-progress-bar-fill{
    background-color: $color !important;
  }

  &.md-buffer {
    .md-progress-bar-fill{
      background-color: $color;
    }
    .md-progress-bar-buffer {
      border-color: rgba($color,.2);
    }
  }
}

@mixin timeline-badge-color($color) {
    background-color: $color;
    @include shadow-big-color($color);
}


@mixin lock-page-input-color($color) {
&.lock-page{
  .form-group{
      .form-control{
          background-image: linear-gradient($color, $color), linear-gradient($mdb-input-underline-color, $mdb-input-underline-color);
      }
  }

}
}

@mixin badge-color() {
    &.badge-primary{
        background-color: $brand-primary;
    }
    &.badge-info {
        background-color: $brand-info;
    }
    &.badge-success{
        background-color: $brand-success;
    }
    &.badge-warning{
        background-color: $brand-warning;
    }
    &.badge-danger{
        background-color: $brand-danger;
    }
    &.badge-rose{
      background-color: $brand-rose;
    }
    &.badge-default{
        background-color: $gray-light;
    }
}

@mixin drop-down-button-color($color) {
  a:hover,
  a:focus,
  a:active {
      background-color: $color !important;
      color: $white-color !important;
      @include shadow-big-color($color);
  }
}


@mixin dropdown-colors($variation-color) {
  .dropdown-menu {
    border-radius: $border-radius-base !important;
    li > a {
      &:hover,
      &:focus {
        color: $white-color !important;
        background-color: $variation-color !important;
        @include shadow-big-color($variation-color);
      }
    }

    .active > a {
      &:hover,
      &:focus {
        color: $white-color !important;
      }
      background-color: $variation-color !important;
      color: $white-color !important;
      @include shadow-big-color($variation-color);
    }
  }
}

@mixin alert-color($color) {
  background-color: $color;
  color: $white-color;
  border-radius: $border-radius-base;
  @include shadow-big-color($color)
}

@mixin transition($time, $type){
    -webkit-transition: all $time $type;
    -moz-transition: all $time $type;
    -o-transition: all $time $type;
    -ms-transition: all $time $type;
    transition: all $time $type;
}

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

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

@mixin transform-translate-x($value){
     -webkit-transform:  translate3d($value, 0, 0);
        -moz-transform: translate3d($value, 0, 0);
        -o-transform: translate3d($value, 0, 0);
        -ms-transform: translate3d($value, 0, 0);
        transform: translate3d($value, 0, 0);
}

@mixin transform-translate-y($value){
     -webkit-transform:  translate3d(0,$value, 0);
        -moz-transform: translate3d(0, $value, 0);
        -o-transform: translate3d(0, $value, 0);
        -ms-transform: translate3d(0, $value, 0);
        transform: translate3d(0, $value, 0);
}

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

@mixin black-filter(){
    background: rgba(0,0,0,.55);
    position: absolute;
    width: 100%;
    height: 100%;
    content: "";
    z-index: 0;
    left: 0;
    top: 0;
}

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

@mixin radial-gradient($extern-color, $center-color){
    background: $extern-color;
    background: -moz-radial-gradient(center, ellipse cover, $center-color 0%, $extern-color 100%); /* FF3.6+ */
    background: -webkit-gradient(radial, center center, 0px, center center, 100%, color-stop(0%,$center-color), color-stop(100%,$extern-color)); /* Chrome,Safari4+ */
    background: -webkit-radial-gradient(center, ellipse cover, $center-color 0%,$extern-color 100%); /* Chrome10+,Safari5.1+ */
    background: -o-radial-gradient(center, ellipse cover, $center-color 0%,$extern-color 100%); /* Opera 12+ */
    background: -ms-radial-gradient(center, ellipse cover, $center-color 0%,$extern-color 100%); /* IE10+ */
    background: radial-gradient(ellipse at center, $center-color 0%,$extern-color 100%); /* W3C */
    background-size: 550% 450%;
}

@mixin tag-color ($color){
    .tag{
         background-color: $color;
         color: $white-color;
         .tagsinput-remove-link{
             color: $white-color;
         }
     }
     .tagsinput-add{
         color: $color;
     }
}
@mixin create-colored-tags(){
    &.tag-primary{
        @include tag-color($brand-primary);
    }
    &.tag-info {
        @include tag-color($brand-info);
    }
    &.tag-success{
        @include tag-color($brand-success);
    }
    &.tag-warning{
        @include tag-color($brand-warning);
    }
    &.tag-danger{
        @include tag-color($brand-danger);
    }
    &.tag-rose{
      @include tag-color($brand-rose);
    }
}

@mixin rotate-180(){
    filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=2);
    -webkit-transform: rotate(180deg);
    -ms-transform: rotate(180deg);
    transform: rotate(180deg);
}

@mixin rotate() {
    -webkit-transform: rotate( 45deg );
    -moz-transform: rotate( 45deg );
    -o-transform: rotate( 45deg );
    -ms-transform: rotate(45deg);
    transform: rotate( 45deg );
}

@mixin linear-gradient($color1, $color2){
    background: $color1; /* For browsers that do not support gradients */
    background: -webkit-linear-gradient(60deg, $color1 , $color2); /* For Safari 5.1 to 6.0 */
    background: -o-linear-gradient(60deg, $color1, $color2); /* For Opera 11.1 to 12.0 */
    background: -moz-linear-gradient(60deg, $color1, $color2); /* For Firefox 3.6 to 15 */
    background: linear-gradient(60deg, $color1 , $color2); /* Standard syntax */
}



// Mixins for buttons

@mixin btn-styles($btn-color) {

    // remove this line if you want black shadows
    @include shadow-2dp-color($btn-color);

    &.md-raised{
        @include shadow-2dp-color($btn-color);
    }

    &,
    &:hover,
    &:focus,
    &:active,
    &.active,
    &:active:focus,
    &:active:hover,
    &.active:focus,
    &.active:hover,
    .open > &.dropdown-toggle,
    .open > &.dropdown-toggle:focus,
    .open > &.dropdown-toggle:hover {
      background-color: $btn-color !important;

      @if $btn-color == $white-color {
        &,
        i{
          color: $gray-light !important;
        }
      } @else {
        &,
        i{
          color: $white-color !important;
        }
      }
    }

    &:focus,
    &:active,
    &:hover{
      // remove this line if you want black shadows
      @include button-shadow-color($btn-color);
      background-color: darken($btn-color, 3%) !important;
    }

  &.disabled,
  &:disabled,
  &[disabled],
  fieldset[disabled] & {
    &,
    &:hover,
    &:focus,
    &.focus,
    &:active,
    &.active {
        box-shadow: none;
        opacity: .65;
        pointer-events: none;
    }
  }

  &.md-simple{
      &,
      &:hover,
      &:focus,
      &:active,
      &.active,
      &:active:focus,
      &:active:hover,
      &.active:focus,
      &.active:hover{
        background-color: transparent !important;
        color: $btn-color !important;
        box-shadow: none;

        i{
          color: $btn-color !important;
        }
      }
  }

}


// for social buttons
@mixin social-buttons-color ($color){
    background-color: $color !important;
    color: #fff;
    @include shadow-2dp-color($color);

    &:hover,
    &:focus,
    &:active,
    &.active,
    &:active:focus,
    &:active:hover,
    &.active:focus,
    &.active:hover{
        background-color: $color !important;
        color: #fff;
        @include button-shadow-color($color);
    }

    &.md-simple{
      &,
      &:hover,
      &:focus,
      &:active,
      &.active,
      &:active:focus,
      &:active:hover,
      &.active:focus,
      &.active:hover{
        color: $color !important;
        background-color: transparent;
        box-shadow: none;

        i{
          color: $color !important;
        }
      }
    }
}

@mixin social-buttons(){
  &.md-facebook {
    @include social-buttons-color($social-facebook);
  }
  &.md-pinterest {
    @include social-buttons-color($social-pinterest);
  }
  &.md-google {
    @include social-buttons-color($social-google);
  }
  &.md-linkedin {
    @include social-buttons-color($social-linkedin);
  }
  &.md-dribbble {
    @include social-buttons-color($social-dribbble);
  }
  &.md-github {
    @include social-buttons-color($social-github);
  }
  &.md-youtube {
    @include social-buttons-color($social-youtube);
  }
  &.md-instagram {
    @include social-buttons-color($social-instagram);
  }
  &.md-reddit {
    @include social-buttons-color($social-reddit);
  }
  &.md-tumblr {
    @include social-buttons-color($social-tumblr);
  }
  &.md-behance {
    @include social-buttons-color($social-behance);
  }
  &.md-twitter {
    @include social-buttons-color($social-twitter);
  }
}

@mixin alert-icon-color($color) {
    i{
        color: $color;
    }
}

@mixin tabs-color($color) {
  &,
  &:hover,
  &:focus{
    background-color: $color !important;
    @include shadow-big-color($color);
  }
}

@mixin collapse-color($color) {
  .md-collapse-label .md-collapse-title{
    &:hover,
    &:focus,
    &:hover .md-icon,
    &:focus .md-icon{
      color: $color !important;
    }
  }

  &.is-active .md-collapse-label .md-collapse-title{
    &,
    .md-icon{
      color: $color !important;
    }
  }
}

@mixin set-wizard-color($color) {

    .moving-tab{
        background-color: $color;
        @include shadow-big-color($color);
    }

    .picture{
        &:hover{
            border-color: $color;
        }
    }

    .choice{
        &:hover,
        &.active{
            .icon{
                border-color: $color;
                color: $color;
            }
        }
    }


    .checkbox input[type=checkbox]:checked + .checkbox-material{
        .check{
            background-color: $color;
        }
    }

    .radio input[type=radio]:checked ~ .check {
        background-color: $color;
    }

    .radio input[type=radio]:checked ~ .circle {
        border-color: $color;
    }
}
