/**
 * Block general.
 */
.block {
  h2 {
    margin-top: 30px;
    margin-bottom: 12px;
    font-size: 16px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
  }
}

/**
 * Sidebar block general.
 */
.site-sidebar {
  .block {
    h2 {
      margin-top: 0;
      margin-bottom: 10px;
    }
  }
}

/**
 * Basic Promotion block.
 */
.block-type-basic-promotion {
  background-color: #000;
  padding: 12px;
  margin-bottom: 20px;
  text-align: center;
  color: #fff;

  .field--name-field-icon {
    display: inline-block;
    padding-right: 10px;
    vertical-align: middle;

    img {
      height: 45px;
      width: auto;
    }
  }

  .field--name-field-title {
    display: inline-block;
    padding: 5px 10px 5px 0;
    font-size: 28px;
    font-weight: 700;
    vertical-align: middle;
  }

  .field--name-field-short-promo {
    display: inline-block;
    padding: 5px 12px 5px 0;
    font-size: 18px;
    font-weight: 700;
    color: $c-primary;
    vertical-align: middle;
  }

  .field--name-field-promo-link {
    display: inline-block;
    vertical-align: middle;
    margin: 5px 0;

    a {
      position: relative;
      padding: 6px 20px;
      background-color: darken($c-primary, 10%);
      border-color: darken($c-primary, 10%);
      border-radius: $border-radius;
      font-weight: 600;
      color: #fff;
      text-transform: capitalize;
      transition: color .1s ease-in-out, background-color .1s ease-in-out, border-color .1s ease-in-out, opacity .1s ease-in-out;

      &:after {
        position: relative;
        display: inline-block;
        margin-left: 3px;
        font-family: $f-glyphicons;
        font-size: 12px;
        content:"\e258";
      }

      &:hover, &:focus {
        background-color: $c-primary;
        border-color: $c-primary;
      }
    }
  }
}

/**
 * 3 CTAs block.
 */
.block-type-3-ctas {
  position: relative;
  text-align: center;

  h2 {
    display: inline-block;
    position: relative;
    z-index: 2;
    margin-bottom: 30px;
    padding: 0 25px;
    background-color: #fff;
    font-size: 24px;
  }

  // Only appears if h2 title is displayed.
  .underline {
    display: inline-block;
    position: absolute;
    top: 44px;
    left: 0;
    z-index: 1;
    width: 100%;
    border-bottom: 1px solid $gray;
  }
}

/**
 * 1 CTA block.
 */
.block-type-1-cta {
  display: inline-block;
  width: 68%;
  text-align: center;
  vertical-align: top;

  @media (max-width: $screen-sm-max) {
    width: 100%;
    margin-bottom: 40px;
  }

  a {
    display: inline-block;
    position: relative;

    .block-type-1-cta__content-wrapper {
      position: absolute;
      top: 47%;
      z-index: 5;
      width: 100%;
      transform: translateY(-50%);
    }

    .field--name-field-icon img {
      width: 100%;
      max-width: 83px;
      height: auto;
      margin: 0 auto;

      @media (max-width: $screen-xs-max) {
        max-width: 50px;
      }
    }

    .field--name-field-title {
      margin: 10px 0 16px;
      font-family: $f-primary-condensed;
      font-size: 48px;
      font-weight: 300;
      letter-spacing: 0.08em;
      line-height: 1em;
      color: #fff;

      @media (max-width: $screen-xs-max) {
        font-size: 40px;
      }
    }

    .field--name-field-cta-image-large img {
      opacity: 1;
    }

    &:hover, &:focus {
      .field--name-field-cta-image-large img {
        opacity: 0.85;
      }
    }
  }
}

/**
 * Customer Service menu block.
 */
