@import "components/helpers";
@import "components/app";
@import "components/settings";
@import "components/table-builder";
@import "components/getting-started";
@import "components/woocommerce";
@import "components/dokan";
@import "components/edd";
@import "components/statistics";
@import "components/proof-selections";
@import "components/tinymce";
@import "components/shortcode";
@import "components/notice";

// Integrations
@import "components/acf";
@import "components/tutor";
@import "components/divi";

#igd-app * {
  box-sizing: border-box;
}

#igd-shortcode-builder * {
  box-sizing: border-box;
}

.igd_file_browser_page {
  #wpcontent {
    padding-left: 0;
  }

  #wpbody-content {
    padding-bottom: 0;
  }

  #wpfooter {
    display: none;
  }

  .igd-sidebar-wrap,
  .igd-body,
  .igd-details-wrap {
    min-height: calc(100vh - 92px);
  }

  .igd-body {
    .body-action {
      top: 82px;
    }
  }

  .igd-sidebar-wrap {
    overflow-y: auto;
    height: calc(100vh - 92px);
    transition: width .3s ease;

    &::-webkit-scrollbar {
      width: 5px;
      height: 5px;
    }

    &::-webkit-scrollbar-thumb {
      background-color: #d3d3d3;
      border-radius: 4px;
    }

    &::-webkit-scrollbar-thumb:hover {
      background-color: #b3b3b3;
    }

    &::-webkit-scrollbar-track {
      background: #f0f0f0;
    }

  }

  @media (min-width: 992px) {
    .igd-sidebar-wrap, .igd-details-wrap {
      top: 82px;
    }
  }

}

// IGD Admin Pages
body.igd-admin-page {

  #wpbody-content {
    & > div.updated:not(.igd-admin-notice),
    & > div.error:not(.igd-admin-notice),
    & > div.notice:not(.igd-admin-notice) {
      display: none !important;
    }
  }

  #wpfooter {
    display: none;
  }
}

// Menu
li#toplevel_page_integrate-google-drive {
  img {
    width: 20px;
  }

  .wp-submenu {
    a[href="admin.php?page=integrate-google-drive-getting-started"] {
      color: #FBBC04 !important;
    }

    a[href="admin.php?page=integrate-google-drive-getting-started"], {
      border-top: 1px solid hsla(0, 0%, 100%, .2);
      border-bottom: 1px solid hsla(0, 0%, 100%, .2);
      padding: 8px 12px;
      display: flex;
      align-items: center;
      margin: 6px 0;
    }

    a[href="admin.php?page=integrate-google-drive-recommended-plugins"] {
      margin-top: 6px;
      padding-top: 8px;
      padding-right: 0;
      border-top: 1px solid hsla(0, 0%, 100%, .2);
    }

    a[href="admin.php?page=integrate-google-drive-account"] {
      margin-top: 6px;
      padding-top: 8px;
      border-top: 1px solid hsla(0, 0%, 100%, .2);
    }

    a[href="admin.php?page=integrate-google-drive-proof-selections"] {
      display: none;
    }

    li {
      &:last-child {
        a {
          border-bottom: 0;
          margin-bottom: 0;
        }
      }
    }
  }
}

