body {
  font-family: 'IRANSansX', sans-serif;
  margin: 0;
  padding: 0;
}
.fa-num {
  -moz-font-feature-settings: 'ss02';
  -webkit-font-feature-settings: 'ss02';
  font-feature-settings: 'ss02';
}

nav.navbar {
  position: fixed;
  width: 100vw;
  top: 0;
  right: 0;
  z-index: 10;
}

nav .container {
  height: 3em;
  position: relative;
}
nav img {
  height: 100%;
}

.on-mobile {
  display: none;
}
.on-desktop {
  display: unset;
}

@media (max-width: 640px) {
  .on-mobile {
    display: unset;
  }
  .on-desktop {
    display: none;
  }
}
@media (max-width: 640px) {
  nav img {
    max-width: 25%;
    height: auto;
  }
  .navbar .btn-outline-primary {
    font-size: 0.7em;
  }
}

nav .btn {
  z-index: 2;
}

.left-side {
  position: absolute;
  top: 50%;
  left: 0;
  transform: translateY(-50%);
}

.navbar-brand {
  font-weight: 900;
  position: absolute;
  width: 100%;
  text-align: center;
}

.navbar + .container {
  margin-top: 6em !important;
}

.main.container {
  margin-top: 5em;
}

.ltr {
  text-align: left;
  direction: ltr;
}

.rtl {
  text-align: right;
  direction: rtl;
}

mjx-container.MathJax {
  font-size: 1.3em;
  font-weight: 900;
}

.hidden {
  display: none !important;
}

.custom-file-container {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 16px;
}

.file-input {
  display: none;
}

.custom-button {
  padding: 10px 20px;
  background-color: #007bff;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
}

.file-name {
  margin: 10px 0;
  font-size: 14px;
  max-width: calc(100% - 11em);
}
.streaming {
  opacity: 0.7;
}

/**********************/
.loader {
  display: inline-flex;
  gap: 8px;
}

.dot {
  width: 4px;
  height: 4px;
  background: gray;
  border-radius: 50%;
  animation: bounce 1.4s infinite ease-in-out;
}

.dot:nth-child(1) {
  animation-delay: -0.3s;
}

.dot:nth-child(2) {
  animation-delay: 0s;
}

.dot:nth-child(3) {
  animation-delay: 0.3s;
}

@keyframes bounce {
  0%,
  100% {
    transform: translateY(0);
    opacity: 1;
  }
  50% {
    transform: translateY(-5px);
    opacity: 0.5;
  }
}
/***************************************/
.progress {
  width: 100%;
  background-color: #f0f0f0;
  border-radius: 4px;
  overflow: hidden;
}

.progress-bar {
  width: 0%;
  background-color: #007bff;
  transition: width 0.3s;
}

.progress-bar.indeterminate {
  animation: marquee 1.5s linear infinite;
  background-color: #007bff; /* or your desired color */
}

@keyframes marquee {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(100%);
  }
}
/***************************************/
error {
  font-size: 90%;
  color: lightcoral;
}
info {
  font-size: 90%;
  color: darkgray;
}
.button-to-top {
  position: absolute;
  top: 1em;
}
@media (max-width: 640px) {
  .button-to-top {
    top: 23px;
  }
}
/***************************************/
.retry-box {
  border: 1px solid;
  border-radius: 0.5em;
  padding: 1em;
  display: flex;
  flex-direction: column;
  font-size: 80%;
  background-color: lightgray;
  direction: rtl;
  text-align: right;
}

html[data-bs-theme='dark'] .retry-box {
  background-color: black;
}

.retry-box button {
  margin: auto;
}
/***************************************/
.delete-btn {
  font-size: 0.8rem;
  color: #dc3545;
  position: absolute;
  font-size: 0.5em;
  padding: 0.2em 0.6em;
  left: 4px;
  top: 4px;
}

.file-item,
.chat-item {
  cursor: pointer;
  padding: 0.5rem;
  border-bottom: 1px solid #eee;
  position: relative;
  color: darkgray;
  padding-left: 18px;
}
html[data-bs-theme='dark'] .file-item,
html[data-bs-theme='dark'] .chat-item {
  border-bottom: 1px solid #555;
  color: lightgray;
}
.file-item:hover,
.chat-item:hover {
  background: #f8f9fa;
}

.file-item[disabled] {
  text-decoration: line-through;
}

#menu {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100vh;
  gap: 16px;
  transition: all 0.5s;
  position: fixed;
  top: 4em;
  left: 0;
  width: 100%;
  z-index: 1000;
  background-color: rgba(var(--bs-tertiary-bg-rgb), 0.97);
  overflow: hidden;
}
#menu .btn {
  width: 80%;
}

.collapsed {
  height: 0 !important;
}

.inside-textbox {
  position: absolute;
  top: -0.8em;
  left: 1em;
  text-align: left;
  padding: 0 0.5em;
  background-color: var(--bs-body-bg);
}

#loading {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1000;
  background-color: rgba(var(--bs-tertiary-bg-rgb), 0.8);
  text-align: center;
  vertical-align: middle;
}

#loading .marquee {
  position: relative;
  top: calc(50% - 24px);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: inline-block;
  border: 3px solid;
  border-color: #fff #fff transparent transparent;
  box-sizing: border-box;
  animation: rotation 1s linear infinite;
}

#loading .marquee::after,
#loading .marquee::before {
  content: '';
  box-sizing: border-box;
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
  margin: auto;
  border: 3px solid;
  border-color: transparent transparent #ff3d00 #ff3d00;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  box-sizing: border-box;
  animation: rotationBack 0.5s linear infinite;
  transform-origin: center center;
}

#loading .marquee::before {
  width: 32px;
  height: 32px;
  border-color: #fff #fff transparent transparent;
  animation: rotation 1.5s linear infinite;
}

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

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

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

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