/*--------------------
Mixins
--------------------*/
/*--------------------
Body
--------------------*/
*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  background: none transparent;
  background-size: cover;
  font-family: "Open Sans", sans-serif;
  font-size: 12px;
  line-height: 1.3;
  overflow: hidden;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  height: 100vh;
}

.bg {
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  z-index: 1;
  background: none;
  filter: blur(80px);
  transform: scale(1.2);
}

/*--------------------
Chat
--------------------*/
.chat {
  position: absolute;
  top: 0; /* Change from 50% to 0 */
  left: 0; /* Change from 50% to 0 */
  transform: none; /* Remove the transform centering */
  height: 90vh; /* 90% of viewport height to leave space for footer */
  width: 100%;
  z-index: 2;
  overflow: hidden;
  background: linear-gradient(rgba(94, 197, 115, 1), rgba(8, 158, 145, 1));
  display: flex;
  justify-content: space-between;
  flex-direction: column;
}

/*--------------------
Chat Footer
--------------------*/
.chat-footer {
  background: #fff;
  color: #000;
  text-align: center;
  padding: 10px;
  font-size: 12px;
  height: 10%;
  width: 100%;
  position: absolute; /* Change from relative to absolute */
  bottom: 0; /* Stick to bottom */
  left: 0; /* Align to left edge */
  z-index: 3; 
}

/*--------------------
Chat Title
--------------------*/ 
.chat-title {
  flex: 0 1 45px;
  position: relative;
  z-index: 2;
  background: rgba(0, 0, 0, 0.2);
  color: #fff;
  text-align: left;
  padding: 10px;
  justify-content: space-between; /* Space between title and buttons */
  display: grid;
  grid-template-columns: auto 1fr auto; /* Avatar, Title, Buttons */
  grid-template-rows: auto auto; /* First row for top elements, second row for ID details */
  gap: 10px; /* Space between elements */
  align-items: center; /* Vertically align items in rows */
}

.chat-title h1, .chat-title h2 {
  font-weight: normal;
  font-size: 14px;
  margin: 0;
  grid-column: 2; /* Place in the second column (title area) */
  grid-row: 1; /* First row */
}
.chat-title h2 {
  color: rgba(255, 255, 255, 0.5);
  font-size: 8px;
  letter-spacing: 1px;
}
.chat-title .avatar {
  z-index: 1;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.24);
  flex-shrink: 0; /* Prevent avatar from shrinking in flexbox */
  grid-column: 1; /* Place in the first column */
  grid-row: 1; /* First row */
  margin: 0; /* Reset any default margin */
  padding: 0; /* Reset any default padding */
}

.chat-title .avatar img {
  width: 100%;
  height: auto;
}

/*--------------------
Messages
--------------------*/


.footer-content {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
}

.footer-content p {
  margin: 0;
  color: rgba(255, 255, 255, 0.7);
}

/* Adjust messages to not overlap with footer */
.messages {
  flex: 1 1 auto;
  color: whitesmoke;
  overflow: hidden;
  position: relative;
  width: 100%;
}

.messages .messages-content {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%; /* Change from 101% to 100% */
  width: 100%;
  overflow-y: auto; /* Add scrolling if needed */
  padding-bottom: 20px; /* Add some padding at bottom */
}

