.tfw-view-textbox {
  position: relative;
  display: inline-block;
  border: none;
  border: 1px solid rgba(0,0,0,.5);
  font: inherit;
  padding: 0;
}

div.tfw-view-textbox.invalid {
    border: 2px solid red;
    border: 1px solid var(--thm-color-SD);
    outline: 1px solid var(--thm-color-SD);
}

div.tfw-view-textbox.disabled {
    border: none;
    box-shadow: none;
}

div.tfw-view-textbox.wide {
  display: block;
  width: 100%;
}

div.tfw-view-textbox.hide { display: none; }

div.tfw-view-textbox.focus {
  z-index: 999999;
}


div.tfw-view-textbox > div {
  margin: 0;
}

div.tfw-view-textbox input {
  border: 0;
  margin: 0;
  background-color: transparent !important;
  font: inherit;
  width: 100%;
  padding: 0 8px;
  line-height: 32px;
  height: 32px;
  border: none;
  -webkit-text-fill-color: inherit !important;
  -webkit-box-shadow: none !important;
}

div.tfw-view-textbox.invalid > div > input {
  color: #f00;
  background-color: #fee;
}

div.tfw-view-textbox.focus input {
  color: #000;
  outline: none;
  border: none;
}

div.tfw-view-textbox.focus input:focus {
  box-shadow: none;
  outline: none;
}

div.tfw-view-textbox > div.body {
  padding: 0;
}

div.tfw-view-textbox > div.head,
div.tfw-view-textbox > div.foot {
  opacity: .5;
  font-size: .8em;
}

div.tfw-view-textbox > div.head {
  padding: 0 8px;
  line-height: 16px;
  height: 16px;
}

div.tfw-view-textbox.no-label > div.head {
  display: none;
}

div.tfw-view-textbox > div.bottom {
  content: ".";
  font-size: 0;
  position: absolute;
  bottom: -2px;
  right: 0;
  left: 0;
  width: 100%;
  height: 2px;
  transform: scaleX(0);
  transform-origin: right top;
  transition: transform .6s;
}

div.tfw-view-textbox.focus > div.bottom {
  transform: scaleX(1);
  transform-origin: left top;
  transition: transform .6s;
}

div.tfw-view-textbox > footer {
  display: none;
  position: absolute;
  bottom: -4px;
  right: 0;
  left: 0;
  width: 100%;
  height: 0;
  padding: 0;
  z-index: 2;
  overflow: show;
}
div.tfw-view-textbox.focus > footer {
  display: block;
}

div.tfw-view-textbox.focus > footer > div.completion {
  padding: 0;
  margin: 0;
  overflow: auto;
  font: inherit;
  font-size: .85em;
  max-height: 280px;
}

div.tfw-view-textbox.focus > footer > div.completion > div {
  width: 100%;
  height: 1.5em;
  line-height: 1.5em;
  padding: 0 .5em;
  white-space: nowrap;
  text-overflow: ellipsis;
  cursor: pointer;
}

div.tfw-view-textbox.focus > footer > div.completion > span {
  opacity: .6;
}

div.tfw-view-textbox.focus > footer > div.completion > b {
  font-weight: normal;
}
