// import variables
@import "shortcodes/variables.less";

.clearfix {
  clear: both;
}

.fusion-clearfix {
  clear: both;
  .clearfix();
}

/* Alignment */
.alignleft,
.fusion-alignleft {
  display: inline;
  float: left;
  margin-right: 15px;
}

.alignright,
.fusion-alignright {
  display: inline;
  float: right;
  margin-left: 15px;
}

.aligncenter,
.fusion-aligncenter {
  clear: both;
  display: block;
  margin-left: auto;
  margin-right: auto;
  text-align: center;

  .fontawesome-icon {
    float: none;
  }
}

.create-block-format-context {
  display: inline-block;
  clear: both;
  .clearfix();
  margin-bottom: 40px;
  width: 100%;
}

.fusion-columns {
  margin: 0 -15px;
}

.fusion-columns-5 {

  .col-lg-2,
  .col-md-2,
  .col-sm-2,
  .col-xs-2 {
    width: 20%;
  }
}

.fusion-columns-6 {

  .fusion-column,
  .fusion-flip-box-wrapper {
    &:nth-of-type(6n+1) {
      clear: both;
    }
  }
}

.fusion-columns-5 {

  .fusion-column,
  .fusion-flip-box-wrapper {
    &:nth-of-type(5n + 1) {
      clear: both;
    }
  }
}

.fusion-columns-4 {

  .fusion-column,
  .fusion-flip-box-wrapper {
    &:nth-of-type(4n+1) {
      clear: both;
    }
  }
}

.fusion-columns-3 {

  .fusion-column,
  .fusion-flip-box-wrapper {
    &:nth-of-type(3n+1) {
      clear: both;
    }
  }
}

.fusion-columns-2 {

  .fusion-column,
  .fusion-flip-box-wrapper {
    &:nth-of-type(2n+1) {
      clear: both;
    }
  }
}

// Shortcodes

.fusion-builder-row>p {
  display: none;
}

.fusion-builder-row {
  width: 100%;
  margin: 0 auto;

  &.fusion-builder-row-inner {
    max-width: 100% !important;
  }

  &:after {
    clear: both;
    content: " ";
    display: table;
  }
}

.row:after {
  clear: both;
  content: " ";
  display: table;
}

// Background Video

.fusion-fullwidth {
  position: relative;

  .fusion-row {
    position: relative;
    z-index: 10;
  }

  .fullwidth-video {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
    min-height: 100%;
    min-width: 100%;
    -webkit-transform-style: preserve-3d;
    overflow: hidden;

    video {
      position: absolute;
      top: 0;
      left: 0;
      z-index: 1;
      min-height: 100%;
      min-width: 100%;
    }
  }

  .fullwidth-overlay {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 5;
    height: 100%;
    width: 100%;
  }

  &.faded-background {
    .fullwidth-faded {
      position: absolute;
      top: 0;
      left: 0;
      z-index: 1;
      min-height: 100%;
      min-width: 100%;
    }
  }

  &.fusion-ie-mode {
    &::before {
      content: "";
      background-color: inherit;
      width: 100%;
      height: 100%;
      position: absolute;
      top: 0;
      left: 0;
    }

    .fullwidth-faded::before {
      content: "";
      background-color: inherit;
      width: 100%;
      height: 100%;
      position: absolute;
      top: 0;
      left: 0;
    }
  }
}

.fullwidth-box.video-background {
  .fullwidth-video-image {
    display: none;
  }
}

.ua-mobile {
  .fullwidth-box {
    &.video-background {
      .fullwidth-video-image {
        width: 100%;
        height: 100%;
        display: block;
        z-index: 2;
        background-size: cover;
        background-position: center center;
        position: absolute;
        top: 0;
        left: 0;
      }
    }
  }
}

// Columns

.fusion-overflow-visible {
  overflow: visible !important;
}

.fusion-column {
  &-first {
    clear: left;
  }

  &-no-min-height {

    .fusion-column-content-centered,
    .fusion-column-wrapper {
      min-height: 0 !important;
    }
  }
}

