@import './common.scss';
$error_color: rgba(255,0,0,0.6);
$error_color_light: rgba(255,0,0,0.4);
$brandon-font-medium: 'Brandon Text Medium';
$brandon-font-regular: 'Brandon Text Regular';
$brandon-font-bold: 'Brandon Text Bold';

@font-face {
  font-family: 'Brandon Text Bold';
  font-style: normal;
  font-weight: normal;
  src: local('Brandon Text Bold'), url('https://prime-panel.rivigo.com/fonts/BrandonTextBold.otf') format('opentype');
}

@font-face {
  font-family: 'Brandon Text Regular';
  font-style: normal;
  font-weight: normal;
  src: local('Brandon Text Regular'), url('https://prime-panel.rivigo.com/fonts/BrandonTextRegular.otf') format('opentype');
}

@font-face {
  font-family: 'Brandon Text Medium';
  font-style: normal;
  font-weight: normal;
  src: local('Brandon Text Medium'), url('https://prime-panel.rivigo.com/fonts/BrandonTextMedium.otf') format('opentype');
}

.ui-commons {
  .form-field {
    padding-left: 75px;
    width: 100%;
    box-sizing: border-box;
    padding-bottom: 10px;
    margin: 0;
    display: block;
    transition: all 0.3s linear;
    &.required {
      .field-label:before {
        content: "*";
        color: red;
        font-size: 1.0em;
        margin-right: 2px;
      }
      &.has-error .input-group input {
        border: 1px solid red;
      }
    }
    .field-label {
      vertical-align: middle;
      font-weight: 500;
      display: block;
      margin-top: 9px;
      margin-bottom: 6px;
      font-size: 12px;
      line-height: 1.5;
      opacity: 0.7;
      color: $black-80;
      .small {
        font-size: 10px;
      }
    }
    .input-group {
      border: 0;
      padding: 0;
      vertical-align: middle;
      width: 79%;

      .select-with-search {
        transition: height 200ms cubic-bezier(0.23, 1, 0.32, 1) 0ms;
        font-size: 16px;
        width: 256px;
        height: 42px;
        display: inline-block;
        position: relative;
        line-height: 24px;
        cursor: auto;
        border: 1px solid rgb(224, 224, 224);
        font-family: Roboto, sans-serif;
        background-color: $white;
        padding: 10px;
        box-sizing: border-box;

        .material-icons {
          cursor: pointer;
        }
      }

      hr {
        // added for removing horizontal line in material select box
        display: none;
      }

      &.sub-group {
        margin-left: 20px;
      }
      .field-label.inline {
        display: inline-block !important;
        padding-right: 10px;
      }

      .text-box, .inline-button {
        height: 42px;
        box-sizing: border-box;
        background-color: $white;
        border: solid 1px $gray-e0;
      }
      .text-box.error:focus {
        @include placeholder-color($error_color);
        border: 1px solid $error_color !important;
      }
      .text-box:focus {
        @include placeholder-color($success_green);
        border: 1px solid $success_green !important;
      }
      .text-box.error {
        @include placeholder-color($error_color);
        border: 1px solid $error_color_light !important;
      }
      .text-box {
        width: 100%;
        padding: 12px 11px;
        border-radius: 2px;
        outline: none;
        transition: border-color ease-in-out .25s, box-shadow ease-in-out .25s;
        &:focus {
          border-color: rgba(0, 0, 0, 0.15);
          box-shadow: 0 1px 1px rgba(0, 0, 0, 0.075) inset, 0 0 8px rgba(0, 0, 0, 0.15);
          outline: 0 none;
        }

      }

      &.multiple {
        > * {
          margin: 0;
        }
      }

      .inline-button {
        padding: 11px 18px;
        border-left: 0;
        cursor: pointer;
      }
    }
  }

  .key {
    opacity: 0.4;
    font-family: BrandonText;
    font-size: 12px;
    font-weight: 500;
    font-style: normal;
    font-stretch: normal;
    line-height: 1.5;
    text-align: left;
    color: #000000;
  }

  .value {
    opacity: 0.9;
    font-family: BrandonText;
    font-size: 14px;
    font-weight: 500;
    font-style: normal;
    font-stretch: normal;
    line-height: 1.29;
    text-align: left;
    color: #000000;
  }

  .boundary {
    display: inline-flex;
    width: 1164.9px;
    height: 102px;
    background-color: #ffffff;
    position: relative;
    right: 11px;
    top: 5px;
  }

  .element {
    margin-top: 30px;
    margin-bottom: 30px;
    margin-left: 40px;
  }

  .transaction-card-block {
    margin-right: 120px;
  }

  .checkButton {
    font-family: BrandonText;
    font-size: 14px;
    font-weight: bold;
    font-style: normal;
    font-stretch: normal;
    color: #dd712f;
  }

  .checkText {
    width: 47px;
    height: 20px;
    font-family: BrandonText;
    font-size: 14px;
    font-weight: bold;
    font-style: normal;
    font-stretch: normal;
    color: #dd712f;
    padding-left: 18px;
    position: relative;
    top: 7px;
  }

  .categoryCheckClass {
    display: inline-flex;
  }

  .darkHeader {
    opacity: 0.7;
    font-family: BrandonText;
    font-size: 12px;
    font-weight: 500;
    font-style: normal;
    font-stretch: normal;
    line-height: 1.5;
    text-align: left;
    color: #000000;
    margin-top: 6px;
  }

  .transaction-card-block {
    margin-right: 120px;
  }

  .lightHeader {
    opacity: 0.4;
    font-family: BrandonText;
    font-size: 12px;
    font-weight: 500;
    font-style: normal;
    font-stretch: normal;
    line-height: 1.5;
    text-align: left;
    color: #000000;
    margin-bottom: 6px;
    margin-top: 30px;
  }

  .upload-hide {
    width: 46px;
    position: relative;
    right: 47px;
    height: 42px;
    opacity: 0;
  }
  .date-time-picker {

    .label {
      font-size: 13px;
      color: $black-50;
      text-transform: uppercase;
    }

    .date-time-input-group input[type="text"] {
      height: 42px;
      box-sizing: border-box;
      background-color: $white;
      border: solid 1px $gray-e0;
      padding: 0px 12px;
      color: $black-70;
      margin-top: 8px;
    }

  }

  input[type=date]::-webkit-inner-spin-button, input[type=time]::-webkit-inner-spin-button { //input[type=date]::-webkit-calendar-picker-indicator
    -webkit-appearance: none;
    display: none;
  }

  .half_width {
    display: inline-block;
    width: 50%;
  }

  .form-field.full_width {
    .Select-control {
      width: 90.6%;
    }
    .Select-menu-outer {
      width: 90.6%;
    }
    .input-group {
      width: 90.6% !important;
    }
  }

  .textarea {
    display: block;
    .input-group {
      width: 90.5%;
      input {
        height: 80px !important;
      }
    }
  }

  .search-locations {
    padding-top: 10px;
    border-bottom: 1px inset;
    width: 150px;

    .search-box {
      min-width: 79%;
      input[type="text"] {
        width: 100%;
      }
    }
  }

  .menu {
    padding: 0px !important;

    .menu-item {
      font-size: 14px !important;
      border-bottom: 1px solid #efefef !important;

      &.selected {
        color: $orange;
      }
    }
  }

  /**
  * React Select
  * ============
  * Created by Jed Watson and Joss Mackison for KeystoneJS, http://www.keystonejs.com/
  * https://twitter.com/jedwatson https://twitter.com/jossmackison https://twitter.com/keystonejs
  * MIT License: https://github.com/JedWatson/react-select
  */
  .Select {
    position: relative;
  }
  .Select,
  .Select div,
  .Select input,
  .Select span {
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    box-sizing: border-box;
  }
  .Select.is-disabled > .Select-control {
    background-color: #f9f9f9;
  }
  .Select.is-disabled > .Select-control:hover {
    box-shadow: none;
  }
  .Select.is-disabled .Select-arrow-zone {
    cursor: default;
    pointer-events: none;
    opacity: 0.35;
  }
  .Select-control {
    background-color: #fff;
    border: solid 1px #e0e0e0;
    color: #333;
    cursor: default;
    display: table;
    border-spacing: 0;
    border-collapse: separate;
    height: 42px;
    outline: none;
    overflow: hidden;
    position: relative;
    width: 100%;
  }
  .Select-control:hover {
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06);
  }
  .Select-control .Select-input:focus {
    outline: none;
  }
  .is-searchable.is-open > .Select-control {
    cursor: text;
  }
  .is-open > .Select-control {
    border-bottom-right-radius: 0;
    border-bottom-left-radius: 0;
    background: #fff;
    border-color: #b3b3b3 #ccc #d9d9d9;
  }
  .is-open > .Select-control .Select-arrow {
    top: -2px;
    border-color: transparent transparent #999;
    border-width: 0 5px 5px;
  }
  .is-searchable.is-focused:not(.is-open) > .Select-control {
    cursor: text;
  }
  .is-focused:not(.is-open) > .Select-control {
    border-color: #007eff;
    box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 0 3px rgba(0, 126, 255, 0.1);
  }
  .Select-placeholder,
  .Select--single > .Select-control .Select-value {
    bottom: 0;
    color: #aaa;
    left: 0;
    line-height: 42px;
    padding-left: 10px;
    padding-right: 10px;
    position: absolute;
    right: 0;
    top: 0;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .has-value.Select--single > .Select-control .Select-value .Select-value-label,
  .has-value.is-pseudo-focused.Select--single > .Select-control .Select-value .Select-value-label {
    color: #333;
  }
  .has-value.Select--single > .Select-control .Select-value a.Select-value-label,
  .has-value.is-pseudo-focused.Select--single > .Select-control .Select-value a.Select-value-label {
    cursor: pointer;
    text-decoration: none;
  }
  .has-value.Select--single > .Select-control .Select-value a.Select-value-label:hover,
  .has-value.is-pseudo-focused.Select--single > .Select-control .Select-value a.Select-value-label:hover,
  .has-value.Select--single > .Select-control .Select-value a.Select-value-label:focus,
  .has-value.is-pseudo-focused.Select--single > .Select-control .Select-value a.Select-value-label:focus {
    color: #007eff;
    outline: none;
    text-decoration: underline;
  }
  .Select-input {
    height: 42px;
    padding-left: 10px;
    padding-right: 10px;
    vertical-align: middle;
  }
  .Select-input > input {
    width: 100%;
    background: none transparent;
    border: 0 none;
    box-shadow: none;
    cursor: default;
    display: inline-block;
    font-family: inherit;
    font-size: inherit;
    margin: 0;
    outline: none;
    line-height: 14px;
    /* For IE 8 compatibility */
    padding: 8px 0 12px;
    /* For IE 8 compatibility */
    -webkit-appearance: none;
  }
  .is-focused .Select-input > input {
    cursor: text;
  }
  .has-value.is-pseudo-focused .Select-input {
    opacity: 0;
  }
  .Select-control:not(.is-searchable) > .Select-input {
    outline: none;
  }
  .Select-loading-zone {
    cursor: pointer;
    display: table-cell;
    position: relative;
    text-align: center;
    vertical-align: middle;
    width: 16px;
  }
  .Select-loading {
    -webkit-animation: Select-animation-spin 400ms infinite linear;
    -o-animation: Select-animation-spin 400ms infinite linear;
    animation: Select-animation-spin 400ms infinite linear;
    width: 16px;
    height: 16px;
    box-sizing: border-box;
    border-radius: 50%;
    border: 2px solid #ccc;
    border-right-color: #333;
    display: inline-block;
    position: relative;
    vertical-align: middle;
  }
  .Select-clear-zone {
    -webkit-animation: Select-animation-fadeIn 200ms;
    -o-animation: Select-animation-fadeIn 200ms;
    animation: Select-animation-fadeIn 200ms;
    color: #999;
    cursor: pointer;
    display: table-cell;
    position: relative;
    text-align: center;
    vertical-align: middle;
    width: 17px;
  }
  .Select-clear-zone:hover {
    color: #D0021B;
  }
  .Select-clear {
    display: inline-block;
    font-size: 18px;
    line-height: 1;
  }
  .Select--multi .Select-clear-zone {
    width: 17px;
  }
  .Select-arrow-zone {
    cursor: pointer;
    display: table-cell;
    position: relative;
    text-align: center;
    vertical-align: middle;
    width: 25px;
    padding-right: 5px;
  }
  .Select-arrow {
    border-color: #999 transparent transparent;
    border-style: solid;
    border-width: 5px 5px 2.5px;
    display: inline-block;
    height: 0;
    width: 0;
    position: relative;
  }
  .is-open .Select-arrow,
  .Select-arrow-zone:hover > .Select-arrow {
    border-top-color: #666;
  }
  .Select--multi .Select-multi-value-wrapper {
    display: inline-block;
  }
  .Select .Select-aria-only {
    display: inline-block;
    height: 1px;
    width: 1px;
    margin: -1px;
    clip: rect(0, 0, 0, 0);
    overflow: hidden;
    float: left;
  }
  @-webkit-keyframes Select-animation-fadeIn {
    from {
      opacity: 0;
    }
    to {
      opacity: 1;
    }
  }
  @keyframes Select-animation-fadeIn {
    from {
      opacity: 0;
    }
    to {
      opacity: 1;
    }
  }
  .Select-menu-outer {
    border-bottom-right-radius: 4px;
    border-bottom-left-radius: 4px;
    background-color: #fff;
    border: 1px solid #ccc;
    border-top-color: #e6e6e6;
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06);
    box-sizing: border-box;
    margin-top: -10px;
    max-height: 200px;
    position: absolute;
    top: 100%;
    width: 73.7%;
    z-index: 1;
    -webkit-overflow-scrolling: touch;
    font-size: 12px;
  }
  .Select-menu {
    max-height: 198px;
    overflow-y: auto;
  }
  .Select-option {
    box-sizing: border-box;
    background-color: #fff;
    color: #666666;
    cursor: pointer;
    display: block;
    padding: 8px 10px;
  }
  .Select-option:last-child {
    border-bottom-right-radius: 4px;
    border-bottom-left-radius: 4px;
  }
  .Select-option.is-selected {
    background-color: #f5faff;
    /* Fallback color for IE 8 */
    background-color: rgba(0, 126, 255, 0.04);
    color: #333;
  }
  .Select-option.is-focused {
    background-color: #ebf5ff;
    /* Fallback color for IE 8 */
    background-color: rgba(0, 126, 255, 0.08);
    color: #333;
  }
  .Select-option.is-disabled {
    color: #cccccc;
    cursor: default;
  }
  .Select-noresults {
    box-sizing: border-box;
    color: #999999;
    cursor: default;
    display: block;
    padding: 8px 10px;
  }
  .Select--multi .Select-input {
    vertical-align: middle;
    margin-left: 10px;
    padding: 0;
  }
  .Select--multi.has-value .Select-input {
    margin-left: 5px;
  }
  .Select--multi .Select-value {
    background-color: #ebf5ff;
    /* Fallback color for IE 8 */
    background-color: rgba(0, 126, 255, 0.08);
    border-radius: 2px;
    border: 1px solid #c2e0ff;
    /* Fallback color for IE 8 */
    border: 1px solid rgba(0, 126, 255, 0.24);
    color: #007eff;
    display: inline-block;
    font-size: 0.9em;
    line-height: 1.4;
    margin-left: 5px;
    margin-top: 5px;
    vertical-align: top;
  }
  .Select--multi .Select-value-icon,
  .Select--multi .Select-value-label {
    display: inline-block;
    vertical-align: middle;
  }
  .Select--multi .Select-value-label {
    border-bottom-right-radius: 2px;
    border-top-right-radius: 2px;
    cursor: default;
    padding: 2px 5px;
  }
  .Select--multi a.Select-value-label {
    color: #007eff;
    cursor: pointer;
    text-decoration: none;
  }
  .Select--multi a.Select-value-label:hover {
    text-decoration: underline;
  }
  .Select--multi .Select-value-icon {
    cursor: pointer;
    border-bottom-left-radius: 2px;
    border-top-left-radius: 2px;
    border-right: 1px solid #c2e0ff;
    /* Fallback color for IE 8 */
    border-right: 1px solid rgba(0, 126, 255, 0.24);
    padding: 1px 5px 3px;
  }
  .Select--multi .Select-value-icon:hover,
  .Select--multi .Select-value-icon:focus {
    background-color: #d8eafd;
    /* Fallback color for IE 8 */
    background-color: rgba(0, 113, 230, 0.08);
    color: #0071e6;
  }
  .Select--multi .Select-value-icon:active {
    background-color: #c2e0ff;
    /* Fallback color for IE 8 */
    background-color: rgba(0, 126, 255, 0.24);
  }
  .Select--multi.is-disabled .Select-value {
    background-color: #fcfcfc;
    border: 1px solid #e3e3e3;
    color: #333;
  }
  .Select--multi.is-disabled .Select-value-icon {
    cursor: not-allowed;
    border-right: 1px solid #e3e3e3;
  }
  .Select--multi.is-disabled .Select-value-icon:hover,
  .Select--multi.is-disabled .Select-value-icon:focus,
  .Select--multi.is-disabled .Select-value-icon:active {
    background-color: #fcfcfc;
  }
  @keyframes Select-animation-spin {
    to {
      transform: rotate(1turn);
    }
  }
  @-webkit-keyframes Select-animation-spin {
    to {
      -webkit-transform: rotate(1turn);
    }
  }

  .form-field {
    .Select-control {
      width: 79%;
    }
    .Select-placeholder {
      color: rgba(0, 0, 0, 0.7);
      font-size: 11px;
    }
    .Select-value-label {
      color: rgba(0, 0, 0, 0.7);
      font-size: 11px;
    }
  }
  .form-field.Select {
    margin-top: 15px;
  }
  .dropWidget {
    border: solid 1px #e0e0e0;
    box-sizing: border-box;
    width: 82%;
    margin-left: 75px;
    padding: 10px;
    font-size: 12px;
    font-weight: 500;
    color: #dd712f;
    text-align: center;
    margin-top: 10px;
    cursor: pointer;
  }

  .inputLength {
    text-align: right;
    font-size: 10px;
    margin: 5px 0px;
    color: #429946;
  }
  .inputLength.error {
    color: $error_color;
  }
}