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

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

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


/*  ----------------------------------------------------------------------------
    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: 10px 13px;
  text-shadow: none;
  border-radius: 3px;
  line-height: 1;
  margin-bottom: 10px;
  vertical-align: top;

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

#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;
  border-radius: 3px;

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

#buddypress a.button,
a.bp-title-button,
#buddypress ul.button-nav li a {
  border-radius: 3px;
  font-size: 11px;

  &: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;
}

#buddypress a.button {
  padding: 4px 10px 5px 10px;
}

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 .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 {
  border-radius: 3px;
  font-size: 9px;
  line-height: 9px;
  padding: 1px 4px;
}

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

/*  ----------------------------------------------------------------------------
    Tabs
*/

#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;

  &:first-child {
    border-bottom-left-radius: 3px;
    border-top-left-radius: 3px;

    &:before {
      display: none;
    }
  }

  &:last-child {
    border-bottom-right-radius: 3px;
    border-top-right-radius: 3px;
    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) {
    width: 49.8%;
    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: 3px;
    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;
  top: -1px;
}

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

  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 {
    margin-left: 0;
    padding-bottom: 31px;

    .activity-inner {
      margin: 6px 0 0 60px;
    }

    .activity-header {
      font-weight: 600;
      margin-left: 60px;

      a {
        display: inline-block;
        vertical-align: top;
      }
    }
  }

  li.new_forum_topic .activity-content .activity-inner {
    margin-left: 60px;
    border-left: 0;
    padding-left: 0;
  }

  .mini .activity-content {

    .activity-header {
      margin-left: 30px;
    }
  }
}

body.activity-permalink #buddypress .activity-content .activity-inner {
  margin: 12px 0 0 60px;
}
body.activity-permalink #buddypress .activity-list li .activity-header > p {
  padding: 0;
}

#buddypress form#whats-new-form {

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

  textarea {
    width: 100%;
  }
}

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

#buddypress div.activity-meta {
  margin-top: 30px;
  width: 100%;
  text-align: right;

  a {
    padding: 3px 8px 4px 8px;

    &.acomment-reply {
      padding-top: 2px;
    }
  }
}

#buddypress {

  a.activity-time-since {
    position: absolute;
    bottom: 0;
    right: 0;
    font-weight: 400;
  }

  .acomment-meta a.activity-time-since {
    bottom: 13px;
  }
}

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

#buddypress .activity-list li.mini .activity-avatar img.avatar,
#buddypress .activity-list li.mini .activity-avatar img.FB_profile_pic {
  margin-left: 0;
}



#buddypress .activity-list .activity-content .activity-header img.avatar {
  margin: 0 10px 0 10px !important;
}

.activity-time-since {
  font-size: 11px;
}


/* 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 a.bp-secondary-action,
#buddypress span.highlight {
  font-size: 11px;
  font-weight: 700;
}

#buddypress a.bp-secondary-action.delete-activity {
  margin-right: 0;
}


#buddypress div#item-header div.generic-button {
  margin-bottom: 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: 31px;
    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.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;
      border-radius: 3px;

      &: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: 50px;
  }
}

body.activity-permalink #buddypress .activity-list li .activity-content,
body.activity-permalink #buddypress div.activity-comments {
  margin-left: 0;
}


#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 {
  margin-left: 15px;

  div.acomment-content {
    margin: 5px 0 0 35px;
  }

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

//#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;
}


/*  ----------------------------------------------------------------------------
    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
*/
@media (max-width: @responsive_p_phone_max) {
  #buddypress ul.item-list li div.action {
    position: relative;
    top: 0;
    margin-top: 10px;
    float: left;
  }

  #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;
    }
  }
}

/* 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: left ;
    }

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

  #buddypress ul.item-list li div.item-desc {
    width: auto;

    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;
    }
  }
}


/*  ----------------------------------------------------------------------------
    Forums Page
*/

#buddypress div#item-header h2.user-nicename {
  font-size: 18px;
  font-weight: 700;

  /* responsive portrait phone */
  @media (max-width: @responsive_p_phone_max) {
      margin-top: 0;
  }
}

.buddypress .td-page-title {
  margin-top: 0;
  margin-bottom: 0;
}

#buddypress #item-header-cover-image #item-header-avatar img.avatar {
  width: 150px;

  /* responsive portrait phone */
  @media (max-width: @responsive_p_tablet_max) {
    width: 100px;
  }
}

#buddypress #item-header-cover-image #item-header-avatar {
  /* responsive portrait tablet */
  @media (max-width: @responsive_p_tablet_max) {
    margin-top: 170px;
  }
}

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

#buddypress div#item-header {
  position: relative;

  div#item-actions {
    h3 {
      font-size: 13px;
      font-weight: 700;
      margin: 10px 0;
      vertical-align: top;
      list-style: none;
      line-height: 1;
      display: block;
    }
  }

  div#item-header-content {
    width: 100%;
  }
}

#buddypress div#item-header #item-header-cover-image #item-header-content {
  margin-top: -120px;

  /* responsive portrait tablet */
  @media (min-width: @responsive_p_tablet_min) and (max-width: @responsive_p_tablet_max) {
    margin-left: 115px;
    margin-top: -95px;
  }
  /* responsive portrait phone */
  @media (max-width: @responsive_p_phone_max) {
    margin-top: 0;
  }
}

#buddypress div#item-header div#item-meta {
  margin: 5px 0;
  line-height: 16px;
}

#buddypress  {
  input[type="checkbox"],
  input[type="radio"] {
    margin-right: 5px;
  }
}
#buddypress .field-visibility-settings-toggle {
  margin-bottom: 0;
  margin-top: 5px;
}

#buddypress div.activity-comments form input {
  margin: 0;
  vertical-align: middle;
  padding: 7px 10px;
}

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

#buddypress table.profile-fields:last-child {
  margin-bottom: 20px;
}

/* 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;
  }
}

body.single-item.groups #buddypress div#item-header #item-header-cover-image #item-actions {
  padding-top: 0;
}


/*  ----------------------------------------------------------------------------
    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;
  }
}