//  ==========
//  = Sidebars for the Carpress HTML template =
//  ==========

// variables
$gallery-side-padding: 26px;


// styles

.sidebar {
  &.left {

  }
  &.right {
    .sidebar-item {
      &.widget_nav_menu {
        background: linear-gradient(to left, $white, darken($white, 3%));

        .nav-pills {
          > li {
            > a {
              position: relative;
              margin-left: -$gallery-side-padding - 12px;
              margin-right: -$gallery-side-padding;
              padding-left: $gallery-side-padding + 12px;
            }
            &.active,
            &.current-menu-ancestor {
              a,
              a:hover {
                &:after {
                  left: 0;
                  right: auto;
                  border-style: solid;
                  border-color: rgba(0,0,0,0) rgba(0,0,0,0) $bodyBackground rgba(0,0,0,0);
                  border-width: 0 12px 31px 0;
                }
              }
            }
          }
        }
      }
    }
  }
}

.sidebar-item {
  margin-bottom: 30px;

  &.opening-time {
    width: auto;

    @media (min-width: 768px) and (max-width: 979px) {
      h3 .icon {
        display: none;      }
    }
  }

  &.widget_nav_menu {
    background-color: darken($white, 2%);
    background: linear-gradient(left, $white, darken($white, 3%));
    box-shadow: 0 0 2px rgba(0,0,0,0.2);
    padding: 24px $gallery-side-padding;

    h3 {
      margin: 0 0 15px;
    }
    .nav-pills {
      margin-bottom: 0;
      > li {
        > a {
          position: relative;
          margin-left: -$gallery-side-padding;
          margin-right: -$gallery-side-padding - 12px;
          border-radius: 0;
          padding-left: $gallery-side-padding;
          font-weight: bold;
          color: $textColor;

          &:hover {
            color: $theme-clr;
            background: none;
          }
        }
        &.active,
        &.current-menu-ancestor {
          > a,
          > a:hover {
            background-color: $btn-clr;
            background: linear-gradient(to bottom, lighten($btn-clr, 5%), darken($btn-clr, 10%));
            color: $white;

            &:after {
              position: absolute;
              z-index: 3;
              content: " ";
              right: 0;
              top: 0;
              border-style: solid;
              border-color: rgba(0,0,0,0) rgba(0,0,0,0) $bodyBackground rgba(0,0,0,0);
              border-width: 0 0 31px 12px;
            }
          }
        }
      }
    }
    .dropdown-menu {
      > .active > a {
        font-weight: bold;
      }
    }
    .current-menu-ancestor > a {
      font-weight: normal;
    }
  }

  &.widget_recent_comments {
    ul {
      list-style: none;
      margin: 0;
    }
    ul > li {
      margin-bottom: 10px;

      a {
        font-weight: bold;
      }
    }
  }
  &.widget_archive {
    a {
      font-weight: bold;
    }
    ul {
      list-style: none;
      margin: 0;
    }
  }
  &.widget_search {
    .search-width {
      width: 165px;
    }
     @media (min-width: 1200px) {
      .search-width {
        width: 215px;
      }
    }
    @media (max-width: 979px) {
      .search-width {
        width: 111px;
      }
    }
    @media (max-width: 767px) {
      .search-width {
        width: 50%;
      }
    }
  }
}

// widgets
.widget_nav_menu {
  .dropdown-menu {
    display: block;
    position: static;
    float: none;
    background: none;
    border: none;
    margin: 0 0 0 14px;
    padding: 0;

    > li {
      border: none;

      > a {
        font-weight: normal;
        padding: 8px 0;
        font-size: 13px;
      }
      > a:hover,
      > a:focus {
        background: none;
      }
    }
  }
  .dropdown-submenu {
    &:hover {
      > a {
        color: inherit;
      }
    }
    > a:after {
      display: none;
    }
  }
}
.widget-single-service {
  .lined h2 {
    margin-top: 15px;
  }
}


// wp specific
#wp-calendar {
  width: 100%;
  text-align: center;

  caption {
    background-color: $theme-clr;
    color: #fff;
    font-weight: bold;
    border-radius: 3px 3px 0 0;
  }
  tbody td {
    text-align: center;
  }
}

// wp
.widget_rss {
  .bolded-line {
    display: none;
  }
  .lined {
    clear: both;
    overflow: auto;

    .rsswidget {
      float: left;
      margin-right: 5px;
      margin-bottom: 10px;
    }
  }
}
