/* MARK: IMPORTS */
@import "/css/segments.css";
@import "/css/header.css";
@import "/css/modal.css";
@import "/css/inputs.css";
@import "/css/variables.css";
@import "/css/study-details.css";
@import "/css/user-details.css";
@import "/css/shares.css";
@import "/css/dropdown.css";
@import "/css/templates.css";

/* FONTS */

@font-face {
  font-family: csblack;
  src: url(/fonts/csblack.woff) format('woff');
}

@font-face {
  font-family: csheavy;
  src: url(/fonts/csheavy.woff) format('woff');
}

@font-face {
  font-family: csbook;
  src: url(/fonts/csbook.woff) format('woff');
}

@font-face {
  font-family: logo;
  src: url(/fonts/logo.otf) format('opentype');
}

@keyframes rotate {
  0% {
    transform: rotate(0deg);
  }
  
  100% {
    transform: rotate(360deg);
  }
}

/* @keyframes rotate {
 0% {
 opacity: 0.5;
 }
 
 50% {
 opacity: 1;
 }
 
 100% {
 opacity: 0.5;
 }
 } */


* {
  transition: all 250ms, color 25ms;
  box-sizing: border-box;
  scroll-behavior: smooth;
}


body {
  background: var(--background);
  font-family: csbook;
  margin: 0px;
  font-size: 13px;
  color: var(--textColor);
  height: var(--app-height);
  /*   overflow: hidden;*/
  display: grid;
  grid-template: min-content auto / [col1] minmax(0px, auto) [col2] minmax(300px, 550px) [col3] minmax(300px, 550px) [col4] minmax(0px, auto);
  grid-template-areas: ". center center .";
}

html, body {
  height: 100%;
  max-height: 100%;
}


header,
.coverPage {
  display: grid;
  grid-template: auto / [col1] minmax(0px, auto) [col2] minmax(300px, 485px) [col3] minmax(300px, 650px) [col4] minmax(0px, auto);
  grid-template-areas: ". center center .";
}

header #followup[hasFollowup="true"] {
  display: inline-grid;
  grid-template: auto / repeat(2, auto);
  grid-gap: var(--padding);
  align-items: center;
}

header #followup[hasFollowup="true"]::before {
  content: url("../media/followup-small.svg");
  position: relative;
  bottom: -2px;
}

#messageBox .container {
  text-align: right;
}

.notification {
  background: var(--black);
  border-radius: var(--radius);
  box-shadow: 0px 0px var(--padding) black;
  text-align: left;
  pointer-events: auto;
  display: inline-block;
  margin: 0px var(--twoTimesPadding) var(--twoTimesPadding) var(--twoTimesPadding);
  max-height: 0px;
  opacity: 0;
  overflow: auto;
}

.dark .notification {
  background: var(--white);
}

.notification:last-child {
  margin-bottom: var(--twoTimesPadding);
}

.notification>div {
  padding: var(--twoTimesPadding);
}

.notification * {
  color: var(--notificationText);
  font-size: 0.89em;
  font-family: csheavy;
}

/* MARK: - CONTENT */

#mainContainer {
  background: inherit;
  overflow: hidden;
  display: grid;
  grid-column: 1 / -1;
  width: 100%;
  grid-template: minmax(0, 250px) auto / [col1] minmax(0px, auto) [col2] minmax(300px, 485px) [col3] minmax(300px, 650px) [col4] minmax(0px, auto);
}

.coverPage {
  grid-column: 1 / -1;
}


#contentAndUploader {
  overflow: hidden;
  grid-column: col2;
  grid-row: 1 / -1;
  border-left: var(--borderSize) solid var(--borderColor);
  border-right: none;
  z-index: 1; /* without this the scroll bar is rendered underneath the sticky row. */
  /* height: 100%; */
  
  
  display: grid;
  grid-template: min-content auto / auto;
  
}

#detailsContainer {
  grid-column: col3;
  overflow: auto;
  border-left: var(--borderSize) solid var(--borderColor);
  border-right: var(--borderSize) solid var(--borderColor);
  background: inherit;
  grid-row: 1 / -1;
}

#content {
  overflow: auto;
}

#details {
  background: inherit;
}

.patientBar {
  display: grid;
  grid-template: auto / auto repeat(4, min-content);
  white-space: nowrap;
  align-items: center;
}

.patientBar>div {
  display: grid;
  grid-template: auto / auto auto;
  align-items: center;
  grid-column-gap: 8px;
  color: black;
}

.dark .patientBar>div {
  color: white;
}

