@import "../markdown.css";


.comments,
#heartsList {
	width: 100%;
	max-height: 100%;
	transition: padding-bottom 200ms;
	overflow: auto;
	margin-left: 0;
	padding-top: 30px;
	flex: 100;
}

#commentsSummaryWarning {
	display: flex;
	/* z-index: 5; */
	/* position: fixed; */
	width: 100%;
	/* margin-bottom: -40px; */
	height: 41px;
	padding: 10px 10px;
	background: #222;
	color: #999;
	justify-content: space-between;
}

.comment {
	display: block;
	/*    make sure you use padding instead of margin. if so, scrolling don't work*/
	padding-top: 0;
	margin-bottom: 20px;
	/* max-height: inherit; */
	/* transition: max-height 200ms 4000ms; */
	overflow: visible;
	/* transition: background 200ms; */
}

.comment.reply .userThumbContainer img {
	background-size: 9px;
}

.comment .userThumbContainer img.hideUntilLoaded {
	opacity: 1;
}

.comment .userThumbContainer {
	display: block;
	position: absolute;
	width: 40px;
	height: 40px;
	top: 2px;
	left: -50px;
	padding-top: 0;
	border-radius: 50%;
	overflow: hidden;
}

.comment .commentNewReply {
	position: relative;
	transition: background-color 200ms;
	background-color: transparent;
	margin-top: 3px;
}

.comment .commentNewReply.active {
	background-color: #444;
	padding-top: 5px;
	padding-left: 60px;
	padding-right: 0;
}

.comment .commentNewReply>.userThumbContainer {
	display: none;
	position: absolute;
	width: 25px;
	height: 25px;
	top: 11px;
	left: 24px;
}

.comment .commentNewReply.active>.userThumbContainer {
	display: block;
}

.comment .commentNewReply .textarea {
	height: auto;
	padding: 0;
	border: none;
	min-height: unset;
	padding-bottom: 10px;
	margin-top: 0;
	cursor: pointer;
	/* opacity: 0; */
	/* visibility: hidden; */
}

.comment .commentNewReply .textarea::after {
	display: block;
	color: #999;
	cursor: pointer;
	font-size: 14px;
	visibility: hidden;
}

.comment:hover .commentNewReply .textarea::after {
	visibility: visible;
}

.comment .commentNewReply.active .textarea::after {
	content: '';
}

.comment .commentNewReply.active .textarea::after {
	/* content: 'Comment Tips'; */
	display: block;
	position: absolute;
	right: 15px;
	bottom: -21px;
	color: #666;
}

.commentNewReply.active .textarea,
.commentNewReply.loading .textarea {
	height: auto;
	min-height: 44px;
	margin-left: -6px;
	padding-right: 15px;
	padding-bottom: 10px;
	padding-left: 5px;
	padding-top: 10px;
	margin-top: -5px;
	font-size: 18px;
}

.comment .commentNewReply button {
	display: none;
}

.comment .commentNewReply.active button {
	display: none;
	float: left;
	margin-top: -10px;
	margin-right: 10px;
}

.comment .commentReplies {
	padding-left: 0;
	padding-right: 0;
}

.showAllRepliesLink {
	display: block;
	padding: 14px 15px 14px 60px;
	background: url('/assets/img/icons/replies_white@2x.png') left 34px center no-repeat;
	background-size: 4px 28px;
	color: #999 !important;
	font-size: 14px;
}

.comment .commentReplies.showAllReplies .showAllRepliesLink {
	display: none;
}

.comment .commentReplies.showAllReplies .reply {
	display: block;
}

.comment.reply {
	/* display: none; */
	border-left: 8px solid transparent;
	margin-bottom: 10px;
	padding-left: 52px;
}

.comment.reply:nth-child(2) {
	margin-top: 15px;
}

.comment.reply:last-child {
	margin-bottom: 0px;
}

.comment.reply>* {
	padding-left: 0px;
}

.comment.reply .userThumbContainer {
	position: absolute;
	width: 25px;
	height: 25px;
	top: -3px;
	left: -36px;
}

.comment.reply .textarea {
	display: none;
}



.comment.flagged h3,
.comment.flagged .commentBody,
.comment.flagged .commentMeta,
.comment.flagged .commentNewReply {
	display: none;
}


.comment.flagged::after {
	display: block;
	padding: 0 15px 0 50px;
	overflow: hidden;
	opacity: 0.3;
	content: '~ Comment is flagged and removed. ~';
	/* font-size: 0.8em; */
	margin-bottom: 20px;
}

