//
// Responsive text utilities
// Inspired by Bootstrap v4
// --------------------------------------------------

.responsive-text(@infix) {
  @media (min-width: ~"@{screen-@{infix}-min}") {
    .text-@{infix}-monospace { .text-monospace; }
    .text-@{infix}-wrap { .text-wrap; }
    .text-@{infix}-nowrap { .text-nowrap; }
    .text-@{infix}-overflow { .text-overflow; }
    .text-@{infix}-truncate { .text-truncate; }
    .text-@{infix}-left { .text-left; }
    .text-@{infix}-right { .text-right; }
    .text-@{infix}-center { .text-center; }
    .text-@{infix}-justify { .text-justify; }

    .text-@{infix}-lowercase { .text-lowercase; }
    .text-@{infix}-uppercase { .text-uppercase; }
    .text-@{infix}-capitalize { .text-capitalize; }
    .text-@{infix}-transform-none { .text-transform-none; }

    .font-weight-@{infix}-light { .font-weight-light; }
    .font-weight-@{infix}-lighter { .font-weight-lighter; }
    .font-weight-@{infix}-normal { .font-weight-normal; }
    .font-weight-@{infix}-bold { .font-weight-bold; }
    .font-weight-@{infix}-bolder { .font-weight-bolder; }
    .font-@{infix}-italic { .font-italic; }

    .text-decoration-@{infix}-underline { .text-decoration-underline; }
    .text-decoration-@{infix}-none { .text-decoration-none; }
    .text-@{infix}-break { .text-break; }

    .lh-@{infix}-0 { .lh-0; }
    .lh-@{infix}-1 { .lh-1; }
    .lh-@{infix}-2 { .lh-2; }
    .lh-@{infix}-3 { .lh-3; }
    .lh-@{infix}-4 { .lh-4; }
  }
}

// Text
.text-monospace { font-family: @font-family-monospace !important; }
.text-wrap     { white-space: normal !important; }
.text-nowrap   { white-space: nowrap !important; }

.text-lowercase { text-transform: lowercase !important; }
.text-uppercase { text-transform: uppercase !important; }
.text-capitalize { text-transform: capitalize !important; }
.text-transform-none { text-transform: none !important; }


// Truncated text with ellipsis
 // BS3
.text-overflow {
  .text-overflow();
}
 // BS4
.text-truncate {
  .text-overflow();
}


// Responsive text-align
.text-left    {
  text-align: left !important;
}
.text-right   {
  text-align: right !important;
}
.text-center  {
  text-align: center !important;
}
.text-justify {
  text-align: justify !important;
}


// Weight and italics
.font-weight-light { font-weight: @font-weight-light !important; }
.font-weight-lighter { font-weight: @font-weight-lighter !important; }
.font-weight-normal { font-weight: @font-weight-normal !important; }
.font-weight-bold { font-weight: @font-weight-bold !important; }
.font-weight-bolder { font-weight: @font-weight-bolder !important; }
.font-italic { font-style: italic !important; }


// Misc
.text-decoration-underline { text-decoration: underline !important; }
.text-decoration-none { text-decoration: none !important; }
.text-break {
  word-break: break-word !important; // IE & < Edge 18
  overflow-wrap: break-word !important;
}


.lh-0 { line-height: @line-height-0 !important; }
.lh-1 { line-height: @line-height-1 !important; }
.lh-2 { line-height: @line-height-2 !important; }
.lh-3 { line-height: @line-height-3 !important; }
.lh-4 { line-height: @line-height-4 !important; }

.responsive-text(sm);
.responsive-text(md);
.responsive-text(lg);
