/* Slim form wrapper */
.message-form-slim {
  display: flex;
  flex-direction: column;
  width: 100%;
}

.message-bar {
  padding: 11px 22px;
  flex: 0 0 auto;
  position: relative;
  display: flex;
  align-items: center;
  width: 98%;
  gap: var(--crotchet);
  border-top: 1px solid var(--mb-70);
}

.message-input {
  flex: 1;
  display: flex;
  align-items: baseline;

}

.message-input__textarea {
  display: flex;
  width: 100%;
  border-radius: var(--quaver);
  border: 1px solid var(--mb-70);
  resize: none;
  outline: none;
  min-height: 30px;
  max-height: 100px;
  min-width: 0;
  background: transparent;
  color: var(--mb);
  border-color: transparent;
  outline: none;
  white-space: pre-wrap;
  overflow-y: auto;

  &::placeholder {
    color: var(--mb-70);
    font-size: 14px;
  }

  &:focus {
    border-color: transparent;
    outline: none;
  }
}

.message-input__submit {
  flex: auto 0 0;
  text-transform: none !important;
  border: none;
  padding: var(--crotchet);
  border-radius: var(--quaver);
  cursor: pointer;
}

/* Send icon toggle styles */
.send-icon {
  transition: opacity 150ms ease-in-out;
}

.send-icon--hidden {
  display: none;
}

/* File upload button styles */
.file-upload-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.file-upload-button {
  cursor: pointer;
  display: inline-block;
  padding: 10px 24px;
  border: 1px solid var(--mb-70);
  border-radius: var(--quaver);
  background: transparent;
  color: var(--mb);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.05em;
  transition: all 150ms ease-in-out;
}

.file-upload-button:hover {
  border-color: var(--mb);
  background-color: var(--grey-100);
}

/* Image preview styles */
.file-preview-container {
  display: flex;
  flex-wrap: wrap;
  gap: var(--quaver);
  padding: 0 22px;
}

.file-preview-container:not(:empty) {
  padding-top: var(--crotchet);
  padding-bottom: var(--quaver);
}

.file-preview-item {
  position: relative;
  width: 80px;
  height: 80px;
  border-radius: var(--quaver);
  overflow: hidden;
  border: 1px solid var(--grey-200);
}

.file-preview-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.file-preview-remove {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background-color: var(--mb);
  color: var(--shw);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  line-height: 1;
  opacity: 0;
  transition: opacity 150ms ease-in-out;
}

.file-preview-item:hover .file-preview-remove {
  opacity: 1;
}