/* Importing Google Fonts - Inter */
@import url('https://fonts.googleapis.com/css2?family=Noto+Kufi+Arabic:wght@100..900&family=Open+Sans:ital,wght@0,300..800;1,300..800&display=swap');

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-optical-sizing: auto;
  font-family: "Open Sans", sans-serif;
}

h5 {
  font-family: 'Courier New', Courier, monospace;
  font-weight: bold;
  color: #333;
  padding: 2px 5px;
  font-size: 15px;
}

code {
  font-family: 'Courier New', Courier, monospace;
  font-weight: bold;
  color: #333;
  padding: 10px;
  font-size: 15px;
  border-radius: 10px;
  background-color: #f5f8fe;
  display: inline-block;
  max-width: 100%;
  word-wrap: break-word;
}

.modal-content {
  background-color: white;
  margin: 15% auto;
  padding: 30px;
  border-radius: 15px;
  width: 40%;
  max-width: 500px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  animation: modalFadeIn 0.3s ease;
  text-align: center;
  position: relative;
}

@keyframes modalFadeIn {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.close {
  color: #aaa;
  font-size: 30px;
  font-weight: bold;
  position: absolute;
  top: 10px;
  right: 20px;
  background: none;
  border: none;
  cursor: pointer;
  transition: color 0.3s ease;
}

.close:hover,
.close:focus {
  color: #000;
  background: #f0f0f0;
}

#close-chatbot {
  font-size: 24px;
  color: #3498db;
  background: #f0f0f0;
  transition: color 0.3s ease;
}

#close-chatbot:hover {
  color: #2980b9;
}

.modal {
  display: none;
  position: fixed;
  z-index: 1;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(5px);
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.suggestion-btn {
  border: 1px solid #dfdfdf;
  padding: 10px 15px;
  font-size: 14px;
  background-color: #f5f8fe;
  color: #000;
  border: none;
  border-radius: 50px;
  margin: 5px;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.2s ease;
  font-weight: bold;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.suggestion-btn i {
  margin-right: 10px;
  font-size: 16px;
  transition: transform 0.3s ease;
}

.suggestion-btn:hover i {
  transform: scale(1.2);
}

.suggestion-btn:hover {
  background-color: #e0e0e0;
  transform: scale(1.05);
}

a {
  font-weight: bold;
  color: #057df5;
}

b {
  color: #057df5;
}

body {
  width: 100%;
  min-height: 100vh;
  background: #fff;
  overflow: hidden;
}

.context-menu {
  background: #f0f0f0 !important;
  position: absolute;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
  list-style-type: none;
  padding: 10px;
  margin: 0;
  border: none !important;
  border-radius: 15px;
  font-weight: bold;
  font-size: 1.31rem;
  letter-spacing: 0.02rem;
  font-family: "Inter Bold", sans-serif;
  display: flex;
  gap: 10px;
  pointer-events: none;
  user-select: none;
}

.context-menu li {
  padding: 8px;
  cursor: pointer;
}

.context-menu li:hover {
  background-color: #b5daff;
  border-radius: 8px;
}

#chatbot-toggler {
  position: fixed;
  bottom: 30px;
  right: 35px;
  border: none;
  height: 50px;
  width: 50px;
  display: flex;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #f0f0f0 !important;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
  transition: all 0.2s ease;
}

#chatbot-toggler:hover {
  transform: scale(1.1);
}

.chat-header #close-chatbot {
  border: none;
  color: #000;
  height: 40px;
  width: 40px;
  font-size: 1.9rem;
  margin-right: 10px;
  padding-top: 2px;
  cursor: pointer;
  border-radius: 30%;
  background: none;
  transition: 0.2s ease;
  margin-left: auto;
}

.chat-header #close-chatbot:hover {
  background: #b5daff;
  color: #057df5;
}

body.show-chatbot #chatbot-toggler {
  transform: rotate(90deg);
}

#chatbot-toggler span {
  color: #ebebeb;
  background: #f0f0f0;
  position: absolute;
}

#chatbot-toggler span:last-child,
body.show-chatbot #chatbot-toggler span:first-child {
  opacity: 0;
}

body.show-chatbot #chatbot-toggler span:last-child {
  opacity: 1;
}

.chatbot-popup {
  right: 0;
  bottom: 0;
  height: 100%;
  border-radius: 0;
  width: 100%;
}

body.show-chatbot .chatbot-popup {
  opacity: 1;
  pointer-events: auto;
  transform: scale(1);
}

.chat-header {
  display: flex;
  align-items: center;
  padding: 15px 22px;
  background: #f5f8fe;
  justify-content: space-between;
  position: relative;
  gap: 10px;
}

.chat-header .header-info {
  display: flex;
  align-items: center;
}

.header-info .chatbot-logo {
  width: 40px;
  height: 40px;
  padding: 6px;
  fill: #0021ff;
  flex-shrink: 0;
}

.header-info .logo-text {
  color: #000;
  font-weight: 600;
  font-size: 1.31rem;
  letter-spacing: 0.01rem;
}

.chat-body {
  padding: 25px 22px;
  gap: 20px;
  display: flex;
  height: 460px;
  overflow-y: auto;
  flex-direction: column;
  scrollbar-width: thin;
  scrollbar-color: #ccfff5 transparent;
  padding-bottom: 100px;
}

.chat-body .message {
  display: flex;
  gap: 11px;
  align-items: center;
  padding-bottom: 10px;
}

