/*-------------------------------------------------------*/
/* Widgets
/*-------------------------------------------------------*/
.widget {

  a:hover {
    text-decoration: underline;
  }

  .footer & {
    margin-bottom: 40px;
  }

  .sidebar &,
  .elementor-widget-sidebar & {
    background-color: #fff;
    border-radius: 5px;
    padding: 36px;
    margin-bottom: 54px;
    border: 1px solid $border-color;
  }
  
  li {
    list-style: none;
  }

  &-title {
    font-size: 1rem;
    margin-bottom: 20px;
  }

  .sub-menu,
  .children {
    padding-top: 10px;
    padding-left: 10px;

    li:first-child {
      border-top: 1px solid $border-color;
      padding-top: 10px;
    }
  }
}

.menu-item {
  list-style: none;
}

.elementor-widget-sidebar .widget-title,
.sidebar .widget-title {
  font-size: 1.125rem;
}


/* Widget Categories, Recent Entries, Comments, Archives, Meta
----------------------------------------------------------------*/
.elementor-widget-wp-widget-recent-posts a,
.widget_recent_entries a,
.elementor-widget-wp-widget-nav_menu a,
.widget_nav_menu a,
.elementor-widget-wp-widget-categories a,
.widget_categories a,
.elementor-widget-wp-widget-pages a,
.widget_pages a,
.elementor-widget-wp-widget-pages-archives a,
.widget_archive a,
.elementor-widget-wp-widget-meta a,
.widget_meta a {
  color: $text-color;

  &:hover {
    color: $primary-color;
  }
}

.elementor-widget-wp-widget-recent-comments a,
.widget_recent_comments a {
  color: $heading-color;

  &:hover {
    color: $primary-color;
  }
}

.elementor-widget-wp-widget-recent-posts li,
.widget_recent_entries li,
.elementor-widget-wp-widget-nav_menu li,
.widget_nav_menu li,
.elementor-widget-wp-widget-pages li,
.widget_pages li,
.elementor-widget-wp-widget-pages-archives li,
.widget_archive li,
.elementor-widget-wp-widget-meta li,
.widget_meta li,
.elementor-widget-wp-widget-recent-comments li,
.widget_recent_comments li,
.widget_categories li,
.elementor-widget-wp-widget-categories li {
  padding: 10px 0;
  border-bottom: 1px solid $border-color;

  &:first-child {
    padding-top: 0;
  }

  &:last-child {
    padding-bottom: 0;
    border-bottom: 0;
  }
}


/* Categories
-------------------------------------------------------*/
.elementor-widget-wp-widget-categories li,
.widget_categories li {
  overflow: hidden;

  &:first-child {
    padding-top: 0;
  }

  &:last-child {
    padding-bottom: 0;
  }
}



/* Recent Comments / Recent Posts
-------------------------------------------------------*/
.recentcomments,
.widget_recent_entries li,
.widget_categories li {
  position: relative;
  padding-left: 16px !important;

  &::before {
    content: '';
    display: block;
    position: absolute;
    left: 0;
    width: 6px;
    height: 6px;
    background-color: $primary-color;
    opacity: 0.2;
    margin-top: 6px;
  }
}



/* Widget RSS
-------------------------------------------------------*/
.widget_rss {
  li {
    padding: 16px 0;
    border-bottom: 1px solid $border-color;

    &:first-child {
      padding-top: 0;
    }
  }

  .rsswidget {
    color: $heading-color;

    &:hover {
      color: $primary-color;
    }
  }

  .rss-date {
    display: block;
    color: $meta-color;
    font-size: 0.875rem;
    margin: 6px 0 12px;
  }

  .rssSummary {
    margin-bottom: 8px;

    & + cite {
      font-size: 15px;
      color: $meta-color;
    }
  }

  .widget-title .rsswidget:last-child {
    vertical-align: middle;
    margin-left: 5px;
    margin-top: 2px;
    display: inline-block;
  }
}


