$font-size-large: 20px;
$font-size-mid-large: 18px;
$font-size-normal: 16px;
$font-size-small: 14px;
$font-size-very-small: 12px;
$text-grey: #7b7b7b;

body {
    margin: 0 auto;
    padding: 0px;
    overflow-y: auto;
    color: #000;
    font-family: 'Prompt';
    font-size: $font-size-normal;
    font-weight: lighter;
    background-color: #f6f6f6;
    overflow-x: hidden;
}

.BGmodel {
  top: 0;
  left: 0;
}

a {
    color: #000;
    border: none;
    outline: none;
    text-decoration: none;
    &:link, &:visited {
        outline: none;
        color: #000;
        text-decoration: none;
    }
    &:hover {
        color: #000;
        text-decoration: none;
    }
}
input:focus, textarea:focus {
    outline: 0;
}

.clear{clear: both;}
.no-padding{
    margin: 0px;
    padding: 0px;
}
.flex{
  display: flex;
}
.hide{
  display: none !important;
}
.btn.active.focus, .btn.active:focus, .btn.focus, .btn:active.focus, .btn:active:focus, .btn:focus{
  outline: 0 !important;
  outline-offset: 0 !important;
  box-shadow: unset !important;
}

.loading{
  position: fixed;
  z-index: 999999999;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  background-color: rgba(0,0,0,0.75);
  display: flex;
  justify-content: center;
  align-items: center;
  &:after{
    content: '';
    display: block;
    position: absolute;
    width: 30px;
    height: 30px;
    -webkit-mask-size: contain !important;
    mask-size: contain !important;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-position: center;
    background-color: #fff;
    -webkit-mask-image: url('../../imgs/loading_02.svg');
    mask-image: url('../../imgs/loading_02.svg');
  }
  &:before{
    content: '';
    display: block;
    position: relative;
    margin: 10% auto;
    width: 60px;
    height: 60px;
    border-radius: 40px 40px 0px 40px;
    -webkit-box-sizing: border-box;
    border: solid 7px rgba(0, 0, 0, 0.3);
    
    -webkit-animation: loading 1s infinite ease-in-out;
  }

  @-webkit-keyframes loading {
    0% {
     border-color: rgba(0, 0, 0, 0.3);
    }
    25% {
      border-top-color: #fff;
      border-right-color: rgba(0, 0, 0, 0.3);
      border-bottom-color: rgba(0, 0, 0, 0.3);
      border-left-color: rgba(0, 0, 0, 0.3);
    }
    50% {
      border-top-color: #fff;
      border-right-color: #fff;
      border-bottom-color: rgba(0, 0, 0, 0.3);
      border-left-color: rgba(0, 0, 0, 0.3);
    }
    75% {
      border-top-color: #fff;
      border-right-color: #fff;
      border-bottom-color: #fff;
      border-left-color: rgba(0, 0, 0, 0.3);
    }
    100% {
      border-color: #fff;
      border-right-color: #fff;
      border-bottom-color: #fff;
      border-left-color: #fff;
    }
  }
}

#main{
  position: relative;
    // display: flex;
    // flex-direction: column;
    // justify-content: center;
    // height: 100vh;
}

.bodysection{
    // width: calc(85vh + 400px + 45px);
    min-width: 993px;
    width: 85%;
    max-width: 1600px;
    
    margin: 0 auto;
    min-height: 85vh;
    border: 1px solid #e9e9e9;
    border-width: 1px 0;
    display: flex;
}

.leftMenu{
    width: 30%;
    // background: #f2f2f2;
    border-right: 1px solid #e9e9e9;
    position: relative;

    &__title{
        font-weight: bold;
        font-size: $font-size-large;
        margin: 20px 0;
    }
}
.content{
    width: 70%;
    background: #fff;
    overflow-y: scroll;

    &__title{
        font-weight: bold;
    }
    &__subtitle{
        font-size: $font-size-normal;
    }
}

#toast{
  position: fixed;
  z-index: 99999;
  top: 12%;
  right: 10%;
  border-radius: 3px;
  min-width: 250px;
  max-width: 80%;
  padding: 10px 20px;
  text-align: center;
  color: #fff;
  font-size: 13px;
  box-shadow: 2px 2px 3px rgba(0,0,0,.3);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: .9;
  animation: slide-top 0.5s cubic-bezier(0.250, 0.460, 0.450, 0.940) both;
  display: none;
}

#toast span{
  max-width: 88%;
}

#toast:before{
  content: '';
  width: 20px;
  height: 20px;
  display: inline-block;
  margin-right: 10px;
  background-size: cover;
  background-repeat: no-repeat;
}
#toast.success:before{
  background-image: url('../../imgs/icon_toast_success.svg');
}
#toast.warning:before{
  background-image: url('../../imgs/icon_toast_warning.svg');
}
#toast.error:before{
  background-image: url('../../imgs/icon_toast_error.svg');
}
#toast.success{
  background: #80b435;
}
#toast.warning{
  background: #d5a011;
}
#toast.error{
  background: #da2828;
}
#toast.condition{
  background: #0166d0;
}