.comments.active {
	padding-bottom: 150px;
}

.comment,
.heart {
	position: relative;
}

.comment>* {
	padding-left: 60px;
	padding-right: 15px;
}

.comment .commentBody {
	overflow-x: hidden;
	padding-top: 0px;
	padding-bottom: 0px;
	font-size: 18px;
}

.comment.summarize > .commentMain .commentBody {
	max-height: 93px;
	overflow-y: hidden;
	text-overflow: ellipsis;
}

.comment a.readMoreLink {
	display: none;
}

.comment.summarize > .commentMain a.readMoreLink {
	display: block;
}


.comment .commentHeader {
	display: flex;
	position: relative;
	flex-wrap: nowrap;
	padding-top: 2px;
}

.comment .commentHeader a {
	color: #999;
	font-size: 14px;
	white-space: nowrap;
	text-overflow: ellipsis;
	overflow: hidden;
}

.commentEditTooltip li {
	font-size: 16px;
	padding: 10px 10px;
	border-bottom: 1px solid #555;
}
.commentEditTooltip li:last-child {
	border-bottom: none;
}
.commentEditTooltip li:hover {
	background: #555;
}

.comment.hasMarker > .commentMain .commentHeader::after {
	position: absolute;
	width: 3px;
	height: 43px;
	left: -60px;
	background: #F8E71C;
	content: '';
	top: 0px;
}

.comment .commentMeta {
	margin-top: 0;
	color: #9b9b9b;
}

.comment .commentDate {
	cursor: pointer;
}

.comment .commentActions {
	display: flex;
	height: auto;
	justify-content: flex-start;
	align-items: flex-start;
	/* visibility: hidden; */
	opacity: 0;
	/* border-top: 1px solid #444444; */
	padding-top: 0px;
	max-height: 0px;
	overflow: hidden;
	transition: opacity 200ms 500ms, max-height 300ms 700ms ease-in-out, padding-top 300ms 700ms ease-in-out;
	user-select: none;
	flex-wrap: wrap;
	flex-direction: row;
}
.commentMain:hover > .commentActions,
.commentActions.active
{
	 transition: opacity 200ms 1000ms, max-height 300ms 1200ms ease-in-out, padding-top 300ms 1200ms ease-in-out;
	/* visibility: visible; */
	opacity: 1;
	padding-top: 5px;
	max-height: 100px;
}

.comment hr {
	margin: 5px 0;
	border-color: #9b9b9b;
}

.comment .btn-circle {
	width: 23px;
	height: 23px;
	border-radius: 20px;
	border: none;
}

.comment .btn-primary {
	background: url('/assets/img/icons/icon_arrow_up.svg') center center no-repeat #E14747;
}

.comment .btn-secondary {
	background: url('/assets/img/icons/code_thin_white@2x.png') center center no-repeat #555;
	background-size: 17px;
}
.comment .emojiReplies {
	display: flex;
	gap: 5px;
	flex-wrap: wrap;
	align-items: center;
}
.comment .emojiPill {
	display: inline-block;
	padding: 3px 8px;
	background-color: #393939;
	border-radius: 3px;
	font-size: 16px;
	white-space: nowrap;
}
.comment .emojiPill:hover {
	background-color: #444;
}
.comment .emojiPill .metric {
	padding-left: 5px;
	font-size: 0.8rem;
}
.comment .emojiPill.userIncluded {
	/* border: 1px solid #666; */
	padding: 2px 7px;
	background-color: #555;
}

#commentSidePanel .comment .commentFullname {
	flex: 10;
}

#commentSidePanel .comment .commentMeta {
	width: auto;
	top: 3px;
	/* position: absolute; */
	right: 0;
	opacity: 0;
	transition: opacity 200ms;
	font-size: 0.8em;
	padding-right: 15px;
	text-align: right;
	background: #333;
	padding-left: 0;
}

#commentSidePanel .comment .icon_edit_white {
	/* right: -8px; */
	width: 20px;
	height: 18px;
	top: 0px;
	background-size: 4px;
	margin-left: 0;
	margin-right: -20px;
}

#commentSidePanel .comment:hover> .commentMain .commentMeta,
#commentSidePanel .commentMeta.active {
	opacity: 1;
}

#commentSidePanel .comment .commentEditTooltip {
	display: none;
}

