
:root {
	--border-color: #599392;
	--header-bg-color: #f9fbff;
	--header-title-color: #333333;
	--message-tags-bg-color: #f9fbff;
	--accent-color: var(--accent);
	--message-body-bg-color: #e6f4f6;
	--in-msg-bg-color: #a9b5b4;
	--out-msg-bg-color: #79c7c5;
	--sub-title-color: #444444;
	--footer-bg-color: #ffffff;
	--initials-bg-color: #1a73e8;
	--initials-color: #ffffff;
	--comment-thread-bg-color: #ffffff;
	--comment-thread-text-color: #000000;
	--comment-thread-sub-title-color: #aaaaaa;
	--message-edit-bg-color: #f0f6f7;
	--message-edit-text-color: #777777;
	--message-edit-border-color: #599392;
	--select-option-bg-color: #ffffff;
}

.chatBox { width: 100%; border: var(--border-color) 1px solid; display: flex; flex-direction: column; border-radius: 10px; overflow: hidden; }
.chatBox .header { width: 100%; display: flex; height: 60px; background-color: var(--header-bg-color); align-items: center; }
.chatBox .header .title { width: 100%; box-sizing: border-box; color: var(--header-title-color); font-size: 1.2rem; text-align: left; padding: 0 10px; display: flex; align-items: center; }
.chatBox .header .title input { width: 100%; box-sizing: border-box; color: var(--header-title-color); font-size: 1.2rem; text-align: left; padding: 0 10px; background: none; border: none; }
.chatBox .header .title .save {}
.chatBox .header .icons { font-size: 1.2rem; padding: 0 10px; }

.chatBox .messageTags { width: 100%; display: flex; background-color: var(--message-tags-bg-color); flex-direction: column-reverse; padding-bottom: 5px; }
.chatBox .messageTags section { background-color: var(--message-tags-bg-color); }
.chatBox .messageTags section.chatTags { padding: 0; }
.chatBox .messageTags section.chatTags .formInput { padding: 0; align-items: flex-end; }
.chatBox .messageTags section.chatTags .formInput input { background-color: initial; }
.chatBox .messageTags > div > span { display: inline-block; padding: 3px 5px; margin: 0 3px; border-radius: 6px; background-color: var(--accent-color); font-size: 0.9em; }


.chatBox .messageTags.search .chatTags {min-height: unset; height: unset;}
.chatBox .messageTags.search .formInput{min-height: unset;}
.chatBox .messageTags.search section.chatTags .formInput { padding: 0 20px; align-items: baseline; }
.chatBox .messageTags.search .kpiBox .action{padding: 0;}
.chatBox .messageTags.search .kpiBox{gap: 10px;}

