@smartphones: ~"only screen and (max-width: 767px)";

@font-face {
  font-family: 'EE-Icons';
  src: url(EE-Icons.ttf);
}
@import url('https://use.fontawesome.com/releases/v5.7.1/css/all.css');

div.eln-tool-top {
  display: inline-block;
}

div.eln-breadcrumb {
  position: relative;
  height: auto;
  text-align: left;
  margin-top:10px;
  // ultimo
  &.ultimo {
    ol.items {
      li.item {
        padding: 1px 0px 1px 5px;
        a.action.remove {
          &:before {
            content: '';
          }
          &:after {
            color: white;
            content: '\e616';
            font-family: EE-Icons;
            font-size: 0.7em;
            cursor: pointer;
          }
        }
      }
    }
  }
  a {
    text-decoration: none;
    color: inherit;
  }
  &:empty {
    //display: none;
  }
  .filter-current {
    min-height: 0px;

  }
  ol.items {

    display: inline;

    padding: 0px;
    li.item {
      margin-bottom: 10px;
      .filter-label {
        font-weight: 200 !important;
      }
      font-weight: 200 !important;
      border-radius: 5px;
      padding: 1px 5px;
      vertical-align: middle;
      display: inline-block;
      border: none;
      margin: 0;
      margin-bottom: 10px;
      font-size: 12px;
      span.filter-label:after {
        content: '';
      }
      span.filters {
        background: white;
        padding: 0 5px;
        height: 100%;
        display: inline-block;
        span.filter-value {

          &:after {
            content: ", ";

          }
          &:nth-last-child(1):after {
            content: "";
          }
          div.product-reviews-summary.short {
            margin: 0px;
            div.rating-summary {
              div.rating-result {
                top: -2px;
                width: 70px;
                &:before {
                  font-size: 12px;
                }
                span:before {
                  font-size: 12px;
                }
              }
            }
          }
        }
      }
      a.action.remove {
        padding-left: 4px;
        position: relative !important;
        &:before {
          color: white;
          content: '\e616';
          font-family: EE-Icons;
          font-size: 0.7em;
          cursor: pointer;
        }
        span {
          display: none;
        }
      }
    }
    .next:not(:last-child):after {
      content: '\e608';
      color: black;
      padding-left: 10px;
      font-family: EE-Icons;
      padding-left: 5px;
      padding-right: 2px;
    }
  }
  // clear all action
  div.eema-clear-filters {
    margin-bottom: 0px;
    margin-top: 5px;
    margin-left: 10px;
    a {
      text-decoration: none;
    }
  }
}

.mobile-filter-open {
  display: none;
  position: fixed;
  left: 0px;
  right: 0px;
  height: 36px;
  bottom: 0px;
  background: #f0f0f0;
  color: #686868;
  left: -1px;
  z-index: 998;
  padding: 7px;
  button {
    float:right;
    width: 150px;
  }
  .product-count {
    display: inline-block;
    .nb-filters {
      background: red;
      color: white;
      left: -8px;
      position: relative;
      top: 8px;
      font-size: 10px;
      border-radius: 5px;
      display: inline-block;
      padding: 2px 3px 0px;
    }
  }
  &:before {
    //font-family: "FontAwesome";
    //content: '\f0b0';
    //font-size: 25px;
  }
}
.uid-mobile-toolbar {
  left: -100%;
  position: fixed;
  //background: transparent !important;
  display: block;
  width: 100%;
  z-index: 999;
  //text-align: right;
  transition: left 0.2s ease;
  height: 50px;
  bottom: 0px;
  right: 0px;
  box-sizing: border-box;
  padding: 7px;
  button {
    //margin-right: 7px;
    float: right;
    width: 150px;
  }
  .product-count {
    display:inline-block;
    .nb-filters {
      background: red;
      color: white;
      left: -8px;
      position: relative;
      top: 8px;
      font-size: 10px;
      border-radius: 5px;
      display: inline-block;
      padding: 2px 3px 0px;
    }
  }
}


div.block.filter {

  &[uid=mobile] {
    display: block;
    position: fixed;
    bottom: 50px;
    top: 0px;
    left: -100%;
    width: 100%;
    z-index: 999;
    overflow-y: auto;
    //background: white;
    transition: left 0.2s ease;
    padding: 0px;
    margin-bottom: 0px;
    .eln-filter-content.filter-options-content.price {
      margin-left:10%;
      margin-right:10%;
    }
    .eln-breadcrumb {
      .filter-current {
        border: unset;
        margin: 0px;
        padding: 5px;
        ol {
          display: block;
          //padding-left: 15px;
        }
      }
    }
    .eln-layer-clear-all {
      float: unset;
      padding-left: 5px;
    }
  }
}

body.mobile-filter {
  overflow: hidden !important;
  .page-header {
    z-index: 1 !important;
  }
  .mobile-filter-open {
    //display: none !important;
  }
  .product-count {
    left: 0px;
  }
  .uid-mobile-toolbar {
    left: 0px;
  }
  div.block.filter {
    &[uid=mobile] {
      left: 0px;

    }
  }
}