.block-customer-service-content-block {
  display: inline-block;
  width: 29%;
  margin-left: 2%;
  vertical-align: top;

  @media (max-width: $screen-sm-max) {
    width: 100%;
    margin-left: 0;
  }

  h2 {
    display: block;
    padding: 33px 30px 21px;
    margin: 0;
    background: #000;
    font-size: 25px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #fff;

    @media (max-width: $screen-md-max) {
      padding: 20px;
      font-size: 22px;
    }
  }

  ul {
    width: 100%;

    li {
      display: block;
      border-bottom: 1px solid #ccc;

      a {
        position: relative;
        padding: 25px 10px 22px 90px;
        font-size: 18px;
        letter-spacing: 0.06em;
        color: $gray-darker;

        @media (max-width: $screen-md-max) {
          padding: 17px 10px 17px 75px;
          letter-spacing: 0;
        }

        &.is-active {
          color: $gray-darker;
        }

        &:before {
          display: inline-block;
          position: absolute;
          content: '';
        }

        &:hover, &:focus {
          color: #000;
        }
      }

      // Icons.
      &.menu__item--shipping-information a:before {
        top: 22px;
        left: 33px;
        width: 45px;
        height: 35px;
        background: url(../gfx/icon-shipping-box.svg) center center no-repeat;
        background-size: 45px 35px;

        @media (max-width: $screen-md-max) {
          top: 14px;
          left: 20px;
        }
      }

      &.menu__item--returns--exchanges a:before {
        top: 22px;
        left: 35px;
        width: 37px;
        height: 31px;
        background: url(../gfx/icon-circle-arrows.svg) center center no-repeat;
        background-size: 37px 31px;

        @media (max-width: $screen-md-max) {
          top: 14px;
          left: 22px;
        }
      }

      &.menu__item--faq a:before {
        top: 21px;
        left: 37px;
        width: 34px;
        height: 34px;
        background: url(../gfx/icon-question.svg) center center no-repeat;
        background-size: 34px 34px;

        @media (max-width: $screen-md-max) {
          top: 13px;
          left: 24px;
        }
      }

      &.menu__item--contact-us a:before {
        top: 22px;
        left: 37px;
        width: 36px;
        height: 28px;
        background: url(../gfx/icon-headset.svg) center center no-repeat;
        background-size: 36px 28px;

        @media (max-width: $screen-md-max) {
          top: 14px;
          left: 24px;
        }
      }

      &.menu__item--live-chat a:before {
        top: 20px;
        left: 36px;
        width: 38px;
        height: 37px;
        background: url(../gfx/icon-chat-2.svg) center center no-repeat;
        background-size: 38px 37px;

        @media (max-width: $screen-md-max) {
          top: 12px;
          left: 23px;
        }
      }
    }
  }
}

/**
 * Newsletter Sign-up webform block.
 * @TODO - If another webform block is added, need to find a better way to add this icon.
 */
.block-webform-block {
  padding: 15px;
  margin-bottom: 20px;
  text-align: center;
  background: #000 url(../gfx/logo-icon-invert-watermark.svg) 10% 50% no-repeat;
  background-size: 200px 200px;

  @media (max-width: $screen-sm-max) {
    background-position: 50% center;
    background-size: 300px 300px;
  }

  &:before {
    display: inline-block;
    position: relative;
    vertical-align: middle;
    margin-right: 5px;
    width: 85px;
    height: 85px;
    background: url(../gfx/logo-icon-invert.svg) center center no-repeat;
    background-size: 85px 85px;
    content: '';

    @media (max-width: $screen-sm-max) {
      margin-right: 0;
      margin-bottom: 5px;
      width: 100%;
    }
  }
}

