// -----------------------------------------------------------------------------
// This file contains all styles related to the header of the site/application.
// -----------------------------------------------------------------------------

/*--------------------------------------------------------------
#{$g}
--------------------------------------------------------------*/

/* #{$g-1} */
.full-layer-outer-header {
  background-color: $g-white;
  border-bottom: 1px solid $g-border-color;
}

.primary-nav {
  float: left;
}

.secondary-nav {
  float: right;
}

/* #{$g-2} */
.full-layer-mid-header {
  background-color: $g-white;
  padding: 35px 0;
  .row {
    position: relative;
  }
}

.brand-logo {
  a {
    display: inline-block;
    vertical-align: top;
  }
}



.form-searchbox {
  width: 100%;
  position: relative;
  overflow: hidden;

  .text-field {
    padding: 0 0 0 15px;
    border-color: $g-brand-color;
  }

  .select-hide {
    visibility: hidden;
  }

  .select-box-position {
    position: absolute;
    right: 40px;
    top: 50%;
    transform: translateY(-50%);

    .select-box {
      border-left: 1px solid $g-brand-color;
      border-right: none;
      border-top: none;
      border-bottom: none;
    }
  }

  button {
    width: 40px;
    height: 46px; // because of text-field border
    position: absolute;
    right: 0;
    top: 50%;
    padding: 0;
    transform: translateY(-50%);
  }
}

/**
 * A dummy Select Menu at the end of the document which will help us to calculate
 * the value of correct width.
 */
.select-dummy-wrapper {
  & #compute-select {
    display: none;
    & option {
      display: none;
    }
  }
}

.mid-nav {
  > li {
    margin-left: 22px;
    > a {
      padding: 0;
      font-size: 25px;

      &#mini-cart-trigger:hover {
        color: $g-brand-secondary-color;
      }
    }
  }
}

.item-counter {
  color: $g-white;
  font-size: 12px;
  line-height: 26px;
  font-weight: 700;
  position: absolute;
  background-color: $g-brand-color;
  width: 26px;
  left: 17px;
  top: -15px;
  text-align: center;
  border-radius: 50%;
}

.item-price {
  color: $g-brand-secondary-color;
  font-weight: bold;
  font-size: 15px;
}

/* #{$g-3} */
.responsive-search-wrapper {
  width: 100%;
  height: 100%;
  position: fixed;
  display: none;
  top: 0;
  left: 0;
  background-color: rgba(0, 0, 0, .94);
  text-align: center;
  z-index: 999998;

  button {
    background-color: transparent;
    color: $g-white;
    z-index: 999998;
    position: absolute;
    font-size: 28px;
    right: 50px;
    top: 70px;
  }
  .responsive-search-container {
    // Vertical Center
    position: relative;
    top: 50%;
    transform: translateY(-50%);

    p {
      color: $g-white;
      font-size: 14px;
      margin-bottom: 40px;
      letter-spacing: 2px;
      text-transform: uppercase;
    }
    .responsive-search-form {
      position: relative;// for search icon
      .responsive-search-field {
        width: 100%;
        background-color: transparent;
        box-shadow: 0 3px 0 0 rgba(255, 255, 255, .1);
        border: 0;
        text-align: center;
        font-size: 35px;
        padding: 20px;
        color: $g-white;
        &:focus {
          outline: 0;
        }
        &::placeholder {
          color: $g-white;
        }
      }
      i {
        position: absolute;
        font-size: 25px;
        right: 15px;
        top: 30px;
        color: rgba(255,255,255,.2);
      }
    }
  }
}


/* #{$g-4} */
.fixed-responsive-container {
  display: none;
  position: fixed;
  z-index: 11;
  right: 24px;
  bottom: 14px;

  .fixed-responsive-wrapper {
    margin-bottom: 8px;
    position: relative;
    button[type="button"], a {
      padding: 0;
      font-size: 15px;
      width: 50px;
      height: 50px;
      border-radius: 50%;
      background: $g-white;
      color: $g-brand-secondary-color;
      box-shadow: 1px 1px 3px rgba(0, 0, 0, .2);
    }

    a {
      display: inline-block;
      line-height: 50px;
      text-align: center;
    }
  }
}