.patientBarImage {
  display: inline-block;
  width: 14px;
  height: 16px;
  background-position: center;
  background-repeat: no-repeat;
  background-size: fill;
  margin-left: 30px;
}

.patientBarFlag {
  background-image: url("../media/flagBlack.svg");
}

.dark .patientBarFlag {
  background-image: url("../media/flagWhite.svg");
}

.patientBarCompare {
  background-image: url("../media/multipleBlack.svg");
}

.dark .patientBarCompare {
  background-image: url("../media/multipleWhite.svg");
}

.patientBarType {
  background-image: url("../media/commandBlack.svg");
}

.dark .patientBarType {
  background-image: url("../media/commandWhite.svg");
}

.patientBarSpeed {
  background-image: url("../media/timerBlack.svg");
}

.dark .patientBarSpeed {
  background-image: url("../media/timerWhite.svg");
}


#detailsBar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--lightGray);
  margin-bottom: var(--threeTimesPadding);
}

.dark #detailsBar {
  border-bottom: 1px solid var(--border);
}

.detailsSectionHeader {
  border-bottom: 1px solid var(--lightGray);
  margin-left: -var(--threeTimesPadding);
  margin-right: -var(--threeTimesPadding);
  margin-bottom: var(--threeTimesPadding);
  margin-top: var(--sevenTimesPadding);
  padding: var(--twoTimesPadding);
  padding-left: var(--threeTimesPadding);
}


.dark .detailsSectionHeader {
  border-bottom: 1px solid var(--border);
}

#detailsTitle {
  padding: var(--threeTimesPadding);
  font-family: csheavy;
  font-size: 1.1em;
  color: var(--black);
}

.dark #detailsTitle {
  color: var(--white);
}

.detailsPatientColumn {
  background: inherit;
  display: grid;
  grid-template: auto / 3px auto;
  grid-column-gap: var(--twoTimesPadding);
  margin-top: 0px;
}

.detailsPatientColumn .detailsItem {
  margin-bottom: 0px;
  margin-top: 0px;
}

.detailsStatusColorBar {
  display: block;
  width: 4px;
  background: yellow;
  border-radius: 3px;
}

#detailsClose {
  border-left: solid var(--lightGray) var(--borderSize);
  padding-right: var(--threeTimesPadding);
  background-image: url(./media/cancel-filled-black.svg);
  background-repeat: no-repeat;
  background-position: center;
}

.dark #detailsClose {
  background-image: url(./media/cancel-filled.svg);
}

#detailsContent {
  padding: var(--threeTimesPadding);
/*  padding-top: 0px;*/
  background: inherit;
}

.group {
  display: grid;
  grid-template: auto / repeat(auto-fit, minmax(0px, 1fr));
  grid-gap: var(--threeTimesPadding);
  margin: 0px;
}

.detailsItem,
.commentLine {
  display: grid;
  grid-template: min-content / auto auto;
  grid-template-areas:
  "label edit"
  "content content";
  margin-bottom: var(--threeTimesPadding);
}

.detailsItem {
  /*   margin-top: var(--fourTimesPadding);*/
  /*   margin-bottom: var(--twoTimesPadding);*/
  grid-row-gap: 3px;
  border: var(--borderSize) solid var(--gray235);
  border-radius: var(--twoTimesPadding);
  padding: var(--twoTimesPadding);
  background: var(--gray240);
  flex-grow: 1;
}

.dark .detailsItem, .dark .sticky {
  background: var(--gray45);
  border-color: var(--gray40);
}

.sticky .detailsItem {
  border: none;
  background: none;
  padding: 0px;
}

.detailsItem.firstRow {
  margin-top: var(--twoTimesPadding);
}

.detailsItemTitle {
  font-size: 0.8em;
  text-transform: uppercase;
  display: flex;
  align-items: center ;
}

.sticky {
  position: sticky;
  top: 0;
  padding-bottom: var(--padding);
  padding-top: var(--padding);
  border-bottom: 1px solid var(--borderColor);
  z-index: 1;
  background: inherit;
  border: var(--borderSize) solid var(--gray235);
  border-radius: var(--twoTimesPadding);
  padding: var(--twoTimesPadding);
  background: var(--gray240);
  /*   margin-top: var(--threeTimesPadding);*/
  margin-bottom: var(--threeTimesPadding);
}

.dark .sticky {
  
}

.detailsItemContent,
.commentLine {
  grid-column: 1 / -1;
}

.detailsItemContent {
  color: var(--black);
  font-weight: 500;
}

.dark .detailsItemContent {
  color: var(--white);
}

.commentLine {
  margin-bottom: 0px;
  grid-column: 1;
  font-family: csbook;
  align-items: center;
  padding-top: var(--padding);
  padding-bottom: var(--padding);
}