.chat-body .message .bot-avatar {
  width: 35px;
  height: 35px;
  padding: 6px;
  fill: #dfdfdf;
  flex-shrink: 0;
  margin-left: 80px;
  margin-bottom: 2px;
  align-self: flex-end;
  border-radius: 100%;
  background: #f5f8fe;
  border: 1px solid #dfdfdf;
}

.chat-body .message .message-text {
  padding: 12px 16px;
  max-width: 100%;
  font-size: 0.95rem;
  margin-right: 80px;
  border-radius: 13px;
}

.chat-body .bot-message.thinking .message-text {
  padding: 2px 16px;
}

.chat-body .user-message {
  flex-direction: column;
  align-items: flex-end;
}

.chat-body .user-message .message-text {
  color: #000;
  background: #eff6ff;
  border-radius: 15px;
}

.chat-body .user-message .attachment {
  width: 25%;
  margin-top: -7px;
  margin-right: 80px;
  border-radius: 15px;
}

.chat-body .bot-message .thinking-indicator {
  display: flex;
  gap: 4px;
  padding-block: 15px;
}

.chat-body .bot-message .thinking-indicator .dot {
  height: 7px;
  width: 7px;
  border-radius: 50%;
  background: #000;
  animation: dotPulse 1.8s ease-in-out infinite;
}

.chat-body .bot-message .thinking-indicator .dot:nth-child(1) {
  animation-delay: 0.2s;
}

.chat-body .bot-message .thinking-indicator .dot:nth-child(2) {
  animation-delay: 0.3s;
}

.chat-body .bot-message .thinking-indicator .dot:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes dotPulse {
  0%, 44% {
    transform: translateY(0);
  }
  28% {
    opacity: 0.4;
    transform: translateY(-4px);
  }
  44% {
    opacity: 0.2;
  }
}

.chat-footer {
  position: absolute;
  bottom: 0;
  width: 100%;
  background: #fff;
  padding: 15px 22px 20px;
}

.chat-footer .chat-form {
  display: flex;
  align-items: center;
  position: relative;
  background: #f3f4f6;
  border-radius: 20px;
  outline: 1px solid #f3f4f6;
  box-shadow: 0 0 8px rgba(0, 0, 0, 0.06);
  transition: 0s ease, border-radius 0s;
  margin: 0 250px;
  flex-direction: column;
  border: 1px solid #dfdfdf;
}

.chat-form .message-input {
  width: 100%;
  height: 47px;
  outline: none;
  resize: none;
  border: none;
  max-height: 180px;
  scrollbar-width: thin;
  font-size: 0.95rem;
  padding: 14px 0 10px 14px;
  scrollbar-color: transparent transparent;
  background: #f3f4f6;
  border-radius: 25px;
}

.chat-form .chat-controls {
  gap: 3px;
  height: 47px;
  display: flex;
  padding-right: 6px;
  align-items: center;
  align-self: flex-end;
}

.chat-form .chat-controls button {
  height: 35px;
  width: 35px;
  border: none;
  cursor: pointer;
  color: #000;
  border-radius: 100%;
  font-size: 1.15rem;
  background: none;
  transition: 0.2s ease;
}

.chat-form .chat-controls button:hover,
body.show-emoji-picker .chat-controls #emoji-picker {
  background: #b5daff;
}

.chat-form .chat-controls #send-message {
  color: #fff;
  display: block;
  background: #0037ff;
}

.chat-form .chat-controls #send-message:hover {
  color: #0539f5;
  background: #b5daff;
}

.chat-form .message-input:valid~.chat-controls #send-message {
  display: block;
}

.chat-form .file-upload-wrapper {
  position: relative;
  height: 35px;
  width: 35px;
  float: left;
}

.chat-form .file-upload-wrapper :where(button, img) {
  position: absolute;
}

.chat-form .file-upload-wrapper img {
  height: 100%;
  width: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.chat-form .file-upload-wrapper #file-cancel {
  color: #ff0000;
  background: #fff;
}

.chat-form .file-upload-wrapper :where(img, #file-cancel),
.chat-form .file-upload-wrapper.file-uploaded #file-upload {
  display: none;
}

.chat-form .file-upload-wrapper.file-uploaded img,
.chat-form .file-upload-wrapper.file-uploaded:hover #file-cancel {
  display: block;
}

em-emoji-picker {
  position: absolute;
  left: 50%;
  top: -337px;
  width: 100%;
  max-width: 350px;
  visibility: hidden;
  max-height: 330px;
  transform: translateX(-50%);
}

body.show-emoji-picker em-emoji-picker {
  visibility: visible;
}

.disclaimer-text {
  text-align: center;
  font-size: 10px;
  color: #6C6C6C;
}

@media (max-width: 768px) {
  .chat-footer .chat-form {
    margin: 0 5px;
    padding: 0 5px;
  }

  span {
    font-size: 18px;
  }

  .disclaimer-text {
    font-size: 10px;
  }

  .bot-avatar {
    width: 30px;
    height: 30px;
  }

  .suggestion-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
    justify-content: center;
    padding: 10px;
  }

  .chat-body .message .bot-avatar {
    margin-left: 10px;
    margin-right: 10px;
  }

  .chat-body .message .message-text {
    margin-right: 10px;
    margin-left: 10px;
  }

  .chat-body .user-message .attachment {
    margin-right: 10px;
    margin-left: 50px;
  }

  .suggestion-btn {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 10px 15px;
    font-size: 14px;
    border: none;
    margin: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
  }

  .suggestion-btn:hover {
    background-color: #b5daff;
  }
}