.fixed-item-counter {
  width: 26px;
  height: 26px;
  top: -4px;
  left: -10px;
  position: absolute;
  font-size: 11px;
  text-align: center;
  line-height: 26px;
  color: white;
  border-radius: 50%;
  display: inline-block;
  background-color: $g-brand-color;
}

/* #{$g-5} */
.mini-cart-open {
  &:after {
    content: '';
    width: 100%;
    height: 100%;
    position: fixed;
    top: 0;
    left: 0;
    display: block;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 19999;
  }
  .mini-cart {
    right: 0;
  }
}

.mini-cart {
  background: $g-white;
  width: 300px;
  position: fixed;
  top: 0;
  overflow: auto;
  z-index: 20000;
  height: 100%;
  right: -300px;
  transition: all .3s;

  .mini-cart-header {
    padding: 15px;
    background: #f9fafc;
    color: #292929;
    font-size: 14px;
    font-weight: 600;
    button {
      background-color: transparent;
      font-size: 25px;
      position: absolute;
      right: 10px;
      top: 4px;
      display: block;
    }
  }
}

.mini-cart-list {
  margin: 0;
  height: auto;
  overflow: auto;
  padding: 16px;
  > li {
    list-style: none;
    padding: 10px 0;
    margin-bottom: 20px;
    border-bottom: 1px dotted #eee;

    > a {
      display: block;
      img {
        float: left;
        width: 50px;
        height: 50px;
        margin-right: 13px;
      }
      .mini-item-name {
        display: block;
        font-size: 13px;
        opacity: .8;
      }
      .mini-item-price, .mini-item-quantity {
        font-size: 13px;
      }
      .mini-item-price {
        font-weight: 600;
        color: $g-brand-color;
      }

      &:hover {

        .mini-item-name {
          color: $g-brand-secondary-color;
        }

        .mini-item-quantity {
          color: $g-text-color;
        }
      }
    }

  }
}

.mini-shop-total, .mini-action-anchors {
  padding: 0 16px;
}

.mini-shop-total {
  margin-bottom: 18px;
  .mini-total-heading, .mini-total-price {
    font-size: 16px;
    font-weight: 600;
    text-transform: uppercase;
  }

  .mini-total-heading {
    color: $g-brand-secondary-color;
  }

  .mini-total-price {
    color: $g-brand-color;
  }
}

.mini-action-anchors {
  .cart-anchor, .checkout-anchor {
    display: block;
    margin-bottom: 16px;
    border-radius: 4px;
    font-weight: 700;
    padding: 10px 20px;
    font-size: 14px;
    text-align: center;
  }



  .cart-anchor {
    border: 2px solid $g-brand-secondary-color;
    color: $g-brand-secondary-color;
  }

  .checkout-anchor {
    background-color: $g-brand-color;
    color: $g-white;
  }

}

/* #{$g-6} */
.full-layer-bottom-header {
  background-color: $g-white;
}

.bottom-nav {
  padding: 0 30px;
  > li {
    > a {
      padding: 15px 0;
      font-size: 14px;
      position: relative; // Its Just For Superscript
      font-weight: bold;
    }
    & + li {
      margin-left: 32px;
    }
  }
}

/* Superscript-labels */
.superscript-label-new, .superscript-label-hot, .superscript-label-discount {
  position: absolute;
  text-transform: uppercase;
  top: -4px;
  display: inline;
  padding: 1px 7px;
  color: $g-white;
  font-size: 9px;
  right: 14px;
  line-height: normal;
  letter-spacing: 1px;
  &:after {
    content: '';
    width: 0;
    height: 0;
    display: block;
    position: absolute;
    right: 18px;
    top: 90%;
    border-width: 6px 7px 0 6px;
    border-style: solid;
    z-index: 100;
  }
}

.superscript-label-new {
  background: #007bff;
  &:after {
    border-color: #007bff rgba(0, 0, 0, 0) rgba(0, 0, 0, 0) rgba(0, 0, 0, 0);
  }
}

.superscript-label-hot {
  background: #FF3860;
  &:after {
    border-color: #FF3860 rgba(0, 0, 0, 0) rgba(0, 0, 0, 0) rgba(0, 0, 0, 0);
  }
}

.superscript-label-discount {
  background: #ffc107;
  &:after {
    border-color: #ffc107 rgba(0, 0, 0, 0) rgba(0, 0, 0, 0) rgba(0, 0, 0, 0);
  }
}
