
:root {
  --sidebar-width: 250px;
  --header-nav-height: 60px;
  --footer-nav-height: 70px;
}

.pagination a {
  color: #6c757d!important;
}

.bs-dark .dropdown-menu {
  min-width: 200px;
  padding: 5px 0;
  margin: 2px 0 0;
  background-color: #343a40;
  border: 1px solid #6c757db2;
  -webkit-box-shadow: 0 6px 12px rgba(0, 0, 0, .175);
          box-shadow: 0 6px 12px rgba(0, 0, 0, .175);
}

.bs-dark .dropdown-menu .divider {
  border: 1px solid rgba(0, 0, 0, 0.8);
}
.bs-dark .dropdown-menu > li > a {
  padding: 6px 10px;
  color: rgba(255,255,255,0.80);
}
.bs-dark .dropdown-menu > li:hover,
.bs-dark .dropdown-menu > li > a:hover,
.bs-dark .dropdown-menu > li > a:focus {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  background-color: transparent;
}
.bs-dark .dropdown-menu > .active > a,
.bs-dark .dropdown-menu > .active > a:hover,
.bs-dark .dropdown-menu > .active > a:focus {
  color: rgba(255,255,255,0.70);
  text-decoration: none;
  background-color: transparent;
  outline: 0;
}

.dropdown-lg-expand .dropdown-toggle {
  margin-right: 4px;
}

@media (min-width: 1199.98px) {
  .dropdown-xl-expand .dropdown-toggle {
    display: none;
  }
  .dropdown-xl-expand .dropdown-menu {
    display: flex;
    clear: both;
    position: relative;

    background: 0;
    border: 0;
    padding: 0;
    margin: 0;
  }
  .dropdown-xl-expand .dropdown-item {
    border-width: 1px;
    padding: 0;
    margin: 0;
  }
  .dropdown-xl-expand .dropdown-item li a {
    padding: 0;
    margin: 0;
  }
}

@media (min-width: 539.98px) {
  .dropdown-lg-expand .dropdown-toggle {
    display: none;
  }
  .dropdown-lg-expand .dropdown-menu {
    display: flex;
    clear: both;
    position: relative;

    background: 0;
    border: 0;
    padding: 0;
    margin: 0;
  }
  .dropdown-lg-expand .dropdown-item {
    border-width: 1px;
    padding: 4px 8px;
    margin-right: 4px;
    border-radius: 4px;
    border: 1px solid;
    width: auto;
  }
  .dropdown-lg-expand .dropdown-item:hover {
    background: lightgray;
  }
}

.z-0 {
  z-index: 0;
}

.ui-autocomplete {
  max-height: 120px;
  overflow-y: auto;   /* prevent horizontal scrollbar */
  overflow-x: hidden; /* add padding to account for vertical scrollbar */
  z-index:1000 !important;
}

.comma:after {
  content: ',';
}

.type-NULL {
  background: rgb(181, 181, 181)!important;
}

.type-INCOMING {
  background: #82b440!important;
  white-space: nowrap;
}

.type-ASSET {
  background: #428bca!important;
  white-space: nowrap;
}

.type-LIABILITY {
  background: #f2b91f!important;
  white-space: nowrap;
}

.type-OUTGOING {
  background: #E14D43!important;
  white-space: nowrap;
}

.mock-checkbox-input {
  display: none;
}
.mock-checkbox-input + label .mock-checkbox:after {
  font-family: "Font Awesome 5 Pro";
  font-weight: 400;
  /* unchecked font */
  content: '\f0c8';
  color: gray;
}
.mock-checkbox-input:checked + label .mock-checkbox:after {
  /* checked font */
  content: '\f14a';
  color: black;
  font-weight: bold;
}
.mock-checkbox-input + label {
  border-bottom: 2px solid lightgray;
  margin: 0;
  padding: 4px 8px 4px 12px;
}
.mock-checkbox-input + label:hover {
  border-bottom-color: black;
}
.mock-checkbox-input:checked + label {
  background: rgba(211, 211, 211, 0.2);
}

.balance-positive {
  color: green;
}
.balance-negative {
  color: red;
}
.balance-dollar, .balance-eye {
  display: none;
}
.balance-dollar {
  cursor: zoom-out;
}
.balance-eye{
  cursor: zoom-in;
}

#form-list {
  display: flex;
  flex-flow: column;
}
#list-order-btn {
  display: flex;
  flex-flow: column;
}
#list-order-btn > *:last-child {
  display: none;
}
#list-order-btn.flex-column-reverse > *:first-child {
  display: none;
}
#list-order-btn.flex-column-reverse > *:last-child {
  display: block;
}

