/*  ----------------------------------------------------------------------------
    BuddyPress plugin
*/

.buddypress hr {
  border: 0;
  background-color: #e6e6e6;
  height: 1px;
}

.buddypress fieldset {
  border-color: #e6e6e6;
}

.td-page-content #buddypress p,
.td-page-content #buddypress li {
  font-size: 13px;
  line-height: 21px;
}

#buddypress .activity-list li.load-more a:hover {
  text-decoration: none;
}

/*  ----------------------------------------------------------------------------
    Buttons

*/

//#buddypress button,
#buddypress input[type=submit],
#buddypress input[type=button],
#buddypress input[type=reset],
#buddypress div.generic-button a,
#buddypress .comment-reply-link {
  border: none;
  box-shadow: none;
  color: #fff;
  background-color: #222;
  font-size: 11px;
  padding: 8px 14px;
  text-shadow: none;
  line-height: 12px;
  margin-bottom: 3px;
  vertical-align: middle;

  &:hover,
  &:active,
  &:focus {
    background-color: @td_theme_color;
    color: #fff;
    border: none;
  }
}

#buddypress {
  input[type="checkbox"],
  input[type="radio"] {
    margin-right: 5px;
    vertical-align: middle;
  }
}

#buddypress .mce-toolbar .mce-ico {
  line-height: 30px;
  height: 28px;
}
#buddypress .standard-form .wp-editor-container textarea {
  border: none;
  font-size: 13px;
  background-color: transparent;
}
#buddypress .field-visibility-settings-toggle {
  margin: 5px 0 0;
  line-height: 1;
}

#buddypress div.generic-button.friendship-button a,
#buddypress div.generic-button a.join-group,
#buddypress div.generic-button a.leave-group,
#buddypress div.generic-button a.mention,
#buddypress div.generic-button a.send-message {
  padding: 4px 10px 5px 10px;
  background-color: #fff;
  border: 1px solid #ccc;
  color: #777;
  cursor: pointer;
  font-weight: 600;
  outline: none;
  text-align: center;
  text-decoration: none;

  &:hover,
  &:focus,
  &:active {
    background-color: #222;
    color: #fff;
    border-color: #222;
  }
}

#buddypress .acomment-options a.acomment-reply,
#buddypress .acomment-options a.acomment-delete {
  font-weight: normal;
  font-size: 11px;
  border: 1px solid #ccc;
  padding: 2px 7px 3px 7px;

  &:hover {
    background-color: #222;
    color: #fff;
    border-color: #222;
  }
}

#buddypress #item-header-avatar {
  /* responsive portrait tablet */
  @media (min-width: @responsive_p_tablet_min) and (max-width: @responsive_p_tablet_max) {
    width: 100% !important;
    text-align: center;
  }

  a {
    /* responsive portrait tablet */
    @media (min-width: @responsive_p_tablet_min) and (max-width: @responsive_p_tablet_max) {
      display: inline-block;

      img {
        margin: 0 0 20px !important;
      }
    }
    /* responsive portrait phone */
    @media (max-width: @responsive_p_phone_max) {
        width: 100px;
    }
  }
}

#buddypress a.button,
a.bp-title-button,
#buddypress ul.button-nav li a {
  font-size: 11px;
  padding: 6px 8px !important;
  display: inline-block;
  margin-bottom: 5px;
  line-height: 1;

  &:hover,
  &:focus,
  &:active {
    background-color: #222;
    color: #fff;
    border-color: #222;

    span {
      background-color: @td_theme_color;
    }
  }
}

#buddypress ul.button-nav li.current a {
  background-color: #222;
  color: #fff;
  border-color: #222;
}

a.bp-title-button {
  padding: 2px 9px 3px 9px;
  position: relative;
  top: -2px;
  margin-left: 12px;
}

.entry-crumbs a.bp-title-button {
  display: none;
}

