.sidebar-content {
  max-width: 840px;
  width: 100%;
  flex: 1;

  @include ie11() {
    flex: none;
  }
}
.thb-fixed {

  @include min-break($break-small) {
    position: -webkit-sticky;
    position: sticky;
    top: 40px;

    .admin-bar & {
  		top: 86px;
  	}
  }
  .admin-bar & {
    @media screen and (min-width: 783px){
      top: 72px;
    }
  }
  .fixed-header-on.fixed-header-scroll-off & {
    @include min-break($break-small) {
      top: 60px;
    }
  }
  .fixed-header-on.fixed-header-scroll-off.admin-bar & {
    @include min-break($break-small) {
  		top: 126px;
    }
    @media screen and (min-width: 783px){
        top: 112px;
    }
  }
}
.sidebar {
  display: flex;
  flex-direction: column;

  @include min-break($break-small) {
    max-width: 300px;
    margin-left: auto;

    .rtl & {
      margin-left: 0;
      margin-right: auto;
    }
  }

  &.columns {

    .wpb_wrapper:not(.thb-fixed) {
      height: 100%;
    }
    @include min-break($break-small) {
      padding: 0;
      padding-right: 15px;
    }
		@include min-break($break-medium) {
			max-width: 315px;
			flex-basis: 315px;
    }
    .wpb_widgetised_column {
      >.wpb_wrapper {
        display: flex;
        flex-direction: column;
      }
    }
  }
}
.thb-sticky-separator {
  margin: 0;
  display: none;
}
.widget {
  margin-bottom: 45px;
  font-size: 14px;
  .thb-widget-title {
    font-size: 12px;
    line-height: 1;
    font-weight: 500;
    text-transform: uppercase;
    margin-bottom: 30px;
  }
  &.style2 {
    .thb-widget-title {
      display: flex;
      justify-content: center;
      align-items: center;
      text-align: center;
      font-size: 11px;
      height: 40px;
      background: #f9f3f2;
    }
  }
	&.style3 {
		.thb-widget-title {
			overflow: hidden;
			font-size: 24px;
			font-weight: 500;
			span {
				display: inline-flex;
				position: relative;
				padding-right: 15px;
				&:after {
					content: '';
			    position: absolute;
			    top: 50%;
			    margin-top: 0;
			    display: block;
			    height: 1px;
			    background: #0a0a0a;
			    width: 900em;
			    pointer-events: none;
					left: 100%;
				}
			}
    }
	}
  ul {
    padding: 0;
    margin: 0;
    list-style: none;

    li {
      margin-bottom: 10px;
    }
  }
  &.widget_media_image {
    >a {
      display: block;
      line-height: 1;
    }
  }
  &.thb_widget_posts {
    .thb-carousel {
      .post {
        margin: 0;
        min-height: 320px;

        .post-inner-content {
          display: flex;
          height: 100%;
          flex-direction: column;
          justify-content: center;
          padding: 20% 10%;
        }
      }
    }
    .post {
      .thb-post-bottom ul li {
        margin-bottom: 0;
      }

    }
    div.post.widget-large {
      &:last-of-type {
        margin-bottom: 0;
      }
    }
    div.post.thumbnail-style4,
    div.post.thumbnail-style8 {
      &:last-of-type {
        margin-bottom: 0;
      }
    }
    .post.thumbnail-style4 {
      margin-bottom: 20px;
    }
		.post.widget-video {
      margin: 0;

      .post-title {
        border-top: 1px dotted $border;
        padding: 15px 0;
        margin: 0;
        h6 {
          margin: 0;
        }
      }
      .post-gallery {
        margin: 0;
        + .post-title {
          border-top: 0;
        }
      }
      &.widget-video-style2 {
        @extend .white-post-content;
        margin-bottom: 20px;
        .post-gallery {
          position: relative;
          .post-title {
            position: absolute;
            bottom: 0;
            left: 0;
            padding: 15px;
            border: 0;
            z-index: 10;
            @include min-break($break-small) {
              padding: 25px;
            }
          }
          &:after {
            content: '';
            display: block;
            position: absolute;
            bottom: 0;
            left: 0;
            width: 100%;
            height: 50%;
            z-index: 1;
            pointer-events: none;
            @include background-image(linear-gradient(rgba(0,0,0,0), rgba(0,0,0,0.55)));
          }
        }
      }
    }
  }
  &.thb_widget_top_reviews {
    .post {
      margin: 0;
      position: relative;
      .post-gallery {
        margin: 0;

        .wp-post-image {
          opacity: 0.8;
        }
      }
      .post-title {
        display: flex;
        align-items: center;
        margin: 0;
        padding: 20px;
        width: 100%;
        h6 {
          margin: 0;
          font-size: 14px;
        }
      }
      .widget-review-title-holder {
        min-height: 60px;
        display: flex;
        border-left: 1px solid $border;
        border-right: 1px solid $border;
        border-bottom: 1px solid $border;

        .thb-widget-score {
          display: flex;
          width: 60px;
          flex-shrink: 0;
          flex-direction: column;
          text-align: center;
          justify-content: center;
          border-left: 1px solid $border;
          font-size: 10px;

          strong {
            font-size: 18px;
            color: $accent;
            line-height: 1;
            margin-bottom: 5px;
          }
        }
      }
      .post-gallery {
        + {
          .widget-review-title-holder {
            position: absolute;
            left: 0;
            bottom: 0;
            width: 100%;
            border: 0;
            border-top: 1px solid rgba(#fff,0.3);
            color: #fff;

            .post-title a {
              color: #fff;

              &:hover {
                span {
                  border-color: #fff;
                }
              }

            }
            .thb-widget-score {
              border-color: rgba(#fff,0.3);

              strong {
                color: #fff;
              }
            }
          }
        }
      }
    } // .style1
    .widget-review-style2 {
      margin-bottom: 20px;
      .widget-review-style2-header {
        display: flex;
        align-items: flex-start;
        margin-bottom: 10px;
        .post-title {
          padding: 0 20px 0 0;
          h6 {
            font-size: 16px;
          }
        }
        .widget-review-style2-score {
          font-weight: 400;
          font-size: 16px;
        }
      }
      &:last-of-type {
        margin: 0;
      }
    } // .style2

  } // .thb_widget_top_reviews
  &.thb_widget_posts_video {
    .post.widget-video {
      margin: 0;

      .post-title {
        border-top: 1px dotted $border;
        padding: 15px 0;
        margin: 0;
        h6 {
          margin: 0;
        }
      }
      .post-gallery {
        margin: 0;
        + .post-title {
          border-top: 0;
        }
      }
      &.widget-video-style2 {
        @extend .white-post-content;
        margin-bottom: 20px;
        .post-gallery {
          position: relative;
          .post-title {
            position: absolute;
            bottom: 0;
            left: 0;
            padding: 15px;
            border: 0;
            z-index: 10;
            @include min-break($break-small) {
              padding: 25px;
            }
          }
          &:after {
            content: '';
            display: block;
            position: absolute;
            bottom: 0;
            left: 0;
            width: 100%;
            height: 50%;
            z-index: 1;
            pointer-events: none;
            @include background-image(linear-gradient(rgba(0,0,0,0), rgba(0,0,0,0.55)));
          }
        }
      }
    }
    .post {
      &:last-child {
        margin: 0;
      }
    }
  } // .thb_widget_posts_video
  &.thb_widget_top_categories {
    .thb-widget-category-link {
      display: block;
      margin-bottom: 20px;
      position: relative;
      height: 90px;
      background: $black;
      img {
        @extend .object-fit;
      }
      .thb-widget-category-name {
        position: absolute;
        left: 0;
        bottom: 10px;
        display: block;
        line-height: 1;
        text-transform: uppercase;
        font-weight: 600;
        font-size: 11px;
        color: #fff;
        background: $black;
        @extend .mid-transition;
        @include min-break($break-small) {
          left: -8px;
        }
        span {
          display: inline-block;
          padding: 12px 15px;
        }
        .thb-widget-category-count {
          background: rgba(#fff,0.2);
          text-align: center;
          padding: 12px 12px;
        }
      }
      &:hover {
        .thb-widget-category-name {
          background: $accent;
        }
      }
    }
  } // .thb_widget_top_categories
  &.thb_widget_about {
    .thb-about-widget-holder {
      display: flex;

      @include max-break($break-small) {
        flex-direction: column;

        figure {
          margin: 0 0 20px 0;
        }
      }
      figure {
        width: 90px;
        height: 90px;
        margin-right: 20px;
        flex-shrink: 0;
        img {
          @extend .object-fit;
          border-radius: 50%;
        }
      }
			&.style2 {
				flex-direction: column;
				text-align: center;
				figure {
					width: 200px;
					height: 200px;
					margin: 0 auto 25px;
				}
	      .thb-about-widget-description {
	        font-size: 13px;
	        @include min-break($break-small) {
	          padding: 0 20px;
	        }
	      }
	    }
    }
    .thb-about-widget-description {
      font-size: 14px;

      p {
        font-size: inherit;
        margin: 0;
      }
    }
  } //.thb_widget_about
  &.thb_widget_authors {
    .thb-widget-author {
      display: flex;
      margin-bottom: 20px;

      &:last-child {
        margin-bottom: 0;
      }
      @include max-break($break-small) {
        flex-direction: column;

        figure {
          margin: 0 0 20px 0;
        }
      }
      figure {
        width: 70px;
        height: 70px;
        margin-right: 20px;
        flex-shrink: 0;
        img {
          @extend .object-fit;
          border-radius: 50%;
        }
      }
      .thb-widget-author-description {
        font-size: 11px;

        a[rel="author"] {
          display: block;
          font-weight: 500;
          font-size: 14px;
          line-height: 1;
          margin-bottom: 7px;
        }
        p {
          font-size: inherit;
          margin: 0;
        }
      }
    }
  } //.thb_widget_authors
  &.widget_nav_menu,
  &.widget_pages {
    .thb-arrow {
      display: inline-flex;
      padding-left: 15px;
      cursor: pointer;

      i {
        pointer-events: none;
      }
      .rtl & {
        padding-left: 0;
        padding-right: 15px;
      }
    }
    .sub-menu,
    .children {
      display: none;
      padding: 10px 0 0 20px;
      list-style: none;
      .rtl & {
        padding: 10px 20px 0 0;
      }
      li {
        &:last-child {
          margin: 0;
        }
      }
    }
  }
  &.widget_recent_entries {
    .post-date {
      font-size: 10px;
      text-transform: uppercase;
      font-weight: 400;
      line-height: 1;
      opacity: 0.8;
      margin-left: 10px;
    }
  } // .widget_recent_entries
  &.widget_search,
  &.widget_product_search {
    .search-field {
      padding-left: 0;
      padding-right: 0;
    }
    .autocomplete-wrapper {
      display: none;
    }
  } // .widget_search
  &.widget_categories {
    .children {
      padding: 10px 0 0 15px;

      .rtl & {
        padding: 10px 15px 0 0;
      }
    }
  } // .widget_categories
  &.widget_rss {
    li {
      margin-bottom: 15px;

      .rsswidget {
        font-weight: 600;
      }
      .rss-date {
        opacity: 0.8;
      }
      .rssSummary {
        font-size: 12px;
        margin-bottom: 5px;
      }
      cite {
        font-size: 14px;
      }
    }
  } // .widget_rss
  &.widget_categories,
  &.widget_archive,
  &.widget_product_categories,
  &.woocommerce-widget-layered-nav {
    color: rgba($black, 0.7);
		li {
			text-align: right;
			line-height: 1;
      @extend .cf;
			a {
				display: inline;
				float: left;
			}
      .rtl & {
        text-align: left;

        a {
          float: right;
        }
      }
		}
	} // .widget_categories
  &.widget_recent_comments {
    color: rgba($black, 0.7);
  } // .widget_recent_comments
  &.widget_calendar {
		table {
			background: transparent;
			border: 0;
			width: 100%;
      max-width: 300px;
      margin: 0 auto;
			border-collapse: collapse;
			table-layout: fixed;
			@extend .reset;
			@include box-shadow(none);
			thead, tbody, tfoot {
				border: 1px solid rgba(0,0,0,0.07);

				.dark & {
					border-color: rgba(255,255,255,0.1);
				}
			}
      thead, tbody {
        border-bottom: 0;
      }
			thead {
				background: transparent;
				font-size: 12px;
				th {
					padding: 13px 0;
					color: #303030;
					text-align: center;
					font-weight: 800;

					.dark & {
						color: #fff;
					}
				}
			}
			tbody {
				background: transparent;
				tr:nth-child(even) {
					background: rgba(0, 0, 0, 0.02);
				}
				td {
					font-size: 12px;
					color: #686868;
					text-align: center;
					padding: 9px 0;

					.dark & {
						color: #fff;
					}
				}
			}
			tfoot {
				background: transparent;
				margin-top: 10px;
				border-top: 1px solid rgba(0,0,0,0.07);
				tr {
					td {
						padding: 12px 14px;
						font-size: 12px;

						a {
							color: #737373;
							text-transform: uppercase;
							font-weight: 500;
						}
					}
					#next {
						text-align: right;
					}
				}
			}
			caption {
				color: #303030;
				font-size: 12px;
				text-transform: uppercase;
				font-weight: 400;
				padding: 15px 0;

				.dark & {
					color: #fff;
				}
			}
		}
	} // .widget_calendar
  &.widget_archive {
    select,
    .select2-container {
      margin: 0;
    }
  } // .widget_archive
  &.thb_widget_twitter {
    .thb-twitter-carousel-wrapper {
      background: #e4f2f8;
      padding: 20px;

      @include min-break($break-small) {
        padding: 40px;
      }
      .thb-tweet .thb-tweet-actions a {
        margin: 0 7px;
      }
    }
    .thb-twitter-carousel-header {
      text-align: center;
      padding: 0 0 25px 0;
      font-size: 36px;
      line-height: 1;
      color: map-get($social, twitter);
    }
    .thb-carousel {
      .thb-tweet {
        padding: 0;
        font-size: 16px;
        text-align: center;
        margin: 0;
        .thb-tweet-time {
          margin-top: 15px;
        }
      }
    }
    .thb-twitter-header {
      height: 100px;
      border-radius: 3px 3px 0 0;
      >a {
        display: block;
        position: relative;
        height: 100%;
      }
      .thb_twitter_header_bg {
        display: block;
        border-radius: 3px 3px 0 0;
        height: 100%;
        width: 100%;
        object-fit: cover;
      }
      .thb_twitter_avatar {
        position: absolute;
        width: 50px;
        height: 50px;
        border-radius: 50%;
        border: 2px solid #fff;
        bottom: -12px;
        left: 50%;
        margin-left: -25px;
      }
    } // .thb-twitter-header
    .thb-twitter-content {
      background: #fff;
      border-radius: 0 0 3px 3px;
      border-left: 1px solid $border;
      border-right: 1px solid $border;
      border-bottom: 1px solid $border;
      padding: 13px;

      @include min-break($break-small) {
        padding: 18px;
      }
    } // .thb-twitter-content
    .thb-twitter-user {
      padding: 5px 0 20px;
      margin-bottom: 20px;
      border-bottom: 1px solid $border;
      color: $black;
      .thb-twitter-username,
      .thb-twitter-screenname {
        font-size: 12px;
        margin-right: 10px;
        font-weight: 500;
        text-transform: uppercase;
      }
      .thb-twitter-screenname {
        opacity: 0.4;
        margin-right: 0;
      }
      .thb-twitter-usermeta {
        margin-top: 5px;
        opacity: 0.4;
        text-transform: uppercase;
        font-size: 10px;

        span {
          margin-right: 15px;
        }
      }
    }
    .thb-tweet {
      position: relative;
      padding-left: 30px;
      margin-bottom: 20px;
      font-size: 12px;
      color: $black;
      &:last-of-type {
        margin-bottom: 0;
      }
      .thb-icon-twitter {
        position: absolute;
        top: 2px;
        left: 0;
        color: #d3d3d3;
        font-size: 20px;
        line-height: 1;
      }
      .thb-tweet-time {
        opacity: 0.6;
        text-transform: uppercase;
        font-size: 10px;
        margin-top: 8px;
        line-height: 1;
      }
      .thb-tweet-text {
        a {
          color: map-get($social, twitter);

          &:hover {
            color: darken(map-get($social, twitter),5%);
          }
        }
      }
      .thb-tweet-actions {
        line-height: 1;
        margin-top: 10px;
        font-size: 10px;
        a {
          display: inline-flex;
          align-items: center;
          margin-right: 14px;

          i {
            font-size: 14px;
          }
          .tweet-count {
            margin-left: 8px;
          }
        }
      }
    }
  } // .thb_widget_twitter
  &.thb_widget_instagram {
    .thb-instagram-row figure {
      margin: 0;
    }
    .thb-instagram-footer {
      padding: 20px 0;
      line-height: 1;
      text-align: center;
      font-size: 16px;
      line-height: 20px;
      border-bottom: 1px solid $border;
      i {
        font-size: 20px;
        margin-right: 10px;
      }
    }
    .thb-instagram-header {
      display: flex;
      align-items: center;
      margin-bottom: 20px;
      a {
        display: block;
        width: 54px;
        height: 54px;
        line-height: 0;
        margin-right: 20px;
        .thb_instagram_avatar {
          border-radius: 50px;
          width: 54px;
          height: 54px;
        }
      }
      .thb-instagram-username {
        font-size: 12px;
        font-weight: 500;
        text-transform: uppercase;
      }
      .thb-instagram-usermeta {
        margin-top: 5px;
        opacity: 0.4;
        text-transform: uppercase;
        font-size: 10px;
        span {
          margin-right: 15px;
        }
      }
    }
  } // .thb_widget_instagram
  // woocommerce
  &.widget_shopping_cart {
    .woocommerce-mini-cart__empty-message {
      font-size: 14px;
      text-align: center;
      margin: 0;
    }
		.product_list_widget {
			li {
				padding-right: 25px;

        .rtl & {
          padding-right: 0;
          padding-left: 25px;
        }
				.quantity {
					display: block;
				}
				.variation {
					font-size: 14px;
					color: $black;
					margin-bottom: 0;
					dt, dd {
						display: inline-block;
						margin-bottom: 5px;
						p {
							margin-bottom: 0;
						}
					}
				}
			}
		}
    .woocommerce-mini-cart__total {
      display: flex;
      justify-content: space-between;
      font-size: 16px;
      text-transform: uppercase;
      margin: 0 0 10px;
      height: 50px;
      align-items: center;
      border-top: 1px solid $border;

      strong {
        font-size: 16px;
        font-weight: 400;
        color: rgba($black,0.5);
      }
    }
    .woocommerce-mini-cart__buttons {
      display: flex;
      flex-wrap: wrap;
      margin: 0 -10px;
      .button {
        flex: 1;
        border-radius: 0;
        margin: 0 10px;
      }
      .wcppec-cart-widget-button {
        width: 100%;
        margin-top: 20px;
        line-height: 1;
        text-align: center;
      }
    }
	}
	&.widget_price_filter {
		.price_slider_wrapper {
			padding-top: 5px;
		}
		.price_slider {
			height: 5px;
			background: #eaeaea;
			position: relative;
			margin-bottom: 25px;
			margin-right: 15px;
			.ui-slider-range {
				height: 5px;
				background: $black;
				position: absolute;
			}
			.ui-slider-handle {
				display: block;
				outline: none;
				position: absolute;
				top: -5px;
				background-size: 14px 19px;
				width: 14px;
				height: 14px;
				border-radius: 7px;
				border: 3px solid $black;
				background: #fff;
				@include transition-duration(0s);
			}
		}
		.price_slider_amount {
			display: flex;
			flex-direction: row-reverse;
			align-items: center;
			justify-content: space-between;
			font-size: 14px;
			font-weight: 500;
			color: $black;

      .rtl & {
        flex-direction: row;
      }
			.clear {
				display: none;
			}
			.button {
				font-size: 14px;
				font-weight: 500;
				color: $black !important;
				background: none !important;
				height: auto !important;
				border: 0 !important;
				padding: 0 !important;
				margin: 0 !important;
			}
		}
	}
	&.widget_product_search {
		#s {
			float: left;
		}
	}
  /* Product List */
  .product_list_widget {
  	list-style: none;
  	margin: 0;
  	.remove {
  		display: flex;
  		justify-content: center;
  		align-items: center;
  		width: 14px;
  		height: 14px;
      font-size: 14px;
      font-weight: 400;
  		position: absolute;
  		top: 0;
  		right: 0;

      .rtl & {
        right: auto;
        left: 0;
      }
  	}
  	li {
  		position: relative;
      border-bottom: 1px solid $border;
  		margin-bottom: 20px;
      padding-bottom: 20px;
      padding-left: 0;
      white-space: normal;
  		@extend .cf;

  		&.empty {
  			text-align: center;
  			font-size: 18px;
  			font-weight: 600;
  			color: $black;
  			margin: 30px 0;
  		}
      &:last-child {
        border-bottom: 0;
        margin-bottom: 0;
      }
  	}
  	a {
  		display: block;
  		font-weight: 400;
  		color: $black;
      opacity: 1;
      text-transform: none;
      font-size: 16px;
  		&:before {
  			display: none;
  		}
  		.wp-post-image,
  		.attachment-woocommerce_thumbnail {
  			max-width: 85px;
  			margin-right: 20px;
  			float: left;

        .rtl & {
          float: right;
          margin-right: 0;
          margin-left: 20px;
        }
  		}
  		.product-title {
  			display: block;
  			margin-bottom: 0;
  		}

  	}
  	.woocommerce-Price-amount {
  		color: rgba($black, 0.7);
  		font-size: 12px;
  	}
  	.quantity {
      margin-top: 5px;
  		font-size: 12px;
  		color: rgba($black, 0.7);
  	}
  }

  // BBPress.
  &.widget_display_stats {
    dl {
      dt {
        margin-bottom: 0;
        font-weight: 500;
      }
      dd {
        font-weight: 400;
        margin-bottom: 15px;
        &:last-of-type {
          margin-bottom: 0;
        }
      }
    }
  } // .widget_display_stats.
  &.bbp_widget_login {
    .bbp-logged-in {
      .user-submit {
        display: block;

        .avatar {
          border-radius: 50%;
        }
      }
      .logout-link {
        height: 30px;
        line-height: 30px;
        padding: 0 17px;
      }
    }
    .bbp-login-form {
      input[type="password"],
      input[type="text"] {
        margin-bottom: 0;
        width: 100%;
      }
    }
  } // .bbp_widget_login.
  &.widget_display_search {
    #bbp-search-form {
      >div {
        display: flex;

        #bbp_search {
          flex: 1;
        }
      }
    }
  } // .widget_display_search.
  &.jetpack_subscription_widget {
    #subscribe-email {
      margin: 0;
    }
  } // .jetpack_subscription_widget
}
