@import "~bootstrap/scss/bootstrap.scss";
$fa-font-path: "~font-awesome/fonts";
@import "~font-awesome/scss/font-awesome.scss";

@mixin ngx-datetime-range-picker-component-theme($theme) {
  $primary-color: map-get($theme, primary);
  $primary-hover-color: darken(mat-color($primary-color), 15%);

  .m1-date-range-picker {
    position: relative;
    border-radius: 0;
    z-index: 1001;
    width: 100% !important;

    .mat-icon {
      height: auto;
      width: auto;
    }

    .full-width {
      width: 100%;
    }

    .fa {
      font-size: 100%;
      color: rgba(0, 0, 0, 0.54);
    }

    .fa-calendar {
      color: #aaa;
    }

    .dateSelect {
      color: #333;
    }

    .retail-dateSelect {
      padding: 0 0 0 30px !important;
    }

    .retail-calendar:before {
      content: "\F073";
    }

    .timezone-info {
      font-size: 95%;
      position: absolute;
      right: 8px;
      top: 8px;
      opacity: 0.6;
      font-weight: bolder;
    }

    .calendar-loading {
      min-width: 240px;
      min-height: 240px;
      padding: 54% 48% 46%;
    }

    .calendar-view {
      width: fit-content;
      background-color: #fff;
      padding: 12px 8px;
      margin-top: 2px;
      border-radius: 4px;
      box-shadow: 0px 2px 4px -1px rgba(0, 0, 0, 0.2), 0px 4px 5px 0px rgba(0, 0, 0, 0.14),
      0px 1px 10px 0px rgba(0, 0, 0, 0.12);
    }

    .calendar-view:before,
    .calendar-view:after {
      position: absolute;
      display: inline-block;
      border-bottom-color: rgba(0, 0, 0, 0.2);
      content: "";
    }

    .timezone-select {
      font-size: 90%;
      display: flex;
      margin: 0 6px 6px;

      .timezones,
      .currentTime {
        display: inline-block;
      }

      .timezones {
        margin-right: auto;
        white-space: nowrap;
        left: 8px;
      }

      .currentTime {
        margin-left: auto;
        white-space: nowrap;
        right: 8px;
      }

      .border-separator {
        border-right: 2px solid #ccc;
        padding-right: 8px;
        margin-right: 8px;
      }

      .timezone {
        display: inline-block;
        cursor: pointer;
      }

      .today-text {
        font-weight: bold;
        text-decoration: underline;
      }
    }

    .active-timezone {
      color: mat-color($primary-color);
      font-weight: bolder;
    }

    .date-dropdown-container,
    .time-item-container {
      display: flex;
      justify-content: center;

      .mat-form-field-wrapper {
        padding-bottom: 0;

        .mat-form-field-infix {
          border-top: 0;
          width: auto;

          .mat-select-value {
            display: inline;
          }
        }

        .mat-form-field-underline {
          display: none;
        }
      }

      .date-dropdown {
        margin: 0 5px;
      }
    }

    .date-select {
      display: inline-flex;
    }

    .ranges {
      min-width: 160px;
      padding: 0 2px;

      .calendar-range {
        width: 100%;
        white-space: nowrap;
        background-color: #f5f5f5;
        border: 1px solid #f5f5f5;
        border-radius: 0px;
        color: mat-color($primary-color);
        line-height: 30px;
        margin: 0 3px;
        margin-bottom: 8px;
        cursor: pointer;
        box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.16), 0 0 0 1px rgba(0, 0, 0, 0.08);
      }

      .active-range {
        background-color: mat-color($primary-color);
        border: 1px solid mat-color($primary-color);
        color: #fff;
      }

      .active-range:hover {
        color: #fff;
        background-color: $primary-hover-color;
        border-color: $primary-hover-color;
      }

      .range-select-button-container {
        white-space: nowrap;
        margin: 0 3px;
        margin-bottom: 8px;
      }

      .range-select-button {
        width: 50%;
        border-radius: 0px;
        line-height: 30px;
        box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.16), 0 0 0 1px rgba(0, 0, 0, 0.08);
      }

      .range-select-button:first-child {
        margin-right: 3px;
      }

      .range-select-button:last-child {
        margin-left: 3px;
      }

      .range-select-apply-button {
        color: #fff;
        background-color: mat-color($primary-color);
        border: 1px solid mat-color($primary-color);
      }

      .range-select-cancel-button {
        background-color: #f5f5f5;
        border: 1px solid #f5f5f5;
        color: mat-color($primary-color);
      }

      .range-select-button-bottom {
        position: absolute;
        bottom: 4px;
      }
    }

    .calendar-container {
      display: flex;
    }

    .calendar {
      margin: 0 6px 0;
      float: left;
      display: block;
      width: auto;
    }

    .calendar-label {
      text-align: center;
      position: relative;
      width: 100%;
    }

    .rowNumber {
      color: #bbb !important;
      font-size: 82%;
      border-right: 1px solid #dedede;
      width: 32px;
    }

    .rowNumberPlaceholder {
      font-size: 82%;
      padding: 0 !important;
      min-width: 0px !important;
    }

    .calendar-week-day {
      color: #ffc266;
      font-weight: normal;
      font-size: 95%;
    }

    .capitalize {
      text-transform: capitalize;
    }

    .dateTitleInput {
      position: relative;
      border: none;
      margin: 0 3px 6px 0;
      width: 100%;
      float: left;
      display: block;

      .dateSelect {
        text-align: center;
      }

      .dateSelect:hover {
        pointer-events: none;
        background: transparent;
        cursor: default;
      }

      i {
        position: absolute !important;
        top: 11px !important;
        left: 10px !important;
        color: #aaa !important;
      }
    }

    .calendar-table {
      .calendar-side-container {
        .calendar-label-container {
          display: inline-flex;
          width: 100%;
          padding: 5px;
        }

        table {
          table-layout: fixed;
          min-width: 100%;

          th,
          td {
            white-space: nowrap;
            text-align: center;
            min-width: 32px;
            padding: 5px;
          }

          td {
            color: #bbb;

            .todayDate {
              font-size: 6px;
            }
          }

          td.valid {
            cursor: pointer;
          }

          td.available,
          th.available {
            cursor: pointer;
            color: #333;
          }

          th.available {
            width: 32px;
          }

          td.available:hover,
          th.available:hover {
            background-color: #eee;
          }

          td.in-range {
            background-color: #f6f6f6;
            color: mat-color($primary-color);
          }
        }
      }
    }

    td.active,
    .fa.active {
      background-color: mat-color($primary-color) !important;
      color: #fff !important;
    }

    .disabled {
      color: #eee;
      pointer-events: none;
    }

    .month-select,
    .year-select,
    .timeItem-select {
      background: #fff;
      padding: 0;
      box-shadow: none;
    }

    .dropdown-menu {
      position: absolute;
      min-width: unset !important;
      font-size: 95%;
      border-radius: 0px;
      max-height: 100px;
      overflow: auto;
    }

    .hide {
      display: none;
    }

    .show {
      display: block;
    }

    .time-picker-container {
      display: flex;

      .time-select {
        position: relative;
        padding: 3px 0;
        text-align: center;
        width: 50%;
        margin: 1em 6px 0;
        border: 1px solid #ddd;

        .clock-icon-container {
          position: absolute;
          left: 0.5em;
          height: 100%;
          padding: 3px;
          color: #aaa;
        }

        .time-item-container {
          margin: 0 5px;
        }
      }
    }
  }
}