#buddypress div.generic-button #new-topic-button {
  padding: 6px 10px 7px 10px;
  margin-bottom: 20px;
  display: inline-block;
  position: relative;
  top: -2px;
}

#buddypress div.generic-button {
  /* responsive portrait phone */
  @media (max-width: @responsive_p_phone_max) {
      margin: 0 !important;
  }
}

#buddypress #item-header-cover-image #item-actions {
  /* responsive portrait phone */
  @media (max-width: @responsive_p_phone_max) {
    padding-top: 0 !important;
  }
}

#buddypress .standard-form #submit:focus,
#buddypress .standard-form #save:focus,
#group-settings-form input[type=submit]:focus {
  background-color: @td_theme_color;
  color: #fff;
}

#buddypress a.loading,
#buddypress input.loading {
  -webkit-animation: none;
  -moz-animation: none;
  border-color: #222;
}

#buddypress a.bp-primary-action span,
#buddypress #reply-title small a span {
  font-size: 9px;
  line-height: 9px;
  padding: 1px 4px;
}

#buddypress #whats-new-options,
#whats-new-post-in-box {
  overflow: visible;
  min-height: 43px;
}


#buddypress .ac-reply-cancel {
  font-size: 11px;
  border: 1px solid #ccc;
  padding: 6px 10px 6px 10px;
  color: #999;
  top: 7px;
  position: relative;

  &:hover {
    background-color: #222;
    color: #fff;
    border-color: #222;
  }
}

#buddypress .ac-reply-content {
  .ac-reply-cancel {
    top: 2px;
  }

  input {
    font-size: 11px;
    line-height: 13px;
    font-family: @font1;
  }
}

#buddypress div.dir-search input[type=text],
#buddypress li.groups-members-search input[type=text] {
  font-size: 13px;
}
/*  ----------------------------------------------------------------------------
    Tabs
*/

#activity-filter-by {
  font-size: 13px;
}

#buddypress div.item-list-tabs ul li {
  border-top: 1px solid #e6e6e6;
  border-left: 1px solid #e6e6e6;
  border-bottom: 1px solid #e6e6e6;
  position: relative;
  margin-bottom: 5px;

  &.feed {
    border: 0;
  }

  &:first-child {

    &:before {
      display: none;
    }
  }

  &:last-child {
    border-right: 1px solid #e6e6e6;
  }

  &:before {
    background-color: #e6e6e6;
    content: "";
    display: block;
    height: 22px;
    position: absolute;
    right: -1px;
    width: 1px;
    top: -1px;
  }

  /* responsive portrait tablet */
  @media (max-width: @responsive_p_tablet_max) {
    margin-bottom: 10px;
  }
}

/* responsive portrait tablet */
#buddypress div.item-list-tabs ul #activity-filter-select {
  @media (max-width: @responsive_p_tablet_max) {
    width: 45%;
    margin-right: -4px;
  }

  @media (max-width: @responsive_p_tablet_min) {
    width: 100%;
    margin: 15px 0 20px 0 !important;
  }
}




#buddypress div.item-list-tabs ul li.selected,
#buddypress div.item-list-tabs ul li.current {
  border-left: 1px solid #222;
  border-top: 1px solid #222;
  border-bottom: 1px solid #222;

  a {
    background-color: #222;
    color: #FFF;
    opacity: 1;

    &:hover {
      background-color: #222;
    }

    span {
      background: @td_theme_color;
    }
  }
}

#buddypress ul.item-list li div.item-title,
#buddypress ul.item-list li h4 {

  /* responsive portrait tablet */
  @media (min-width: @responsive_p_tablet_min) and (max-width: @responsive_p_tablet_max) {
    width: 70%;
  }
}

