$webien-purple-light: #F0E9FF;
$webien-green-light: #DBFDFF;
$images: '/wp-content/plugins/webien-plugin/assets/images/';

.webien-control-info {
  padding: 10px;
  border: 1px solid #e6e9ec;
  background: #f6f6f6;
  border-radius: 5px;
  font-size: var(--control-title-size);
}


// Elementor font sizes in dropdown
.elementor-editor-active {
  .e-global__preview-item.e-global__typography {
    font-size: inherit !important;
  }
}



body.use-webien-scheduling{

  // Scheduling
  .air-datepicker {
    --adp-day-name-color: #000n !important;
    --adp-cell-background-color-selected: var(--e-context-primary-color) !important;
    --adp-cell-background-color-selected-hover: var(--e-context-primary-color-dark) !important;
    --adp-color-current-date: #000 !important;

    .air-datepicker-body--cells.-days- {
      .air-datepicker-cell.-day-.-current- {
        position: relative;

        &:before {
          content: '';
          position: absolute;
          top: 50%;
          left: 50%;
          transform: translate(-50%, -50%);
          width: 30px;
          height: 30px;
          border-radius: 50%;
          background-color: #f6f6f6;
          z-index: -1;
        }

        &.-selected- {
          &:before {
            display: none;
          }
        }
      }
    }

    .air-datepicker--time {
      padding-top: 10px;
      padding-bottom: 10px;

      .air-datepicker-time--sliders {
        // Hide minutes
        .air-datepicker-time--row {
          margin: 0;

          &:nth-child(2){
            display: none;
          }
        }
      }
    }


  }

  .misc-pub-curtime {
    display: none;
  }

  .misc-pub-duplicator {
    border-top: 1px solid #dcdcde;
    padding-top: 8px;
  }

  .misc-webien-schedule {
    border-top: 1px solid #dcdcde;
    padding: 0px;
    margin-top: 10px;

    #toggle-webien-schedule {
      display: flex;
      align-items: center;
      justify-content: space-between;
      width: 100%;
      background-color: transparent;
      border: none;
      border-radius: 0;
      appearance: none;
      padding: 16px 16px 16px 10px;
      cursor: pointer;
      transition: background-color 0.2s ease-in-out;
      color: inherit;

      &:active,
      &:focus {
        outline: none;
      }

      &:hover {
        background-color: #f1f1f1;
      }

      &:active {
        background-color: #e3e3e3;
      }

      .first {
        display: flex;
        align-items: center;

        .dashicons {
          color: #8c8f94;
        }

        .title {
          padding-left: 6px;
        }
      }

      .toggle-indicator {
        transform: rotate(180deg);
      }
    }

    &.open {
      .inputs {
        display: flex;
      }
      #toggle-webien-schedule {
        .toggle-indicator {
          transform: rotate(0deg);
        }
      }
    }

    .inputs {
      padding: 6px 10px 10px 10px;
      display: none;
      flex-direction: column;
      gap: 6px;

      .published-msg {
        font-size: 80%;
        background: $webien-purple-light;
        border-radius: 4px;

        &.active {
          background: $webien-green-light;
        }

        span {
          display: block;
          padding: 5px;
        }

      }

      .start,
      .stop {
        display: flex;
        align-items: center;
        background-color: #f1f1f1;
        border-top-right-radius: 4px;
        border-bottom-right-radius: 4px;

        span {
          padding: 6px 10px;
          display: grid;
          place-items: center;

          svg {
            width: auto;
            height: 16px;
            opacity: 0.5;
          }
        }
      }

      input {
        font-size: inherit;
        flex-grow: 1;
      }
    }
  }

}


#acf-group_webien_cleanup_options {
  .options-remover {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px;

    textarea {
      flex-grow: 1;
      resize: none;
    }
  }

}




#acf-group_webien_update_tools {
  .btns {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px;

  }
}

#webien_update_db_dumps {
  display: inline-block;
  padding: 5px 10px;
  background-color: var(--e-a-bg-success);
  border-radius: 5px;
  font-size: 12px;
  color: var(--e-a-color-success);
  border: 1px solid var(--e-a-color-success);
  margin-top: 20px;
  position: relative;

  span {
    font-weight: 600;
    display: inline-block;
  }

}


.acf-field-webien-update-tools-webien-update-buttons-message {
  position: relative;

  .loading {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.8);
    background-image: url($images + 'loader.svg');
    background-position: center center;
    background-size: 60px auto;
    background-repeat: no-repeat;
    display: none;
  }
}


.acf-field-webien-cron-options-webien-cron-info-message {
  background: rgba(255, 240, 230, 0.6);
  border-left: 4px solid var(--e-context-warning-color);

}


// Admin html
#webien_admin_custom_html_editor {
  width: 100%;
  max-height: 80vh;
  border: 1px solid #ccd0d4;
  overflow: auto;
  border-radius: 5px;

  .cm-scroller {
    min-height: 100px;
  }
}

.acf-field-webien-admin-scripts-webien-admin-custom-html {
  display: none;
}