/*** layout_list ***/
#wrapper-window {
  display: flex;
  flex-flow: column;

  min-height: 100vh;
}

#header {
  flex: initial;
  min-height: var(--header-nav-height);
}
#footer {
  flex: initial;
  min-height: var(--footer-nav-height);
}

#wrapper {
  flex: 1;
  display: flex;
  position: relative;
}

#sidebar {
  width: var(--sidebar-width);
  flex: 0 0 var(--sidebar-width);
  overflow-y: auto;

  align-self: flex-start;
  position: sticky;
  top: var(--header-nav-height);

  overflow-x: hidden;
  overflow-y: auto;
  max-height: calc(100vh - var(--header-nav-height) - var(--footer-nav-height));

  background: white;
}

#sidebar .link-1 {
  padding: 16px;
}
#sidebar .link-2 {
  padding-top: 5px;
  padding-left: 1rem;
  padding-bottom: 10px;
}
#sidebar .link-1 > li > div,
#sidebar .link-2 > li {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
#sidebar .link-1 > li > div > a:first-child,
#sidebar .link-2 > li > a:first-child {
  flex: 1;
  color: black;
}

#dismiss {
  position: fixed;
  top: var(--header-nav-height);
  left: calc(var(--sidebar-width) + 1rem);
  color: lightgray;
  font-size: 5rem;
  z-index: 999;
}

#dimmer {
  position: fixed;
  /* full screen */
  width: 100vw;
  height: 100vh;
  /* transparent black */
  background: rgba(0, 0, 0, 0.7);
  /* middle layer, i.e. appears below the sidebar */
  z-index: 998;
  opacity: 0;
  top: 0;
  /* animate the transition */
  transition: all 0.5s ease-in-out;
}

#content {
  flex: 1;
  width: calc(100vw - var(--sidebar-width));
}

@media (max-width: 767.98px) {
  #content {
    flex: 1;
    width: 100vw;
  }
  #sidebar {
    margin-right: calc(0px - var(--sidebar-width));
    height: calc(100vh - var(--header-nav-height));
    max-height: 100vh;

    position: fixed;
    top: var(--header-nav-height);
  }
  #dimmer.active {
    opacity: 1.0;
    z-index: 1019;
  }
}

/*** list_transaction ***/

#selected-status {
  white-space: nowrap;
  margin-bottom: -20px;
  margin-right: -200px;
  font-size: 10pt;
  text-align: left;
  display: none;
  padding: 6px;

  z-index: 999;
}

.transaction {
  display: flex;
  align-items: baseline;
  font-family: Consolas, monospace;

  flex-wrap: wrap;
}
.transaction .col-space {
  flex: 1;
}
.transaction .col-checkbox {
  flex: 0 0;
  margin-right: 5px;
}
.transaction .col-time {
  flex: 0 0 0;
  white-space: nowrap;
  margin-right: 5px;

  position: relative;
}
.transaction .col-time sup {
  position: absolute;
  top: 0;
  left: 0;
  color: gray;
}
.transaction .col-status {
  flex: 0 0 1.2rem;
}
.transaction .form-invalid a {
  color: red;
}
.transaction .col-value {
  flex: 1 0 7rem;
  margin-right: 5px;

  display: flex;
  flex-flow: column;
  align-items: flex-end;
}
.transaction .col-value .text-secondary {
  margin-left: -55rem;
  white-space: nowrap;
}
.transaction .col-from-to {
  flex: 1 1 12rem;
  margin-right: 5px;

  display: flex;
  justify-content: space-between;
}
.transaction .col-from-to > span {
  padding: 0 4px;
}
.transaction .col-from-to .account-name {
  color: white;
  font-size: 0.8rem;
  border-radius: 3px;
  padding: 2px 6px;
}
.transaction .col-description {
  flex: 10 1 5rem;
}
.transaction .col-create-time {
  flex: 1 1 auto;
  font-size: 0.8rem;
  margin-right: 5px;
  text-align: right;
  min-width: 0;
}

@media (max-width: 991.98px) {
  .transaction {
    font-size: 0.8rem;
  }
  .transaction .col-space {
    display: none;
  }
  .transaction .col-lg-break {
    width: 10px;
    flex: 0 0 100%;
    background: red;
  }
  .transaction .col-time {
    flex: 0 1 3.5rem;
    color: gray;
  }
  .transaction .col-status {
    color: gray;
  }
  .transaction .col-value {
    flex: 1 1 15%;
    font-weight: bold;
  }
  .transaction .col-from-to {
    flex: 1 1 45%;

    display: flex;
    flex-wrap: nowrap;
    justify-content: center;
    overflow: hidden;

    max-width: 45%;
    margin-left: auto;
  }
  .transaction .col-from-to .account-name {
    font-size: 0.64rem;
  }
  .transaction .col-description {
    padding-top: 4px;
    padding-left: 0.5rem;
    color: gray;
    text-align: right;
  }
  .transaction .col-create-time {
    color: gray;
    margin-left: auto;
    flex-basis: auto;
  }
}

