:root {
  --rad: 10px;
  --rad-sm: 3px;
}

body {
  margin: 0;
  font-family: 'Lato', Helvetica, Arial, sans-serif;
}

*:focus {
  outline: none;
}

.username {
  color: #5e5e5e;
  user-select: none;
  -webkit-user-select: none;
  /* For Safari */
  -moz-user-select: none;
  /* For Firefox */
  -ms-user-select: none;
  /* For older IE */
}

#chatContainer {
  height: 100dvh;
}

.leftWrapper {
  display: flex;
  flex-direction: column;
  height: 100dvh;
  background: #f2f2f2;
  border-right: 1px solid #ccc;
}

#userList {
  width: 250px;
  padding: 5px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 5px;
  height: calc(100dvh - 110px);
  background-color: #a5daff;
}

.user {
  padding: 10px;
  cursor: pointer;
  border-bottom: 1px solid #ddd;
}

.user:hover {
  background: #d6dbe2;
}

.user-item {
  background-color: #f2f5ff;
  padding: 5px 5px;
  box-sizing: border-box;
  align-items: center;
  display: flex;
  flex-direction: row;
  justify-content: left;
  gap: 10px;
  cursor: pointer;
}

.user-item:hover {
  background-color: #e1e8ff;
}

.user-item.active {
  background-color: #cdddff;
}

#chatHeader {
  padding: 10px;
  box-sizing: border-box;
  font-size: 16px;
  font-weight: bold;
  height: 40px;
  background-color: #fbfbfb;
  box-shadow: 0px 3px 5px -2px rgba(0, 0, 0, 0.1);
  z-index: 100;
  color: #9b9b9b;
}

#chatBox {
  flex: 1;
  display: flex;
  flex-direction: column;
}

#chatMessages {
  flex: 1;
  padding: 10px 10px 40px 10px;
  overflow-y: auto;
  background: #fff;
}

.message {
  width: fit-content;
  padding: 8px 12px;
  margin: 8px 0;
  background: #eee;
  border-radius: 10px;
  font-size: 14px;
  line-height: 20px;
  /*box-shadow: 2px 2px 5px 0 rgba(0, 0, 0, 0.20);*/
  word-wrap: break-word;
  /* for legacy support */
  overflow-wrap: break-word;
  /* modern equivalent */
  /*max-width: 60%;*/
}

.message.sent {
  border-radius: var(--rad) var(--rad-sm) var(--rad-sm) var(--rad);
  background: #d7e7ff;
  color: #000;
  margin-left: auto;
  margin-top: 5px;
  margin-bottom: 15px;
  align-self: flex-end;
  max-width: 60%;
  min-width: 175px;
  word-wrap: break-word;
  /* for legacy support */
  overflow-wrap: break-word;
  /* modern equivalent */
  white-space: normal;
  /* ensures text wraps */
}

.message.received {
  border-radius: var(--rad-sm) var(--rad) var(--rad) var(--rad-sm);
  background: #dddddd;
  color: #000;
  margin-right: auto;
  margin-top: 10px;
  margin-bottom: 15px;
  align-self: flex-start;
  max-width: 60%;
  min-width: 175px;
  word-wrap: break-word;
  /* for legacy support */
  overflow-wrap: break-word;
  /* modern equivalent */
  white-space: normal;
  /* ensures text wraps */
}

/* Proper radius for the first .msg in the parent container */
.chatMessages>.message:first-child {
  border-top-left-radius: var(--rad);
  border-top-right-radius: var(--rad);
}

/* Detect the first message in a group and style it */
.message.sent:first-child,
.message.rcvd+.message.sent {
  border-top-right-radius: var(--rad);
}

.message.rcvd:first-child,
.message.sent+.message.rcvd {
  border-top-left-radius: var(--rad);
}

.meta {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  font-size: 0.6rem;
  text-align: right;
  font-style: italic;
  transform: translateY(28px);
  gap: 10px;
}

.readIcon {
  color: #014104;
  font-size: 14px;
}

.copy-icon {
  color: #0035ff;
  font-size: 0.75rem;
  cursor: pointer;
}

.copy-icon:hover {
  color: #033097;
}

