/*  ----------------------------------------------------------------------------
    WordPress default widgets
*/
// general widgets
.widget {
  margin-bottom: 38px;
  font-size: 13px;
  font-family: @font2;

  &.td_block_wrap {
    padding-bottom: 0;
  }

  a {
    color: #111;

    &:hover {
      color: @td_theme_color;
    }
  }

  ul {
    list-style: none;
    box-shadow: none;
    margin: 0;
  }

  li {
    line-height: 1;
    list-style: none;
    margin-left: 0;

    a {
      padding: 9px 0;
      display: inline-block;
    }

    li {
      margin-left: 21px;
      font-size: 12px;
    }
  }

  select {
    width: 100%;
    height: 30px;
    margin-top: 9px;
    padding: 0 5px;
  }

  .block-title {
    float: none;
    margin-bottom: 11px;
    width: 100%;

    span a {
      padding: 0;
      color: inherit;
    }
  }

  .current-menu-item {
    a {
      color: @td_theme_color;
    }
  }
}

// search
.td-search-form-widget,
.search-form {
  position: relative;
}

input.td-widget-search-input,
.search-field {
  width: 100%;
  height: 28px;
  margin: 0;
  padding: 0 11px;
  font-family: @font1;
  font-size: 13px;
  color: #666;
  border: 0;
  border-bottom: 1px solid #ebebeb;

  /* responsive portrait phone */
  @media (max-width: @responsive_p_phone_max) {
    font-size: 16px;
  }
}

#searchsubmit,
input.search-submit {
  position: absolute;
  top: 0;
  right: 0;
  background-color: transparent;
  height: 14px;
  margin: 6px 0;
  padding: 0 1px 0 8px;
  text-transform: uppercase;
  font-size: 11px;
  font-weight: 700;
  text-shadow: none;
  color: #000;
  border-left: 1px solid #ebebeb;

  &:hover {
    background-color: transparent;
    color: @td_theme_color;
  }
}

.widget_search {
  margin-bottom: 48px;

  .block-title {
    margin-bottom: 20px;
  }

  .search-field {
    padding: 0;
  }

  input[type=submit]:hover {
    background-color: transparent;
  }
}


// calendar
.widget_calendar {
  margin-bottom: 36px;

  .block-title {
    margin-bottom: 13px;
  }

  table {
    width: 100%;
    text-align: center;
  }

  th {
    text-align: center;
  }

  td {
    padding: 8px 0;

    /* responsive portrait tablet */
    @media (min-width: @responsive_p_tablet_min) and (max-width: @responsive_p_tablet_max) {
      padding: 5px 0;
    }
  }

  tbody a {
    color: @td_theme_color;
  }

  #today {
    background-color: @td_theme_color;
    font-weight: bold;
    color: #fff;
    border-color: @td_theme_color;

    a {
      color: #fff;
    }
  }

  caption {
    font-weight: bold;
    padding-bottom: 10px;
  }

  thead tr {
    line-height: 34px;

    /* responsive portrait tablet */
    @media (min-width: @responsive_p_tablet_min) and (max-width: @responsive_p_tablet_max) {
      line-height: 28px;
    }
  }

  tfoot {
    td {
      border: none;
    }
    #prev {
      text-align: left;
    }
    #next {
      text-align: right;
    }

    a:hover {
      color: @td_theme_color;
    }
  }
}

// categories
.widget_categories {
  li {
    line-height: 1;
    padding-right: 40px;

    &:hover {
      > a span:before {
        border-color: @td_theme_color;
      }

      > a {
        color: @td_theme_color;
      }
    }

    li {
      margin-right: 0;
    }

    a {
      padding: 11px 0;
      width: 100%;
      display: block;
    }

    span {
      display: inline-block;
      margin-top: -5px;
      padding: 4px 6px;
      min-width: 22px;
      line-height: 1;
      position: absolute;
      right: 0;
      text-align: center;

      &:before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        border: 1px solid #000;
        .border-radius(10px);
        opacity: 0.2;
      }
    }
  }
}

// recent comments
.widget_recent_comments {
  margin-bottom: 42px;
  font-size: 12px;
  color: #444;

  .block-title {
    margin-bottom: 18px;
  }

  a {
    display: inline !important;
    font-size: 13px;
    font-weight: 500;
  }

  li {
    position: relative;
    margin: 10px 0 !important;
    line-height: 21px;
    padding-bottom: 13px;
    
    &:after {
      content: '';
      position: absolute;
      bottom: 0;
      left: 0;
      width: 100%;
      height: 1px;
      background-color: #f5f5f5;
    }

    &:last-child {
      padding-bottom: 0;
      
      &:after {
        display: none;
      }
    }
  }
}

// recent posts
.widget_recent_entries {
  margin-bottom: 32px;

  li {
    margin-bottom: 8px;
    padding-bottom: 7px;
    border-bottom: 1px solid #f5f5f5;

    &:last-child {
      border-bottom: none;
    }

    a {
      display: inline-block;
      line-height: 21px;
    }
  }

  .post-date {
    display: block;
    font-family: @font1;
    font-size: 11px;
    line-height: 16px;
    color: #b5b5b5;
    font-style: italic;
    margin-bottom: 5px;
  }
}

// rss
.widget_rss {
  margin-bottom: 29px;

  .block-title {
    margin-bottom: 15px;

    span {
      padding: 0;
      line-height: 1;
    }

    a {
      margin: 0;
    }

    a:first-child {
      margin-right: 2px;
      vertical-align: middle;
    }
  }

  li {
    position: relative;
    margin-bottom: 6px;
    padding-bottom: 11px;
    line-height: 21px;

    &:after {
      content: '';
      position: absolute;
      bottom: 0;
      left: 0;
      width: 100%;
      height: 1px;
      background-color: #f5f5f5;
    }

    .rsswidget {
      margin-right: 10px;
      font-family: @font2;
      font-weight: 600;
      font-size: 15px;
    }

    .rssSummary {
      font-size: 12px;
      color: #444;
    }
  }

  li:last-child {
    &:after {
      display: none;
    }
  }

  .rss-date,
  cite {
    display: block;
    font-family: @font2;
    font-size: 12px;
    line-height: 16px;
    color: #000;
    position: relative;
    margin-bottom: 5px;
    margin-top: 5px;
    .opacity(0.5);
  }
}

// text
.widget_text {
  .block-title {
    margin-bottom: 13px;
  }

  p {
    font-size: 15px;
  }

  .wp-smiley {
    width: auto;
  }
}

// tags
.widget_tag_cloud {
  margin-bottom: 48px;

  .block-title {
    margin-bottom: 16px;
  }

  .tagcloud {
    padding: 0 12px;
  }

  a {
    margin-right: 10px;
    margin-bottom: 10px;
    display: inline-block;
  }
}

// video embed
.wp-video {
  margin-bottom: 26px;
  position: relative;

  .wp-video-shortcode {
    outline: none;
  }
}

// tag cloud
.widget_tag_cloud {
  .tagcloud {
    padding: 0;
  }
}