* {
  box-sizing: inherit;
}

@import "./scss/utility.scss";
@import "./scss/layout.scss";
@import "./scss/notices.scss";
@import "./scss/components.scss";

:root {
  --wp-admin-theme-color: #7c3aed !important;
  --wp-admin-theme-color-darker-10: #6127c7 !important;
  --wp-admin-theme-color-darker-20: #501ea5 !important;
  --litepickerDayIsEndBg: var(--wp-admin-theme-color, #7c3aed);
  --litepickerDayIsStartBg: var(--wp-admin-theme-color, #7c3aed);
  --litepickerDayIsInRange: #f3f3f3;
  --litepickerDayIsTodayColor: var(--wp-admin-theme-color, #7c3aed);
}

.presto-options__pro-badge {
  margin: 0 4px;
  line-height: 1;
  background: var(--wp-admin-theme-color);
  color: white;
  padding: 3px 6px;
  border-radius: 9999px;
  font-size: 10px;
  display: inline-block;
}

.presto-options__disabled-overlay * {
  pointer-events: none;
}

.presto-options__card {
  position: relative;
}

.litepicker {
  font-size: 1em;

  .container__days > div,
  .container__days > a {
    margin-bottom: 5px;
  }

  .container__months,
  .container__footer,
  .container__main .container__predefined-ranges {
    border: 1px solid #e0e0e0;
    box-shadow: none;
    border-radius: 0;
    margin: 0;
  }

  .container__main {
    .container__predefined-ranges {
      margin-right: -1px;
      padding: 16px;
      max-width: 125px;
      width: 125px;
      border-radius: 0;

      > div {
        color: var(--wp-admin-theme-color, #007cba);
      }
    }
  }

  .container__months {
    .month-item-header div > .month-item-year {
      padding: 0 24px 0 8px;
    }
  }

  .container__footer {
    margin-top: -1px;
    padding: 8px;

    .button-cancel,
    .button-apply {
      display: inline-flex;
      text-decoration: none;
      font-size: 13px;
      margin: 0;
      border: 0;
      cursor: pointer;
      -webkit-appearance: none;
      background: none;
      transition: box-shadow 0.1s linear;
      height: 36px;
      align-items: center;
      box-sizing: border-box;
      padding: 6px 12px;
      border-radius: 2px;
      color: #1e1e1e;
      white-space: nowrap;
    }

    .button-apply {
      background: #007cba;
      background: var(--wp-admin-theme-color);
      color: #fff;
      text-decoration: none;
      text-shadow: none;
    }
  }
}

.presto-settings {
  &__page {
    margin: 25px 25px 25px auto;
  }
  &__loading {
    min-height: 200px;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  &__setting,
  &__body .components-card {
    max-width: 800px;
  }

  &__navigation {
    margin-left: -20px;
    margin-right: -20px;
    padding-right: 20px;
    position: sticky;
    top: 32px;
    z-index: 99;

    @media screen and (max-width: 782px) {
      top: 46px;
    }
  }

  .components-snackbar.is-snackbar-error {
    background: #cc1818;
  }

  &__date-select,
  &__date-select:disabled {
    padding-right: 30px;
    background: #fff
      url(data:image/svg+xml;charset=US-ASCII,%3Csvg%20width%3D%2220%22%20height%3D%2220%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M5%206l5%205%205-5%202%201-7%207-7-7%202-1z%22%20fill%3D%22%23555%22%2F%3E%3C%2Fsvg%3E)
      no-repeat right 5px top 55%;
    background-size: 16px 16px;
    cursor: pointer;
    vertical-align: middle;
    opacity: 1;
    box-shadow: none;
    color: #444;
    border-color: #757575;
    user-select: none;
  }
}

.is-color-control {
  max-width: 250px;
}
