/**
 * Bookit Dashboard
 */

/** Colors **/
$base-color: #006666;
$base-bg-color: #f0f8f8;
$border-color: #dfe6e9;
$green: #2cbf70;
$red: #d94141;
$white: #ffffff;
$grey: #dddddd;
$black: #272727;

/** Fonts **/
@mixin small-font {
  font-size: 12px;
  line-height: 14px;
}
@mixin smaller-font {
  font-size: 14px;
  line-height: 16px;
}
@mixin normal-font {
  font-size: 16px;
  line-height: 19px;
}
@mixin big-font {
  font-size: 18px;
  line-height: 21px;
}


/** admin notice **/
.notice{
  &.bookit-pro-notice{
    display: flex;
    justify-content: flex-start;
    align-items: center;
    border: 1px solid $red;
  }
  p{
    padding: 10px;
    font-weight: 700;
    line-height: 20px;
    width: 90%;
    @include normal-font;
  }
  i{
    &.warning{
      display: inline-block;
      background: url("icons/warning.svg") no-repeat center;
      background-size: contain;
      width: 30px;
      height: 30px;
      margin-right: 3px;
      vertical-align: text-bottom;
    }
  }
}
#bookit-dashboard-app {
  width: 100%;

  // Display
  .display-block        { display: block !important; }
  .display-inline       { display: inline !important; }
  .display-inline-block { display: inline-block !important; }

  // Alignment
  .text-left            { text-align: left; }
  .text-right           { text-align: right; }
  .text-center          { text-align: center; }
  .text-justify         { text-align: justify; }
  .text-nowrap          { white-space: nowrap; }
  .float-left           { float: left; }
  .float-right          { float: right; }

  // Transformation
  .text-lowercase       { text-transform: lowercase !important; }
  .text-uppercase       { text-transform: uppercase !important; }
  .text-capitalize      { text-transform: capitalize !important; }

  // Font Style
  .text-bold            { font-weight: bold; }
  .text-normal          { font-weight: normal; }
  .text-italic          { font-style: italic; }

  // Transformation
  .slide-leave-active,
  .slide-enter-active   { transition: .2s; }
  .slide-enter-active   { transition-delay: .2s; }
  .slide-enter          { transform: translate(100%, 0); }
  .slide-leave-to       { transform: translate(-100%, 0); }

  // Margins
  .mt-small             { margin-top: 5px; }
  .mt-medium            { margin-top: 10px; }
  .mt-large             { margin-top: 15px; }
  .mb-small             { margin-bottom: 5px; }
  .mb-medium            { margin-bottom: 10px; }
  .mb-large             { margin-bottom: 15px; }


  .print-only           { display: none; }
  &:after               { clear: both; }

  .noselect {
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
  }

  a {
    text-decoration: none;
    transition: ease-in 0.1s;
    &:active,
    &:focus {
      outline: 0;
      box-shadow: none;
    }
  }

  /* Grid System */
  .bookit-row {
    display: flex;
    justify-content: space-between;

    &.not-active{
      opacity:0.5;
      pointer-events: none;
    }

    &.normal{
      justify-content: unset;
    }
    &.flex-start {
      align-items: flex-start;
    }
    > div {
      width: 100%;
      padding-left: 5px;
      padding-right: 5px;
      &.no-padding {
        padding-left: 0;
        padding-right: 0;
      }
      &.col-3-4 {
        width: 75%;
      }
      &.col-2-3 {
        width: 66.6%;
      }
      &.col-2 {
        width: 50%;
      }
      &.col-3 {
        width: 33.3%;
      }
      &.col-4 {
        width: 25%;
      }
      &.col-5 {
        width: 20%;
      }
      &.group-title{
        display: block;
        margin: 0 0 30px 0;
        @include normal-font;
        color: $black;
        font-weight: 700;
        width: 100%;
        text-transform: uppercase;
      }
    }
  }

  .error {
    color: $red;
    font-size: 16px;
  }
  h2 {
    @include big-font;
    font-weight: bold;
    color: $black;
  }

  .bookit-wrapper {
    position: relative;
    min-height: 300px;
    padding: 10px 0;
    margin-right: 20px;
    border-radius: 4px;
    box-shadow: 0 3px 6px 0 rgba(0, 0, 0, 0.16);
    background-color: $white;
    &.no-height {
      min-height: 100px;
      padding-bottom: 0;
    }
    .bookit-header {
      padding: 10px 20px;
      border-bottom: 1px solid $grey;
      h4 {
        @include big-font;
        margin: 10px 0;
      }
      .bookit-button {
        margin-left: 5px;
      }
    }
    .bookit-footer {
      padding: 10px 20px;
    }
    .bookit-categories-wrapper {
      .bookit-categories {
        padding: 20px;
        .bookit-category {
          display: inline-block;
          background: rgba(255, 212, 0, 0.2);
          border-radius: 4px;
          padding: 0 10px;
          margin: 0 10px 10px 0;
          position: relative;
          .category-item {
            display: inline-flex;
            align-items: center;
            input {
              cursor: pointer;
              background: transparent;
              border: none;
              border-radius: 0;
              padding: 0 5px;
              color: $base-color;
              font-weight: 500;
              &:focus {
                cursor: text;
                border: none;
                box-shadow: 0 2px 2px -2px $base-color;
              }
            }
            .delete-icon{
              content: "";
              -webkit-mask-repeat: no-repeat;
              mask-repeat: no-repeat;
              -webkit-mask-position: right;
              mask-position: right;
              width: 18px;
              height: 18px;
              display: block;
              float: right;
              cursor:pointer;
              background-color:rgba(0, 102, 102, 0.6);
              -webkit-mask-image: url("icons/reject.svg");
              mask-image: url("icons/reject.svg");
            }
          }
        }
      }
      .bookit-category-form {
        padding: 20px;
        background: $base-bg-color;
      }
    }

    // Form Fields
    @import 'components/form';
    @import 'components/view';
    @import 'components/popup';
    /** Settings */
    &.bookit-settings {
      padding: 0 0 20px;
      .bookit-row {
        &.settings {
          max-width: 750px;
        }
        &.payment-settings {
          max-width: 750px;
          margin-bottom: 20px;
        }
      }
      .bookit-button {
        margin-top: 20px;
      }
      .bookit-tabs-details {
        .big-label {
          @include normal-font;
          text-transform: capitalize;
          &.switcher {
            margin-top: 10px;
            margin-bottom: 0;
          }
        }
        input[readonly] {
          font-size: 16px;
          margin-top: 20px;
          width: 100%;
          background: $grey;
          border-radius: 0;
          &:focus {
            outline: 0;
            box-shadow: none;
          }
          &.small {
            width: auto;
            min-height: auto;
            padding: 2px 4px;
            margin-bottom: 4px;
            border-radius: 2px;
            font-size: 14px;
            cursor: -webkit-grab;
            cursor: pointer;
            background: $base-bg-color;
            border: 1px dashed $grey;
            text-align: center;
          }
        }
        @import "components/settings";
      }
    }

    /** Switcher */
    .bookit-switch {
      position: relative;
      margin-right: 5px;
      display: inline-block;
      label {
        width: 35px;
        height: 20px;
        background: $grey;
        position: relative;
        border-radius: 46px;
        margin-bottom: 1px;
        display: inline-block;
        -webkit-transition: 0.2s;
        transition: 0.2s;
        &:after {
          content: '';
          background: #fff;
          top: 0;
          left: 0;
          width: 20px;
          height: 20px;
          position: absolute;
          border-radius: 100%;
          z-index: 2;
          box-shadow: 0 0 5px rgba(0, 0, 0, 0.2);
          -webkit-transition: 0.2s;
          transition: 0.2s;
        }
      }
      input {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        height: 100%;
        z-index: 5;
        opacity: 0;
        cursor: pointer;
        &:checked + label:after {
          background: #fff;
          left: 15px;
        }
        &:checked + label {
          background: $base-color;
        }
      }
    }

    /** Color Picker */
    @import "components/colorpicker";

    /** Documentation */
    @import 'components/documentation';


    /** Addon features */
    @import 'components/addon-feature';

    /** Pro Features */
    .disabled {
      opacity: 0.5;
      cursor:not-allowed;
      .round-link-icon, button{
        cursor: not-allowed;
      }
      .bookit-row{
        .form-group{
          button, label, textarea{
            cursor: not-allowed;
          }
          input, input[readonly]{
            cursor: not-allowed;
          }
        }
      }

      input{
        cursor: not-allowed;
      }
      + .pro-feature {
        position: absolute;
        left: 300px;
      }
    }
    .pro-feature {
      z-index: 99;
      .lock-icon {
        display: inline-block;
        background: url("icons/lock.svg") no-repeat center;
        background-size: contain;
        width: 18px;
        height: 18px;
        margin-right: 3px;
        vertical-align: text-bottom;
      }
      span {
        @include smaller-font;
      }
      .bookit-button {
        margin-left: 15px;
      }
    }

  }

  /* Round icon tip */
  .round-link-icon {
    background-color:$white;
    color:$base-color;
    border: 1px solid $base-color;
    width:16px;
    height:16px;
    display:flex;
    border-radius:100%;
    font-size:14px;
    justify-content: center;
    align-items: center;
    margin-left: 10px;
    cursor: pointer;
  }


  /* Info popup */
  .info-tip {
    background-color: #ffd50030;
    border-radius: 4px;
    -moz-border-radius: 4px;
    -webkit-border-radius: 4px;
    color: $base-color;
    float: left;
    position: relative;
    padding: 10px;
    margin-top: 5px;
    width: calc(100% + 2px);
    text-align: center;
    box-sizing: border-box;
    &.payments{
      margin: 30px 0;
    }
    &.width-lower{
      width: calc(100% - 20px);
    }
  }

  /* Error popup with top arrow style */
  .error-tip, .error-tip-for-input-group {
    background: $red;
    border-radius: 7px;
    -moz-border-radius: 7px;
    -webkit-border-radius: 7px;
    display: inline;
    color: $white;
    float: right;
    position: relative;
    padding: 5px 20px;
    margin-top: 5px;
    &::after {
      content: '';
      width: 0;
      height: 0;
      display: block;
      position: absolute;
      z-index: 10;
      border: 0;
      border-left: 8px solid transparent;
      border-right: 8px solid transparent;
      border-bottom: 10px solid $red;
      right: 0;
      top: -5px;
      margin-right: 15px;
    }
  }

  .error-tip-for-input-group {
    position: absolute;
  }

  .accordion-tip {
    border-radius: 4px;
    -moz-border-radius: 4px;
    -webkit-border-radius: 4px;
    display: inline;
    float: right;
    position: relative;
    padding: 3px 5px;
    line-height: 1.1em;
    width: 50%;
    max-width: 50%;
    margin-right: 15%;
    &.error{
      margin-top: -7.8%;
      color: $red;
      background: rgba(217, 65, 65, 0.2);
    }
    &.info{
      margin-top: -9%;
      color: $base-color;
      background: #fff;
    }
  }

  /**
   * Import Components
   */
  @import 'components/accordion';
  @import 'components/datatable';
  @import 'components/tabs';
  @import 'components/import-tab';
  @import 'components/loader';
  @import 'components/autocomplete';
  @import 'components/feedback';

}

/**
 * Global Import
 */
@import 'components/toaster';

/** Calendar styles **/
@import 'components/calendar';

/** Addon styles **/
@import 'components/payments/stripe-connect';

/** Addon styles **/
@import 'components/addons/google-calendar';

@media screen and (max-width: 769px) {
  #bookit-dashboard-app {
     .bookit-wrapper{
       .bookit-row {
         flex-direction: column;
         div[class^='col-'] {
           width: 100%;
         }
         .form-group{
           + .form-group:not(.no-margin) {
             margin-left: 0px;
           }
         }
       }
     }
  }
}

@media print {
  .print-only {
    display: block;
  }
}

/**
 * Date style for Chrome
 */
input[type="date"]::-webkit-datetime-edit{
  line-height: normal;
}
input[type="date"]::-webkit-calendar-picker-indicator{
  padding: 0;
}
input[type="date"]::-webkit-datetime-edit-fields-wrapper{
  padding: 0;
}

