/* *****************************************************************************
*
*  Utilities
*
* ***************************************************************************** */

// Paddings
// --------------------------------------------------------
.pl-card {
  padding-left: $card-body-padding-x;
}

.pl-responsive {
  @include media-breakpoint-down(md){
    padding-left: $responsive-padding;
  }
}

.pr-responsive {
  @include media-breakpoint-down(md){
    padding-right: $responsive-padding;
  }
}

.p-table-td {
  padding: $table-cell-padding;
}

.pr-card {
  padding-right: $card-body-padding-x;
}

.p-input {
  padding: $input-padding-y $input-padding-x;
}

.pt-section {
  @include media-scale(padding-top, 2rem, 3rem, 4rem);
}
.pb-section {
  @include media-scale(padding-bottom, 2rem, 3rem, 4rem);
}
.py-section {
  @extend .pt-section;
  @extend .pb-section;
}

.pt-hero {
  @include media-scale(padding-top, 2rem, 2.5rem, 3rem);
}
.pb-hero {
  @include media-scale(padding-bottom, 2rem, 2.5rem, 3rem);
}
.py-hero {
  @extend .pt-hero;
  @extend .pb-hero;
}

.w-100vw {
  width: 100vw;
}

// Others
// --------------------------------------------------------

.font-weight-medium {
  font-weight: 600 !important;
}

.font-italic {
  font-style: italic;
}

.text-underline {
  text-decoration: underline;
}

.text-strike {
  text-decoration: line-through;
}

.text-normal {
  white-space: normal !important;
}

.text-break {
  overflow-wrap: break-word;
  word-break: break-word;
}

.viewport-freeze{
  width: 100vw;
  height: 100vh;
  overflow: hidden;
}

.border-rounded {
  border-radius: $border-radius;

  &--lg{
    border-radius: $border-radius-lg;
  }
}
.overflow-hidden{
  overflow: hidden;
}

.list-reset {
  list-style-type: none;
}

.pointer-none {
  pointer-events: none!important;
}

.w-100--mobile-only {
  @include media-breakpoint-down(sm){
    width: 100% !important;
  }
}

.text-transform-initial {
  text-transform: initial !important;
}

.mh-60-autoscroll {
  max-height: 60vh;
  overflow: auto;
  padding-right: $spacer-4;
}

.mh-70-autoscroll {
  max-height: 70vh;
  overflow: auto;
  padding-right: $spacer-4;
}
.mh-autoscroll {
  overflow: auto;
  padding-right: $spacer-4;

  &--105 {
    max-height: 105vh;
  }
}
.fullpage-section {
  min-height: 100vh;
  display: flex;
  align-items: center;
}

.hover-translate {
  @include transitions(transform);
  transform: translateX(0);

  @include hover-focus(){
    transform: translateX(0.1rem);
    text-decoration: none;
  }
}
//Legacy : todo use: bootstrap 4.1+ text-truncate instead
.overflow-ellipsis {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

// POSITION classes
// -----------------------------------------------
.position-absolute {
  &--top {
    position: absolute;
    left: 50%;
    top: 0;
    transform: translate(-50%, 0%);
  }

  &--top-left {
    position: absolute !important;
    left: 0;
    top: 0;
  }

  &--top-right {
    position: absolute !important;
    left: auto;
    top: 0;
    right:0;
  }

  &--center {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
  }

  &--center-left {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translate(0, -50%);
  }

  &--center-right {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translate(0, -50%);
  }

  &--bottom {
    position: absolute;
    left: 50%;
    top:auto;
    bottom:0;
    transform: translate(-50%, 0%);
  }

  &--bottom-left {
    position: absolute;
    left: 0;
    top:auto;
    bottom:0;
    transform: translate(0, -50%);
  }

  &--bottom-right {
    position: absolute;
    left: auto;
    right: 0;
    top:auto;
    bottom:0;
    transform: translate(0, -50%);
  }

  &--bottom-out {
    position: absolute;
    left: 50%;
    top:auto;
    bottom:0;
    transform: translate(-50%, 50%);
  }
}


.minh-100 {
    min-height: 100%;
}

.minw-100 {
    min-width: 100%;
}