/*--- Promo ---*/
.igd-pro-modal {
  width: 370px;
  background: #FFF;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 30px 20px;
  border-radius: 12px;
  box-shadow: 0 0 10px rgba(0, 0, 0, .2);
  position: relative;
  text-align: center;
  box-sizing: border-box;

  * {
    box-sizing: border-box;
  }

  &-wrap {
    width: 100%;
    height: 100%;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 99999999;
    background: rgba(0, 0, 0, .5);
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .igd-pro-modal-close {
    position: absolute;
    top: 5px;
    right: 5px;
    cursor: pointer;
    font-size: 28px;
    color: #999;
    padding: 10px;

    &:hover {
      color: #555;
    }
  }

  img {
    width: 200px;
    position: absolute;
    top: -80px;
  }

  h3 {
    font-size: 1.2rem;
    font-weight: 600;
    color: #555;
    margin: 25px 0 2px;
  }

  h2 {
    color: #FF9458;
    margin: 20px 0 20px 0;
    font-size: 2.5rem;
    font-weight: bold;

    .upto {
      font-size: 14px;
      margin-right: 5px;
    }

  }

  p {
    font-size: .875rem;
    color: #555;
    margin-bottom: 24px;
    line-height: 1.2;
    margin-top: 7px;
  }

  a {
    padding: 15px 20px;

    &:hover {
      color: #fff;
    }

  }

  .discount {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    position: relative;
    margin: 15px 0 15px;

    &-special {
      color: $igd_color;
      position: absolute;
      font-size: 24px;
      top: -24px;
      background: #FFF;
      padding: 5px;
      text-transform: uppercase;
    }

    &-text {
      border: 2px solid $igd_color;
      font-size: 32px;
      padding: 15px;
      border-radius: 5px;
      font-weight: bold;
      color: $igd_color;
    }
  }

  .timer {
    display: flex;
    align-items: center;
    text-align: center;

    & > div {
      display: inline-block;
      margin: 0 14px;
      width: 47px;
      background-size: contain;
      line-height: 2;

      span {
        &:first-child {
          font-size: 28px;
          color: #333;
          height: 47px;
          margin: 0 0 2px;
          display: flex;
          align-items: center;
          justify-content: center;
          position: relative;
          z-index: 1;
          border: 1px dashed #ddd;
          border-radius: 5px;
          font-weight: 500;
        }

        &:last-child {
          font-family: Arial, serif;
          font-size: 12px;
          text-transform: uppercase;
          color: #555;
        }
      }
    }

  }

  &-actions {
    margin-top: 10px;
  }

}

/*--- Block Editor ---*/
.wp-block-igd-shortcodes {

  .igd-module-placeholder {
    .module-icon {
      width: 60px;
      height: 60px;
      background-color: #2FB44B;
      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;

      img {
        width: 32px;
        height: 32px;
        margin-bottom: 0;
      }

      &.icon-shortcodes {
        background-color: rgba(#2FB44B, 0.1);
      }

      &.icon-browser {
        background: #EFF3FE;
      }

      &.icon-uploader {
        background: #EAF7ED;
      }

      &.icon-gallery {
        background: #ECE8FF;
      }

      &.icon-slider {
        background: #E9F0FF;
      }

      &.icon-media {
        background: #FFF6F5;
      }

      &.icon-search {
        background: #E4FFDE;
      }

      &.icon-embed {
        background: #ECF7FF;
      }

      &.icon-download {
        background: #EAF7ED;
      }

      &.icon-view {
        background: #F5F8FF;
      }

      &.icon-review {
        background: #EAF7ED;
      }

      &.icon-list {
        background: linear-gradient(144deg, rgba(247, 204, 220, 0.16) 11.16%, rgba(253, 128, 210, 0.16) 94.07%);
      }

    }
  }

  .preview-inner {
    &:empty {
      height: 200px;
      background-image: url('data:image/svg+xml;base64, ');
      background-color: rgba(#2fb44b, .1);
      background-repeat: no-repeat;
      border: 2px dashed rgba(#2fb44b, 0.5);
      background-position: center;
      padding: 2rem;
    }

    pointer-events: none;
  }

  &.is-selected {
    .preview-inner {
      pointer-events: auto;
    }
  }

}


/*--- WPForms ---*/
#wpforms-builder {
  .igd-form-uploader-trigger-wpforms {
    margin-top: 15px;
  }
}

/*--- FormidableForms ---*/
#frm_builder_page {

  .igd-configure-field {
    display: block;
    width: 100%;
    margin-bottom: 15px;

    label {
      display: block;
      margin-bottom: 5px;
    }
  }

  .igd-form-uploader-trigger-formidableforms {
    margin-top: 15px;
  }

  .igd-shortcode-browser {
    max-height: 500px;
  }

}

/*--- GravityForms ---*/
.gforms_edit_form {

  .igd-form-uploader-trigger {
    margin-top: 15px;
  }

  .gfield--type-integrate_google_drive {
    .igd {

    }
  }

  .igd-shortcode-browser {
    max-height: 500px;
  }

}

// Ninja Forms
#nf-builder {
  .igd {
    pointer-events: none;
  }

  .igd-shortcode-browser {
    max-height: 500px;
  }

}

// CF7
#tag-generator-panel-google_drive {

  .igd-form-uploader-trigger {
    margin-top: 15px;
  }
}

// Freemius Opt-in
body.igd_getting_started_page:has(.igd-getting-started) {

  #fs_connect {
    width: calc(100% - 30px) !important;
    margin: 15px !important;
    display: flex;
    flex-wrap: wrap;
    background: #fff;
    box-sizing: border-box;
    border: 1px solid $igd_color;
    border-left: 5px solid $igd_color;
    padding: 15px;
    border-radius: 4px;
    font-size: 14px;
    line-height: 1.5;

    .fs-notice,
    .fs-freemium-licensing,
    .fs-terms {
      display: none !important;
    }

    .fs-header {
      height: auto;
      margin-right: 20px;

      .fs-plugin-icon {
        position: unset;
        margin: 0;
      }
    }

    .fs-box-container {
      background: transparent;
      padding-top: 0;
      flex: 1;
      box-shadow: none;

      .fs-content {
        padding: 0;

        h2 {
          text-align: left !important;
          margin-bottom: 5px;
          margin-top: 0;
        }

        p {
          font-size: 14px;
        }

      }

      .fs-actions {
        padding: 0;
        border: none;
        margin-top: 15px;
        display: flex;
        gap: 15px;

        .button {
          font-size: 14px;
          height: 32px;
          line-height: 30px;
        }

      }

      .fs-permissions {
        padding: 0;
        margin-top: 10px;

        a {
          text-align: left;

          .button-link {
            color: $igd_color_dark !important;
          }

        }
      }

    }
  }

}


