@font-face {
  font-family: 'Cairo';
  src: url('fonts/cairo-regular.ttf') format('woff2'),
    url('fonts/cairo-regular.ttf') format('woff');
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: 'Cairo';
  src: url('fonts/cairo-bold.ttf') format('woff2'),
    url('fonts/cairo-bold.ttf') format('woff');
  font-weight: bold;
  font-style: normal;
}


* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Cairo", sans-serif;
  -webkit-tap-highlight-color: transparent;
}

:root {
  --text-color: #222;
  --subheading-color: #A0A0A0;
  --placeholder-color: #6C6C6C;
  --primary-color: #F6F9FC;
  --secondary-color: #E9EEF6;
  --secondary-hover-color: #DBE1EA;
  --color-hever-load: #D0CEFF;
  --notifU: #E8EAF6;
}

.darkMode {
  /* Dark mode colors */
  --text-color: #E3E3E3;
  --subheading-color: #828282;
  --placeholder-color: #A6A6A6;
  --primary-color: #1E1E1E;
  --secondary-color: #2D2D30;
  --secondary-hover-color: #444;
  --color-hever-load: #64637B;
   --darkBs:#2D2D30;
}


body {
  background: var(--primary-color);
}

.header,
.chat-list .message,
.typing-form {
  margin: 0 auto;
  max-width: 980px;
}

.header {
  margin-top: 6vh;
  padding: 1rem;
  overflow-x: hidden;
}

body.hide-header .header {
  margin: 0;
  display: none;
}

.header :where(.title, .subtitle) {
  color: var(--text-color);
  font-weight: 500;
  line-height: 4rem;
}

.title {
  display: flex;
  justify-content: center;
  align-items: center; 
  height: 100px;
}

.title img {
  max-width: 300px;
  height: auto;
}


.chat-list {
  padding: 2rem 1rem 12rem;
  max-height: 100vh;
  overflow-y: auto;
  scrollbar-color: #999 transparent;
}

.chat-list .message.incoming {
  margin-top: 1.5rem;
}

.chat-list .message .message-content {
    display: flex;
    gap: 1.5rem;
    width: 100%;
    align-items: center;
   background: var(--secondary-color);
    border-radius: 15px;
    padding: 10px 15px;
}

.chat-list .message .text {
  color: var(--text-color);
  white-space: pre-wrap;
}

.chat-list .message.error .text {
  color: #e55865;
}

.chat-list .message.loading .text {
  display: none;
}

.chat-list .message .avatar {
  width: 40px;
  height: 40px;
  object-fit: cover;
  border-radius: 50%;
  align-self: flex-start;
}

.chat-list .message.loading .avatar {
  animation: fade 1s linear infinite;
}

@keyframes fade {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0;
  }
}


.chat-list .message .icon {
  color: var(--text-color);
  cursor: pointer;
  height: 35px;
  width: 35px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  font-size: 1.25rem;
  margin-left: 3.5rem;
  visibility: hidden;
}

.chat-list .message .icon.hide {
  visibility: hidden;
}

.chat-list .message:not(.loading, .error):hover .icon:not(.hide) {
  visibility: visible;
}

.chat-list .message .icon:hover {
  background: var(--secondary-hover-color);
}
.icon {
overflow: hidden;
position: relative;
}
.chat-list .message .loading-indicator {
  display: none;
  gap: 0.8rem;
  width: 100%;
  flex-direction: column;
}

.chat-list .message.loading .loading-indicator {
  display: flex;
}

.chat-list .message .loading-indicator .loading-bar {
  height: 11px;
  width: 100%;
  border-radius: 0.135rem;
  background-position: -800px 0;
  background: linear-gradient(to right, #635bff, var(--color-hever-load), #635bff);
  animation: loading 3s linear infinite;
}

.chat-list .message .loading-indicator .loading-bar:last-child {
  width: 70%;
}

@keyframes loading {
  0% {
    background-position: -800px 0;
  }

  100% {
    background-position: 800px 0;
  }
}

.typing-area {
  position: fixed;
  width: 100%;
  left: 0;
  bottom: 0;
  padding: 1rem;
  background: var(--primary-color);
}

.typing-area :where(.typing-form, .action-buttons) {
  display: flex;
  gap: 0.75rem;
}

.typing-form .input-wrapper {
  width: 100%;
  height: 56px;
  display: flex;
  position: relative;
}

.typing-form .typing-input {
  height: 100%;
  width: 100%;
  border: none;
  outline: none;
  resize: none;
  font-size: 1rem;
  color: var(--text-color);
  padding: 1.1rem 4rem 1.1rem 1.5rem;
  border-radius: 100px;
  background: var(--secondary-color);
}

.typing-form .typing-input:focus {
  background: var(--secondary-hover-color);
}

.typing-form .typing-input::placeholder {
  color: var(--placeholder-color);
}

.typing-area .icon {
  width: 56px;
  height: 56px;
  flex-shrink: 0;
  cursor: pointer;
  display: flex;
  font-size: 1.4rem;
  color: var(--text-color);
  align-items: center;
  justify-content: center;
  background: var(--secondary-color);
  transition: background-color 0.3s ease-in-out;
}

.typing-area .icon:hover {
  background: var(--secondary-hover-color);
}

.typing-form #send-message-button {
  position: absolute;
  right: 0;
  outline: none;
  border: none;
  transform: scale(0);
  background: transparent;
  transition: transform 0.2s ease;
}