a.eln-layer-clear-all {
  &.hidden {
    display: none;
  }
  display: inline;
  margin-top: 10px;
  font-size: 15px;
  padding-right: 16px;
  float: right;
  &:before {
    content: '\e616';
    font-family: 'EE-Icons';
    font-size: 10px;
    padding-right: 10px;
    text-decoration: none !important;
  }
}

div.block.filter {

  opacity: 1;
  //display:none;
  &.hidden {
    display: none !important;
  }
  // ultimo
  &.ultimo {
    div.eln-layer-title-section {
      .eln-layer-title {
        font-size: 19px;
      }
      a.eln-layer-clear-all {
        margin-top: 0px;
        padding-right: 0px;
      }
    }
    div.eln-layer {
      div.eln-filter-item {
        div.eln-filter-content {
          .filter-option {
            padding-left: 6px;
            margin-left: -2px;
          }
        }
      }
    }
  }

  div.eln-layer-title-section {
    .eln-layer-title {
      font-size: 25px;
      padding: 0 10px;

    }

  }
  div.eln-layer {
    padding: 5px;
    div.filter-options-item {
      &:nth-last-child(1) {
        border-bottom: none !important;
      }
    }
    &:empty {
      display: none;
    }
    span.back {
      display: none;
      width: 20px;
      padding-top: 10px;
      padding-left: 10px;
    }

    // one filter block
    div.eln-filter-item {
      input[type=checkbox] {
        display: none;
      }
      // title of the filter block
      div.eln-filter-title {
        padding: 10px 40px 10px 10px;
        cursor: pointer;
        text-transform: uppercase;
        font-weight: 600;
        &:after {
          content: '\e622';
          float: right;
          right: -25px;
          font-family: 'EE-Icons';
          position: relative;
        }
      }
      // content of the filter block
      div.eln-filter-content {
        display: none;
        padding: 10px;
        // checkbox to select the value
        input[type="checkbox"] {
          float: left;
        }
        // content of the option
        .filter-option {
          cursor: pointer;
          text-decoration: none;
          color: black;
          margin-left: -5px;
          margin-right: -5px;
          padding-left: 5px;
          padding-top: 2px;
          padding-right: 7px;
          &:hover {
            background-color: #e8e8e8;
          }
          &.disabled {
            opacity: 0.5;
            cursor: not-allowed;
            div.disabled { // swatch and text option
              cursor: not-allowed;
            }
          }
          img.eln-option-image {
            float:left;
            margin-left:5px;
          }
          // number of results for the option
          span.title {
            margin-left: 5px;
            display: inline;
            &:before {
              background-color: #ffffff;
              border: 1px solid #adadad;
              color: transparent;
              float: left;
              height: 1.6rem;
              text-align: center;
              vertical-align: top;
              width: 1.6rem;
              border-radius: 1px;
              content: '';
              font-size: 0;
              transition: font-size 0.1s ease-out, color 0.1s ease-out, border-color 0.1s linear;
            }
            &.selected:before {
              content: '\2714';
              font-size: 1.3rem;
              line-height: 1.1em;
              color: #514943;
            }
          }
          span.count {
            padding-left: 10px;
            &:before {
              content: "(";
            }
            &:after {
              content: ")";
            }
          }
        }

      }
      // ratings filter block
      div.eln-filter-content.ratings {
        div.rating-summary {
          div.rating-result {
            vertical-align: top;
          }
        }
      }

      // Price filter block
      div.eln-filter-content.price {
        // slider
        div.eln-price-slider {
          a.ui-slider-handle {
            font-weight: normal;
            height: 4px;
            padding: 4px;
            width: 4px;
            top: -1px;
          }
        }
        div.price-range {
          font-weight: bold;
          text-align: center;
          .span {
            position: absolute;
            top: 10px;
            margin-left: 9px;
            height: 2px;
            cursor: default;
          }
          input {
            width: 50px;
            height: 20px;
            padding: 0px;
            margin: 0 4px;
            text-align: center;
          }
        }
        div.price-limit {
          font-size: 11px;
          .max {
            float: right;
          }
        }
      }
    }
    // opened filter block
    div.eln-filter-item.active {
      div.eln-filter-content {
        display: block;
        &.swatch {
          display: flex;
        }
      }
      div.eln-filter-title {
        &:after {
          content: '\e621';
        }
      }
    }
    // categlories filter block
    div.eln-filter-item[attribute-code=categories] {
      ul {
        padding-left: 10px;
        margin-bottom: 0;
        span.head {
          margin-bottom: 10px;
          display: block;
          span {
            cursor: pointer;
          }
        }
      }
      // treeview
      ul {
        li {
          list-style: none;
        }
        li.children > span.tree {
          cursor: pointer;
          position: relative;
          border-color: #000 transparent transparent transparent;
          border-style: solid;
          border-width: .5rem .4rem 0 .4rem;
          transition: all .2s linear;
          margin-left: -13px;
          transform: rotate(-90deg);
          margin-top: 7px;
          float: left;
        }
        li.children > ul {
          display: none;
        }
        li.children.active > span.tree {
          transform: rotate(0deg);
        }
        li.children.active > ul {
          margin-top: 7px;
          display: block;
        }
      }
    }

  }
}