html.newSketch .codeCommentIcon,
html.embedPage .codeCommentIcon {
	display: none;
}

#newCommentContainer {
	position: relative;
	/* transition: bottom 200ms; */
	width: 100%;
	height: auto;
	height: auto;
	bottom: 0px;
	overflow: hidden;
	z-index: 21;
	/* flex: 1 0 20%; */
	max-height: 80%;
}

#app.commentsDisabled #newCommentContainer {
	padding: 20px;
	background: #222;
	color: #666;
}

#app.commentsDisabled #newCommentContainer::before {
	display: block;
	content: "New comments are disabled";
	text-align: center;
}

#app.commentsDisabled .newComment {
	display: none !important;
}

#newCommentContainer.active {
	box-shadow: 0 0px 10px #111;
	border-top: 1px solid #222;
}


#verifyToComment {
	position: absolute;
	width: 100%;
	height: auto;
	bottom: 0px;
	transition: bottom 200ms;
	background: #5a5a5a;
	padding-top: 10px;
	padding-bottom: 10px;
	text-align: center;
}

#joinToComment {
	position: absolute;
	width: 100%;
	height: auto;
	bottom: 0px;
	transition: bottom 200ms;
	background: #5a5a5a;
	padding-top: 10px;
	padding-bottom: 10px;
	text-align: center;
}

.newComment {
	display: flex;
	padding: 0;
	flex-direction: column;
	justify-content: flex-end;
	align-items: stretch;
	max-height: 100%;
}

#commentSidePanel .newComment .userImage {
	display: none;
	top: -56px;
	bottom: 85px;
}

.newComment .textarea {
	width: 100%;
	margin: 0;
	padding: 15px 10px 15px 15px;
	min-height: 55px;
	max-height: 100%;
	/* bottom: 0px; */
	background: #8d8d8d;
	text-align: left;
	outline: none;
	overflow-x: hidden;
	overflow-y: auto;
	border-left: 1px solid #888888;
	font-size: 18px;
	/* flex: 1 0 100%; */
}

.newComment .textarea.empty {
	padding-top: 11px;
	padding-bottom: 0px;
	text-align: center;
	font-size: 28px;
	font-family: bariol;
}

/* override it to be empty */
.toTextarea-placeholder:empty:after {
	content: '';
}
/* and enable it when has .empty */
.toTextarea-placeholder.empty:after {
	content: attr(data-placeholder);
}
.commentNewReply.loading {
	background-image: url('/assets/img/icons/loader_white.svg');
	background-size: 12px;
	background-repeat: no-repeat;
	background-position: right 5px top 15px;
}

#newCommentContainer.loading .textarea {
	background-image: url('/assets/img/icons/loader_white.svg');
	background-size: 12px;
	background-repeat: no-repeat;
	background-position: right 5px center;
}

.newComment .toTextarea-placeholder:focus:empty:after {
	display: none;
}

.newComment .buttonContainer {
	/* margin-top: -60px; */
	display: flex;
	position: relative;
	/* padding: 0 10px; */
	height: 0px;
	/* visibility: hidden; */
	/* background: #333; */
	text-align: center;
	z-index: 100;
	transition: height 200ms;
	justify-content: space-between;
	flex: 1 0 auto;
}

#newCommentContainer.active .buttonContainer {
	/* visibility: visible; */
	height: 70px;
}

.newComment .buttonContainer button {
	margin: 15px;
}

.newComment .buttonContainer button.btn-secondary {
	color: #f5f5f5;
	padding-right: 0;
}

.newComment .buttonContainer button.btn-primary {
	min-width: 100px;
}

.newComment .buttonContainer button.btn-secondary:hover {
	opacity: 0.8;
}

.newComment .buttonContainer .small {
	color: #ccc;
}

#commentSidePanel {
	display: flex;
	padding: 0px 0 0 0;
	overflow: hidden;
	padding-top: 0;
	flex-direction: column;
	flex-wrap: nowrap;
	justify-content: space-between;
	align-items: flex-start;
}

#commentSidePanel > * {
	width: 100%;
}

#commentSidePanel .loaderContainer {
	padding: 15px;
}

#commentSidePanel .icon_privacy_public_white {
	width: 16px;
	height: 16px;
	background-image: url('/assets/img/icons/privacy_public_white@2x.png');
}

#commentSidePanel .icon_privacy_group_white {
	width: 16px;
	height: 16px;
	background-image: url('/assets/img/icons/privacy_group_white@2x.png');
}