#typingStatus {
  font-style: italic;
  color: #1845ad;
  font-size: 12px;
}

.dots::after {
  content: '...';
  animation: dotsBlink 1.5s steps(3, end) infinite;
  font-size: 16px;
  font-weight: bold;
  color: #1845ad;
}

@keyframes dotsBlink {
  0% {
    content: '';
  }

  33% {
    content: '.';
  }

  66% {
    content: '..';
  }

  100% {
    content: '...';
  }
}

.ellipsis {
  cursor: pointer;
  user-select: none;
  color: #131313;
  align-self: flex-end;
  font-size: 0.75rem;
  transform: translate(-5px, 3px);
  width: fit-content;
}

.delete-icon {
  cursor: pointer;
  font-size: 0.75rem;
  color: #757575;
  transform: translateY(4px);
}

.delete-icon:hover {
  color: #f80202;
}

#chatBox>button {
  padding: 10px 20px;
  font-size: 16px;
  margin: 0 10px 10px 10px;
  flex-grow: 0;
  height: 40px;
  border: none;
  background-color: #007bff;
  color: white;
  border-radius: 4px;
  cursor: pointer;
}

.buttonsContainer {
  display: none;
  position: relative;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  background-color: white;
  border-top: 1px solid #ccc;
}

.whoIs {
  margin: 5px;
  height: 20px;
  width: fit-content;
  padding: 5px 10px;
  border-radius: 5px;
  border: 1px solid #ccc;
  display: none;
  align-items: center;
  justify-content: center;
  background-color: #f1f1f1;
  z-index: 11000;
  font-size: 12px;
  color: #696969;
  left: 245px;
  bottom: 45px;
}

#chatInput {
  width: 100%;
  height: 45px;
  padding: 5px;
  align-items: center;
  text-align: left;
  border: 1px solid #343541;
  color: #000;
  font-size: 14px;
  border: none;
  background-color: #fff;
  margin: 0 5px;
  line-height: 20px;
  resize: none !important;
  border: none;
  outline: none;
  overflow-y: hidden;
  resize: none;
  max-height: 120px;
  box-shadow: -1px 0px 3px 0px rgba(143, 143, 143, 0.4) inset;
  -webkit-box-shadow: -1px 0px 1px 0px rgba(143, 143, 143, 0.4) inset;
  -moz-box-shadow: -1px 0px 3px 0px rgba(143, 143, 143, 0.4) inset;
}

.subCheck {
  position: relative;
  display: none;
}

.sub-bar {
  display: none;
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  padding: 3px;
  box-sizing: border-box;
  box-shadow: 0px -5px 10px -3px rgba(0, 0, 0, 0.1)
}

.file-preview {
  max-width: 200px;
  border-radius: 8px;
  margin-top: 5px;
  cursor: pointer;
  display: block;
}


.file-link {
  display: inline-block;
  text-decoration: none;
  color: #007bff;
  margin-top: 5px;
}

.avatar.initials {
  width: 40px;
  height: 40px;
  background-color: #ccc;
  color: #fff;
  font-weight: bold;
  border-radius: 50%;
  text-align: center;
  line-height: 40px;
  display: inline-block;
  user-select: none;
  -webkit-user-select: none;
  /* For Safari */
  -moz-user-select: none;
  /* For Firefox */
  -ms-user-select: none;
  /* For older IE */
}

.avatar.pic {
  width: 40px;
  height: 40px;
  background-color: white;
  border-radius: 50%;
  display: inline-block;
  object-fit: cover;
}

.status-indicator {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-left: 8px;
  vertical-align: middle;
}

.status-indicator.online {
  background-color: #02bc0b;
  /* green */
}

.status-indicator.offline {
  background-color: #ccc;
  /* grey */
}

.toast-container {
  position: fixed;
  bottom: 50px;
  right: 20px;
  width: 250px;
  z-index: 9999;
}