/*** form_transaction ***/
.form-money-transfer,
.form-money-transfer-not1 {
  display: none;
}
.form-money-transfer-btn {
  border: 1px lightgray dashed;
  cursor: pointer;
  font-size: 0.8em;
}

#fast-draft-container {
  flex-shrink: 0;
  width: 45%;

  display: flex;
}
#fast-draft-input {
  flex: 1 0;
  background: white;
  padding: 8px;
}

.bk-tag {
  padding-left: 5px;
  background: white;
  position: relative;
  padding: 2px;
  border: 1px LightGray solid;
  border-radius: 2px;

  display: inline-block;
  min-width: 50px;
}
.bk-tag > span {
  display: inline-block;
}
.bk-tag > span:after {
  display: inline-block;
  width: 5px;
  content: '.';
  color: white;
  background: white;
  font-size: 0.001em;
}
.bk-tag:after {
  content: 'test';
  display: inline-block;
  position: absolute;
  top: -1.5em;
  left: 0;
  font-size: 12px;
  white-space: nowrap;

  color: white;
  background: gray;
  padding: 2px;
}
div#fast-draft-input:before {
  content: '.';
  color: white;
}
div#fast-draft-input strong.time {
  font-size: 1em;
}

.fast-draft-candidate-item .break:after {
  content: '⟹';
}

/*** list_account ***/
.group {
  font-size: 0.75rem;
  padding: 0.2rem;
  background: #e9ecef;
  color: #495057;
  border: 1px solid #ced4da;
  border-radius: 0.7rem 0 0 0.7rem;
  white-space: nowrap;
}

.account {
  display: flex;
  flex-wrap: wrap;

  width: 100%;
}
.account > div {
  margin-right: 8px;
}
.account .col-type {
  width: 1.7rem;
  height: 1.7rem;
  flex: 0 0 1.7rem;
}
.account .col-name {
  min-width: 10rem;
}
.account .col-group {
  margin-right: auto;
}
.account .col-group .group {
  margin-left: 5px;
}

@media (max-width: 991.98px) {
  .account > div {
    margin-right: 4px;
  }
  .account .col-name {
    font-size: 0.8rem;

    min-width: 0;
    flex: 0 1 auto;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .account .col-group {
    display: flex;
    flex-direction: row-reverse;

    flex: 0 1 auto;
    min-width: 0;
    overflow: hidden;

    margin-right: 0;
    margin-left: auto;
  }
}

/*** form_account_group ***/
#group-edit .name {
  width: 100px;
  font-size: 1rem;
  text-align: right;
  margin-right: 1rem;

  flex: 0 0 auto;
}

#group-edit .radio {
  min-width: 0;
  flex: 0 1 75px;

  display: flex;
}

#group-edit .name label {
  width: 100%;
  background: #e9ecef;
  color: #495057;
  border: 1px solid #ced4da;
  border-radius: 0.7rem 0 0 0.7rem;
}

#group-edit label {
  margin: 0;
  padding: 0;
}

#group-edit .radio input {
  display: none;
}

#group-edit .radio label {
  border: 2px lightgray solid;
  flex: 1 1 auto;
  text-align: center;
  margin-left: 5px;
}

#group-edit input:disabled + label {
  text-decoration:line-through;
  color: gray;
}

#group-edit input[data-default] + label {
  border-style: dashed;
}
#group-edit input[data-default]:checked + label {
  background: lightgray;
  border-color: black;
}

#group-edit input:checked + label {
  border-style: solid;
}

#group-edit input[data-changed]:checked + label {
  background: #007bff;
  color: white;
}

#group-edit > label:hover {
  background: rgba(211, 211, 211, 0.26);
}

#group-edit .radio input[data-default] + label:hover,
#group-edit .radio input[data-changed] + label:hover {
  border-color: #eee;
  background: #007bffee;
  color: white;
}

#group-edit input:disabled + label:hover {
  cursor: not-allowed;
}

/*** list_activity ***/
#bkactivties .item a {
  display: block;
  color: black;
  height: auto;
  width: 100%;
}
#bkactivties .item:hover {
  background: lightgray;
}