form.newsletter-signup-form {
  display: inline-block;
  vertical-align: middle;
  width: calc(100% - 365px);

  @media (max-width: $screen-md-max) {
    width: calc(100% - 240px);
  }

  @media (max-width: $screen-sm-max) {
    width: 100%;
  }

  h2 {
    display: inline-block;
    vertical-align: middle;
    padding: 5px 10px 5px 0;
    margin: 0;
    font-size: 28px;
    text-transform: uppercase;
    color: #fff;
    letter-spacing: 0.02em;
  }

  h3 {
    display: inline-block;
    vertical-align: middle;
    padding: 5px 12px 5px 0;
    margin: 0;
    font-size: 18px;
    font-weight: 700;
  }

  // H6 only used to break to a new line.
  h6 {
    margin: 0;
    padding: 0;
    font-size: 0;
  }

  .form-optional {
    display: none;
  }

  .form-item {
    display: inline-block;
    margin: 3px 6px 10px 0;

    .form-control {
      font-size: 16px;
    }

    &.form-item-email-address {
      max-width: 290px;
    }
  }

  .form-actions {
    display: inline-block;
    margin: 0;

    .btn-primary {
      background-color: darken($c-primary, 10%);
      border-color: darken($c-primary, 10%);

      &:hover, &:focus {
        background-color: $c-primary;
        border-color: $c-primary;
      }
    }
  }
}

/**
 * Catalog selected facet summary.
 */
.block-facets-summary {
  text-align: right;

  @media (min-width: $screen-md-min) {
    text-align: left;
  }

  // Block title.
  h2 {
    display: none;
  }

  > ul {
    display: inline-block;
    width: 100%;
    margin: 0 0 10px;
    padding: 0;
    vertical-align: top;

    @media (min-width: $screen-sm-min) {
      padding: 0 0 15px;
      border-bottom: 1px solid $gray-light;
    }

    li {
      display: inline-block;
      margin: 0;
      padding: 0;
      vertical-align: top;

      a {
        position: relative;
        display: inline-block;
        margin: 0 5px 5px 0;
        padding: 2px 35px 4px 10px;
        font-size: 15px;
        color: $c-body;
        text-decoration: none;
        background: #fff;
        border: 1px solid $gray;

        @media (min-width: $screen-sm-min) {
          padding: 2px 40px 4px 15px;
        }

        // Close icon.
        &:after {
          @include fa-icon();
          content: $fa-var-times;
          position: absolute;
          top: 0;
          right: 0;
          display: block;
          margin: 0;
          padding: 7px 0 0 0;
          width: 25px;
          height: 100%;
          color: $c-body;
          text-align: center;
          background: $gray-light;
          transition: color .2s ease-in-out, background-color .2s ease-in-out, border-color .2s ease-in-out;
        }
        .js-facet-deactivate {
          display: none;
        }

        &:hover,
        &:focus {
          color: $c-link;
          border-color: $c-link;

          // Close icon.
          &:after {
            color: #fff;
            background: $c-link;
          }
        }
      }
    }
  }
}

/**
 * Side column facets.
 */
.block-facets {
  padding: 10px 10px 10px 15px;

  ul {
    padding: 0;
    list-style: none;

    li {
      position: relative;

      .facets-checkbox {
        position: absolute;
        top: 1px;
        left: 0;
        height: 17px;
        width: 17px;
      }

      label {
        margin-left: 24px;
        font-size: 14px;
        font-weight: normal;
      }

      &.facet-item--expanded {
        padding: 10px 10px 5px 15px;
        margin: 5px -10px 5px -15px;
        background: #f7f7f7;

        > .facets-checkbox {
          top: 10px;
          left: 15px;
        }

        .facet-item--expanded {
          margin: -5px 0 0 -5px;
          padding: 5px 0 0 15px;
        }
      }
    }
  }
}

.facets-soft-limit-link {
  display: block;
  position: relative;
  bottom: 12px;
  max-width: 200px;
  padding: 2px 7px;
  margin-bottom: 12px;
  background-color: transparent;
  border: 1px solid #ccc;
  color: #666;
  font-size: 14px;
  text-align: center;
  outline: none;
  cursor: pointer;
  transition: color .1s ease-in-out, background-color .1s ease-in-out, border-color .1s ease-in-out;

  &:hover, &:focus {
    background-color: #f7f7f7;
    border: 1px solid #bbb;
    color: #333;
  }
}

/**
 * Google maps.
 */
.block-type-google-map {
  iframe {
    width: 100%;
  }
}

.site-sidebar .block-type-google-map h2 {
  margin-bottom: 18px;
  font-size: 26px;
  font-weight: 300;
  text-transform: none;
  letter-spacing: initial;
}
