//-- Contextual text color variations

.zmd-text-variant(@name, @all: true) {
  // get colors
  .zmd-get-color-main-variables(@name);

  // use primary color
  color: @@color-500;
  a&:hover,
  a&:focus {
    color: @@color-600;
  }

  // color variants
  & when (@all = true) {
    &-50 {
      color: @@color-50;
      a&:hover,
      a&:focus {
        color: @@color-100;
      }
    }
    &-100 {
      color: @@color-100;
      a&:hover,
      a&:focus {
        color: @@color-200;
      }
    }
    &-200 {
      color: @@color-200;
      a&:hover,
      a&:focus {
        color: @@color-300;
      }
    }
    &-300 {
      color: @@color-300;
      a&:hover,
      a&:focus {
        color: @@color-400;
      }
    }
    &-400 {
      color: @@color-400;
      a&:hover,
      a&:focus {
        color: @@color-500;
      }
    }
    &-500 {
      color: @@color-500;
      a&:hover,
      a&:focus {
        color: @@color-600;
      }
    }
    &-600 {
      color: @@color-600;
      a&:hover,
      a&:focus {
        color: @@color-700;
      }
    }
    &-700 {
      color: @@color-700;
      a&:hover,
      a&:focus {
        color: @@color-800;
      }
    }
    &-800 {
      color: @@color-800;
      a&:hover,
      a&:focus {
        color: @@color-900;
      }
    }
    &-900 {
      color: @@color-900;
      a&:hover,
      a&:focus {
        color: darken(@@color-900, 10%);
      }
    }
  }

}

.zmd-text-variant-accent(@name) {
  // get colors
  .zmd-get-color-accent-variables(@name);


  &-A100 {
    color: @@color-A100;
    a&:hover,
    a&:focus {
      color: darken(@@color-A100, 10%);
    }
  }
  &-A200 {
    color: @@color-A200;
    a&:hover,
    a&:focus {
      color: darken(@@color-A200, 10%);
    }
  }
  &-A400 {
    color: @@color-A400;
    a&:hover,
    a&:focus {
      color: darken(@@color-A400, 10%);
    }
  }
  &-A700 {
    color: @@color-A700;
    a&:hover,
    a&:focus {
      color: darken(@@color-A700, 10%);
    }
  }
}

.zmd-text-variant-bw(@name) {
  // get colors
  .zmd-get-bw-color-variables(@name);

  &-lighter {
    color: @@color-lighter;
    a&:hover,
    a&:focus {
      color: @@color-light;
    }
  }
  &-light {
    color: @@color-light;
    a&:hover,
    a&:focus {
      color: @@color-dark;
    }
  }
  &-dark {
    color: @@color-dark;
    a&:hover,
    a&:focus {
      color: @@color-darker;
    }
  }
  &-darker {
    color: @@color-darker;
    a&:hover,
    a&:focus {
      color: @name;
    }
  }
}