.messages .message {
  clear: both;
  float: left;
  padding: 6px 10px 7px;
  border-radius: 10px 10px 10px 0;
  background: rgba(0, 0, 0, 0.3);
  margin: 8px 0;
  font-size: 14px;
  line-height: 1.4;
  margin-left: 35px;
  position: relative;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.2);
}
.messages .message .timestamp {
  position: absolute;
  bottom: -15px;
  font-size: 9px;
  color: whitesmoke;
}
.messages .message::before {
  content: "";
  position: absolute;
  bottom: -6px;
  border-top: 6px solid rgba(0, 0, 0, 0.3);
  left: 0;
  border-right: 7px solid transparent;
}
.messages .message .avatar {
  position: absolute;
  z-index: 1;
  bottom: -15px;
  left: -41px;
  border-radius: 36px;
  width: 36px;
  height: 36px;
  overflow: hidden;
  margin: 0;
  padding: 0;
  border: 2px solid rgba(255, 255, 255, 0.24);
  background-color: rgba(0, 0, 0, 0.2);
}
.messages .message .avatar img {
  width: 100%;
  height: auto;
}
.messages .message.message-personal {
  float: right;
  color: #fff;
  text-align: left;
  background: linear-gradient(120deg, #009D38, #3DD569);
  border-radius: 10px 10px 0 10px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}
.messages .message.message-personal::before {
  left: auto;
  right: 0;
  border-right: none;
  border-left: 5px solid transparent;
  border-top: 4px solid #3DD569;
  bottom: -4px;
}
.messages .message:last-child {
  margin-bottom: 30px;
}
.messages .message.new {
  transform: scale(0);
  transform-origin: 0 0;
  -webkit-animation: bounce 500ms linear both;
          animation: bounce 500ms linear both;
}
.messages .message.loading::before {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  content: "";
  display: block;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  z-index: 2;
  margin-top: 4px;
  -webkit-animation: ball 0.45s cubic-bezier(0, 0, 0.15, 1) alternate infinite;
          animation: ball 0.45s cubic-bezier(0, 0, 0.15, 1) alternate infinite;
  border: none;
  -webkit-animation-delay: 0.15s;
          animation-delay: 0.15s;
}
.messages .message.loading span {
  display: block;
  font-size: 0;
  width: 20px;
  height: 10px;
  position: relative;
}
.messages .message.loading span::before {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  content: "";
  display: block;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  z-index: 2;
  margin-top: 4px;
  -webkit-animation: ball 0.45s cubic-bezier(0, 0, 0.15, 1) alternate infinite;
          animation: ball 0.45s cubic-bezier(0, 0, 0.15, 1) alternate infinite;
  margin-left: -7px;
}
.messages .message.loading span::after {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  content: "";
  display: block;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  z-index: 2;
  margin-top: 4px;
  -webkit-animation: ball 0.45s cubic-bezier(0, 0, 0.15, 1) alternate infinite;
          animation: ball 0.45s cubic-bezier(0, 0, 0.15, 1) alternate infinite;
  margin-left: 7px;
  -webkit-animation-delay: 0.3s;
          animation-delay: 0.3s;
}

/*--------------------
Message Box
--------------------*/
.message-box {
  flex: 0 1 40px;
  width: 100%;
  background: rgba(0, 0, 0, 0.3);
  padding: 10px;
  position: relative;
  display: flex;
  flex-direction: column;
}
.message-input-area{
  display: flex;
  flex-direction: space-between;
}
.message-box .message-input {
  background: none;
  border: none;
  outline: none !important;
  resize: vertical;
  color: rgba(255, 255, 255, 0.7);
  font-size: 14px;
  height: 40px;
  max-height: 200px;
  margin: 0;
  padding-right: 20px;
  width: 100%;
}
.message-box textarea:focus:-webkit-placeholder {
  color: transparent;
}
.message-box .message-submit {
  position: absolute;
  z-index: 1;
  bottom: 10px;
  right: 10px;
  color: #fff;
  border: none;
  background: rgb(17,49,211);
  font-size: 14px;
  text-transform: uppercase;
  line-height: 1;
  padding: 6px 10px;
  border-radius: 0;
  outline: none !important;
  transition: background 0.2s ease;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.349);
}
.message-box .message-submit:hover {
  background: #415adc;
}

/*--------------------
Custom Srollbar
--------------------*/
.mCSB_scrollTools {
  margin: 1px -3px 1px 0;
  opacity: 0;
}

.mCSB_inside > .mCSB_container {
  margin-right: 0px;
  padding: 0 10px;
}

p {
  margin: 0px;
}

.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar {
  background-color: rgba(0, 0, 0, 0.5) !important;
}