.toast {
  background: #4D4D4D;
  color: #fff;
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 10px;
  font-size: 14px;
  cursor: pointer;
  position: relative;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.toast:hover {
  transform: scale(1.02);
}

.toast .close-toast {
  position: absolute;
  right: 8px;
  top: 6px;
  font-weight: bold;
  cursor: pointer;
  color: #aaa;
}

.toast .close-toast:hover {
  color: #fff;
}

.avatar {
  width: 40px;
  height: 40px;
  border-radius: 20px;
  /* makes it a perfect circle */
  object-fit: cover;
  /* crops/resizes image to fill the box */
  display: inline-block;
}


.welcomebox {
  display: flex;
  padding: 8px;
  flex-direction: row;
  gap: 5px;
  justify-content: center;
  align-items: center;
  background-color: white;
  height: 60px;
}

.selfAvatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  color: white;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 14px;
  margin-right: 8px;
  vertical-align: middle;
}

.selfName {
  font-size: 1.25rem;
  font-weight: 700;
}

.sendMessageIcon {
  color: #42a5f5;
  margin: 0 10px;
  font-size: 20px;
  cursor: pointer;
}

.sendMessageIcon:hover {
  color: #2c72ab;
}

.loginContainer {
  width: 100%;
  height: 100dvh;
  background-color: #080710;
}

.background {
  width: 430px;
  height: 70%;
  position: absolute;
  transform: translate(-50%, -50%);
  left: 50%;
  top: 50%;
}

.background .shape {
  height: 200px;
  width: 200px;
  position: absolute;
  border-radius: 50%;
}