.commentLineContent {
  color: var(--black);
}

.dark .commentLineContent {
  color: var(--white);
}

.comment,
.progressComment,
.logComment {
  /* font-family: csheavy; */
  margin-bottom: var(--padding);;
  margin-top: var(--threeTimesPadding);
  border-bottom: 1px solid var(--border);
  padding-bottom: var(--padding);;
  color: var(--black);
  
}

.comment {
  border-bottom: none;
}

.logComment {
  margin-bottom: 0px;
  margin-top: 0px;
  padding-bottom: 0px;
}

.logMessages {
  display: grid;
  grid-template: auto / auto auto;
  grid-column-gap: var(--threeTimesPadding);
  grid-row-gap: var(--twoTimesPadding);
  justify-content: start;
}

.dark .comment,
.dark .logComment,
.dark .progressComment {
  color: var(--white);
}

.adminSection {
  display: grid;
  grid-template: auto / auto;
  grid-auto-flow: column;
  justify-content: center;
  padding: var(--twoTimesPadding);
  padding-top: var(--sevenTimesPadding);
  grid-column-gap: var(--threeTimesPadding);
  margin-bottom: var(--sevenTimesPadding);
  font-size: 12px;
}

.adminSection .link {
  transition: color 0s;
  text-transform: lowercase;
  margin: 0px var(--padding);;
}

.adminSection .link:hover { color: var(--black); }

.dark .link:hover {
  color: var(--white);
}

.itemTable {
  display: grid;
  grid-template: auto / auto;
  grid-row-gap: var(--padding);;
}

.itemRow {
  display: flex;
  grid-template: auto / min-content auto;
  align-items: center;
  grid-gap: 10px;
}

.itemCheckbox {
  background-repeat: no-repeat;
  background-position: center;
}

.itemRow[selected="true"] .itemCheckbox {
  background: url("../media/checkBlack.svg");
  background-repeat: no-repeat;
  background-position: center;
}

.itemTitle {
  color: var(--black);
  font-family: csheavy;
}

.itemTitle label {
  font-family: csbook;
}

/* MARK: - INPUTS */

.inlineLogo {
  font-family: logo;
  font-size: 1em;
  color: inherit;
  position: relative;
  top: 0.5px;
}


.edit {
  grid-column: 2;
  text-transform: lowercase;
  text-align: right;
  color: var(--orange);
}

.click:hover {
  text-decoration: underline;
}

.commentLabel.edit {
  color: var(--mediumGray);
}

.status {
  font-size: 0.75em;
}

/* MARK: - FEATURES */

/* .red .link,
 .red .click,
 a {
 color: var(--white);
 } */


.link:hover,
a:hover,
.patient *:hover {
  text-decoration: underline;
}

.bold {
  font-family: csheavy;
}

.padBottom {
  padding-bottom: 20px;
}






/* ROWS */
.row,
.noteRow {
  border-bottom: var(--borderSize) solid var(--borderColor);
  opacity: 0;
  padding: var(--twoTimesPadding);
}

.rowHeader {
  padding: var(--twoTimesPadding);
  font-family: csheavy;
  text-align: center;
  background: var(--highlightBlue);
  position: sticky;
  top: 0;
  border-bottom: 1px solid var(--borderColor);
  color: var(--black);
}

.dark .rowHeader {
  background: var(--highlightBlue);
  color: var(--white);
}

.headerItem {
  padding: var(--twoTimesPadding);
}

.headerTitle {
  font-family: csheavy;
}

.row:hover,
.headerItem:hover,
.noteRow:hover {
  background: var(--highlight);
}

.dark .row:hover,
.dark .headerItem:hover,
.dark .noteRow:hover {
  background: var(--highlight);
}


.row .container,
.noteRow .container {
  display: grid;
  grid-template: auto / [colorBar] 5px [attention] min-content [followup] min-content [caseid] min-content [indicators] min-content [names] auto min-content min-content;
  grid-auto-flow: dense;
  grid-gap: 10px;
}

.row .container .role,
.row .container .date {
  text-transform: uppercase;
  font-size: 10px;
  color: var(--mediumGray);
  text-align: right;
  align-self: center;
  display: none;
}

.row .container .date {
  display: contents;
}

.row .container .clientRow {
  display: inline-grid;
  grid-template: auto / auto;
  grid-gap: var(--padding);;
  /* align-items: center; */
}

.row .statusColumn {
  border-radius: 3px;
  flex: 0 0 3px;
}

