/**
*
* Highlight
*
**/

.highlight-module {
  overflow: hidden;
  margin-top: $lineHeight*2;
  margin-bottom: $lineHeight;
  position: relative;

  &::after {
    background: $colorGrayBackground;
    content: "";
    height: 100%;
    position: absolute;
    top: 0;
    bottom: 0;
    z-index: 0;
    width: 100%;
    right: 0;
    left: 0;
  }

  ul,
  ol {
    padding-left: 0;
  }
}

.highlight-module__container {
  @include container;
  padding-bottom: $lineHeight*3;
  z-index: 1;
  @include highlight-symbol();

  @include medium {
    padding-bottom: $lineHeight*2;
  }

  @include wide {
    min-height: $lineHeight*8;
  }
}

.highlight-module__title {
  @include type--huge;
  padding-top: $lineHeight;

  @include wide {
    @include type--xxlarge;
  }
}

.highlight-module__cta {
  display: block;
}


/*==========  LEARNING  ==========*/
.highlight-module--learning {
  color: #ffffff;

  &::after {
    background-color: $colorLearning;
  }

  a {
    color: #ffffff;
    text-decoration: underline;
  }
}


/*==========  REMEMBER  ==========*/
.highlight-module--remember {
  color: #ffffff;

  &::after {
    background-color: $colorRemember;
  }

  a {
    color: #ffffff;
    text-decoration: underline;
  }
}


/*==========  CODE  ==========*/
.highlight-module--code {
  overflow: visible;
  margin-bottom: $lineHeight*2;

  pre {
    margin: 0;
    padding-top: $lineHeight;
    font-size: $fontBase - 2;
    line-height: $lineHeight;
    padding-bottom: 0;
    padding-left: 0;
    padding-right: 0;

    span {
      margin: 0;
      padding: 0;
      display: inline-block;
    }
  }

  code {
    margin: 0;
    padding: 0;
    word-spacing: -2px;
    display: block;
  }

  .highlight-module__container {
    padding-bottom: 0;
  }

  .highlight-module__cta {
    position: absolute;
    bottom: -$lineHeight;
  }

}


/*==========  LEFT  ==========*/
.highlight-module--left {
  &::after {
    @include wide {
      width: 80%;
      right: 20%;
    }
  }
}


/*==========  RIGHT  ==========*/
.highlight-module--right {
  &::after {
    @include wide {
      width: 80%;
      left: 20%;
    }
  }

  &.highlight-module--code {
    &::after {
      @include wide {
        width: 100%;
        left: 0;
      }
    }
  }
}

/*==========  INLINE  ==========*/
.highlight-module--inline {
  color: $colorText;
  overflow: visible;
  margin: $lineHeight 0 0;

  & .highlight-module__container {
    padding-bottom: 0;

    &::before {
      display: none;
    }
  }

  & .highlight-module__content {
    border-color: $colorGrayKeyline;
    border-style: solid;
    border-width: 1px;
    border-left-width: 0;
    border-right-width: 0;
    margin-bottom: -2px; // Offsetting 2px to considerate border top/bottom - baseline rules.
    padding:  0 0 $lineHeight;
  }

  & .highlight-module__title {
    @include type--large;
  }

  &.highlight-module--remember {
    & .highlight-module__title,
    & li::before {
      color: $colorRemember;
    }
  }

  &.highlight-module--learning {
    & .highlight-module__title,
    & li::before {
      color: $colorLearning;
    }
  }

  &::after {
    display: none !important;
  }
}

/*==========  COLORS  ==========*/

