.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100dvh;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
  z-index: 4;
}
.popup {
    color: var(--text-color);
    background: var(--block-color);
    border: 0.065rem solid var(--border-color);
    padding: 2rem 2rem;
    border-radius: 2rem;
    text-align: center;
    backdrop-filter: blur(0.3rem);
    transform: scale(0.8);
    opacity: 0;
    transition: transform 0.3s, opacity 0.3s;
    position: relative;
    margin-bottom: 50%;
}
.close-button {
  position: absolute;
  top: 1.5rem;
  left: 1.5rem;
  background: var(--border-color);
  color: var(--text-color);
  border: none;
  /* padding: 5px 10px; */
  cursor: pointer;
  border-radius: 0.7rem;
  width: 2rem;
  padding-bottom: 2px;
  height: 2rem;
  text-align: center;
  border: 0.0325rem solid #26272996;
}

.overlay.active {
  opacity: 1;
  visibility: visible;
}

.overlay.active .popup {
  transform: scale(1);
  opacity: 1;
}

.input-field {
  width: 80%;
  padding: 10px;
  border-radius: 0.935rem;
  border: 0.0325rem solid #2c2d2e;
  outline: 0.125rem solid #3f698a00;
  margin: 10px 0;
  background-color: var(--background-color);
  transition: all 0.25s ease-in-out;
  color: var(--text-color);
  margin-left: 10%;
  margin-right: 5%;
}
    .input-field:focus {
        outline-color: var(--primary-color);
    }
.input-field.error {
  transition: all 0.3s ease;
  animation: shake 0.4s ease;
  outline-color: rgba(255, 0, 0, 0.5); /* Мягкая красная обводка */
}

@keyframes shake {
  0%,
  100% {
    transform: translateX(0);
  }

  25% {
    transform: translateX(-0.3125rem);
  }

  75% {
    transform: translateX(0.3125rem);
  }
}

#messageInput-div {
  display: flex;
  width: 100%;
  align-content: center;
  align-items: center;
}

.char-limit {
  font-size: 14px;
  color: gray;
  text-align: left;
}

.error-message {
  color: red;
  font-size: 14px;
  text-align: right;
  margin-bottom: 0;
}
#sendButton {
    padding: 0.1rem 1rem;
    width: fit-content;
    padding-bottom: 0.2125rem;
    font-weight: 600;
    font-size: medium;
    height: 1.9375rem;
    border-radius: 0.625rem;
    outline: 0.0625rem solid #7777772b;
    border: 0;
    margin-top: 1rem;
    background-color: var(--primary-color);
    color: var(--block-color);
}