.row .attentionColumn {
  background: var(--yellow);
  display: inline-flex;
  align-items: center;
  justify-items: center;
  overflow: hidden;
  flex: 1 0 auto;
}

.row .followupColumn {
  display: inline-flex;
  align-items: center;
  justify-items: center;
  overflow: hidden;
  flex: 1 0 auto;
}


.row .idColumn {
  flex: 0 0 60px;
}

.row .usersColumn {
  display: inline-flex;
  flex-direction: column;
  white-space: nowrap;
  overflow: hidden;
  flex: 1;
}

.row .actionsColumn {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: space-around;
  width: 80px;
  justify-self: end;
}

.row .actionsColumn .click {
  border-radius: 3px;
  margin: 2px;
  color: black;
}

.dark .row .actionsColumn .click {
  color: var(--white);
}

.red .row .actionsColumn .click {
  color: var(--white);
}


.row[selected="true"],
.noteRow[selected="true"] {
  position: sticky;
  top: 0;
  bottom: 0;
  background: var(--lightGray);
  z-index: 1;
}

.noteRow[selected="true"] {
  position: static;
}

.dark .row[selected="true"],
.dark .noteRow[selected="true"] {
  background: var(--darkGray);
}

.red .row[selected="true"],
.red .noteRow[selected="true"] {
  background: var(--darkRed);
}

/* SHOWING INFO */

.emphasis {
  color: var(--black);
  font-family: csheavy;
}

.dark .emphasis {
  color: var(--white);
}

.hspace {
  display: inline-block;
  height: 1px;
  /*    min-width: var(--twoTimesPadding);*/
  flex: 0 0 var(--twoTimesPadding);
}

/* Columns */

.red {
  color: var(--red);
}

/* Uploads */
.uploaderContainer {
  width: 100%;
  border-radius: 5px;
  text-align: center;
  background: var(--highlightBlue);
  border: 1px dashed var(--borderColor);
  display: grid;
  grid-template: 100px / 1fr;
  margin: 5px 0px;
}

.uploaderContainer.uploadHover {
  background: var(--highlightBlueHover);
}

.dark .uploaderContainer.uploadHover {
  background: var(--gray100);
}

.uploaderContainer label {
  display: inline-grid !important;
  grid-template: 1fr / 1fr;
  place-items: center;
  margin: 0px !important;
  padding: 15px;
  font-size: 14px;
  cursor: pointer;
}

.uploaderContainer .uploadText {
  text-transform: none;
  color: var(--darkGray);
}

.dark .uploaderContainer .uploadText {
  color: var(--lightGray);
}

.uploaderContainer input {
  display: none;
}


.uploadItem {
  display: block;
  margin-top: 10px;
  margin-bottom: 25px;
  max-height: 100px;
}

.uploadName {
  font-family: csheavy;
}

.uploadStatus {
  margin: 5px 0px;
}

.uploadProgressContainer {
  display: block;
  background: var(--gray235);
  border: 1px solid var(--lightGray);
  height: 6px;
  width: 100%;
  border-radius: 3px;
}

.uploadProgressBar {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: #40A9F5;
  sizing: border-box;
  position: relative;
}

/* FILE ROWS */

.file {
  display: flex;
  align-items: center;
  padding: var(--padding); 0px;
}

.file a {
  text-decoration: none;
  color: inherit;
}

.file a:hover {
  text-decoration: underline;
}

.file button {
  width: auto;
  height: auto;
  background: none;
  border: none;
  color: var(--textColor);
  padding: 0px 0px 0px 5px;
}

.hide * {
  color: var(--red);
  text-decoration: line-through;
}


.hideButton,
.deleteButton,
.viewPDFButton,
.unlockButton {
  width: 20px;
  height: 20px;
  margin-left: var(--twoTimesPadding);
  background-size: cover;
  background-repeat: no-repeat;
}

.hideButton {
  background: url("../media/hideBlack.svg");
  background-repeat: no-repeat;
}

.hide .hideButton {
  background: url("../media/hideBlackFilled.svg");
  background-repeat: no-repeat;
}

.dark .hideButton {
  background: url("../media/hideWhite.svg");
  background-repeat: no-repeat;
}

.dark .hide .hideButton {
  background: url("../media/hideWhiteFilled.svg");
  background-repeat: no-repeat;
}

.deleteButton {
  background: url("../media/trashBlack.svg");
  background-repeat: no-repeat;
}

.dark .deleteButton {
  background: url("../media/trashWhite.svg");
  background-repeat: no-repeat;
}

.viewPDFButton {
  background: url("../media/bookBlack.svg");
  background-repeat: no-repeat;
}

