@import "./__comments-modal.css";
@import "./__comments-flashing.css";
@import "./__comments-sent.css";

/* ----------------------------- TOP OF COMMENT ----------------------------- */
div.project-comment-top-scroll {
	background-color: var(--panel-color);
	border: solid 1px var(--border-color);
	border-bottom: none;
	border-radius: 4px 4px 0 0;

	padding: 30px 24.5px;
	overflow: auto;
	height: 100%;
	width: 100%;

	min-height: 200px;
	max-height: calc(100vh - 620px);
}
div.project-comment-top {
	width: 100%;
}
/* -------------------------------------------------------------------------- */

/* ---------------------------- BOTTOM OF COMMENT --------------------------- */
div.project-comment-bottom {
	border: solid 1px var(--border-color);
	border-top: none;
	border-radius: 0 0 4px 4px;

	padding: 12px 14px;

	min-height: 95px;
	height: 100%;
	width: 100%;
}

.project-comment-bottom-row {
	width: 100%;
}

textarea.project-comment-box::placeholder {
	font-style: italic;
}
textarea.project-comment-box {
	background-color: transparent;
	border: none;
	color: var(--charcoal-casper);
	font-size: 12px;
	font-weight: normal;
	text-align: left;

	width: 100%;
}

textarea#message::placeholder,
div[placeholder]#message::placeholder {
	content: attr(placeholder);
	font-style: italic;
}
div[placeholder]#message:focus::placeholder {
	content: "";
}
textarea#message,
div[placeholder]#message {
	background-color: transparent !important;
	border: none;

	color: var(--charcoal-casper);
	font-size: 12px;
	font-weight: normal;
	text-align: left;

	padding: 0;
	height: 28px;
	width: 100%;
}
/* -------------------------------------------------------------------------- */

/* ------------------------- PROJECT COMMENT BUBBLE ------------------------- */
div.project-comment-them,
div.project-comment-you {
	position: relative;
	clear: both;
	margin-bottom: 10px;
	height: 100%;
	width: 100%;
}

div.project-comment-them {
	float: left;
}
div.project-comment-you {
	float: right;
	flex-direction: row-reverse;
}
.project-comment-link {
	border-radius: 8px;
}
/* -------------------------------------------------------------------------- */

/* ---------------------- PROJECT COMMENT DELETE BUTTON --------------------- */
div.project-comment-them .delete-entry,
div.project-comment-you .delete-entry {
	background-color: var(--panel-color);
	border-radius: 50%;
	box-shadow: -3px 3px 6px 0 rgba(0, 0, 0, 0.24);
	font-size: 20px;
	position: absolute;
	top: -8px;
	left: 34px;
}
div.project-comment-you .delete-entry {
	left: unset;
	right: 34px;
}

div.project-comment-them .delete-entry:hover,
div.project-comment-you .delete-entry:hover {
	color: var(--accent);
}
/* -------------------------------------------------------------------------- */

/* ------------------------------- TIME STAMP ------------------------------- */
.project-comment-time {
	display: flex;
	flex-direction: column;
	color: var(--tc-primary);
	opacity: 40%;
	font-size: 12px;
	letter-spacing: -0.24px;
	margin: 0 8px;
}
/* -------------------------------------------------------------------------- */

/* ------------------------------ PRIVACY TEXT ------------------------------ */
.project-comment-privacy {
	background-color: var(--accent);
	border-radius: 9px;
	color: var(--tc-accent);
	font-size: 12px;
	font-weight: 500;
	text-transform: uppercase;
	padding: 0.6px 4px 0.4px;
	margin-top: 2px;
}
/* -------------------------------------------------------------------------- */

/* ----------------------------- PRIVACY BUTTON ----------------------------- */
.comment-privacy {
	font-size: 12px;
	font-weight: 500;
	text-transform: uppercase;
}

.comment-privacy.active {
	color: var(--accent);
}
/* -------------------------------------------------------------------------- */

/* ------------------------------- FIRST NAME ------------------------------- */
.project-comment-bubble-name,
.project-comment-bubble-name ~ b,
.project-comment-bubble-name ~ strong {
	font-weight: 900;
}

.project-comment-bubble-name ~ p b,
.project-comment-bubble-name ~ p strong {
	font-weight: 700;
}

.project-comment-bubble-name ~ p:nth-child(2) {
	display: inline;
	margin-left: 4px;
}

.project-comment-bubble-name ~ p:nth-child(3) {
	margin-top: 1rem;
}

.project-comment-bubble-name ~ p:last-child {
	margin-bottom: 0;
}
/* -------------------------------------------------------------------------- */

div.project-comment-separator {
	display: grid;
	place-content: center;
	position: relative;
	background-color: var(--panel-color);

	font-size: 14px;
	text-align: center;
	color: #98a9bc;
	margin: 10px 0 20px 0;
	width: 100%;
}
.project-comment-separator > span {
	z-index: 1;
	background-color: var(--panel-color);
	padding: 0 16px;
}
.project-comment-border {
	position: absolute;
	border-bottom: solid 1px var(--border-color);
	width: 50%;
	top: 50%;
	left: 25%;
}

.project-comment-profile {
	background-color: #dddddd11;
	border-radius: 50%;
	margin: 0 8px;
	height: 32.6px;
	width: 32.6px;
	min-height: 32.6px;
	min-width: 32.6px;
}

/* --------------------------------- BUBBLE --------------------------------- */
.project-comment-bubble {
	display: flex;
	align-items: center;

	background-color: var(--background-color);
	border: solid 1px var(--border-color);
	border-radius: 8px;

	padding: 8px 16px;
	min-height: 34px;
	height: 100%;
	max-width: 80%;
}

