/* -------------------------
 * Form Element
 * ------------------------- */

/* date-time */
.input-datetimerange .input-group {
  width: 200px;
}

.bootstrap-datetimepicker-widget.dropdown-menu {
  font-size: 0.875rem;
}

.bootstrap-datetimepicker-widget {
  z-index: 1040;
  position: absolute;
}

/* desimal */
input.desimal-titik {
  text-align: right;
}

.input-group > input.desimal-koma {
  text-align: right;
  border-left: 1px solid transparent;
  flex: 0 0 auto;
  width: 4rem;
}

/* fileupload */
.fileupload {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  position: relative;
  height: 200px;
  border: 1px solid #ced4da;
  padding: 1.5rem 1.75rem;
}

.fileupload .thumbnail {
  position: relative;
  max-width: 100%;
  max-height: 100%;
}

.fileupload .nofile {
  display: block;
  text-align: center;
}

.fileupload.preview .nofile {
  display: none;
}

.fileupload input[type="file"] {
  position: absolute;
  top: 0;
  left: 0;
  margin: 0;
  opacity: 0;
  filter: alpha(opacity=0);
  font-size: 0;
  direction: ltr;
  cursor: pointer;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.fileupload img {
  max-height: 100%;
  max-width: 100%;
  display: none;
}

.fileupload.preview img {
  display: block;
}

.fileupload .toolbar {
  display: flex;
  align-items: center;
  justify-content: center;
}

.fileupload .browse {
  position: relative;
}

.fileupload .remove-file {
  cursor: pointer;
  display: none;
}

.fileupload.preview .remove-file {
  display: block;
}

.fileupload .remove-file:hover {
  color: red;
}

/* richtext */
.richText .richText-editor ol,
.richText .richText-editor ul {
  margin: 0;
}

.richText .richText-help {
  display: none;
}

/* spinner */
.spinner {
  text-align: right;
}

.dropdown-menu {
  z-index: 1040;
}

/* -------------------------
 * Show-password
 * ------------------------- */

.field-password {
  position: relative;
}

.show-password {
  position: absolute;
  color: #94a3b8;
  border: 0;
  outline: none;
  top: 0;
  right: 0;
  font-family: "FontAwesome";
  font-size: 1.25rem;
  font-style: normal;
  font-weight: 400;
  background: transparent;
  padding: 0 16px;
}

.show-password:before {
  content: "\F06E";
}

.show-password.show:before {
  content: "\F070";
}

/* -------------------------
 * Validation
 * ------------------------- */
/*  */
.form-control.is-invalid,
.was-validated .form-control:invalid,
.custom-select.is-invalid,
.was-validated .custom-select:invalid {
  background: none;
  padding-right: 0.75rem;
}

.input-group.is-invalid .form-control,
.fileupload.is-invalid {
  border-color: #dc3545;
  padding-right: calc(1.5em + 0.75rem);
}

/* -------------------------
 * fieldset:disabled
 * ------------------------- */
fieldset:disabled .btn {
  cursor: default;
  background-color: #e9ecef;
}

fieldset:disabled .input-group-prepend,
fieldset:disabled .input-group-append {
  display: none;
}

fieldset:disabled .btn-spinner-plus,
fieldset:disabled .btn-spinner-min {
  border-color: none;
}

fieldset:disabled .fileupload input[type="file"] {
  cursor: default;
}

fieldset:disabled .fileupload .toolbar {
  display: none;
}

fieldset:disabled .richText-toolbar {
  display: none;
}

fieldset:disabled .richText-editor {
  background-color: #e9ecef;
}

/* -------------------------
 * Tree Picker
 * ------------------------- */
ul.picker-tree,
ul.picker-tree ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
ul.picker-tree {
  padding-left: 1rem;
}

ul.picker-tree li {
  margin: 0;
  line-height: 20px;
  border-left: 1px solid #e1e1e1;
  position: relative;
  padding-left: 2em;
}

ul.picker-tree li:last-child {
  border-left: none;
}

ul.picker-tree li:before {
  position: absolute;
  top: 0;
  left: 0;
  height: 26px;
  width: 1.25em;
  color: white;
  border-bottom: 1px solid #e1e1e1;
  content: "";
}

ul.picker-tree > li:before {
  height: 24px;
}

ul.picker-tree li:last-child:before {
  border-left: 1px solid #e1e1e1;
}

ul.picker-tree li > div {
  padding: 5px 0;
  min-height: 50px;
  line-height: 40px;
}

ul.picker-tree .collapser,
.tree-collapser,
.tree-disabled {
  position: absolute;
  top: 16px;
  bottom: 0;
  left: 0.5em;
  margin: auto 0;
  cursor: pointer;
}

.tree-disabled {
  color: #e1e1e1;
}

ul.picker-tree > li > .collapser {
  top: 14px;
}

ul.picker-tree .collapser.open:before,
.tree-collapser.open:before {
  content: "\f068";
}

.modal-picker {
  position: fixed;
  top: 0;
  left: 0;
  display: none;
  width: 100%;
  height: 100%;
  overflow: hidden;
  outline: 0;
  transition: opacity 0.15s linear;
  z-index: 1040;

  align-items: center;
}

.modal-picker.show {
  display: flex;
}

.modal-picker > .backdrop {
  position: fixed;
  top: 0;
  left: 0;
  z-index: -1;
  width: 100vw;
  height: 100vh;
  background-color: #000;
  opacity: 0.5;
}

.modal-picker > .dialog {
  position: relative;
  width: 100%;
  margin: 0 auto;
  pointer-events: none;
}

@media (min-width: 576px) {
  .modal-picker > .dialog {
    width: 500px;
    padding: 1rem;
  }
}

/*
.modal-picker-backdrop.fade {
  opacity: 0;
}
*/
.picker-content {
  position: relative;
  display: -ms-flexbox;
  display: flex;
  -ms-flex-direction: column;
  flex-direction: column;
  width: 100%;
  pointer-events: auto;
  background-color: #fff;
  background-clip: padding-box;
  outline: 0;
  height: 100vh;
}

@media (min-width: 576px) {
  .picker-content {
    border: 1px solid rgba(0, 0, 0, 0.2);
    border-radius: 0.3rem;
    max-height: 100vh;
    height: auto;
  }
}

.picker-header,
.picker-footer {
  position: relative;
  display: flex;
  align-items: center;
  height: 50px;
}

.picker-header {
  padding-left: 10px;
  justify-content: space-between;
}

.picker-search {
  display: flex;
  position: relative;
  background-color: #fff;
  color: #000;
  align-items: center;
  border-width: 0;
}

.picker-search i.fa-search {
  position: absolute;
  margin-left: 1rem;
}

.picker-search input {
  padding-left: 2.5rem;
  padding-right: 2.5rem;
  border-width: 0;
}

.picker-body {
  display: flex;
  flex-direction: column;
  padding: 15px;
  flex: 1 1 100%;
  overflow-y: auto;
}

.picker-body > ul.picker-tree {
  display: block;
}

.tree-item {
  padding: 5px 0;
  min-height: 50px;
  line-height: 40px;
  display: flex;
  justify-content: flex-start;
  align-items: baseline;
  align-content: baseline;
  flex-wrap: wrap;
}

.section-tree > .tree-item {
  padding: 0.375rem 0.75rem;
  min-height: unset;
  line-height: 1.5;
  border: 1px solid #e1e1e1;
  border-radius: 0.25rem;
  display: inline-block;
}

.tree-item.active {
  color: var(--primary);
}

.picker-body .section-tree {
  display: block;
  padding: 0;
}

.search-on .picker-body > .section-tree {
  display: none;
}

.picker-body > .section-search {
  display: none;
}

.search-on .picker-body > .section-search {
  display: block;
  overflow-y: auto;
  margin-bottom: 50px;
  padding-bottom: 1px;
  max-height: calc(100vh - 100px);
}

.select2-container--open {
  z-index: 1100;
}