.shape:first-child {
  background: linear-gradient(#1845ad,
      #23a2f6);
  left: -80px;
  top: -80px;
}

.shape:last-child {
  background: linear-gradient(to right,
      #ff512f,
      #f09819);
  right: -30px;
  bottom: -80px;
}

.loginWrapper {
  width: 375px;
  background-color: rgba(255, 255, 255, 0.13);
  position: absolute;
  transform: translate(-50%, -50%);
  top: 50%;
  left: 50%;
  border-radius: 10px;
  backdrop-filter: blur(10px);
  border: 2px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 0 40px rgba(8, 7, 16, 0.6);
  padding: 50px 35px;
}

h3 {
  font-size: 32px;
  font-weight: 500;
  line-height: 42px;
  text-align: center;
}

.login-label {
  display: block;
  margin-top: 30px;
  font-size: 16px;
  font-weight: 500;
  color: white;
}

.login-input {
  display: block;
  height: 40px;
  width: 100%;
  background-color: rgba(255, 255, 255, 0.07);
  border-radius: 3px;
  padding: 0 10px;
  margin-top: 8px;
  font-size: 14px;
  font-weight: 300;
  border: none;
  outline: none;
  box-sizing: border-box;
  color: white;

}

::placeholder {
  color: #aaa9a9;
}

.login-button {
  margin-top: 30px;
  width: 100%;
  background-color: #23a2f6;
  color: #080710;
  padding: 10px 0;
  font-size: 16px;
  font-weight: 600;
  border-radius: 5px;
  cursor: pointer;
  border: none;
}

.greptcha {
  margin-top: 30px;
}

/*SETTINGS POPUP*/
/* Popup container */
.frmSettings {
  position: absolute;
  width: 200px;
  height: 150px;
  padding: 10px;
  border-radius: 10px;
  background-color: #14161b;
  display: flex;
  flex-direction: column;
  gap: 20px;
  /* Space between settings */
  justify-content: flex-start;
  /* Align items to the top */
  bottom: 70px;
  right: 10px;
  color: white;
  font-size: 14px;
  box-shadow: 0px 0px 17px 5px rgba(0, 0, 0, 0.31);
  -webkit-box-shadow: 0px 0px 17px 5px rgba(0, 0, 0, 0.31);
  -moz-box-shadow: 0px 0px 17px 5px rgba(0, 0, 0, 0.31);
}

.setting {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 25px;
}

.toggle-switch {
  position: relative;
  width: 36px;
  height: 18px;
}

.toggle-switch input {
  display: none;
}

.slider {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ebebeb;
  padding: 9px 9px;
  border-radius: 38px;
  cursor: pointer;
  border: 1px solid #ccc;
  transition: background-color 0.3s ease;
}

.slider::before {
  content: '';
  position: absolute;
  height: 14px;
  width: 14px;
  left: 2px;
  bottom: 2px;
  background-color: #ffffff;
  border-radius: 50%;
  transition: transform 0.3s ease;
}

input:checked+.slider {
  background-color: #2196F3;
}

input:checked+.slider::before {
  transform: translateX(16px);
}

.okBtn {
  position: absolute;
  height: 20px;
  width: 60px;
  border-radius: 5px;
  background-color: #ff0000;
  color: white;
  font-size: 12px;
  bottom: 10px;
  right: 5px;
  border: none;
  cursor: pointer;
}

/*END Settings POPUP*/

/*DATE SEPARATOR*/
.date-separator {
  text-align: center;
  position: relative;
  margin: 30px 0;
  font-weight: bold;
  color: #555;
  font-size: 12px;
}


.separator-line {
  display: inline-block;
  background: #eee;
  padding: 4px 12px;
  border-radius: 12px;
  position: relative;
  z-index: 1;
}

.date-separator::before,
.date-separator::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 40%;
  height: 1px;
  background: #ccc;
}

.date-separator::before {
  left: 0;
}

.date-separator::after {
  right: 0;
}

.contextMenu {
  border-radius: 4px;
  font-size: 14px !important;
  background-color: #f8f8f8 !important;
  color: #000;
  display: 'block';
  position: 'absolute';
  color: '#333';
  padding: '4px 8px';
  z-Index: '1000';
  cursor: 'pointer';
  box-shadow: 0px 1px 5px 0px rgba(0, 0, 0, 0.4);
  -webkit-box-shadow: 0px 1px 5px 0px rgba(0, 0, 0, 0.4);
  -moz-box-shadow: 0px 1px 5px 0px rgba(0, 0, 0, 0.4);
}

/*TASKS STYLES*/
.tasksWrapper {
  display: flex;
  flex-direction: column;
  height: 100dvh;
  background: #f2f2f2;
  border-left: 1px solid #ccc;
  border-right: 1px solid #ccc;
  width: 350px;
  right: 0;
}


.taskHeader {
  top: 0px;
  width: 350px;
  height: 40px;
  padding: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 16px;
  font-weight: bold;
  color: #000;
  box-sizing: border-box;
  border-bottom: 1px solid #ccc;
}

.taskContainer {
  width: 350px;
  top: 40px;
  font-size: 12px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  height: calc(100dvh - 185px);
}

.taskInputContainer {
  position: absolute;
  bottom: 0;
  padding: 5px;
  display: flex;
  flex-direction: row;
  gap: 5px;
  width: 350px;
  box-sizing: border-box;
  align-items: center;
  justify-content: space-between;
  background-color: white;
  border-top: 1px solid #ccc;
}

.taskInput {
  height: 60px;
  width: 275px;
  border: none;
  outline: none;
  overflow-y: scroll;
  background-color: white;
  font-family: Verdana, Arial;
  font-size: 12px;
  resize: none;
  overflow-x: hidden;
  scrollbar-width: none;
  /* Firefox */
  -ms-overflow-style: none;
  /* IE 10+ */
}

taskInput::-webkit-scrollbar {
  display: none;
  /* Chrome, Safari */
}

.btnTask {
  width: 60px;
  height: 75px;
  background-color: #ededed;
  color: #383838;
  font-size: 12px;
  padding: 0 5px;
  font-weight: bold;
  line-height: 18px;
  border-radius: 5px;
  border: 1px solid #b3b3b3;
  background: linear-gradient(0deg, #c3c3c3, #d9d9d9, #efefef);
  box-shadow: rgba(50, 50, 93, 0.25) 0px 6px 12px -2px, rgba(0, 0, 0, 0.3) 0px 3px 7px -3px;
  -webkit-box-shadow: rgba(50, 50, 93, 0.25) 0px 6px 12px -2px, rgba(0, 0, 0, 0.3) 0px 3px 7px -3px;
  -moz-box-shadow: rgba(50, 50, 93, 0.25) 0px 6px 12px -2px, rgba(0, 0, 0, 0.3) 0px 3px 7px -3px;
  cursor: pointer;
}

/*TASK LIST ITEMMS*/
.taskOuter {
  border-bottom: 1px solid #ccc;
}

.taskDate {
  text-align: right;
  font-size: 0.85em;
  color: #777;
  margin-right: 5px;
  margin-bottom: 8px;
}

.taskItem {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px;
  display: flex;
  font-size: 13px;
}

.chkTasks {
  cursor: pointer;
  margin-right: 10px;
}

.descTasks {
  flex-grow: 1;
  word-break: break-word;
}

.btnDelTask {
  background: none;
  border: none;
  cursor: pointer;
  color: #c00;
  margin-left: 10px;
}

.taskDate {
  font-style: italic;
}

.taskInner {
  display: flex;
  align-items: center;
  flex-grow: 1;
}

.refreshTaskIcon {
  cursor: pointer;
}

.rotate {
  animation: spin 1s linear infinite;
}

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

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

/*blinker for user list items on new emesssage*/
@keyframes slow-blink {

  0%,
  100% {
    background-color: inherit;
  }

  50% {
    background-color: #0758f0;
  }

  /* light yellow highlight */
}

.blink {
  animation: slow-blink 1.5s infinite;
}

.toolsIcon {
  display: flex;
  position: absolute;
  height: 40px;
  width: 40px;
  border-radius: 50%;
  background-color: white;
  bottom: 5px;
  left: 10px;
  box-shadow: rgba(0, 0, 0, 0.24) 0px 3px 8px;
  border: 1px solid #ebebeb;
  font-size: 18px;
  color: #494949 !important;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 1000;
}


.tab-container {
  position: fixed;
  display: none;
  height: 450px;
  width: 750px;
  border: 5px solid #d3d3d3;
  border-radius: 5px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0);
  transform-origin: var(--origin-x, center) var(--origin-y, center);
  z-index: 10000;
  transition: transform 0.3s ease, opacity 0.3s ease;
  box-shadow: rgba(100, 100, 111, 0.2) 0px 7px 29px 0px;
  opacity: 0;
  background-color: white;
}

.tab-container.show {
  background-color: white;
  transform: translate(-50%, -50%) scale(1);
  opacity: 1;
}

.hidden {
  display: none;
}

.tab-buttons {
  display: flex;
  flex-direction: column;
  width: 165px;
  background: #f1f1f1;
}

.tab-btn {
  padding: 15px 10px;
  border: none;
  background: none;
  text-align: left;
  cursor: pointer;
  font-size: 12px;
  font-weight: normal;
  transition: background 0.3s;
  display: flex;
  align-items: center;
}

.tab-btn:hover {
  background: #ddd;
}

.tab-btn.active {
  background: #fff;
  color: #5c38ff;
  border-radius: 10px 0 0 10px;
}

.tab-content {
  flex-grow: 1;
  padding: 20px;
}

.tab-page {
  display: none;
}

.tab-page.active {
  display: block;
}

.input-settings {
  height: 30px;
  padding: 5px;
  background-color: #f1f1f1;
  border: none;
  outline: none;
  border-radius: 5px;
  font-size: 12px;
}

.input-form-button {
  width: fit-content;
  height: 30px;
  padding: 5px;
  background-color: #5c38ff;
  color: white;
  font-size: 12px;
  border-radius: 5px;
  border: 1px solid #2f00ff;
  box-shadow: rgba(99, 99, 99, 0.2) 0px 2px 8px 0px;
  margin: 15px 0;
}

.sIcons {
  font-size: 18px;
  color: #959595 !important;
  margin-right: 10px;
}

.tab-container.flex {
  display: flex;
  transform: translate(-50%, -50%) scale(1);
}

.btnCloseSettings {
  position: absolute;
  height: 20px;
  width: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: red;
  font-size: 16px;
  margin-bottom: 5px;
  right: 10px;
  top: 10px;
  z-index: 999;
  cursor: pointer;
  box-shadow: rgba(0, 0, 0, 0.02) 0px 1px 3px 0px, rgba(27, 31, 35, 0.15) 0px 0px 0px 1px;
}

.info-text {
  font-size: 12px;
  color: forestgreen;
  line-height: 24px;
}

.password-wrapper {
  position: relative;
  display: inline-block;
  width: 200px;
  background-color: #f1f1f1;
  border-radius: 5px;
  padding: 0 5px;
}

#togglePassword {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
  font-size: 1.2rem;
  color: #888;
}