/* Widgets select (Categories, Archives, Text Widget)
-------------------------------------------------------*/
.widget_categories,
.widget_archive,
.widget_text {  
  select {
    margin-bottom: 0;
  }
}


/* Widget Calendar
-------------------------------------------------------*/
.calendar_wrap {

  table {
    width: 100%;
  }

  th,
  td,
  span {
    display: table-cell;
    font-size: 1em;
    font-weight: 500;
    line-height: 1;
    padding: 2.5% 2.5% 2% 2.5%;
    text-align: center;
  }

  caption {
    caption-side: top;
    text-align: center;
    background-color: $bg-light;
    padding: 2% 2.5%;
    margin-bottom: 0;
    border: 1px solid $border-color;
    border-bottom: 0;
    font-weight: 600;
  }

  .pad {
    background: none;
  }

  .wp-calendar-nav {
    padding: 10px 5px;
    display: flex;
    justify-content: space-between;

    span {
      flex: 1;
    }
  }

  tfoot #prev,
  .wp-calendar-nav-prev {
    text-align: left;
  }

  tfoot #next,
  .wp-calendar-nav-next {
    text-align: right;
  }

}

/* Widget About
-------------------------------------------------------*/
.widget-about {
  &__description {
    margin-top: 10px;

    @include bp-lg-up {
      padding-right: 40px;
    }
  }
}


/* Widget Info
-------------------------------------------------------*/
.widget-info {
  &__item:not(:last-child) {
    margin-bottom: 20px;
  }

  &__title {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
    text-transform: uppercase;
    font-size: 0.8125rem;
  }
}


/* Widget Popular Posts
-------------------------------------------------------*/
.widget-popular-posts {

  &__first-post {
    .widget-popular-posts__img-holder {
      width: 100%;
      float: none;
      
      margin-bottom: 24px !important;
      margin-left: 0 !important;
    }
  }

  &__list > li {
    padding: 20px 0;
    border-bottom: 1px solid $border-color;

    &:first-child {
      padding-top: 0;
    }

    &:last-child {
      padding-bottom: 0;
      border-bottom: 0;
    }
  }

  &__img-holder {
    width: 80px;
    border-radius: 3px;
    float: right;
    position: relative;
    margin-left: 16px !important;
    overflow: hidden;

    @include bp-lg-down {
      width: 50px;
    }
  }

  &__entry {
    min-height: 60px;
    overflow: hidden;
  }

  &__entry-title {
    font-size: 1rem;
    line-height: 1.3;
    margin-bottom: 5px;
  }

}


/* Widget Search
-------------------------------------------------------*/
.widget.widget_search,
.widget.widget_product_search {
  padding: 0;
  border: 0;
}

.widget_search .search-input {
  margin: 0;
}

.widget-search-button,
.search-form__button,
.search-button,
.woocommerce-product-search button[type=submit] {
  font-family: 'everse';
  position: absolute;
  top: 0;
  right: 0;
  width: 56px;
  height: 56px;
  line-height: 56px;
  padding: 0 !important;
  box-shadow: none;
  background-color: transparent !important;
  color: $text-color;
  border: 0;  
  vertical-align: middle;  

  &:focus {
    background-color: inherit;
    color: inherit;
  }
}

.search-form {
  position: relative;

  .widget-search-button,
  .search-form__button,
  .search-button,
  .woocommerce-product-search button[type=submit] {
    border-radius: 0;
    font-size: 1.25rem;
  }
}


/* Widget Tags / Entry Tags
-------------------------------------------------------*/
.widget_tag_cloud a,
.entry__tags a,
.widget_product_tag_cloud a {
  line-height: 1;
  margin: 0 8px 8px 0;
  padding: 8px 12px;
  border-radius: 5px;
  font-size: 0.875rem !important;
  background-color: $bg-light;
  color: $text-color;
  float: left;
  @include transition( all 0.1s ease-in-out );

  &:hover {
    text-decoration: none;
    background-color: $primary-color;
    border-color: transparent;
    color: #fff;
  }
}

.tagcloud {
  overflow: hidden;
}