#buddypress div.item-list-tabs ul li > a {
  background-color: #FFF;
  color: #444;
  padding: 0 15px;
  font-family: @font1;
  font-size: 11px;
  line-height: 20px;
  font-weight: 700;
  text-transform: uppercase;
  position: relative;
  height: 20px;

  span {
    background: @td_theme_color;
    border-radius: 0;
    border: transparent;
    color: #fff;
    margin-left: 3px;
    font-size: 9px;
    line-height: 9px;
    padding: 2px 5px;
    position: relative;
    display: inline-block;
    top: -1px;
  }

  &:hover {
    background-color: #f7f7f7;

    span {
      background-color: @td_theme_color;
      opacity: 0.8;
    }
  }

  &#change-avatar {
    @media (max-width: @responsive_p_phone_max) {
      padding: 0 4px;
    }
  }
}

#buddypress li.friend-tab img.avatar {
  display: inline-block;
  margin-right: 5px;
}

#buddypress div.item-list-tabs ul li > span {
  background-color: #FFF;
  color: #444;
  padding: 0 15px;
  font-family: @font1;
  font-size: 11px;
  line-height: 20px;
  font-weight: 700;
  text-transform: uppercase;
  position: relative;
  height: 20px;
}

#activity-filter-select,
#members-order-select,
#forums-order-select,
#group_members-order-select,
#groups-order-select {
  border: none !important;
  margin-top: 0 !important;
}

.item-list-tabs .feed {
  border-right: 1px solid #222;

  a {
    background-color: #222 !important;
    color: #fff !important;
  }

  &:hover {
    border-color: @td_theme_color !important;

    a {
      background-color: @td_theme_color !important;
    }
  }
}

/*  ----------------------------------------------------------------------------
    Activity Page
*/


#buddypress .activity-list {

  .activity-content {
    .activity-header {
      a {
        display: inline-block;
        vertical-align: top;
      }

      .avatar {
        width: 20px;
        vertical-align: top;
      }
    }
  }
}

#buddypress form#whats-new-form {

  p.activity-greeting {
    line-height: 21px;
  }

  textarea {
    width: 100%;
  }
}

#buddypress #whats-new:focus {
  border-color: #aaa !important;
  outline: 0;
}

/* Content */
#buddypress #activity-stream p {
  margin: 0;
}

/* Create Groups Page */
#group-create-tabs li {
  height: 22px;
}

#buddypress form.standard-form .main-column {
  margin-left: 170px;
}

#buddypress div#invite-list {
  background: transparent;
  height: auto;
  overflow: auto;
  padding: 0 0 20px 0;
  width: 160px;
  margin-top: 10px;
}

#buddypress span.activity {
  font-size: 12px;

  @media (max-width: @responsive_p_phone_max) {
    font-size: 10px;
  }
}

.bp-widget,
#group-settings-form {

  h4 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 10px;
  }
}

legend.screen-reader-text {
  padding: 0 5px;
}

#admins-list,
#member-list,
#mods-list,
#members-list {

  h5 {
    margin-top: 2px;
    font-size: 14px;
    margin-bottom: 0;
    font-weight: 600;

    a:hover {
      color: #222;
    }
  }

  .item-title {
    font-size: 14px !important;
  }
}

#friend-list {

  h4 {
    line-height: 24px;
  }

  a {
    font-weight: 700;
    font-size: 12px;

    &:hover {
      color: #222;
    }
  }
}

#buddypress div.pagination .pag-count {
  margin-left: 0;
  font-size: 11px;
}

.groups-members-search {
  border: none !important;
}

#search-members-form,
#forums-dir-search,
#search-groups-form,
#search-message-form {
  label {
    display: inline-block;
  }

  #members_search,
  #forums_search,
  #groups_search {
    height: 28px;
    background-color: transparent;
    padding-left: 5px;
  }

  #members_search_submit,
  #forums_search_submit,
  #groups_search_submit {
    position: relative;
    top: 0;
    display: inline-block;
    left: -7px;
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
  }
}

#search-message-form {
  position: relative;

  #messages_search {
    height: 31px;
  }

  #messages_search_submit {
    position: absolute;
    top: 0;
    right: -20px;
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
  }
}