.fusion-builder-column {
  &.fusion-column-last {
    margin-right: 0;
  }
}

.fusion-builder-placeholder,
.fusion-builder-placeholder:active,
.fusion-builder-placeholder:hover,
.fusion-builder-placeholder:visited {
  display: block;
  background: rgba(42, 48, 53, 0.5);
  color: rgba(255, 255, 255, 0.9);
  text-align: center;
  padding: 30px;
  font-size: 18px;
  margin: 5px 0;
}

/* Rollovers */
.fusion-image-wrapper {
  overflow: hidden;
  z-index: 1;
  position: relative;

  &:hover {
    .fusion-rollover {
      opacity: 1;
      transform: translateX(0%);

      .no-csstransforms & {
        display: block;
      }
    }
  }

  &.fusion-video {
    display: block;
  }
}

.fusion-image-size-fixed {
  display: inline-block;
  max-width: 100%;
  vertical-align: top;
}

.fusion-rollover {
  display: flex;
  align-items: center;
  justify-content: space-around;
  opacity: 0;
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100%;
  line-height: normal;
  text-align: center;
  background-image: linear-gradient(to top, #aad75d, #d1e990);
  transform: translateX(-100%);
  transition: all 0.3s ease-in-out;
  -webkit-transform-style: preserve-3d;

  .no-csstransforms & {
    display: none;
  }

  a {
    text-decoration: none;
    box-shadow: none !important;
  }
}

.fusion-rollover-content {
  padding: 10px;
  width: 90%;
  box-sizing: border-box;

  .fusion-rollover-categories,
  .fusion-rollover-title {
    margin: 0;
    line-height: normal;
    font-size: 13px;
    color: #333333;
  }

  .fusion-rollover-title {
    margin-bottom: 3px;
    margin-top: 10px;
    padding-top: 0;
  }

  .fusion-rollover-categories {
    z-index: 99;
    position: relative;

    a {
      font-size: 11px;

      &:hover {
        color: #444;
      }
    }
  }
}

.fusion-rollover-sep {
  display: inline-block;
  vertical-align: middle;
  height: 36px;
  width: 5px;
}

.fusion-rollover-gallery,
.fusion-rollover-link {
  display: inline-block;
  opacity: 0.9;
  position: relative;
  vertical-align: middle;
  margin: 0;
  height: 36px;
  width: 35px;
  text-indent: -10000px;
  background-color: #333;
  border-radius: 50%;
  background-clip: padding-box;
  z-index: 99;

  &:hover {
    opacity: 1;
  }

  &:before {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    text-indent: 0;
    line-height: normal;
    text-shadow: none;
    font-family: @icon-font;
    font-size: 15px;
    color: #fff;
    -webkit-font-smoothing: antialiased;
  }
}

.fusion-rollover-link {
  &:before {
    content: @link-icon;
  }
}

.fusion-rollover-gallery {
  &:before {
    content: @search-icon;
  }
}

.fusion-rollover-content {
  .fusion-link-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
    z-index: 1;
  }
}

.fusion-read-more {
  box-shadow: none !important;
  position: relative;

  &:after {
    content: '\f105';
    top: 50%;
    right: -10px;
    padding-left: 5px;
    font-size: 14px;
    font-family: icomoon;
    position: absolute;
    transform: translateY(-50%);
  }
}

// Needs to be in shortcodes file for the replacements to occur.
.fusion-builder-elements-primary_color_elements {
  color: var(--primary_color);
}

// Needs to be in shortcodes file for the replacements to occur.
.fusion-builder-elements-primary_border_color_elements {
  border-color: var(--primary_color);
}

// Needs to be in shortcodes file for the replacements to occur.
.fusion-builder-elements-primary_background_color_elements {
  background-color: var(--primary_color);
}

// WooCommerce global styles
.products {
  .product-list-view {
    padding-left: var(--timeline_bg_color-20px-transparent);
    padding-right: var(--timeline_bg_color-20px-transparent);
  }

  li.product {
    background-color: var(--timeline_bg_color);
  }
}