.project-comment-bubble p {
	font-size: 12px;
}

.project-comment-bubble li {
	margin-bottom: 0.5rem;
}
.project-comment-bubble ol,
.project-comment-bubble ul {
	margin-bottom: 1rem;
}

.project-comment-bubble .comment-attachment {
	display: flex;
	flex-direction: column;
	border-left: solid 3px var(--border-color);
	margin: 1rem 0;
	padding-left: 10.9px;
}

/* Link URL */
.project-comment-bubble .comment-attachment :nth-child(1) {
	font-size: 9px;
	opacity: 80%;
}
/* Link Title */
.project-comment-bubble .comment-attachment :nth-child(2) {
	font-size: 14px;
	font-weight: bold;
	display: -webkit-box;
	overflow: hidden;
	text-overflow: ellipsis;
	-webkit-line-clamp: 1;
	-webkit-box-orient: vertical;
}
/* Link Description */
.project-comment-bubble .comment-attachment :nth-child(3) {
	font-size: 14px;
	display: -webkit-box;
	overflow: hidden;
	text-overflow: ellipsis;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
}

.project-comment-bubble * {
	user-select: text !important;
}

.project-comment-bubble img {
	max-width: 100%;
	max-height: 300px;
	cursor: pointer;
}

.project-comment-you .project-comment-bubble {
	border: solid 1px var(--accent);
}

.project-comment-private .project-comment-bubble {
	background-color: #393830;
}

.project-comment-link .project-comment-bubble {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	padding: 10px 14px;
}
/* -------------------------------------------------------------------------- */

/* ------------------------- PROJECT COMMENT BUBBLE ------------------------- */
.project-comment-bubble > div {
	border-left: solid 3px var(--tc-primary);
	padding: 0 11.2px;
	margin-top: 19px;
}

.project-comment-bubble a {
	color: var(--accent);
}
.project-comment-bubble a:hover {
	text-decoration: underline;
}

.project-comment-bubble > span {
	font-size: 12px;
	line-height: 20px;
	letter-spacing: -0.12px;
	text-align: left;
	color: var(--tc-primary);
	word-break: break-word;
	width: 100%;
}
.project-comment-bubble > span > div:not(:empty) {
	margin-bottom: 1rem;
	line-height: 20px;
}
/* Override any font tags that come from email */
.project-comment-bubble font {
	font-size: inherit;
}
.project-comment-link .project-comment-bubble,
.project-comment-link .project-comment-bubble > span {
	font-size: 12px;
}

.project-comment-bubble-heading {
	font-weight: 600;
}
/* -------------------------------------------------------------------------- */

/* --------------------------- PROJECT COMMENT TAG -------------------------- */
.project-comment-tag {
	border-radius: 4px;
	background-color: rgba(0, 145, 255, 0.13);
	padding: 2px;
	font-size: 14px;
	font-weight: normal;
	color: #0091ff;
}
.project-comment-tag.project-comment-tag-you {
	background-color: rgba(245, 202, 61, 0.2);
	color: var(--notification-warning);
}
/* -------------------------------------------------------------------------- */

/* -------------------- PROJECT COMMENT PRIVACY DROPDOWN -------------------- */
.privacy-dropdown {
	color: var(--tc-primary);
	font-size: 12px;
	text-transform: uppercase;
	margin-right: 16px;
}

.privacy-dropdown .dropdown-button-text {
	font-weight: 500;
}

.privacy-dropdown .dropdown-button-text > i {
	margin-right: 4px;
}

.privacy-dropdown i.dropdownChevron {
	color: var(--tc-primary);
	font-size: 12px;
}
/* -------------------------------------------------------------------------- */

/* ------------------ COMMENTS HEIGHT AND SPACING OVERRIDES ----------------- */
#projectPanel div.tab-container.entry-tab-container,
#projectPanel
	div.tab-container.entry-tab-container
	> .container-fluid
	> .tab-content,
#projectPanel
	div.tab-container.entry-tab-container
	> .container-fluid
	> .tab-content
	> div:last-child,
#projectPanel
	div.tab-container.entry-tab-container
	> .container-fluid
	> .tab-content
	> div:last-child
	> div.row,
#projectPanel
	div.tab-container.entry-tab-container
	> .container-fluid
	> .tab-content
	> div:last-child
	> div.row
	> div.col-12 {
	height: 100%;
}

#projectPanel div.tab-container.entry-tab-container > .container-fluid {
	height: calc(100% - 44px);
}

div.comments-container {
	margin: 28px 0;
	display: grid;
	grid-template-rows: auto min-content;
}

.modal .tab-content #tab-comments .remote-load-contents,
.modal .tab-content #tab-files {
	height: 100%;
}
/* -------------------------------------------------------------------------- */

/* ------------------------ MODAL COMMENTS OVERRIDES ------------------------ */
.modal-side .project-comment-top-scroll {
	max-height: 100%;
}

@media screen and (max-width: 732px) {
	.modal-side .project-comment-top-scroll {
		padding: 0.5rem;
	}

	.project-details-tab-wrapper div.container-fluid {
		min-height: auto;
	}

	/* Mobile optimizations for comments feed */
	.project-comment-top .globalRow.project-comment-you,
	.project-comment-top .globalRow.project-comment-them {
		flex-direction: column;
		grid-gap: 5px;
	}

	.project-comment-top .project-comment-bubble {
		max-width: 100%;
	}

	.project-comment-profile {
		display: none;
	}
}
/* -------------------------------------------------------------------------- */
