.ribbon {
  background-color: $gray-600;
  position: absolute;
  width: 3.325rem;
  height: 2rem;
  left: -0.325rem;
  padding-top: 0.25rem;
  top: 1rem;
  box-shadow: 0.025rem 0.125rem 0.375rem $shadow-darker;
  color: $white;
  font-size: 0.875rem;
  font-weight: bold;
  text-shadow: 0 0 0.25rem $shadow-darker;
  text-align: center;

  &::after {
    content: " ";
    display: block;
    height: 0;
    width: 0;
    border-style: solid;
    border-width: 0 0.325rem 0.325rem 0;
    border-color: transparent darken($gray-600, 10%) transparent transparent;
    position: absolute;
    bottom: -0.325rem;
    left: 0;
  }

  &.ribbon-a {
    background-color: $alert-blue;

    &::after {
      border-right-color: darken($alert-blue, 10%);
    }
  }

  &.ribbon-d {
    background-color: $yellow-700;

    &::after {
      border-right-color: darken($yellow-700, 10%);
    }
  }

  &.ribbon-g {
    background-color: $alert-green;

    &::after {
      border-right-color: darken($alert-green, 10%);
    }
  }

  &.ribbon-m {
    background-color: $blue-700;

    &::after {
      border-right-color: darken($blue-700, 10%);
    }
  }

  &.ribbon-r {
    background-color: darken($blue-700, 10%);

    &::after {
      border-right-color: darken($blue-700, 20%);
    }
  }

  &.ribbon-s {
    background-color: $teal-800;

    &::after {
      border-right-color: darken($teal-800, 10%);
    }
  }

  &.ribbon-t {
    background-color: darken($alert-blue, 10%);

    &::after {
      border-right-color: darken($alert-blue, 20%);
    }
  }
}