.typing-form .typing-input:valid~#send-message-button {
  transform: scale(1);
}

.typing-area .disclaimer-text {
  text-align: center;
  font-size: 0.85rem;
  margin-top: 1rem;
  color: var(--placeholder-color);
}

/* Responsive media query code for small screen */
@media (max-width: 768px) {
  .header :is(.title, .subtitle) {
    font-size: 2rem;
    line-height: 2.6rem;
  }

  .header .subtitle {
    font-size: 1.7rem;
  }

  .typing-area :where(.typing-form, .action-buttons) {
    gap: 0.4rem;
  }

  .typing-form .input-wrapper {
    height: 50px;
  }

  .typing-form .typing-input {
    padding: 1.1rem 3.5rem 1.1rem 1.2rem;
  }

  .typing-area .icon {
    height: 50px;
    width: 50px;
  }

  .typing-area .disclaimer-text {
    font-size: 0.75rem;
    margin-top: 0.5rem;
  }
}

#loaderCo {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--primary-color);
  display: flex;
  justify-content: center; 
  align-items: center;
  z-index: 9999;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}
#loaderCo.hidden {
  opacity: 0; 
  visibility: hidden; 
}
.loader {
  width: 48px;
  height: 48px;
  margin: auto;
  position: relative;
}

.loader:before {
  content: '';
  width: 48px;
  height: 5px;
  background: #635BFF50;
  position: absolute;
  top: 60px;
  left: 0;
  border-radius: 50%;
  animation: shadow324 0.5s linear infinite;
}

.loader:after {
  content: '';
  width: 100%;
  height: 100%;
  background: #635BFF;
  position: absolute;
  top: 0;
  left: 0;
  border-radius: 4px;
  animation: jump7456 0.5s linear infinite;
}

@keyframes jump7456 {
  15% {
    border-bottom-right-radius: 3px;
  }

  25% {
    transform: translateY(9px) rotate(22.5deg);
  }

  50% {
    transform: translateY(18px) scale(1, .9) rotate(45deg);
    border-bottom-right-radius: 40px;
  }

  75% {
    transform: translateY(9px) rotate(67.5deg);
  }

  100% {
    transform: translateY(0) rotate(90deg);
  }
}

@keyframes shadow324 {

  0%,
    100% {
    transform: scale(1, 1);
  }

  50% {
    transform: scale(1.2, 1);
  }
}
/* Note */
.note {
  position: relative;
  padding: 20px 50px 20px 20px;
  background: var(--notifU);
  color: #3c4043;
  font-size: .85rem;
  line-height: 1.6em;
  border-radius: 10px;
  overflow: hidden;
  margin: 20px 10px;
}

.note::before {
  content: '';
  width: 60px;
  height: 60px;
  background: rgba(0, 0, 0, .4);
  display: block;
  border-radius: 50%;
  position: absolute;
  top: -12px;
  right: -12px;
  opacity: .1
}

.note::after {
  content: '\002A';
  position: absolute;
  right: 18px;
  top: 16px;
  font-size: 20px;
  min-width: 15px;
  text-align: center
}
.note p {
margin: 10px;
font-size: 14px;
}

.darkMode .note {
background: var(--darkBs);
  color: white;
}
/* Overlay */
.dialog-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(128, 128, 128, 0.3);
  backdrop-filter: blur(5px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease-in-out, backdrop-filter 0.3s ease-in-out;
}

/* Show the overlay */
.dialog-overlay.show {
  opacity: 1;
  visibility: visible;
}

/* Dialog box styling */
.dialog-box {
  background-color: var(--secondary-color);
  padding: 20px;
  border-radius: 8px;
  color: var(--text-color);
  width: 300px;
  text-align: center;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  transform: scale(0.8);
  transition: transform 0.2s ease-in-out;
}

.dialog-overlay.show .dialog-box {
  transform: scale(1);
}

/* Buttons */
.dialog-buttons {
  margin-top: 15px;
  display: flex;
  gap: 10px;
}

.btn {
  flex: 1; 
  padding: 10px 0;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  text-align: center;
}

.btn.cancel {
  background-color: #ccc;
  color: #333;
}

.btn.delete {
  background-color: #e74c3c;
  color: #fff;
}

.btn:hover {
  opacity: 0.8;
}
.ignielSquircle {
    clip-path: url(#ignielSquircle);
}