div.highlight > pre > code, code .highlight  { background: transparent; }
div.highlight > pre > code .c, code .highlight .c { color: #999988; font-style: italic } /* Comment */
div.highlight > pre > code .err, code .highlight .err { color: #a61717; background-color: #e3d2d2 } /* Error */
div.highlight > pre > code .k, code .highlight .k { } /* Keyword */
div.highlight > pre > code .o, code .highlight .o { } /* Operator */
div.highlight > pre > code .cm, code .highlight .cm { color: #999988; font-style: italic } /* Comment.Multiline */
div.highlight > pre > code .cp, code .highlight .cp { color: $colorGray; } /* Comment.Preproc */
div.highlight > pre > code .c1, code .highlight .c1 { color: #999988; font-style: italic } /* Comment.Single */
div.highlight > pre > code .cs, code .highlight .cs { color: $colorGray; font-style: italic } /* Comment.Special */
div.highlight > pre > code .gs, code .highlight .gd { color: #000000; background-color: #ffdddd } /* Generic.Deleted */
div.highlight > pre > code .gd .x, code .highlight .gd .x { color: #000000; background-color: #ffaaaa } /* Generic.Deleted.Specific */
div.highlight > pre > code .ge, code .highlight .ge { font-style: italic } /* Generic.Emph */
div.highlight > pre > code .gr, code .highlight .gr { color: #aa0000 } /* Generic.Error */
div.highlight > pre > code .gh, code .highlight .gh { color: $colorGray } /* Generic.Heading */
div.highlight > pre > code .gi, code .highlight .gi { color: #000000; background-color: #ddffdd } /* Generic.Inserted */
div.highlight > pre > code .gi .x, code .highlight .gi .x { color: #000000; background-color: #aaffaa } /* Generic.Inserted.Specific */
div.highlight > pre > code .go, code .highlight .go { color: #888888 } /* Generic.Output */
div.highlight > pre > code .gp, code .highlight .gp { color: #555555 } /* Generic.Prompt */
div.highlight > pre > code .gs, code .highlight .gs { } /* Generic.Strong */
div.highlight > pre > code .gu, code .highlight .gu { color: #aaaaaa } /* Generic.Subheading */
div.highlight > pre > code .gt, code .highlight .gt { color: #aa0000 } /* Generic.Traceback */
div.highlight > pre > code .kc, code .highlight .kc { } /* Keyword.Constant */
div.highlight > pre > code .kd, code .highlight .kd { } /* Keyword.Declaration */
div.highlight > pre > code .kp, code .highlight .kp { } /* Keyword.Pseudo */
div.highlight > pre > code .kr, code .highlight .kr { } /* Keyword.Reserved */
div.highlight > pre > code .kt, code .highlight .kt { color: #445588; } /* Keyword.Type */
div.highlight > pre > code .m, code .highlight .m { color: #009999 } /* Literal.Number */
div.highlight > pre > code .s, code .highlight .s { color: $colorLearning } /* Literal.String */
div.highlight > pre > code .na, code .highlight .na { color: #008080 } /* Name.Attribute */
div.highlight > pre > code .nb, code .highlight .nb { color: #0086B3 } /* Name.Builtin */
div.highlight > pre > code .nc, code .highlight .nc { color: #445588; } /* Name.Class */
div.highlight > pre > code .no, code .highlight .no { color: #008080 } /* Name.Constant */
div.highlight > pre > code .ni, code .highlight .ni { color: #800080 } /* Name.Entity */
div.highlight > pre > code .ne, code .highlight .ne { color: #990000; } /* Name.Exception */
div.highlight > pre > code .nf, code .highlight .nf { color: #990000; } /* Name.Function */
div.highlight > pre > code .nn, code .highlight .nn { color: #555555 } /* Name.Namespace */
div.highlight > pre > code .nt, code .highlight .nt { color: $colorRemember } /* Name.Tag */
div.highlight > pre > code .nv, code .highlight .nv { color: #008080 } /* Name.Variable */
div.highlight > pre > code .ow, code .highlight .ow { } /* Operator.Word */
div.highlight > pre > code .w, code .highlight .w { color: #bbbbbb } /* Text.Whitespace */
div.highlight > pre > code .mf, code .highlight .mf { color: #009999 } /* Literal.Number.Float */
div.highlight > pre > code .mh, code .highlight .mh { color: #009999 } /* Literal.Number.Hex */
div.highlight > pre > code .mi, code .highlight .mi { color: #009999 } /* Literal.Number.Integer */
div.highlight > pre > code .mo, code .highlight .mo { color: #009999 } /* Literal.Number.Oct */
div.highlight > pre > code .sb, code .highlight .sb { color: $colorLearning } /* Literal.String.Backtick */
div.highlight > pre > code .sc, code .highlight .sc { color: $colorLearning } /* Literal.String.Char */
div.highlight > pre > code .sd, code .highlight .sd { color: $colorLearning } /* Literal.String.Doc */
div.highlight > pre > code .s2, code .highlight .s2 { color: $colorLearning } /* Literal.String.Double */
div.highlight > pre > code .se, code .highlight .se { color: $colorLearning } /* Literal.String.Escape */
div.highlight > pre > code .sh, code .highlight .sh { color: $colorLearning } /* Literal.String.Heredoc */
div.highlight > pre > code .si, code .highlight .si { color: $colorLearning } /* Literal.String.Interpol */
div.highlight > pre > code .sx, code .highlight .sx { color: $colorLearning } /* Literal.String.Other */
div.highlight > pre > code .sr, code .highlight .sr { color: #009926 } /* Literal.String.Regex */
div.highlight > pre > code .s1, code .highlight .s1 { color: $colorLearning } /* Literal.String.Single */
div.highlight > pre > code .ss, code .highlight .ss { color: #990073 } /* Literal.String.Symbol */
div.highlight > pre > code .bp, code .highlight .bp { color: $colorGray } /* Name.Builtin.Pseudo */
div.highlight > pre > code .vc, code .highlight .vc { color: #008080 } /* Name.Variable.Class */
div.highlight > pre > code .vg, code .highlight .vg { color: #008080 } /* Name.Variable.Global */
div.highlight > pre > code .vi, code .highlight .vi { color: #008080 } /* Name.Variable.Instance */
div.highlight > pre > code .il, code .highlight .il { color: #009999 } /* Literal.Number.Integer.Long */
