@use '../../../style/color/index.scss' as *;

.ver-textarea {
  width: auto;
  height: auto;
  display: inline-block;
  overflow: hidden;
  position: relative;
  textarea {
    width: 100%;
    height: 100%;
    padding: 0;
    outline: none;
    border: 1px solid $ver-zinc-3;
    transition: all 0.2s ease;
    border-radius: 3px;
    padding: 8px 8px 10px 8px;
    box-sizing: border-box;
    font-size: 14px;
    color: #606266;
    font-family: auto;
    &:focus,
    &:active,
    &:focus-visible {
      border: 1px solid $ver-violet-6;
    }
    &:focus-visible {
      border: 1px solid $ver-violet-6;
    }

    .dark & {
      color: $ver-zinc-1;
      border-color: $ver-zinc-9;

      &:focus,
      &:active,
      &:focus-visible {
        border: 1px solid $ver-violet-6;
      }
      &:focus-visible {
        border: 1px solid $ver-violet-6;
      }
    }
  }
}

.maxlength-box {
  font-size: 14px;
  color: #c4c4c4;
  position: absolute;
  bottom: 10px;
  right: 10px;
}

textarea::placeholder {
  color: #c6c8cc;
  font-size: 12px;
}

.ver-textarea.is-disabled {
  textarea {
    cursor: not-allowed;
    color: #c3bfbf;
    &:focus,
    &:active,
    &:focus-visible {
      border: 1px solid #dcdfe6f6;
    }
    &:focus-visible {
      border: 1px solid #dcdfe6f6;
    }
  }
  .maxlength-box {
    color: #c3bfbf;
  }
}
