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

// Integrations
@import "components/acf";
@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: #adff2f !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-proofing-submissions"] {
      &.current {
        font-weight: 500;
      }
    }

    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:has(.igd-icon.icon-pro) {
      display: flex;
      align-items: center;
      font-weight: 500;
      color: darken(#ffc300, 2%);
      border-top: 1px solid rgba(255, 255, 255, 0.1);
      margin-top: 3px;
      padding-top: 7px;

      i {
        margin-right: 5px;
      }

      &:hover {
        color: darken(#ffc300, 5%);
      }

    }

    a:has(.integrate-google-drive.account) {
      border-top: 1px solid rgba(255, 255, 255, 0.1);
      margin-top: 5px;
      padding-top: 7px;
    }

    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;

    display: flex;
    gap: 12px;
    justify-content: center;

    .igd-btn {
      padding: 12px 20px;
      border-radius: 30px;
      border: none;
      cursor: pointer;
      font-weight: 600;
      text-decoration: none;
      transition: 0.2s ease;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 14px;

      i {
        margin-right: 5px;
        background: #fff;
      }

      &.video {
        background: transparent;
        color: #FF0000;
        border: 1px solid #FF0000;
        transition: all 0.2s ease;

        i {
          color: #FF0000;
        }

        &:hover {
          background: #FF0000;
          color: #fff;

          i {
            color: #fff;
            background: #FF0000;
          }
        }

      }

      &.primary {
        background: $igd_color;
        color: #fff;
      }

      &:hover {
        opacity: 0.9;
      }

    }

  }

}

/*--- 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;
  }
}

// Plugin row
// ==============================
// Integrate Google Drive – PRO Upgrade Notice
// ==============================

.igd-pro-upgrade-row {
  background: #f8fafc;

  .igd-pro-upgrade-cell {
    padding: 14px 16px;
    border-top: 1px solid #dcdcde;
    border-bottom: 1px solid #dcdcde;
  }

  .igd-upgrade-notice {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;

    .igd-upgrade-content {
      .igd-upgrade-title {
        margin: 0 0 4px;
        font-size: 14px;
        font-weight: 600;

        .igd-pro-highlight {
          color: #2271b1;
        }
      }

      .igd-upgrade-description {
        margin: 0;
        font-size: 13px;
        line-height: 1.5;
        color: #50575e;
      }
    }

    .igd-upgrade-actions {
      display: flex;
      align-items: center;
      gap: 12px;
      white-space: nowrap;

      .igd-upgrade-hide {
        font-size: 13px;
        color: #646970;
        text-decoration: none;

        &:hover {
          color: #1d2327;
          text-decoration: underline;
        }
      }

      .igd-upgrade-button {
        padding: 4px 14px;
      }
    }
  }

}