#commentSidePanel .icon_privacy_user_white {
	width: 16px;
	height: 16px;
	background-image: url('/assets/img/icons/privacy_user_white@2x.png');
}

#commentSidePanel .icon_reply_small_white {
	width: 11px;
	height: 11px;
	background-image: url('/assets/img/icons/reply_small_white@2x.png');
}

#commentSidePanel .icon_addEmoji_small_white {
	width: 24px;
	height: 15px;
	background-image: url('/assets/img/icons/addEmoji_small_white@2x.png');
}

#newCommentPrivacyOptions {
	max-width: 280px;
	margin-bottom: 30px;
}

#newCommentPrivacyOptions .btn-group {
	max-width: 100%;
	/* overflow: hidden;
	text-overflow: ellipsis; */
}

#newCommentPrivacyOptions .btn-group .btn {
	/* text-overflow: ellipsis; */
	overflow: hidden;
}

#newCommentPrivacyOptions .btn-group .btn:last-child {
	flex-shrink: 1;
	overflow: hidden;
	text-overflow: ellipsis;
}

#newCommentMarker {
	display: flex;
	height: auto;
	padding-top: 0px;
	padding-bottom: 0px;
	padding-left: 15px;
	padding-right: 15px;
	justify-content: space-between;
	align-items: center;
	overflow: hidden;
	transition: max-height 200ms, padding-top 200ms, padding-bottom 200ms;
	max-height: 0;
	flex: 1 0 auto;
}

#newCommentContainer.active #newCommentMarker {
	max-height: 50px;
	padding-top: 10px;
	padding-bottom: 10px;
}





/* CODE COMMENTS */


#codePanel .codeComment {
	display: inline-block;
	position: absolute;
	width: 100px;
	height: 30px;
	right: 0px;
	background: transparent;
	margin-bottom: -30px;
}

#app.commentsDisabled .codeComment {
	display: none;
}

#codePanel .codeCommentOverlay {
	display: none;
	position: absolute;
	width: 100px;
	height: 300px;
	right: 0px;
	background: #333;
}

#codePanel .codeComment.highlight .codeCommentIcon,
#codePanel .codeComment.selected .codeCommentIcon {
	opacity: 1;
}

#codePanel .codeCommentIcon {
	position: relative;
	width: 24px;
	height: 18px;
	transition: opacity 200ms;
	background: url('/assets/img/icons/comment_small_red@2x.png') no-repeat center 3px;
	background-size: 16px;
	opacity: 0.8;
	cursor: pointer;
	text-align: center;
}

#app.darkMode #codePanel .codeCommentIcon {
	opacity: 0.7;
}

#codePanel .codeCommentIcon:hover {
	opacity: 1 !important;
}

#codePanel .codeCommentIcon.newComment {
	background-image: url('/assets/img/icons/comment_new_small_red@2x.png');
}

#codeContainer.showComments .commentMarker.commentMarkerSelected {
	background-color: #F3EC97;
}

#codeContainer.showComments .commentMarker {
	background-color: #FEFCE1;
	transition: background-color 200ms;
	/* transition doesn't effect hover state; lines are re-created by codemirror from stratch */
}

#app.darkMode #codeContainer.showComments .commentMarker {
	background-color: #2d2c13;
	transition: background-color 200ms;
}
#app.darkMode #codeContainer.showComments .commentMarker.commentMarkerSelected {
	background-color: #5e5b0c;
	transition: background-color 200ms;
}

.tippy-content .codeCommentBox {
	width: 300px;
	min-height: 100px;
	max-height: 364px;
	overflow: auto;
	text-align: left;
	white-space: normal;
}

.emojiListContainer {
	display: block;
	position: relative;
	max-height: 400px;
	overflow: auto;
	user-select: none;
}

.emojiList label {
	display: block;
	color: #f5f5f5;
}

.emojiList li {
	display: inline-block;
	padding: 0px 3px;
	cursor: pointer;
	font-size: 30px;
	cursor: pointer;
	border-radius: 5px;
}
.defaultEmojis li {
	padding: 0px 3px;
	display: inline-block;
	cursor: pointer;
	filter: saturate(0);
}
.defaultEmojis li:hover {
	filter: saturate(1);
}

.emojiList li:hover {
	background: #979797;
}
.addEmojiIcon {
	opacity: 0.5;
	margin-right: 5px;
}
.addEmojiIcon:hover {
	opacity: 1;
}
