@import './lib/fontawesome.css';
@import './lib/materialdesign-icons.css';
@import './lib/vuetify.css';

.hide-scroll {
  overflow: hidden;
}

#WalletApp, #WalletSpaceApp, #WalletAdminApp {
  background: transparent;

  textarea {
    margin-bottom: 0;
  }

  label {
    margin-bottom: 0;
  }

  .v-divider--vertical {
    vertical-align: middle;
  }

  .v-messages {
    min-height: auto;
  }

  .v-select__selections {
    max-width: 80%;
  }
  .v-divider {
    margin: 0;
  }
  .layout {
    max-width: 100%;
  }

  .v-input input {
    margin-bottom: 0;
    border: 0;
    box-shadow: none;
  }
  .application--wrap {
    min-height: auto;
  }

  code {
    padding: 0;
    max-width: 100%;
  }

  #accountListContainer {
    max-width: 100%;
    box-sizing: border-box;

    .layout {
      display: inline-flex;
    }

    .accountItemContainer {
      max-width: 100%;
      width: 410px;
      margin: 0 auto 20px;

      > .v-card {
        margin: auto;
      }

      .accountItemContent {
        height: calc(100% - 110px);
      }
    }
  }

  .clickable {
    cursor: pointer;
  }

  #accountDetail {
    position: relative;

    .accountDetailSummary {
      height: auto;
      display: block;
    }
    .transactionDetailItem, .transactionDetailContent {
      height: 79px;
      padding: 4px 0;
    }
    .v-list__tile__title {
      height: 29px;
    }
    .transactionDetailContent > .v-list__tile__title {
      height: auto;
      min-height: 29px;
      white-space: normal;
    }
    .rightIcon {
      position: absolute;
      right: 0;
      top: 0;
    }

    .accountDetailIcon {
      margin-bottom: 2px;
    }

    #accountDetailTitle {
      margin: auto 0;
      padding-top: 20px;
      height: 100px;
      display: flex;
      flex-direction: column;

      > * {
        margin: auto;
      }

      .title {
        position: absolute;
        left: 0;
        top: 0;
        margin: 8px;
      }
    }

    #accountDetailActions > div {
      margin: 0 auto;
    }

    .v-bottom-nav .v-btn .v-btn__content span {
      padding: 0 10px;
    }
  }
  .v-autocomplete label {
    z-index: 1002;
  }
  .v-autocomplete__content {
    position: fixed;
    z-index: 1100 !important;
  }
  .v-btn {
    border: 0;
    padding: 0;
  }
  .v-card__text {
    box-sizing: border-box;
  }
  #accountDetailsDrawer, #contractDetailsDrawer {
    z-index: 1050;
  }
  .no-padding .v-toolbar__content {
    padding: 0;
  }

  .transactionDetailActions {
    box-sizing: border-box;
    text-align: right;
    margin-left: 5px;
    align-items: flex-end;
    width: auto;
    overflow: visible;
    height: 79px;

    div {
      width: auto;
    }
  }

  > .walletConfigurationMenu {
    top: 40px!important;
    right: 20px!important;
    left: auto!important;
  }

  .walletAccountMenu {
    top: 40px!important;
    right: 20px!important;
    left: auto!important;
  }

  #sendFundsAccount {
    position: relative;

    .v-menu__content {
      top: 72%!important;
      left: 0px!important;
      position: absolute;
      width: 100%;
      z-index: 1050 !important;
      
      .v-list {
        padding: 0;
      }
    }
  }

  #requestFundsAccount {
    position: relative;

    .v-menu__content {
      top: 72%!important;
      left: 0px!important;
      position: absolute;
      width: 100%;
      z-index: 1050 !important;
      
      .v-list {
        padding: 0;
      }
    }
  }

  .contactAutoComplete {
    position: relative;
  }

  .contactAutoCompleteContent {
    top: 55px !important;
    left: 0 !important;
    position: absolute;
    width: 100%;
    z-index: 1050 !important;

    .v-list {
      padding: 0;
    }

    .v-list__tile {
      height: 30px;
      transition: unset;
      transform: none;
    }

    .v-list__tile:hover {
      background-color: #578dc9;
      color: #fff;
      transition: unset;
      transform: none;
    }

    .v-list__tile__title {
      transition: unset;
      transform: none;
    }

    .v-list__tile__avatar {
      min-width: 25px;
    }
  }

  .v-dialog {
    overflow: visible;
    border-radius: 4px;
    transform: translate(0);
    max-width: 100vw !important;
    max-height: 100vh;
    margin: 0;
  }

  .v-dialog.with-overflow {
    overflow-y: auto;
    overflow-x: hidden;
  }

  .createNewToken {
    border-radius: 0;
    max-width: 100vw;
    max-height: 100vh;
    overflow: auto;
  }

  .uiIconClose {
    line-height: 27px;
  }

  .v-icon.uiIconBlue {
    color: #476a9c;
  }

  .alert {
    max-width: 100%;
    word-break: break-word;
    white-space: normal;

    /* To fix links baseline positions */
    .popupWithLink {
      min-height: 33px;
    }
  }

  .v-speed-dial {
    i {
      height: auto !important;
    }
    .v-btn--floating {
      width: 28px;
      height: 28px;
    }
  }

  .walletAddress {
    margin-left: 5px;
    margin-right: 5px;
  }
  .copyToClipboard {
    position:relative;
    display: inline-block;
    max-width: 100%;

    code {
      height: 15px;
      line-height: 15px;
    }
    button {
      right: 0;
      top: 0;
      border-radius: 0;
    }
    input {
      position: absolute;
      left:-9999px;
    }
  }
  .alert{
    line-height: 29px;
    display: inline-block;
    max-width: 100%;

    i {
      margin-right: 0;
    }

    [class^="uiIcon"] {
      margin-right: 15px;
    }

    .fixLinkHeight {
      min-height: 31px;
    }
  }

  #walletPrivateKey code {
    height: auto;
    font-size: 20px;
    line-height: 20px;
    margin: 0;
    padding: 0;

    &:after, &:before {
      content: none;
    }
  }

  #requestMessage {
    height: auto;
    margin: 0;
  }

  .primary--text {
    color: #578dc9 !important;
  }

  .primary:not([disabled]) {
    background-color: #578dc9 !important;
    color: #fff;
  }

  .v-text-field .v-label--active {
    top: 0;
  }

  .buttomNavigation {
   .v-btn {
      opacity: 1;
      filter: none;
    }

    .bottomNavigationItem:hover {
      color: #578dc9 !important;
    }
  }

  .errorHeadline {
    line-height: 48px!important;
  }

  .flex-center {
    word-wrap: break-word;
    white-space: pre-line;

    > * {
      width: 100%;
    }
  }

  #walletBrowserSetup {
    padding: 5px;
  }

  #walletMetamaskSetup {
    padding: 1px;

    .alert {
      margin: 20px auto 0;
      width: auto;
      max-width: fit-content;
    }
  }

  #etherTooLowWarningParent {
    position: relative;

    .etherTooLowWarning {
      top: -30px!important;
      left: -30px!important;
      width: max-content;
      width: -moz-max-content;
      z-index: 2000!important;
    }
  }
  .autocompleteSelectedItem {
    cursor: pointer;
    margin: 0 3px 3px 0;
    padding: 2px 6px;
    background: #578dc9;
    color: #fff;
    border: 1px solid #215ab2;
    border-radius: 3px;
    font-size: 15px;

    > .v-chip__content {
      height: auto;
      padding: 0;
    }
  }

  .inlineIconButton {
    margin: 0 5px 2px;
    width: 18px;
    height: 18px;

    .uiIconWarning {
      margin: 0 0 2px;
      font-size: 15px;
    }
  }

  .accountItem {
    cursor: pointer;
  }
  &.minimized {
    padding: 10px 0;

    .head-container {
      padding-left: 11px;
      font-size: 17px;
      font-weight: 400;
      color: #4d5466;
    }

    .buttomNavigation .v-dialog__activator {
      height: 100%;
    }
  }

  .transactionsList {
    overflow-x: hidden;
    overflow-y: auto;

    .v-expansion-panel__header {
      padding: 0 5px 0 0;
    }

    .v-expansion-panel {
      box-shadow: none;
    }

    .v-expansion-panel__container:first-child {
      border-top: 1px solid rgba(0,0,0,.12) !important;
    }

    .v-list {
      max-width: ~"calc(100vw - 30px)";
      display: block;
    }

    .v-bottom-nav .v-btn .v-btn__content span {
      padding: 0 10px;
    }
  }

  .additionalToolbar {
    width: 100%;

    > div {
      height: auto !important;
      padding: 0;
    }

    .alert {
      max-width: 100%;
      margin: 20px auto 0;
    }
  }

  .arrow-up-right {
    transform: rotate(45deg);
  }

  &.maximized {
    margin: 20px 20px 0;
  }

  .dynamic-height .v-list__tile {
    height: auto;
    min-height: 40px;
    
    .v-list__tile__content.align-end {
      max-width: ~"calc(100% - 110px)";
    }
  }
}

@media (min-width : 1024px) {
  #WalletApp, #WalletSpaceApp {

    &.minimized {
      max-width: 100%;

      .accountItem {
        .v-speed-dial {
          display: none;
        }
      }
      .accountItem:hover {
        .v-speed-dial {
          display: block;
        }
      }
    }
  }
}

#WalletAdminApp {
   margin: 10px 11px 0;

  .v-dialog__content {
    z-index: 100000 !important;
  }

  #initialfundsRequestMessage {
    margin-bottom: 0;
    margin-top: 4px;
  }
}

/* Override uiPopup !important attributes */
@media (max-width : 1024px) {
  #WalletAdminApp {
    .createNewToken {
      width: 100% !important;
      margin: 0 !important;
      transform: translate(0px,0px) !important;
    }
  }

  .uiPopup.v-dialog:not(.v-dialog--fullscreen) .v-card__text {
    max-height: calc(100vh - 235px);
    overflow-y: auto;
    overflow-x: hidden;
    
    > .container {
      max-width: calc(100% - 32px);
    }
  }
}