#cropContainer {
  width: 240px;
  height: 240px;
  position: relative;
  overflow: hidden;
  margin: 10px 0;
}

#preview {
  max-width: 200px;
  max-height: 200px;
  display: block;
}

/*Loader Animation*/
.status-container {
  position: absolute;
  display: flex;
  bottom: 49px;
  height: 2px;
  width: 90%;
  left: 50%;
  transform: translateX(-50%);
}

.loader-line-9 {
  position: relative;
  width: 200px;
  height: 2px;
  overflow: hidden;
  left: 50%;
  transform: translateX(-50%);
}

.loader-line-9:after {
  content: "";
  display: block;
  height: 100%;
  width: 100%;
  position: absolute;
  background-color: #ff0046;
  animation: anm-LL-9-move 3s ease-out infinite;
}

@keyframes anm-LL-9-move {
  0% {
    left: -100%;
  }

  50% {
    left: 100%;
  }

  100% {
    left: -100%;
  }
}

.connection-status {
  min-width: 100px;
  width: fit-content;
  height: 20px;
  padding: 5px 10px;
  font-size: 12px;
  color: #20e65f;
  z-index: 100;
  display: flex;
  justify-content: center;
  align-items: center;
}

/*END LOADER ANIMATION*/
.statusWrapper {
  position: fixed;
  left: 0;
  display: flex;
  bottom: 0;
  width: 250px;
  height: 50px;
  background-color: #2f2f2f;
  z-index: 500;
  justify-content: center;
  align-items: center;
  box-shadow: 0px -5px 10px -3px rgba(0, 0, 0, 0.1);
}

