label {
  margin-bottom: 0.25rem;
  cursor: pointer;
}

input[type=text],
input[type=date],
input[type=password],
input[type=number],
input[type=url],
textarea {
  display: block;
  width: 100%;
  padding: 0.375rem 0.75rem;
  border: 1px solid var(--form-input-border);
  border-radius: 5px;
  background-color: var(--form-input-bg);
  color: var(--text-color);

  &:focus {
    border-color: var(--form-input-border-focus);
    outline: none;
  }

  &.border-danger {
    border-color: var(--text-danger);
  }
  
  &.border-success {
    border-color: var(--indicator-good);
  }

  &.thin {
    width: 4rem;
  }

  &.micro {
    font-size: 14px;
    padding: 0 0.25rem;
    width: 3rem;

    &.wide {
      width: 5rem;
    }

    &.thin {
      width: 2rem;
    }
  }
}

select {
  background-color: var(--form-input-bg) !important;
}

.form-select {
  color: var(--text-color);
  background-color: var(--form-input-bg);
  border: 1px solid var(--form-input-border);
  border-radius: 3px;

  &:focus {
    border-color: var(--form-input-border-focus);
  }
}

#regAssetForm {
  input[data-tmpl=tradingTierInput] {
    width: 3em;
  }

  .readygreen {
    color: #009931;
  }

  .setuporange {
    color: #b89400;
  }
}

#confirmRegForm {
  width: 425px;

  button.submit {
    width: auto;
    padding: 12px 30px;
    border-radius: 3px;
    opacity: 0.9;

    &:hover {
      opacity: 1;
    }
  }

  input.app-pass {
    display: inline-block;
    max-width: 250px;
  }

  div.reg-conf-msg {
    width: 100%;
  }

  div.borderright {
    border-right: 1px solid #777;
  }

  .mw50 {
    max-width: 50%;
  }
}

#newWalletForm {
  width: 425px;

  [data-tmpl=walletTypeTabs] {
    .wtab.selected {
      opacity: 1;
      cursor: default;
      background-color: var(--form-selected-tab-bg);
    }

    .wtab:not(.selected) {
      opacity: 0.8;
      cursor: pointer;

      &:hover {
        opacity: 1;
      }
    }
  }

  .one-bttn {
    display: inline-block;
    font-size: 22px;
    padding: 10px 25px;
    background-color: #0b5831;
    border-radius: 5px;
    animation: glow 1.5s infinite alternate;
  }

  .one-bttn:hover {
    background-color: #0c5f36;
  }

  @keyframes glow {
    from {
      box-shadow: 0 0 4px -3px #fff7;
      opacity: 0.95;
    }

    to {
      box-shadow: 0 0 4px 0 #fff7;
      opacity: 1;
    }
  }
}

.form-check-label {
  user-select: none;
}

#forms {
  @extend .stylish-overflow;
  @extend .flex-center;

  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 25px 0;
  background-color: var(--forms-bg);
  backdrop-filter: blur(5px);
  z-index: 101;

  & > form {
    @extend .flex-stretch-column;

    box-sizing: content-box;
    margin: auto;
    position: relative;
    padding-bottom: 1rem;

    & > div {
      padding: 1rem 1rem 0;

      &.form-closer-unbound,
      &.form-closer {
        @extend .flex-center;
        @extend .hoverbg;

        cursor: pointer;
        line-height: 1;
        font-size: 0.8rem;
        padding: 0.75rem;
        position: absolute;
        top: 0;
        right: 0;
        z-index: 1;

        span {
          opacity: 0.6;

          &:hover {
            opacity: 1;
          }
        }
      }
    }

    header {
      @extend .flex-center;

      padding: 1rem;
      line-height: 1;
      border-bottom: 1px solid var(--border-color);
      font-size: 1.6rem;
    }
  }
}

div[data-handler=init],
div[data-handler=login],
div[data-handler=register] {
 #forms {
  margin-top: 70px;
  z-index: 99;
 } 
}

#walletWait {
  .icons {
    width: 25px;
  }

  .ico-check {
    color: #05a35a99;
  }
}

#dexAddrForm {
  .known-exchange {
    @extend .flex-center;

    font-size: 17px;
    padding: 5px 0;
    width: 100%;
    border: 1px solid #555;
    margin-bottom: 10px;
    border-radius: 3px;
    cursor: pointer;

    &:hover,
    &.selected {
      background-color: #7772;
    }
  }
}

#loginForm,
#authorizeAccountImportForm,
#disableAccountForm,
#discoverAcctForm {
  width: 275px;
}

#changeAppPWForm,
#resetAppPWForm,
#dexAddrForm,
#verifyForm,
#deleteArchivedRecordsForm {
  width: 325px;
}

#appPWForm {
  width: 350px;
}

#sendForm,
#vSendForm,
#exportSeedAuth,
#cancelForm,
#quickConfigForm,
#companionAppForm,
#toggleWalletStatusConfirm,
#walletWait {
  width: 375px;
}