.chatBox .messageBody { width: 100%; display: flex; height: clamp(200px, calc(100dvh - 300px), 1200px); background-color: var(--message-body-bg-color); flex-direction: column-reverse; flex-wrap: nowrap; overflow-y: scroll; }
.chatBox .messageBody > div:not(.printSpacer) { width: 100%; background-color: var(--message-body-bg-color); font-size: 0.9rem; box-sizing: border-box; padding: 20px; }
.chatBox .messageBody .inMsg { text-align: left; }
.chatBox .messageBody .outMsg { text-align: right; }
.chatBox .messageBody > div > div { padding: 10px; display: inline-block; border-radius: 10px; width: calc(100% - 150px); color: #ffffff; }
.chatBox .messageBody > div.inMsg > div { background-color: var(--in-msg-bg-color); }
.chatBox .messageBody > div.outMsg > div { background-color: var(--out-msg-bg-color); }
.chatBox .messageBody > div > div .subTitle { font-size: 0.8rem; font-weight: 600; color: var(--sub-title-color); }
.chatBox .messageBody > div > div .subTitle.dual { display: flex; }
.chatBox .messageBody > div > div .subTitle.dual div { padding: 0 5px; }
.chatBox .messageBody > div > div .subTitle.dual.inMsg { justify-content: flex-end; }
.chatBox .messageBody > div > div .msg { text-align: left; }
.chatBox .messageBody > div > div .msg .contentDownload { color: var(--header-title-color); text-decoration: none; }

.chatBox .footer { width: 100%; display: flex; background-color: var(--footer-bg-color); height: 80px; padding: 10px; box-sizing: border-box; }
.chatBox .footer form { width: calc(100% - 80px); }
.chatBox .footer form textarea { outline: none; width: 100%; height: 60px; border: none; background-color: var(--footer-bg-color); box-sizing: border-box; resize: none; color: var(--comment-thread-text-color); }
.chatBox .footer .controls { width: 100px; box-sizing: border-box; display: flex; font-size: 20px; justify-content: space-evenly; align-items: center; }

.main .printSpacer { width: 100%; height: 0 !important; }


/*.chatBox{width: 100%; border: #599392 1px solid; display: flex; flex-direction: column; border-radius: 10px; overflow: hidden;}*/

/*.chatBox .header{width: 100%; display: flex; height: 60px; background-color: #f9fbff; align-items: center;}*/
/*.chatBox .header .title{width: 100%; box-sizing: border-box; color: #333333; font-size: 1.2rem; text-align: left; padding: 0 10px; display: flex; align-items: center;}*/

/*.chatBox .header .title input{width: 100%;  box-sizing: border-box; color: #333333; font-size: 1.2rem; text-align: left; padding: 0 10px; background: none; border: none;}*/
/*.chatBox .header .title .save{}*/
/*.chatBox .header .icons {font-size: 1.2rem; padding: 0 10px;}*/


/*.chatBox .messageTags{width: 100%; display: flex;  background-color: #f9fbff; flex-direction: column-reverse; padding-bottom: 5px;}*/
/*.chatBox .messageTags section{background-color:  #f9fbff;}*/
/*.chatBox .messageTags section.chatTags{padding: 0}*/
/*.chatBox .messageTags section.chatTags .formInput{padding: 0; align-items: flex-end;}*/
/*.chatBox .messageTags section.chatTags .formInput input{background-color: initial;}*/
/*.chatBox .messageTags span{display: inline-block; padding: 3px 5px; margin: 0 3px; border-radius: 6px; background-color: var(--accent); font-size: 0.9em;}*/

/*.chatBox .messageBody{width: 100%; display: flex; height: clamp(200px, calc(100dvh - 300px), 400px); background-color: #e6f4f6; flex-direction: column-reverse; flex-wrap: nowrap; overflow-y: scroll;}*/
/*.chatBox .messageBody > div:not(.printSpacer){width: 100%; background-color: #e6f4f6; font-size: 0.9rem; box-sizing: border-box; padding: 20px; }*/
/*.chatBox .messageBody .inMsg{text-align: left;}*/
/*.chatBox .messageBody .outMsg{text-align: right;}*/
/*.chatBox .messageBody > div > div{ padding: 10px; display: inline-block; border-radius: 10px; width: calc(100% - 150px); color: #ffffff;}*/

/*.chatBox .messageBody > div.inMsg > div{ background-color: #a9b5b4;}*/
/*.chatBox .messageBody > div.outMsg > div{ background-color: #79c7c5; }*/

/*.chatBox .messageBody > div > div .subTitle{font-size: 0.8rem; font-weight: 600; color: #444444;}*/
/*.chatBox .messageBody > div > div .subTitle.dual{display: flex;}*/
/*.chatBox .messageBody > div > div .subTitle.dual div{padding: 0 5px;}*/
/*.chatBox .messageBody > div > div .subTitle.dual.inMsg{justify-content: flex-end;}*/
/*.chatBox .messageBody > div > div .msg{text-align: left;}*/

/*.chatBox .footer{width: 100%; display: flex; background-color: #ffffff; height: 80px; padding: 10px; box-sizing: border-box;}*/
/*.chatBox .footer form{width: calc(100% - 80px);}*/
/*.chatBox .footer form textarea{outline: none; width: 100%; height: 60px; border: none; background-color: #ffffff; box-sizing: border-box; resize: none;}*/
/*.chatBox .footer .controls{width: 100px;box-sizing: border-box; display: flex; font-size: 20px; justify-content: space-evenly;align-items: center;}*/

/*!*hide the print spacer if on main*!*/
/*.main .printSpacer{width: 100%; height: 0 !important;}*/

.chatBox.commentThread{
	max-height: calc(100vh - 130px);
	.messageBody > div{ display: flex; flex-direction: column; padding: 10px 20px; box-sizing: border-box;}
	.messageBody > div .msgHeader{display: flex; flex-direction: row; align-items: center; gap: 10px; padding: 0; margin: 0 0 5px 0; background-color: unset;}
	.messageBody > div .msgHeader .editByText{font-style: italic; color: var(--message-edit-text-color)}
	.messageBody > div .msgHeader i{font-size: 1.3em;}
	.messageBody > div .initials{background-color: var(--initials-bg-color); color: var(--initials-color); border-radius: 50%; width: 30px; height: 30px; display: flex; justify-content: center; align-items: center; user-select: none;}
	.messageBody > div:before{display: none;}
	.messageBody > div > div{ background-color: var(--comment-thread-bg-color); width: 100%; box-sizing: border-box; color: var(--comment-thread-text-color);}
	.messageBody > div > div{display: flex; flex-direction: column; gap: 6px; padding: 15px; border-radius: 10px; width: 100%; color: var(--comment-thread-text-color);}

	.messageBody > div.isAction{padding-top: 0; padding-bottom: 0;}
	.messageBody > div.isAction .msgHeader{display: none;}
	.messageBody > div.isAction > div {border: none;}
	.messageBody > div.isAction > div:last-child{border-color: #a1a1eb; border-style: solid; border-width: 0 1px 0 1px; border-radius: 0}
	.messageBody > div.isAction > div:last-child{border-color: #a1a1eb; border-style: solid; border-width: 0 1px 0 1px; border-radius: 0}

	/* Single action item - not preceded AND not followed by action items */
	.messageBody > div.isAction:not(div.isAction + div.isAction):not(:has(+ div.isAction)) > div:last-child {
		border-top-width: 1px;
		border-bottom-width: 1px;
		border-radius: 10px;
	}

	/* Top border - when visually on top (last in DOM due to column-reverse) */
	.messageBody > div.isAction:last-child > div:last-child,
	.messageBody > div.isAction:not(:has(+ div.isAction)) > div:last-child {
		border-top-width: 1px;
		border-radius: 10px 10px 0 0;
	}

	/* Bottom border - when visually on bottom (first in DOM due to column-reverse) */
	.messageBody > div.isAction:first-child > div:last-child,
	.messageBody > div.isAction:not(div.isAction + div.isAction) > div:last-child {
		border-bottom-width: 1px;
		border-radius: 0 0 10px 10px;
	}


	.messageBody > div > div .msg{color: var(--comment-thread-text-color); font-size: 1.15em; user-select: text;}
	.messageBody > div.isAction:nth-of-type(odd) > div{background-color: rgba(255,255,255,0.1);}
	.messageBody > div > div .msg.action > form{
		display: grid; grid-template-columns: 1fr fit-content(300px) fit-content(180px) fit-content(50px); gap: 0; padding: 0; margin: 0; width: 100%; justify-items: center;
		/*.column-span-3{grid-column: 1 / span 2;}*/
		section.block.long.narrow{align-content: center;}
		section.block.long.narrow > div{padding: 0; margin: 0;}
		section.block.long.narrow.form{margin: 0; padding: 0; background-color: transparent; width: 100%;}
		section.block.long.narrow > div{min-height: 0; height: unset; background-color: transparent;}

		section.block.long .longBlock.formInput input[type='text'],
		section.block.long .longBlock.formInput select,
		section.block.long .longBlock.formInput input[type='date'],
		section.block.long .longBlock.formInput .searchInputWrapper.searchDependantV2
		{background-color: transparent; border-bottom-width: 0;}
		section.block.long .longBlock.formInput select{padding: 0 15px;}
		section.block.long .longBlock.formInput select option{background-color: #333;}
	}


	.messageBody > div > div .subTitle{color: var(--comment-thread-sub-title-color); justify-content: space-between;}
	.messageBody > div > div .subTitle div{padding: 0}
	.msg textarea {width: 100%;box-sizing: border-box;padding: 5px;border-width: 1px; border-style: solid; border-color: var(--message-edit-border-color); background-color: var(--message-edit-bg-color); margin: 5px 0 0;font-size: 17px;outline: none; resize: none; border-radius: 3px; color: var(--comment-thread-text-color);}

	/*.msg .linkObjects{display: inline-flex; gap: 5px; align-items: baseline; padding: 2px 4px; user-select: none;}*/
	/*.msg .linkObjects:hover{background-color: #eee; border-radius: 12px; cursor: pointer;}*/
	.msg .msgBodyOptions{display: flex;  gap: 3px; align-items: flex-start; flex-direction: column; padding: 0;}
	.msg .msgBodyOptions .formBtn{display: flex;  gap: 3px;}
}


@media (max-width: 	768px){
	.chatBox .messageBody > div > div{width: 100%; box-sizing: border-box;}
}