@import "../../../../assets/scss/variables";

.text-area {
  outline: none;
  width: 100%;
  border: 1px solid #CCCCCC;
  background: $grayish-box-background;
  padding: 10px 16px;
  color: $title-color;
  font-size: 2rem;
  line-height: 25px;
  font-weight: $regular;
  border-radius: 10px;
  box-sizing: border-box;

  &::placeholder {
    color: $text-color;
    font-size: 1.4rem;
  }

  &:focus-visible {
    border-color: $main-color;
  }

  &.afm-form {
    background-color: unset;
    border: unset;
    height: auto;
    padding: 0 0 0 .5rem;
    font-size: 1.5rem;
    font-weight: $extra-light;
    color: $text-color;
    letter-spacing: .8px;
    line-height: 1;
    border-bottom: 0.1rem solid #ccc;
    border-radius: 0;

    &.disable {
      border-bottom: unset;
    }

    &:focus {
      outline: none;
    }

    &::placeholder {
      font-weight: $extra-light;
      font-size: $index-size;
    }

    &.hasError {
      border-color: $error-color;
    }
  }

  &.user-form-field {

    height: 50px;
    background-color: unset;
    border: unset;
    resize: none;
    overflow-y: auto;

    &::-webkit-scrollbar {
      width: 5px;
      height: 50% !important;
      transform: scaleY(0.5) !important;
    }

    /* Track */
    &::-webkit-scrollbar-track {
      background: #e9f0f9;
      border-radius: 10px;
    }

    /* Handle */
    &::-webkit-scrollbar-thumb {
      background: #ccc;
      border-radius: 10px;
    }

    /* Handle on hover */
    &::-webkit-scrollbar-thumb:hover {
      background: transparent;
    }

    padding: 0 0 0 .5rem;
    font-size: 1.6rem;
    font-weight: $extra-light;
    color: $text-color;
    letter-spacing: 0.8px;
    line-height: 25px;
    border-bottom: 0.1rem solid #ccc;
    border-radius: 0;

    &.disable {
      border-bottom: unset;
    }

    &:focus {
      outline: none;
    }

    &::placeholder {
      font-weight: $extra-light;
      font-size: $index-size;
    }

    &.hasError {
      border-color: $error-color;
    }
  }
}

.clear{
  cursor: pointer;
  position: relative;
  right:20px;
  opacity: 0; /* Initially hide the .clear element */
  transition: opacity 0.3s ease; /* Add a transition effect for smooth visibility */
}
.text-area:focus + .clear {
  opacity: 1; /* Make the .clear element visible when the text field is focused */
}

.has-url {
  min-height: 50px;
  a {
    color: #040059;
  }
}