/*
** Widgets
*/
aside h2 {
  margin-bottom: 0;
  line-height: 1;
}

aside > * + * {
  margin-top: 66px;
  @media (max-width: 991px) {
    margin-top: 46px;
  }
}

.widget {
  position: relative;
  & > h3,
  .widget-title {
    @include widget-title();
  }

  //for shortcodes demo
  & > h2:last-child {
    line-height: 1;
  }

  //our custom widgets with bootstrap .media element
  li.media {
    margin-bottom: 30px;
    margin-top: 0;
    position: relative;
    &:last-child {
      margin-bottom: 0;
    }
    h3, h4 {
      margin-top: 4px;
      letter-spacing: 0;
      font-weight: 500;
      line-height: 1.5;
      margin-bottom: 14px;
      text-transform: none;
      font-size: inherit;
    }
    p {
      line-height: 1.4;
      margin-bottom: 0.5em;
    }
    .item-meta span {
      padding: 0;
    }
  }

  .page_footer & {
    margin-top: 50px;
    & > h3,
    .widget-title {
      margin-bottom: 16px;
      font-weight: 500;
    }
  }
}

.page_footer .widget_nav_menu {
  @media(max-width: 767px) {
    margin-bottom: -7px;
  }
}

.widget-title.next-image-background {
  position: relative;
  z-index: 2;
  & + img {
    position: absolute;
    left: 0;
    top: -25px;
    opacity: 0.5;
  }
  .text-center & + img {
    left: 50%;
    transform: translateX(-50%);
    max-width: 60px;
  }
}

@media(max-width: 991px) {
  aside {
    margin: 50px auto 0;
  }
  &.widget-feed {
    margin-top: 0;
  }
}

/* affix-aside */
.affix-aside {
  position: relative;
  &.affix {
    position: fixed;
    //oriented header height
    top: 100px;
  }
  &.affix-bottom {
    position: absolute !important;
  }
  &.affix-top {
    width: inherit !important;
    left: auto !important;
  }

  @media(max-width: 991px) {
    &,
    &.affix-top,
    &.affix,
    &.affix-bottom {
      position: static !important;
      width: 100% !important;
    }
  }
}

//p.stars removed
.stars {
  & > span {
    display: flex;
  }

  a {
    position: relative;
    width: 1em;
    color: transparent;
    text-indent: -999em;

    &:before {
      position: absolute;
      top: 0;
      left: 0;
      width: 1em;
      height: 1em;
      line-height: 1;
      text-indent: 0;
      font-family: 'FontAwesome';
    }
    &:before,
    &:hover ~ a:before {
      color: $fontColor;
      content: "\f006"
    }
  }
  &.selected a.active:before,
  &:hover a:before {
    content: "\f005";
    color: $colorMain;
    opacity: 1;
  }
  &.selected {
    a.active ~ a:before {
      content: "\f005";
      color: $fontColor;
      opacity: .75
    }
    a:not(.active):before {
      content: "\f005";
      color: $colorMain;
      opacity: 1
    }
  }
}

.star-rating {
  overflow: hidden;
  position: relative;
  height: 1em;
  line-height: 1;
  font-size: 14px;
  width: 5.7em;
  letter-spacing: 0.2em;
  font-family: 'FontAwesome';
  color: $fontColor;

  &:before {
    content: '\f006\f006\f006\f006\f006';
    float: left;
    top: 0;
    left: 0;
    position: absolute
  }

  span {
    overflow: hidden;
    float: left;
    top: 0;
    left: 0;
    position: absolute;
    padding-top: 1.5em;

    &:before {
      content: '\f005\f005\f005\f005\f005';
      top: 0;
      position: absolute;
      left: 0
    }

  }
}

.widget_author_bio {
  padding: 50px 30px 41px;
  img {
    max-width: 200px;
    border-radius: 50%;
  }
}

.widget.widget_portfolio .photo {
  display: inline-block;
    img {
      margin: 5px 3px;
      max-width: 163px;
  }
}


.widget.widget_recent_posts {
  * + .media-body, .media-body + * {
      margin-left: 19px;
  }
}

aside {
  .tagcloud {
    margin-bottom: -8px;
  }
 .widget_portfolio {
    margin-bottom: -4px;
  }
}
.widget.widget_popular_entries li.media h4 {
  width: 229px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@import 'widgets/search_mailchimp';
@import 'widgets/nav_cat_arch_meta_pages';
@import 'widgets/calendar';
@import 'widgets/rss';
@import 'widgets/tag_cloud';
@import 'widgets/flickr';
@import 'widgets/instagram';
@import 'widgets/access_press';
@import 'widgets/twitter';
@import 'widgets/post_slider';
@import 'widgets/post_tabs';
@import 'widgets/post_2cols';