#confirmRegistrationForm,
#regAssetForm,
#reconfigForm,
#authorizeSeedDisplay,
#seedBackupForm,
#votingForm,
#gameCodeForm {
  width: 425px;
}

a[data-tmpl=walletCfgGuide] {
  color: inherit;
  text-decoration: none;
}

#deposit {
  #copyAlert {
    margin-left: 12px;
    position: absolute;
  }
}

.mini-slider {
  padding: 0.5rem 0;
  cursor: pointer;
  user-select: none;

  div[data-tmpl=color] {
    width: 100%;
    height: 0.2rem;
    background-color: #7777;
    position: relative;
    overflow: visible;

    

    & > div[data-tmpl=track] {
      position: absolute;
      left: 0.375rem; // keep the ball inside of the color
      right: 0.375rem;
      bottom: 0;
      top: 0;
      overflow: visible;

      & > div[data-tmpl=ball] {
        width: 0.75rem;
        height: 0.75rem;
        top: 0.1rem;
        border-radius: 1rem;
        background-color: var(--text-grey);
        position: absolute;
        transform: translate(-50%, -50%);
        cursor: pointer;
      }
    }
  }

  &.small {
    div[data-tmpl=color] {
      height: 0.125rem;

      & > div[data-tmpl=track] {
        left: 0.25rem;
        right: 0.25rem;
  
        & > div[data-tmpl=ball] {
          width: 0.5rem;
          height: 0.5rem;
        }
      }
    }
  }
}

.slider-container,
.order-opt {
  border: 1px solid #424242;
  border-radius: 3px;
  padding: 4px;
  margin-top: 8px;

  & > div.disabled {
    opacity: 0.8;

    [data-tmpl=sliderBox] {
      cursor: default;

      .slider .slider-handle {
        background-color: #777b;
      }
    }
  }

  div.opt-check {
    width: 15px;
    height: 15px;
    border-radius: 7.5px;
    border: 2px solid #424242;
    margin-top: 5px;
    cursor: pointer;
  }

  .xy-range-input {
    width: 35px;
    font-size: 14px;
    height: 16px;
  }

  [data-tmpl=sliderBox] {
    cursor: pointer;

    .slider {
      margin: 10px 10px 5px;
      height: 2px;
      background-color: grey;
      position: relative;

      .slider-handle {
        position: absolute;
        height: 20px;
        width: 14px;
        top: -9px;
        border-radius: 7px;
        background-color: #2cce9c;
        border: 2px solid #424242;
      }
    }
  }
}

div[data-tmpl=scoreTray] {
  background-color: var(--buy-color);
  height: 12px;
  border-radius: 100px;
  overflow: hidden;

  div[data-tmpl=scoreWarn] {
    background-color: var(--sell-color);
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
  }
}

span[data-tmpl=scorePointer] {
  transform: translateX(-50%);

  span[data-tmpl=scoreData] {
    top: 0;
    bottom: 0;

    &.positive {
      right: calc(100% + 0.125rem);
    }

    &.negative {
      left: calc(100% + 0.125rem);
    }
  }
}

.penalty-marker {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 10%;
  width: 2px;
  z-index: 2;
  background-color: black;
}

div[data-handler=init] {
  .quickconfig-asset-logo {
    width: 25px;
    height: 25px;
  }
}

.anitoggle {
  width: 1.5rem;
  height: 0.9rem;
  border-radius: 0.45rem;
  background-color: #777a;
  cursor: pointer;

  &.on {
    background-color: var(--indicator-good);
  }

  & > div {
    position: relative;
    top: 0.1rem;
    left: 0.1rem;
    width: 0.7rem;
    height: 0.7rem;
    border-radius: 0.35rem;
    transition: left 0.5s;
    background-color: var(--section-bg);
  }

  &.on > div {
    left: 0.7rem;
  }

  &.big {
    width: 35px;
    height: 20px;
    border-radius: 10px;

    & > div {
      top: 2px;
      left: 2px;
      width: 16px;
      height: 16px;
      border-radius: 12px;
    }

    &.on > div {
      left: 17px;
    }
  }
}

.selectable.selected {
  border: 2px solid green;
}

.dynamicopts {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  flex-wrap: wrap;

  & > div {
    min-height: 55px;
  }

  & > div:not(.repeatable, [data-tmpl=checkbox]) {
    width: 47%;
  }
}

.hoveropaque {
  opacity: 0.7;

  &:hover {
    opacity: 1;
  }
}

#placementsBody td[data-tmpl=error] {
  max-width: 200px;
}

body.dark {
  ::-webkit-calendar-picker-indicator {
    filter: invert(1);
  }

  #regAssetForm {
    div.reg-asset {
      .fader {
        background-image:
          linear-gradient(
            to bottom,
            #13202b00,
            #122739
            90%
          );
      }

      &:not(.nohover):hover {
        .fader {
          background-image:
            linear-gradient(
              to bottom,
              #202c3500,
              #202c35
              90%
            );
        }
      }
    }
  }
}