.dark .viewPDFButton {
  background: url("../media/bookWhite.svg");
  background-repeat: no-repeat;
}



.qq-file-name {
  flex: 1;
}

.qq-upload-size {
  display: inline;
}


/* SOURCE ITEM */

.sourceItem {
  display: grid;
  grid-template: auto / auto 1fr auto;
  grid-gap: 10px;
  padding: 10px;
}

.sourceItem>div:first-child {
  color: black;
}

.dark .sourceItem>div:first-child {
  color: white;
}


.sourceItem[selected="true"] {
  background: var(--lightGray);
}

.dark .sourceItem[selected="true"] {
  background: var(--darkGray);
}


.searchContainer {
  display: inline-flex;
  background: var(--highlight);
  border: var(--borderSize) solid var(--borderColor);
  border-radius: var(--radius);;
  justify-content: space-between;
}

.searchHandle {
  fill: var(--textColor);
}


.searchGlass {
  stroke: var(--textColor);
}


.unread {
  background: url("../media/unreadFileBlack.svg");
  background-repeat: no-repeat;
  background-position: center;
}

.dark .unread {
  background: url("../media/unreadFileWhite.svg");
  background-repeat: no-repeat;
  background-position: center;
}

.read {
  background: url("../media/readFileBlack.svg");
  background-repeat: no-repeat;
  background-position: center;
}

.dark .read {
  background: url("../media/readFileWhite.svg");
  background-repeat: no-repeat;
  background-position: center;
}

.imageTextContainer {
  display: grid;
  grid-template: auto / max-content auto;
  grid-gap: 10px;
  margin-bottom: 10px;
}

.commentIcon {
  display: block;
  width: 30px;
  height: auto;
  border-radius: 5px;
}

.commentIcon {
  background-image: url("../media/commentBubbleBlack.svg");
  background-color: var(--lightGray);
  background-position: center;
  background-repeat: no-repeat;
  background-size: fill;
}

.commentIcon.new {
  background-color: var(--blue);
}

.trashIcon {
  background-image: url("../media/trashGray.svg");
  background-repeat: no-repeat;
  background-size: contain;
  width: 20px;
  height: 20px;
  position: relative;
  top: 5px;
}

.trashIcon.click {
  background-image: url("../media/trashRed.svg");
}


/* ICONS */

.flagContainer {
  display: grid;
  grid-template: auto / 40px auto;
  padding-bottom: 10px;
  margin-top: 5px;
}

.flagContainer:last-child {
  padding-bottom: unset;
}

.flag,
.note,
.followupIcon
{
  background-color: var(--yellow);
  background-repeat: no-repeat;
  background-position: center;
  
  border-radius: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 10px;
}

.note {
  padding: 10px 10px;
}

.followupIcon {
  background: none;
  padding: 0px;
  margin: 0px;
}

.noteDetails {
  font-family: csbook;
  align-self: center;
  color: var(--textColor);
  ;
}

.noteContainer {
  display: grid;
  grid-template: auto / 40px auto min-content;
}

.noteInfo {
  display: grid;
  grid-gap: 3px;
}

.noteStatus,
.dark .noteStatus {
  width: 40px;
  height: 100%;
  background-size: 14px 14px;
  background-position: center;
  background-repeat: no-repeat;
  margin-left: -5px;
  transition: background-size 0s;
}

.noteStatus {
  background-image: url('/media/commentBlack.svg')
}

.dark .noteStatus {
  background-image: url('/media/commentWhite.svg')
}

.noteStatus.new {
  background-image: url('/media/commentBlue.svg')
}


.doctorsList {
  grid-column: 1 / -1;
  /*    overflow: hidden; */
  /*    max-height: 0px; */
  padding-left: 15px;
}

.doctorRow {
  display: grid;
  grid-template: auto / 1fr 1fr 1fr auto;
  grid-column-gap: 10px;
}

.userBalance {
  text-align: right;
}

.reportTypeLabel {
  display: flex;
  justify-content: space-between;
}

#console {
  font-family: monospace;
}


/* STUDY DETAILS */
.serviceRow {
  display: grid;
  grid-template: auto / repeat(5, 1fr) min-content;
  /* grid-gap: var(--twoTimesPadding); */
  margin-bottom: var(--twoTimesPadding);
}

.serviceRow .actionsColumn {
  /*    border: var(--orange) var(--borderSize) solid;*/
  /*    background: none;*/
  color: var(--orange);
  /*    display: inline-flex;*/
  /*    justify-content: center;*/
  /*    align-items: center;*/
  /*    max-height: min-content;*/
  /*    border-radius: var(--sevenTimesPadding);*/
  place-self: center;
}