#buddypress div#item-header ul {
  display: inline-block;
}

/* Forum */

#buddypress {
  th {
    background-color: #222;
    color: #fff;
    border: none;
  }

  .forum td {
    border: none;
  }

  table {
    font-size: 13px;
  }

  select {
    font-size: 13px;
    padding: 3px 9px;
  }

  table.forum tr td.td-title a.topic-title {
    margin: 0 0 4px 35px;
    display: block;
    line-height: 20px;
    font-weight: 700;
    color: #222;

    &:hover {
      color: @td_theme_color;
    }
  }

  table.forum p.topic-meta {
    font-size: 10px;
    margin: 0 0 0 35px;
    color: #c3c3c3;

    a {
      color: #222;

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

  table.forum .td-freshness p.topic-meta {
    margin: 5px 0 0 0;
  }

  .forum {
    .td-title,
    .td-freshness {
      position: relative;
    }
  }

  table.forum td .topic-by img.avatar {
    position: absolute;
    margin: 0;
    width: 40px;
    top: 12px;
    left: 0;
  }

  table.forum td .topic-in {

    a {
      font-weight: 600;
    }

    img.avatar {
      display: inline-block;
      margin-left: 3px;
    }
  }

  table.forum td .freshness-author img.avatar {
    float: right;
    margin-right: 0;
  }

  table.forum tr > td:last-child {
    padding-right: 0;
  }

  table.forum th#th-freshness {
    text-align: right;
  }

  .forum tbody tr {
    border-bottom: 1px solid #e6e6e6;
    height: 64px;
  }

  .activity-list li.load-more,
  .activity-list li.load-newest {
    font-size: 12px;
    line-height: 1;
    text-align: center;
    vertical-align: middle;
    background-color: transparent;
    border-bottom: none;

    a {
      padding: 7px 10px;
      display: inline-block;
      border: 1px solid #dcdcdc;
      color: #999;

      &:hover {
        background-color: #222;
        color: #fff;
        border-color: #222;
      }
    }
  }
}

#new-topic-post h4,
#new-topic-post h5,
#profile-edit-form h4,
#post-topic-reply h4 {
  font-size: 18px;
  font-weight: 700;
}

#group-admins,
#group-mods {
  margin-top: 0;

  li {
    margin-left: 5px;
  }
}

#buddypress div.pagination .pagination-links a {
  font-weight: 700;
}

#buddypress ul.item-list li {

  div.item-title {
    font-weight: 700;
    font-size: 16px;

    a {
      color: #222;

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

  div.item-meta span {
    font-size: 11px;
  }
}

#group-settings-form .bp-widget .single-line h5 {
  margin-top: 0;
}


/* Members activity */
#buddypress #activity-stream {
  margin-top: 0;

  .activity-avatar img.avatar-150 {
    width: 20px;
  }
}


#buddypress table.notifications {
  margin-bottom: 20px;
}

#notification-bulk-manage {
  padding: 6px 10px 7px 10px !important;
  position: relative;
  top: -1px;
}

.register-section h4 {
  font-weight: 700;
}

body.activity-permalink #buddypress div.activity-comments > ul {
  padding: 0 10px 0 26px;
}

#buddypress div.activity-comments {
  div.acomment-content {
    margin: 5px 0 0 35px;
  }

  ul li {
    padding: 15px 0 8px 0;
  }
}

#buddypress #signup_form.standard-form div.submit {
  margin-bottom: 30px;
}

#buddypress .standard-form #basic-details-section input[type="password"],
#buddypress .standard-form #blog-details-section input#signup_blog_url,
#buddypress #signup_form.standard-form input[type="text"] {
  width: 100%;
}

#buddypress .standard-form #basic-details-section,
#buddypress .standard-form #profile-details-section {
  /* responsive portrait phone */
  @media (max-width: @responsive_p_phone_max) {
    float: none;
    display: block;
    width: 100%;
  }
}
#buddypress .standard-form label,
#buddypress .standard-form span.label {
  /* responsive portrait phone */
  @media (max-width: @responsive_p_phone_max) {
    font-size: 12px;
  }
}


