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

aside > * + * {
  margin-top: 60px;
}
.page_footer{
  .widget-title{
    text-align: center;
  }
}
.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: 20px;
    background-color: transparent;
    border-radius: 0;
    padding-right: 10px;
    overflow: hidden;
    padding-top: 0;
    padding-bottom: 0;

    .item-meta{
      i.fa{
        margin-right: 4px;
      }
    }

    img {
      max-width: 70px;
      height: 70px;
    }
    h3, h4 {
      font-size: 16px;
      font-family: "Montserrat", sans-serif;
      text-transform: none;
      font-weight: 500;
      line-height: 19px;
      margin: 0 0 3px;
      color: $darkFontColor;
      overflow: hidden;
      a{
        &:hover{
          color: $colorMain;
        }
      }
    }
    p {
      line-height: 1.4;
      margin-bottom: 0.5em;
    }
  }

  .page_footer & {
    margin-bottom: 26px;
    & > h3,
    .widget-title {
      margin-bottom: 1.9em;
    }
  }
}

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

@media(max-width: 991px) {
  aside {
    margin: 60px auto;
    max-width: 500px;
  }
}

/* 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: 5em;
  letter-spacing: 0.1em;
  font-family: 'FontAwesome';
  color: $colorMain3;

  &:before {
    content: '\f006\f006\f006\f006\f006';
    color: $colorMain3;
    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
    }

  }
}

.ds{
  .widget_twitter{
    .twitter-item{
      .media{
        .media-body{
          a{
            color: $colorMain;
            &:hover{
              color: $lightColor!important;
            }
          }
        }
      }
    }
  }
}

.widget_twitter{
  .widget-title{
    margin-bottom: 25px;
  }
  .twitter-item{
    margin-top: -7px;
    .fa{
      color: $colorMain;
      font-size: 16px;
    }
    .media{
      align-items: flex-start;
      * + .media-body{
        margin-left: 21px;
      }
      .icon-styled{
        margin-top: 0;
      }
      .media-body{
        & > p{
          margin: 0;
          & + a{
            display: inline-block;
            margin-top: 13px;
          }
        }
        a{
          color: $colorMain3;
          &:hover{
            color: $darkFontColor!important;
          }
        }
      }
      & + .media{
        margin-top: 20px;
      }
    }
  }
}

.widget_post_tabs{
  .nav-tabs .nav-item.show .nav-link, .nav-tabs .nav-link.active{
    border-color: $colorMain2;
    background-color: $colorMain2;
    color: $lightColor;
    font-weight: 600;
  }
  .nav-tabs .nav-item{
    min-width: unset;
    width: 33.33%;
    &:last-child{
      a{
        margin-right: 0;
      }
    }
    @media (max-width: 767px) {
      width: 100%;
      a{
        margin-right: 0;
      }
    }
  }
  .nav-tabs .nav-link{
    &:hover{
      border-color: $colorMain2;
      background-color: $colorMain2;
      color: $lightColor;
    }
  }
  .tab-content{
    background-color: $greyColor;
  }
  .tab-content::before{
    background-color: $colorMain2;
  }
}

@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';