#passwordStatus {
  font-size: 12px;
  margin: 20px 0;
}

/*SCROLLBAR STYLING*/
#userList,
#chatMessages,
.taskContainer {
  overflow-y: auto;
  -ms-overflow-style: none;
  /* IE and Edge */
  scrollbar-width: none;
  /* Firefox */
}

/* Hide scrollbar (Chrome, Safari, Opera) */
.taskContainer::-webkit-scrollbar {
  width: 0;
  height: 0;
}

/* Show scrollbar on hover */
.taskContainer:hover {
  scrollbar-width: thin;
  /* Firefox */
  scrollbar-color: #ccc #fff;
  /* thumb track */
}

.taskContainer:hover::-webkit-scrollbar {
  width: 1px;
  height: 5px;
}

.taskContainer:hover::-webkit-scrollbar-thumb {
  background-color: #ccc;
  border-radius: 10px;
}

.taskContainer:hover::-webkit-scrollbar-track {
  background-color: #fff;
}

#uploadAlert {
  width: fit-content;
  margin-top: 25px;
  font-size: 14px;
  line-height: 28px;
}

/*PROJECT FILES MANAGEMENT*/

/* Tree container */
.treeview {
  font-family: Arial, sans-serif;
  font-size: 14px;
  line-height: 1.4;
  padding: 10px;
}

/* Collapse/expand spacing */
.treeview details summary {
  cursor: pointer;
  padding: 3px 0;
  font-weight: bold;
  display: flex;
  align-items: center;
  gap: 5px;
}

.treeview ul {
  list-style: none;
  margin-left: 15px;
  padding-left: 0;
}

.treeview li {
  margin: 3px 0;
}

.treeview a {
  color: #333;
  text-decoration: none;
}

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

/* Icons */
.treeview i.fa-regular {
  margin-right: 5px;
}

.preview-container {
  border: 1px solid #ccc;
  padding: 10px;
  margin-top: 10px;
  max-height: 600px;
  overflow: auto;
  background: #fafafa;
  left: 250px;
  top: 50px;
  display: none;
}

.file-list {
  margin: 0 0 0 20px;
}

/*files manager styles*/

.proj-tab-wrapper {
  display: flex;
  flex-direction: column;
}

.proj-tab-nav {
  display: flex;
  flex-direction: row;
  width: 100%;
  background-color: #f8f8f8;
}