.dropdown{
    .caret{
      width: 9px;
      height: 6px;
      transition: all 0.3s;
      background: url('../../imgs/down.svg') no-repeat;
      border: 0;
    }
    span.text{
        padding-right: 20px;
    }
    .btn-default{
        border: 0;
    }
}

.dropdown.open .caret{
  transform: rotate(180deg);
}

$switch_blue-theme: rgb(3, 155, 229);

/* Important switch stuff */
// input[type=checkbox].switch + label{
//   width: 34px;
//   height: 14px;
//   background: lightgray;
//   display: inline-block;
//   border-radius: 10px;
//   position: -webkit-sticky;
//   position: sticky;
//   cursor: pointer;
//   margin: 10px;
//   &:before,
//   &:after{
//     content: "";
//     display: inline-block;
//     width: 20px;
//     height: 20px;
//     background: white;
//     border-radius: 50%;
//     position: absolute;
//     top: -3px;
//     left: 0;
//     transition: all .2s;
//   }
//   &:after{
//     box-shadow: 0px 1px 3px 0px rgba(0, 0, 0, 0.2), 0px 1px 1px 0px rgba(0, 0, 0, 0.14), 0px 2px 1px -1px rgba(0, 0, 0, 0.12);
//   }
//   &:before{
//     background: lightgray;
//     transform: scale3d(0,0,1);
//   }
//   &:active:before{
//     transform: scale3d(3,3,1);
//     opacity: 0;
//   }
// }
// input[type=checkbox].switch{
//   display: none;
//   &:checked + label{
//     background: rgba($switch_blue-theme, 0.5);
//     &:before,
//     &:after{
//       left: 14px;
//       background: $switch_blue-theme;
//     }
//   }
//   &:disabled + label{
//     opacity: 0.4;
//     cursor: not-allowed;
//   }
// }
.switch{
  position: relative;
  display: flex;
  input[type=checkbox]{
    height: 100%;
    width: 100%;
    position: absolute;
    opacity: 0;
  }
  
  label {
    cursor: pointer;
    text-indent: -9999px;
    width: 35px;
    height: 19px;
    background: grey;
    border-radius: 100px;
    position: relative;
    display: flex;
    align-items: center;
    margin: 0 5px;
    left: unset;
    top: unset;
  }
  
  label:after {
    content: '';
    position: absolute;
    left: 2px;
    width: 15px;
    height: 15px;
    background: #fff;
    border-radius: 50%;
    transition: 0.3s;
  }
  
  input:checked + label {
    background: #9ecc3b;
  }
  
  input:checked + label:after {
    left: calc(100% - 2px);
    transform: translateX(-100%);
  }
}

.styled-checkbox {
  position: absolute; // take it out of document flow
  opacity: 0; // hide it

  & + label {
    position: relative;
    cursor: pointer;
    padding: 0;
      display: flex;
  align-items: center;
  font-weight: normal;
    font-size: 13px;
  }

  // Box.
  & + label:before {
    content: '';
    margin-right: 10px;
    display: inline-block;
    vertical-align: text-top;
    width: 20px;
    height: 20px;
    background: white;
    border-radius: 5px;
  }

  // Disabled state label.
  &:disabled + label {
    color: #b8b8b8;
    cursor: auto;
  }

  // Disabled box.
  &:disabled + label:before {
    box-shadow: none;
    background: #ddd;
  }

  // Checkmark. Could be replaced with an image
  &:checked + label:after {
    content: '';
    position: absolute;
    left: 5px;
    background: black;
    width: 2px;
    height: 2px;
    box-shadow:
      2px 0 0 black,
      4px 0 0 black,
      4px -2px 0 black,
      4px -4px 0 black,
      4px -6px 0 black,
      4px -8px 0 black;
    transform: rotate(45deg);
  }

  &:indeterminate + label:after {
    content: '';
    position: absolute;
    left: 3px;
    top: 9px;
    background: black;
    width: 10px;
    height: 2px;
  }
}

.alertMessage{
  position: fixed;
  top: 0;
  background-color: rgba(0,0,0,0.8);
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  z-index: 2000;
  text-align: center;

  &__text{
    margin-bottom: 40px;
  }

  &__submit{
    display: inline-block;
    background: #00bcd4;
    color: #fff !important;
    border-radius: 5px;
    margin-right: 15px;
    padding: 10px;
    width: 35%;
    text-align: center;
  }
  &__cancel{
    display: inline-block;
    background: #ddd;
    border-radius: 5px;
    padding: 10px;
    width: 35%;
    text-align: center;
  }

  .popup{
    width: 400px;
    max-width: 90%;
    background: #fff;
    margin: 0 auto;
    padding: 30px;
    border-radius: 3px;
  }
}