// Horizontal filters
div.block.filter.horizontal {
  margin-bottom: 0;
  div.block-content.filter-content {
    min-height: 50px;
    div.eln-layer {
      padding: 0 5px;
      display: inline-block;
      div.filter-options-item {
        border-bottom: 0;
        padding-bottom: 0px;
        display: inline-block;
        .filter-options-title {
          padding: 10px 40px 10px 0px;
        }
      }

      div.swatch-attribute-options {
        width:100%;
        margin-top: 0px;
      }
      div.eln-filter-item.active {
        div.eln-filter-content {
          position: absolute;
          background: white;
          min-width: 200px;
          max-width: 280px;
          z-index: 999;
          border: 1px solid #CCC;
        }
      }
    }
  }

}

.columns {
  .sidebar-main {
    &.moving {
      transition: transform 0.5s ease;
    }
  }
  .sidebar-additional {
    &.moving {
      transition: transform 0.5s ease;
    }
  }
}

@media @smartphones {

  .block.newsletter .form.subscribe {
    width:unset !important;
  }

  .mobile-filter-open {
    display:block !important;
  }
  .columns .sidebar-main {
    order: 0;
    position: relative;
  }

  .page-products .columns {
    padding-top: 0px !important;
  }
  .eln-tool-top {
    display: none !important;
  }

  [uid=left], [uid=right], [uid=top] {
    display: none;
  }
}

.swatch-attribute {
  div.container {
    display: inline-block;
    input.eln-layer-filter {
      width: 100%;
      height: 25px;
      margin-bottom: 10px;
      padding: 6px;
    }
    a.hidden {
      display: none !important;
    }
    span.hidden {
      display: none !important;
    }
  }
  a {
    &.show-more {
      display: none;
      background: none;
      text-align: right;
    }
    &.show-less {
      display: block;
      background: none;
      text-align: right;
    }
  }
}

.swatch-attribute.hide-more {
  a {
    &.hide1:not(.show-more):not(.show-less):nth-of-type(1n+2) {
      display: none !important;
    }
    &.hide2:not(.show-more):not(.show-less):nth-of-type(1n+3) {
      display: none !important;
    }
    &.hide3:not(.show-more):not(.show-less):nth-of-type(1n+4) {
      display: none !important;
    }
    &.hide4:not(.show-more):not(.show-less):nth-of-type(1n+5) {
      display: none !important;
    }
    &.hide5:not(.show-more):not(.show-less):nth-of-type(1n+6) {
      display: none !important;
    }
    &.hide6:not(.show-more):not(.show-less):nth-of-type(1n+7) {
      display: none !important;
    }
    &.hide7:not(.show-more):not(.show-less):nth-of-type(1n+8) {
      display: none !important;
    }
    &.hide8:not(.show-more):not(.show-less):nth-of-type(1n+9) {
      display: none !important;
    }
    &.hide9:not(.show-more):not(.show-less):nth-of-type(1n+10) {
      display: none !important;
    }
    &.hide10:not(.show-more):not(.show-less):nth-of-type(1n+11) {
      display: none !important;
    }
    &.show-more {
      display: block;
    }
    &.show-less {
      display: none;
    }
  }
  span {
    &.hide1:not(.show-more):not(.show-less):nth-of-type(1n+2) {
      display: none !important;
    }
    &.hide2:not(.show-more):not(.show-less):nth-of-type(1n+3) {
      display: none !important;
    }
    &.hide3:not(.show-more):not(.show-less):nth-of-type(1n+4) {
      display: none !important;
    }
    &.hide4:not(.show-more):not(.show-less):nth-of-type(1n+5) {
      display: none !important;
    }
    &.hide5:not(.show-more):not(.show-less):nth-of-type(1n+6) {
      display: none !important;
    }
    &.hide6:not(.show-more):not(.show-less):nth-of-type(1n+7) {
      display: none !important;
    }
    &.hide7:not(.show-more):not(.show-less):nth-of-type(1n+8) {
      display: none !important;
    }
    &.hide8:not(.show-more):not(.show-less):nth-of-type(1n+9) {
      display: none !important;
    }
    &.hide9:not(.show-more):not(.show-less):nth-of-type(1n+10) {
      display: none !important;
    }
    &.hide10:not(.show-more):not(.show-less):nth-of-type(1n+11) {
      display: none !important;
    }
    &.show-more {
      display: block;
    }
    &.show-less {
      display: none;
    }
  }
}