//#buddypress div.activity-comments ul li {
//}

#buddypress .acomment-options {
  margin-left: 35px;
}

body.activity-permalink #buddypress div.activity-comments ul li {
  padding: 15px 0 8px 0;
}

#buddypress ul.item-list.activity-list li.has-comments {
  padding-bottom: 0;
}

#buddypress div.activity-comments form .ac-textarea {
  border-style: solid;
}


#buddypress .field-visibility-settings-notoggle {
  margin-top: 5px;
}

/*  ----------------------------------------------------------------------------
    Notification Page
*/


/* responsive portrait tablet */
#buddypress div.item-list-tabs#subnav ul li#members-order-select {
  @media (max-width: @responsive_p_tablet_max) {
    width: 100%;
    margin-top: 10px !important;
  }
}


/*  ----------------------------------------------------------------------------
    Messages Page
*/


/* responsive portrait tablet */
#buddypress div.message-search {
  @media (max-width: @responsive_p_tablet_max) {
    width: 100%;
    margin: 18px 0;
    float: left;
  }
}

#search-message-form #messages_search_submit {
  @media (max-width: @responsive_p_tablet_max) {
    right: 0;
  }
}

#buddypress .standard-form input[type=text],
#buddypress .standard-form textarea {
  @media (max-width: @responsive_p_tablet_max) {
    width: 100%;
  }
}


/*  ----------------------------------------------------------------------------
    Friends Page
*/

#buddypress #pag-bottom.pagination {
  float: left;
}

@media (max-width: @responsive_p_phone_max) {
  #buddypress ul.item-list li div.action {
    position: relative;
    top: 0;
    margin-top: 10px;
  }

  #buddypress #friend-list span.activity {
    display: block;
  }

  .group-invites #buddypress ul.item-list li div.action {
    float: none;
    text-align: left;
    margin-left: 60px;
  }

  #buddypress form.standard-form .main-column {
    margin-left: 0;
    width: 100%;
    float: left;
  }

  #buddypress form#send-invite-form {
    margin-top: -30px;
  }

  #buddypress ul.item-list li h5 span.small {
    width: 100%;

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



/*  ----------------------------------------------------------------------------
    Groups Page
*/

#create-group-form {
  .main-column {
    #message {
      padding-top: 12px;
    }
  }
}
#buddypress ul.item-list li div.item-desc {
  width: auto;
}
#buddypress div#item-header div#item-meta {
  margin: 5px 0 0;
}

#buddypress div#item-header #item-header-cover-image #item-header-content {
  /* responsive portrait tablet */
  @media (min-width: @responsive_p_tablet_min) and (max-width: @responsive_p_tablet_max) {
    margin-top: -20px;
    margin-left: 0;
    text-align: center;
    width: 100%;
  }
}

#buddypress {
  .bbp-header li {
    /* responsive portrait tablet */
    @media (min-width: @responsive_p_tablet_min) and (max-width: @responsive_p_tablet_max) {
      font-size: 11px;
    }
  }
}

#buddypress div#item-header-cover-image h2 a,
#buddypress div#item-header-cover-image h2 {
  /* responsive portrait tablet */
  @media (min-width: @responsive_p_tablet_min) and (max-width: @responsive_p_tablet_max) {
    color: inherit;
    text-shadow: none;
    margin: 0;
  }
  /* responsive portrait phone */
  @media (max-width: @responsive_p_phone_max) {
    margin: 0;
  }
}