/*--------------------
Bounce
--------------------*/
@-webkit-keyframes bounce {
  0% {
    transform: matrix3d(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);
  }
  4.7% {
    transform: matrix3d(0.45, 0, 0, 0, 0, 0.45, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);
  }
  9.41% {
    transform: matrix3d(0.883, 0, 0, 0, 0, 0.883, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);
  }
  14.11% {
    transform: matrix3d(1.141, 0, 0, 0, 0, 1.141, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);
  }
  18.72% {
    transform: matrix3d(1.212, 0, 0, 0, 0, 1.212, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);
  }
  24.32% {
    transform: matrix3d(1.151, 0, 0, 0, 0, 1.151, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);
  }
  29.93% {
    transform: matrix3d(1.048, 0, 0, 0, 0, 1.048, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);
  }
  35.54% {
    transform: matrix3d(0.979, 0, 0, 0, 0, 0.979, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);
  }
  41.04% {
    transform: matrix3d(0.961, 0, 0, 0, 0, 0.961, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);
  }
  52.15% {
    transform: matrix3d(0.991, 0, 0, 0, 0, 0.991, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);
  }
  63.26% {
    transform: matrix3d(1.007, 0, 0, 0, 0, 1.007, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);
  }
  85.49% {
    transform: matrix3d(0.999, 0, 0, 0, 0, 0.999, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);
  }
  100% {
    transform: matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);
  }
}
@keyframes bounce {
  0% {
    transform: matrix3d(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);
  }
  4.7% {
    transform: matrix3d(0.45, 0, 0, 0, 0, 0.45, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);
  }
  9.41% {
    transform: matrix3d(0.883, 0, 0, 0, 0, 0.883, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);
  }
  14.11% {
    transform: matrix3d(1.141, 0, 0, 0, 0, 1.141, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);
  }
  18.72% {
    transform: matrix3d(1.212, 0, 0, 0, 0, 1.212, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);
  }
  24.32% {
    transform: matrix3d(1.151, 0, 0, 0, 0, 1.151, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);
  }
  29.93% {
    transform: matrix3d(1.048, 0, 0, 0, 0, 1.048, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);
  }
  35.54% {
    transform: matrix3d(0.979, 0, 0, 0, 0, 0.979, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);
  }
  41.04% {
    transform: matrix3d(0.961, 0, 0, 0, 0, 0.961, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);
  }
  52.15% {
    transform: matrix3d(0.991, 0, 0, 0, 0, 0.991, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);
  }
  63.26% {
    transform: matrix3d(1.007, 0, 0, 0, 0, 1.007, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);
  }
  85.49% {
    transform: matrix3d(0.999, 0, 0, 0, 0, 0.999, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);
  }
  100% {
    transform: matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);
  }
}
@-webkit-keyframes ball {
  from {
    transform: translateY(0) scaleY(0.8);
  }
  to {
    transform: translateY(-10px);
  }
}
@keyframes ball {
  from {
    transform: translateY(0) scaleY(0.8);
  }
  to {
    transform: translateY(-10px);
  }
}

.loader {
  border: 2px solid #f3f3f3; /* Light grey */
  border-top: 2px solid #3498db; /* Blue */
  border-radius: 50%;
  width: 20px;
  height: 20px;
  animation: spin 1s linear infinite;
  margin-top: 20px;
  flex-shrink: 0;
  display:inline-block;
  align-self: center;
}

.createNewConvo {
  flex: 1; 
  padding: 20px; 
  border-bottom: 1px solid #000000;
  justify-content: center;
}

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


#fab {
  position: fixed;
  bottom: 10px;
  right: 10px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background-color: #009D38;
  color: white;
  border: none;
  font-size: 24px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
}

#fab:hover {
  background-color: rgb(211,214,212);
}

.title-button:hover {
  background: #0e27a9;
}

.copy-to-clipboard {
  padding: 3px 8px;
}

#no-id-container {
  width: 80%;
  margin: 0 auto;
  padding: 20px;
}

#no-id-container div {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

#no-id-container input {
  width: 100%;
  padding: 10px;
  margin-bottom: 10px;
}

#no-id-container button {
  padding: 10px 20px;
}

/* Error message styling */
.error-message {
  position: relative;
  padding: 15px;
  background-color: rgba(255,0,0,0.8);
  box-shadow: 0 4px 8px 0 rgba(0,0,0,0.2);
  transition: 0.3s;
  border-radius: 0;
  margin: 20px 0;
}

#error-message-text {
  color: white;
  font-size: 14px;
  padding-right: 10px;
}

.error-dismiss-btn {
  position: absolute;
  top: 5px;
  right: 10px;
  cursor: pointer;
  font-size: 18px;
  color: #ffffff;
  background: none;
  border: none;
  font-weight: bold;
}

.basic-button {
  color: white;
  background-color: rgba(44, 131, 212, 0.6);
  border: none;
  box-shadow: 0 4px 8px 0 rgba(0,0,0,0.2);
  border-radius: 5px;
}

.basic-button:hover {
  background-color: rgba(44, 131, 212, 0.9);
}

.textfield {
  border-radius: 0;
  box-shadow: 0 4px 8px 0 rgba(0,0,0,0.2);
}

#id-title {
  grid-column: 1 / span 3; /* Span across all columns */
  grid-row: 2; /* Second row */
  display: flex;
  align-items: center;
}

#id-title-text {
  padding: 2px 5px 2px 5px;
  background-color: rgba(0, 0, 0, 0.2);
  border-radius: 5px;
  margin-right: 10px;
}

#current-id-text{
  margin-right: 5px;
}

.title-buttons {
  grid-column: 3; /* Place in the third column (buttons area) */
  grid-row: 1; /* First row */
  display: flex;
  gap: 10px;
  margin-right: 10px;
}