.popupModel{
  display: none;
  position: absolute;
  top: 0;
  left: 0;
  z-index: 999;

  .BGmodel{
    top: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0,0,0,0.8);
      position: fixed;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .popup{
    background: #fff;
    padding: 30px 40px;
    max-width: 90%;
    position: relative;

    &__title{
      font-size: $font-size-large;
      font-weight: bold;
      margin-bottom: 15px;
    }
    &__remake{
      text-align: right;
      font-size: 9px;
      margin-bottom: 3px;
    }
    &__remark{
      font-size: $font-size-normal;
    }

    &__contrl{
      display: flex;
      justify-content: space-between;
      margin-top: 30px;

      &--save{
        background: #00bcd4;
        color: #fff;
        padding: 12px 1.6em;
        border-radius: 3px;
        cursor: pointer;
        font-size: $font-size-small;
      }
      &--ok{
        background: #00bcd4;
        color: #fff;
        padding: 12px 1.6em;
        border-radius: 3px;
        cursor: pointer;
        font-size: $font-size-small;
      }
      &--cancel{
        background: #ddd;
        padding: 12px 1.6em;
        border-radius: 3px;
        cursor: pointer;
        font-size: $font-size-small;
      }
      &--clear{
        padding: 12px 1.6em;
        text-decoration: underline;
        cursor: pointer;
        font-size: $font-size-small;
      }
    }

    .modal-close{
      position: absolute;
      right: 30px;
    }
  }
}
.modal-content{
  max-width: 96vw;
}

.btnAdd{
  border: 0;
  background: #004f9c;
  color: #fff !important;
  padding: 8px 15px;
  border-radius: 3px;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  font-size: 14px;
  &:after{
    content: '+';
    margin-left: 10px;
    font-size: 1.6em;
    line-height: .9em;
  }
}

@media only screen and (max-width: 992px){
  #main{
      display: block;
  }
  .bodysection{
      width: 100%;
      max-width: 450px;
      min-width: 100vw;
      height: unset;
      display: block;
  }
  .leftMenu{
      width: 100%;
      border: 0;
  }
  .content{width: 100%;}

  .styled-checkbox {
    &:indeterminate + label:after {
      top: 7.5px;
    }
  }
  // .popupModel{
  //   .popup{
  //     max-height: 90vh;
  //     overflow-y: scroll;

  //     &__contrl{
  //       font-size: 12px;
  //     }
  //     // ---- popup QRcode
  //     &__qrcode{
  //       display: inherit;
  //       input{
  //         width: 100%;
  //       }
  //       &--copy{
  //         margin-left: 0;
  //         margin-top: 10px;
  //         text-align: center;
  //         justify-content: center;
  //       }
  //       &--qr{
  //         margin-left: 0;
  //         margin-top: 10px;
  //         text-align: center;
  //         justify-content: center;
  //       }
  //     }
  //   }
  // }
}
/* ----------- iPad Portrait ----------- */
@media only screen and (min-device-width : 768px) and (max-device-width : 1024px) and (orientation : portrait) {
  .bodysection{
    min-width: unset;
  }
}
@media only screen and (width: 1024px){
    #main{
        // padding: 0 20px;
    }
    .bodysection{
        max-width: 984px;
    }
    #perview{
      max-width: 984px;
      margin: 0 auto;
    }
}

// --------- annimation ------------------------
@keyframes slide-top {
  0% { transform: translateY(0);opacity: 0;}
  100% {transform: translateY(-10px);opacity: 1; }
}
// --------- end annimation --------------------

// ------------------------------------------- Radio --------------------------------------------------------
.radiogroup{
  margin-bottom: 15px;
  width: 100%;

}
.radiogroup label{
  position: unset;
  top: 0;
  margin: 7px 0;
  transition: unset;
  display: flex;
  align-items: center;
  font-size: 15px;
}

input[type="radio"] {
  -webkit-appearance: none;
  -moz-appearance: none;
  -ms-appearance: none;
  -o-appearance: none;
  appearance: none;
  position: relative;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  height: 20px;
  width: 20px;
  background: #fff;
  border: none;
  color: #fff;
  cursor: pointer;
  display: inline-block;
  margin: 0 0.5em 0 0;
  outline: none;
  border-radius: 50%;
  transition: all 0.2s ease-in-out;
  border: 1px solid #000;
}
input[type="radio"]:hover {
  background: #039be5;
  border-color: #039be5;
}
input[type="radio"]:checked {
  background: #039be5;
  border-color: #039be5;
}
input[type="radio"]:focus{
  outline: unset;
}

// ------------------------------------------- End Radio -------------------------------------------------
.loader{
    background: rgba(0, 0, 0, 0.5);
    width: 100vw;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: fixed;
    z-index: 999;
}
.loader::after{
    content: '';
    border: 16px solid #f3f3f3; /* Light grey */
    border-top: 16px solid #3498db; /* Blue */
    border-radius: 50%;
    width: 120px;
    height: 120px;
    animation: spin 2s linear infinite;
}