.proj-tab-btn {
  padding: 20px 10px;
  border: none;
  background: none;
  text-align: center;
  cursor: pointer;
  font-weight: bold;
  border-bottom: 1px solid #ddd;
  width: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  color: #2196F3;
  gap: 5px;
}

.proj-tab-btn.active {
  background-color: #e5e5e5;
}

.proj-tab-content {
  flex-grow: 1;
}

.proj-tab-panel {
  display: none;
}

.proj-tab-panel.active {
  display: block;
}


/*TREEVIEW STYLES*/
summary {
  list-style: none;
  /* remove default arrow */
  cursor: pointer;
}

summary::-webkit-details-marker {
  display: none;
  /* hide the triangle */
}

#treeForm {
  margin: 5px 0 10px 0 !important;
  background: lightgray;
}

#treeform::after {
  content: "";
  position: relative;
  bottom: 1px;
  width: 240px;
  height: 1px;
  background: #ccc;
}

.folder-title {
  padding-left: 4px;
  font-weight: 100;
  display: flex;
  align-items: center;
  gap: 6px;
  color: #3f51b5;
}

.file-node {
  margin-left: 20px;
}

.image-node {
  margin-left: 20px;
}

.file-object,
.image-object {
  margin-left: 40px !important;
  list-style-type: square;
  color: #a9a9a9;
}

.popup-preview {
  display: none;
  /* Hidden by default */
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 80%;
  max-width: 800px;
  height: 80%;
  background-color: #fff;
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.3);
  border-radius: 8px;
  z-index: 9999;
  overflow: auto;
  padding: 16px;
}

.popup-preview iframe {
  width: 100%;
  height: 100%;
  border: none;
}

.closeBtn {
  position: absolute;
  padding: 0 5px;
  top: 0;
  right: 0;
  background: #e1e1e1;
  border: none;
  border: 1px solid #ccc;
  border-radius: 5px;
  font-size: 24px;
  cursor: pointer;
  color: red;
  z-index: 1000;
}

#filePreview {
  pointer-events: auto;
}

.tooltip-icon {
  position: relative;
}

.tooltip-icon:hover+.custom-tooltip {
  display: inline-block;
}

.custom-tooltip {
  display: none;
  position: absolute;
  background: #333;
  color: #fff;
  font-size: 12px;
  padding: 4px 6px;
  border-radius: 4px;
  top: -30px;
  left: 0;
  white-space: nowrap;
  z-index: 1000;
}

.reply-block {
  background: #f1f1f1;
  padding: 6px 8px;
  border-left: 3px solid #ccc;
  border-radius: 4px;
  margin-bottom: 5px;
  font-size: 0.85em;
}

.reply-icon {
  color: #3665ff;
  font-size: 0.75rem;
  transition: color 0.2s;
  cursor: pointer;
  font-weight: 100;
}

.reply-icon:hover {
  color: #1a047e;
}

.reply-preview {
  background-color: #e7efff;
  font-size: 12px;
  font-weight: 500;
  color: #444444;
  padding: 2px 5px;
  width: fit-content;
  margin: 0 5px;
  box-sizing: border-box;
  border-radius: 5px;
}

.replyHeader {
  font-size: 12px;
  color: #444444;
  font-style: italic;
  font-weight: 300;
}

.original-message {
  font-size: 10px;
  color: #444444;
  font-style: italic;
  font-weight: 300;
}

#chatInputWrapper {
  width: 100%;
}

.forward-icon {
  color: #2196f3;
  font-size: 0.75rem;
  transition: color 0.2s;
  cursor: pointer;
  font-weight: 100;
}

.forward-icon:hover {
  color: #0278d8;
}