h1.main-heading {
  font-size: 1.8em; /* Increase font size */
  font-weight: bold; /* Make it bold */
  margin: 0; /* Ensure no extra margin is added */
  color: whitesmoke;
}

.title-button {
  font-size: 1.5em;
  width: 40px;
  height: 25px;
  background: linear-gradient(rgba(170, 43, 91, 0.4),rgba(158, 16, 141, 0.4)); /* Primary color */
  color: white;
  border: none;
  border-radius: 7px; /* Rounded corners */
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); /* Optional shadow */
}

.snackbar {
  visibility: hidden;
  min-width: 250px;
  text-align: center;
  border-radius: 0;
  padding: 10px;
  position: fixed;
  left: 50%;
  bottom: 30px;
  transform: translateX(-50%);
  z-index: 1;
  font-size: 17px;
  opacity: 0;
  transition: visibility 0.5s, opacity 0.5s ease-in-out;
}

.snackbar-info {
  background-color: #333;
  color: rgb(211,214,212);
}

.snackbar-error {
  background-color: red;
  color: rgb(211,214,212);
}

/* Chat Footer */
/* .chat-footer {
  background-color: #f8f9fa;
  padding: 8px 15px;
  text-align: center;
  font-size: 11px;
  color: #6c757d;
  border-top: 1px solid #e9ecef;
  position: absolute;
  bottom: 0;
  width: 100%;
  z-index: 2;
} */




.footer-content {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.footer-images {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  margin-bottom: 5px;
}

.footer-logo {
  height: 30px;
  width: auto;
  object-fit: contain;
}

/* Adjust the second logo specifically if needed */
.footer-logo:last-child {
  height: 25px; /* Slightly smaller to match visual hierarchy */
}

#version-info {
  color: #adb5bd;
  font-style: italic;
  margin-left: 10px;
}

.snackbar.show {
  visibility: visible;
  opacity: 1;
}

/* The Modal (background) */
.modal {
  display: none; /* Hidden by default */
  position: fixed; /* Stay in place */
  z-index: 1; /* Sit on top */
  left: 0;
  top: 0;
  width: 100%; /* Full width */
  height: 100%; /* Full height */
  overflow: auto; /* Enable scroll if needed */
  background-color: rgb(0,0,0); /* Fallback color */
  background-color: rgba(0,0,0,0.4); /* Black w/ opacity */
}

/* Modal Content */
.modal-content {
  background-color: rgb(211,214,212);
  margin: 30% auto; /* 15% from the top and centered */
  padding: 10px;
  border: 1px solid #888;
  width: 80%; /* Could be more or less, depending on screen size */
  max-width: 400px;
  text-align: center;
  border-radius: 0;
}

/* The Close Button */
.close {
  color: #8f8f8f;
  float: right;
  font-size: 28px;
  font-weight: bold;
  position: relative;
  top: -10px;
}

.close:hover,
.close:focus {
  color: black;
  text-decoration: none;
  cursor: pointer;
}

/* Button styles */
.modal-button {
  padding: 8px 10px 8px 10px;
  margin-top: 10px;
  margin-right: 5px;
  margin-left: 5px;
  cursor: pointer;
  border: none;
  border-radius: 0;
  color: rgb(211,214,212)
}

#confirmDelete {
  background-color: rgb(180, 0, 0);
}

#cancelDelete {
  background-color: rgb(151, 150, 150);
}

.modal-title {
  display: flex;
  justify-content: space-between;
  vertical-align: text-top;
}

.upload-icon {
  display: inline;
  cursor: pointer;
  font-size: 14px;
  color: #fff;
  border: none;
  background: blue;
  font-size: 14px;
  line-height: 1;
  padding: 6px 10px;
  border-radius: 0;
  outline: none !important;
  transition: background 0.2s ease;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.349);
  width: fit-content;
  block-size: fit-content;
}

.upload-icon i {
  pointer-events: none;
}

.image-preview-container {
  display: flex;
  align-items: center;
  margin: 5px 0;
}

.image-preview-container img {
  max-height: 60px;
  object-fit: cover;
}

.remove-image-button {
  color: red;
  font-size: 20px;
  margin-left: 5px;
}

.message-input.drag-over {
  border: 2px dashed #007bff;
  background-color: #f0f8ff;
}

.language-picker {
  display: flex;
  align-items: center;
  margin-left: auto;
  background-color: rgba(245, 245, 245, 0);
}

.language-picker select {
  font-size: 20px;
  background-color: rgba(245, 245, 245, 0.26);
  margin: 0;
  cursor: pointer;
  border: none;
  border-radius: 5px;
  -webkit-appearance: none;
  -moz-appearance: none;
  height: 25px;
  text-align:center
}