
// Claroline & bootstrap mixins
@import "src/main/app/Resources/styles/mixins";
// Forum variables
@import "../variables";

.current-subject{
  margin-top: calc($line-height-computed - 4px);
}

.subjects-back {
  display: flex;
  justify-content: flex-end;
  margin-top: 4px;
}

.subject-info {
  margin-bottom: $component-margin-bottom;
}

.subject-poster {
  margin-bottom: 4px;
  @include border-radius($border-radius-lg);
}

.tag {
  span,
  a {
    margin-right: .2em;
  }
}

.posts {
  list-style: none;
  padding: 0;

  .post{
    margin-bottom: $component-margin-bottom;

    h4 {
      a {
        font-size: $font-size-sm;
      }
    }
    .user-message-container{
      margin-bottom: 0;
    }
  }
}

// TODO : to remove
.messages-sort {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  margin-bottom: 10px; // same as list grid sort

  .btn {
    font-weight: bold;
    border: none;
    padding-top: 0;
    padding-bottom: 0;

    .fa {
      margin-left: $icon-text-spacer;
    }
  }
}


/**
 * Comments
 */

.user-comment-container {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  max-width: 100%;
  margin-bottom: 5px;
  background-color: var(--#{$prefix}secondary-bg);
  padding: 10px 0 0 10px;

  .user-avatar {
    max-height: 50px;
    font-size: 50px;
  }
}

.user-comment-form-container {
  .form-group {
    padding-right: 15px;
    margin: 15px;
  }
  .btn-save-container{
    margin: 0 30px 10px 15px;
  }

}

.user-comment-meta {
  display: flex;
  flex-direction: row;
  justify-content: flex-end;
  align-items: center;
  color: $gray-light;
  font-size: $font-size-sm;
  margin: 0 15px;
  padding-bottom: 10px;
  border-bottom: 1px solid $user-message-inner-border;

  .user-comment-info {
    flex: 1 0 auto;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    font-weight: bold;

    .date {
      padding: 0 10px;
      font-weight: normal;
      font-style: italic;
    }
  }

  .user-comment-actions {
    padding-left: 10px;
    border-left: 1px solid $user-message-inner-border;
    .btn {
      padding: 0;
      + .btn {
        margin-left: 5px;
      }
    }
  }
}

.user-comment {
  position: relative;
  flex: 1;
  align-self: stretch;
  //background: $user-message-bg;
  background-color: var(--#{$prefix}secondary-bg);

  @include border-radius($user-message-border-radius);
}

.user-comment-content {
  padding: 15px;
}

.comment-link-container{
  display: flex;
  justify-content: flex-end;

  .comment-link {
    padding: 0 0 0 10px;
    border: 0;
  }
}


// the margin-left of this container =>
// 60px of the profile img + 30px between the profile img and the user-message
// so that the button can have the width of the userMessage
.answer-comment-container {
  margin: 10px 0 0 90px;

  .comments-title {
    justify-content: flex-end;
  }
}