/* responsive portrait tablet */
@media (max-width: @responsive_p_tablet_max) {
  #buddypress div.item-list-tabs#subnav ul li#groups-order-select {
    width: 100%;
    margin-top: 10px !important;
  }

  .mygroups {
    .item,
    div.action {
      margin-left: 60px;
    }

    .item-desc {
      margin-left: 0 !important;
    }

    .group-button {
      text-align: right;
    }

    .meta {
      margin-top: 10px !important;
    }
  }

  #buddypress ul.item-list li div.item-desc {

    p {
      margin-bottom: 5px;
    }
  }

  #create-group-form {

    .avatar-150 {
      width: 50px;
    }

    .main-column {
      margin-left: 60px !important;

      #message {
        margin-left: 110px;
      }
    }

    #friend-list {
      border: none;
    }

    #upload {
      margin-top: 10px;
    }
  }
}

@media (max-width: @responsive_p_phone_max) {
  #create-group-form {
    #upload {
      margin-top: 20px;
    }
  }

  .mygroups .group-button {
    text-align: left;
  }
}


/*  ----------------------------------------------------------------------------
    Forums Page
*/
#buddypress div#item-header {
  position: relative;

  div#item-actions {
    /* responsive portrait phone */
    @media (max-width: @responsive_p_phone_max) {
      width: 100%;
      text-align: center;
    }

    h3 {
      font-size: 13px;
      font-weight: 700;
      line-height: 1;
      margin: 0;
      vertical-align: top;
      margin-bottom: 3px;
    }
  }
}

.group-forum #buddypress div#item-header ul {
  display: inline-block;
  margin: 0;
}

/* Pagination */
#buddypress div.pagination,
#buddypress div.pagination .pag-count,
#buddypress div.pagination .pagination-links {
  float: none;
}

#buddypress div#topic-meta {
  padding: 5px 0;

  h3 {
    font-size: 18px;
    font-weight: 700;
  }

  div.admin-links {
    position: relative;
    top: auto;
    right: auto;
  }
}

#buddypress div.admin-links {
  right: 0;
}

#buddypress div.topic-tags {
  font-size: 11px;
  color: #777;
}

#buddypress ul#topic-post-list li {
  padding: 15px 0;
}

/* responsive portrait tablet */
@media (max-width: @responsive_p_tablet_max) {
  #buddypress div.item-list-tabs ul li#forums-order-select {
    width: 100%;
    margin-top: 10px !important;
  }
}


/*  ----------------------------------------------------------------------------
    Members Page
*/


#buddypress div.dir-search {
  margin-top: -45px;
}

/* responsive portrait phone */
@media (max-width: @responsive_p_phone_max) {

  #search-members-form,
  #search-groups-form {
    position: relative;
    margin-bottom: 30px;
  }

  #buddypress div.dir-search {
    width: 100%;
    margin: 0;
  }

  #buddypress div.dir-search input[type="text"],
  #buddypress div.item-list-tabs ul li.groups-members-search,
  #buddypress div.item-list-tabs ul li#group_members-order-select {
    width: 100%;
  }

  #search-members-form #members_search_submit,
  #search-groups-form #groups_search_submit {
    position: absolute;
    top: 0;
    right: 0;
    left: auto;
  }

  #members_search,
  #groups_search {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
  }

  #buddypress #member-list.item-list li div.action {
    float: none;
    margin-left: 60px;
  }
}

.buddypress {
  .td-page-title {
    margin-bottom: 20px;
  }
}

// widgets
.widget.buddypress span.activity {
  font-size: 12px;
  opacity: 0.4;
}
.widget.buddypress #friends-list li,
.widget.buddypress #groups-list li,
.widget.buddypress #members-list li {
  line-height: 12px;

  .item-title {
    padding: 4px 0 8px;
  }
}
.widget.buddypress div.item-options {
  padding: 0;
}
.widget.buddypress li {
  margin-left: 0;
}
.widget.buddypress .bp-login-widget-user-links > div {
  margin-bottom: 0;
}
#buddypress div#message p,
#buddypress #sitewide-notice p {
  background-color: #FFF;
  border: 1px solid #F0F0F0;
  font-size: 70%;
}