@charset 'UTF-8';

/* stylelint-disable declaration-no-important */
/* Purpose of helpers */

/**
* Spacers
*/

.m-0-auto {
  margin: 0 auto;
}

.m-0 {
  margin: 0 !important;
}

.m-t-0 {
  margin-top: 0 !important;
}

.m-r-0 {
  margin-right: 0 !important;
}

.m-b-0 {
  margin-bottom: 0 !important;
}

.m-l-0 {
  margin-left: 0 !important;
}

.m-05 {
  margin: $grid-gutter-width / 4 !important;
}

.m-t-05 {
  margin-top: $grid-gutter-width / 4 !important;
}

.m-r-05 {
  margin-right: $grid-gutter-width / 4 !important;
}

.m-b-05 {
  margin-bottom: $grid-gutter-width / 4 !important;
}

.m-l-05 {
  margin-left: $grid-gutter-width / 4 !important;
}

.m-1 {
  margin: $grid-gutter-width / 2 !important;
}

.m-t-1 {
  margin-top: $grid-gutter-width / 2 !important;
}

.m-r-1 {
  margin-right: $grid-gutter-width / 2 !important;
}

.m-b-1 {
  margin-bottom: $grid-gutter-width / 2 !important;
}

.m-l-1 {
  margin-left: $grid-gutter-width / 2 !important;
}

.p-0 {
  padding: 0 !important;
}

.p-t-0 {
  padding-top: 0 !important;
}

.p-r-0 {
  padding-right: 0 !important;
}

.p-b-0 {
  padding-bottom: 0 !important;
}

.p-l-0 {
  padding-left: 0 !important;
}

.p-1 {
  padding: $grid-gutter-width / 2 !important;
}

.p-t-1 {
  padding-top: $grid-gutter-width / 2 !important;
}

.p-r-1 {
  padding-right: $grid-gutter-width / 2 !important;
}

.p-b-1 {
  padding-bottom: $grid-gutter-width / 2 !important;
}

.p-l-1 {
  padding-left: $grid-gutter-width / 2 !important;
}

.text-word-break {
  word-break: break-all;
  hyphens: auto;
}

/**
* Blocks
*/

.d-block {
  display: block !important;
}

.d-inline {
  display: inline !important;
}

.d-inline-block {
  display: inline-block !important;
}

/**
 * Lists
 */

ul.unstyled-list,
ol.unstyled-list {
  list-style: none;
  padding-left: 0.5em;
}

ul.filters-list,
ol.filters-list {
  padding-left: 22px;
  list-style: none;

  .sawi-icons {
    font-size: 0.6em;
  }
}

ul.unspaced-list,
ol.unspaced-list {
  padding-left: 22px;
}

/**
 * Ckeditor
 */

.entity-content {
  img {
    display: block;
    height: auto;
    margin: $grid-gutter-width auto;
    max-width: 100%;
  }

  p:empty {
    display: none;
  }
}

/**
 * Flex same-height
 */

 @media screen and (min-width: $screen-md-min) {
  .same-height-group {
    display: block; /** graceful degradation **/
    display: flex;

    &:before,
    &:after {
      content: none;
    }
  }

  .same-height-group .same-height {
    display: block; /** graceful degradation **/
    display: flex;
    flex: 1 0 auto;

    &:before,
    &:after {
      content: none;
    }

    > div {
      width: 100%;
    }
  }
}

// wrap in a {% spaceless %} block (twig) to to handle the spacing correctly
// Please don't put links as first children though :(

.text-square-separation {
  > *:not(:last-child) {
    &:after {
      content: '\0025A0'; // ■
      position: relative;
      top: -0.55em;
      margin: 1em;
      font-size: 40%;
      color: $text-color;
    }
  }
}

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

/**
 * Background
 */

.bg-gray-lighter {
  background-color: $gray-lighter;
}

/**
 * Flex
 */

.flex {
  display: flex;
  flex: 1 0 auto;
}

.flex-space-around {
  justify-content: space-around;
}

.flex-space-between {
  justify-content: space-between;
}

.flex-align-center {
  align-items: center;
}

.flex-no-wrap {
  flex-wrap: nowrap;
}

.overflow-hidden {
  overflow: hidden;
}

/* stylelint-enable declaration-no-important */