/* Modal background */
.modal {
  position: fixed;
  z-index: 9999;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Hide modal by default */
.hidden {
  display: none !important;
}

/* Modal box */
.modal-content {
  background: #fff;
  border-radius: 8px;
  padding: 20px;
  width: 90%;
  max-width: 400px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

/* User list */
.user-list {
  max-height: 200px;
  overflow-y: auto;
  margin: 10px 0;
  border: 1px solid #ccc;
  border-radius: 4px;
  padding: 8px;
  font-size: 0.8rem;
}

.user-list div {
  margin-bottom: 5px;
}

/* Actions */
.modal-actions {
  display: flex;
  justify-content: space-between;
  margin-top: 15px;
}

.modal-actions button {
  padding: 8px 16px;
  border: none;
  background: #007BFF;
  color: white;
  border-radius: 4px;
  cursor: pointer;
}

.modal-actions button:last-child {
  background: #888;
}

.modal-heading {
  font-size: 0.9rem;
  color: #ccc;
}

/*connected status beacon*/
.beacon {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  position: relative;
}

.connected {
  background-color: #00ff00;
  box-shadow: 0 0 8px 2px rgba(0, 255, 0, 0.6);
}

.connected::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 10px;
  height: 10px;
  background-color: rgba(0, 255, 0, 0.3);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  animation: pulse 2s infinite ease-out;
  z-index: -1;
}

.disconnected {
  background-color: #888;
  box-shadow: none;
}

@keyframes pulse {
  0% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 0.8;
  }

  100% {
    transform: translate(-50%, -50%) scale(4);
    opacity: 0;
  }
}

/*CUSTOM TOOLTIPS*/

[data-tooltip] {
  position: relative;
}

[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 125%;
  left: 50%;
  transform: translateX(-50%);
  background: rgb(53, 53, 53);
  color: white;
  padding: 6px 8px;
  border-radius: 4px;
  white-space: nowrap;
  font-size: 12px;
  font-family: 'Lato', Helvetica, Arial, sans-serif;
  font-weight: normal;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
  z-index: 99999;
  text-transform: none !important;
}

[data-tooltip]:hover::after {
  opacity: 1;
  animation: fadeOut 2s ease-in-out 2s forwards;
  /* wait 2s, then fade out */
}

@keyframes fadeOut {
  to {
    opacity: 0;
  }
}

/*file upload progress bar*/
#uploadProgressContainer {
  font-size: 12px;
  color: #ffffff;
  display: none;
  justify-content: space-between;
  align-items: center;
  gap: 5px;
  margin: 0 5px 0 5px;
}

#uploadProgress {
  width: 100%;
  height: 5px;
  border-radius: 6px;
  appearance: none;
  /* Remove default styling */
}

/* Chrome, Safari, Edge */
#uploadProgress::-webkit-progress-bar {
  background-color: #eee;
  /* Light grey track */
  border-radius: 6px;
}

#uploadProgress::-webkit-progress-value {
  background-color: #2196f3;
  /* Blue progress fill */
  border-radius: 6px;
}

/* Firefox */
#uploadProgress::-moz-progress-bar {
  background-color: #2196f3;
  border-radius: 6px;
}

/* Optional: add some margin and text */


#uploadPercent {
  display: inline-block;
  margin-top: 4px;
  font-weight: normal;
  font-size: 10px;
  color: blue;
}

/*Search in chat styles*/
/* Smooth reveal/hide */
.search-wrapper {
  overflow: hidden;
  margin: 0 0 10px 10px;
  align-self: flex-start;
  font-size: 12px;
  display: block;
  background-color: white;
  /* important: keep as block so it can animate */
  box-shadow: rgba(0, 0, 0, 0.24) 0px 3px 8px;
  border-radius: 5px;
  padding: 7px;
  position: fixed;
  bottom: -20px;
  max-height: 200px;
  transform: translateY(100%);
  transition: transform 0.3s ease;
  z-index: 10;
}

.search-wrapper.expanded {
  transform: translateY(-100px);
  /* Adjust based on how high it should appear */
}

/* Highlighted matches */
.highlighted-search {
  background-color: yellow;
  padding: 1px 2px;
  border-radius: 2px;
}

.current-match {
  background-color: #fbfcb9 !important;
}

/* Radio buttons container */
.searchMode {
  font-size: 10px;
  margin-bottom: 6px;
  display: flex;
  gap: 10px;
}

/* Input + counter + nav buttons */
.searchControls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.chatSearch {
  flex: 1;
  padding: 4px 8px;
  border: none;
  outline: none;
  border-radius: 20px;
  background-color: #f1f1f1;
  color: #000000;
  font-size: 12px;
}

.searchCounter {
  text-align: center;
  width: fit-content;
  font-size: 10px;
}