@import 'fontawesome/fontawesome.scss';
@import "fontawesome/light.scss";
@import "fontawesome/brands.scss";
@import "vendor/jquery-ui.theme.min.css";
@import '~tlite/tlite.css';

$purple: #a46497;
$green: #61ce70;
$red: #d20000;

.sg-tooltip { position: relative; }

.sg-code-editor-container {
  .CodeMirror-line { padding-left: 30px; }
}

.sg-about-page {
  .section-content {
    justify-content: space-around;
  }
  .section-item {
    .section-image {
      height: 135px;
      display: block;
      width: 100%;
      text-align: center;
      box-sizing: border-box;

      img {
        max-height:100%;
        max-width: 100%;
        width: auto;
        height: auto;
      }
    }
    .inline-svg {
      text-align: center;
      background: #61ce70;
      padding: 1em;
      border-radius: 3px;

      &.purple {
        background: #a46497;
      }
      .fal,
      .fab {
        color: rgba(255, 255, 255, 0.75);
      }
    }
  }
}
.sortable_wordpress_gallery li.attachment {
  width:  141px;
  height: 141px;
}
.sortable_wordpress_gallery {
  display: block;
}
.sortable_wordpress_gallery:after {
  display: table;
  content: '';
  clear: both;
}

#giveasap_display .form-table tbody td:last-child {
  width: 200px;
}

#giveasap_display .wp-picker-open+.wp-picker-input-wrap {
  display: block;
}

#giveasap_display .iris-picker.iris-border {
  margin-left: -100px;
}

#giveasap_schedule .datepicker {
  display: block !important;
}

/** Settings **/

#giveasap_settings textarea {
  width: 100%;
  min-height: 100px;
}

.sg-form-table {

  input:not([type=checkbox]):not([type=radio]),
  select,
  textarea {
    width: 100%;
  }

  td {
    vertical-align: top;
  }

  th {
    padding: 10px;
    background: #F1F1F4;
    box-shadow: 1px 1px 1px rgba( 0, 0, 0, 0.1 );
    &:not(:last-child) {
      border-right: 1px solid rgba(0, 0, 0, 0.075);
    }
  }

  .sg-form-field-option {
    display: flex;

    .button {
      margin-left: 10px;
    }
  }

  .handle-column {
    width: 50px;
  }

  .sg-form-row-handle {
    width: 30px;
    height: 30px;
    display: block;
    line-height: 30px;
    margin-left: 10px;
    background: rgba( 0, 0, 0, 0.05 );
    cursor: move;
    text-align: center;
    border-radius: 3px;
  }
}


/** Users **/

.wp-list-table.users .column-entries {
  position: relative;
}

.wp-list-table.users .column-entries .button:not(.hidden),
.wp-list-table.users .column-entries .giveasap-edit-user-input,
.wp-list-table.users .column-entries .giveasap-user-entries:not(.hidden),
.wp-list-table.users .column-entries .upgrade-link {
  display: inline-block;
  vertical-align: middle;
}

.wp-list-table.users .column-entries .button {
  margin-left: 5px;
}

.sg-subscriber-data {
  display: flex;
  .sg-subscriber-entries {
    font-size: 5em;
    text-align: center;
  }
}

.sg-badge {
  &.sg-status {
    display: inline-block;
    padding: 0.25em 0.5em;
    background-color: $purple;
    color: #fff;
    border-radius: 3px;

    &.sg-status-blocked {
      background-color: #d20000;
    }

    &.sg-status-pending {
      background-color: rgba( $purple, 0.5 );
    }
  }

  &.sg-entries-status {
    text-transform: uppercase;

    &.sg-status-invalid {
      background-color: #d20000;
    }

    &.sg-status-valid {
      background-color: rgba( $purple, 0.5 );
    }
  }
}

.wp-core-ui {
  .button {
    &.sg-button-red {
      color: #d20000;
    }
  }
}
/** Giveaway Sharing Methods **/

.giveaway-sharing-method {
  &:not(:last-child) {
    margin-bottom: 1em;
  }

  .method-header {
    background: #f1f1f1;
    padding: 5px 10px;
    line-height: 28px;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid rgba( 0, 0, 0, 0.05 );
    -webkit-box-shadow: 0px 1px 1px rgba( 0, 0, 0, 0.15 );
    -moz-box-shadow: 0px 1px 1px rgba( 0, 0, 0, 0.15 );
    box-shadow: 0px 1px 1px rgba( 0, 0, 0, 0.15 );

    &:after {
      content: '';
      display: table;
      clear: both;
    }

    .button { float: right; }
  }

  &.active {
    .method-header {
      border-bottom: 1px solid rgba(0, 0, 0, 0.15);
    }

    .method-form {
      display: block;
    }
  }

  .method-form {
    display: none;
    padding: 10px;
    box-shadow: 0px 1px 1px rgba( 0, 0, 0, 0.25 );
  }
}

/**
Giveaway Post
 */

#sg-metaboxes {
  &.postbox {
    .inside {
      padding: 0;
      margin-top: 0;

      .sg-metaboxes {
        clear:both;
        display: flex;

        &:after {
          display: table;
          content: '';
          clear: both;
        }

        > ul {
          width: 30%;
          max-width: 200px;
          margin: 0;
          padding: 0;
          background: rgba( $purple, 0.2 );

          li {
            margin: 0;
            a {
              display: block;
              color: darken( $purple, 20% );
              padding: 0.5em;
              text-decoration: none;
              border-bottom: 1px solid rgba( $purple, 0.25 );


              .sg-metabox-icon {
                font-size: 1em;
                width: 20px;
                height: 20px;
                display: inline-block;
                vertical-align: middle;
                line-height: 16px;
              }
            }

            &.active {
              a {
                background: rgba( $purple, 0.6 );
                color: white;
                border-bottom-color: $purple;
              }
            }
          }
        }

        .sg-metaboxes-fields {
          width: 100%;
          padding: 1em;

          .hidden {
            display: none !important;
          }

          .form-table {
            margin: 0;

            th {
              width: 100px;
              @media screen and (min-width:960px) {
                width: 150px;
              }
            }
          }

          .sg-extra-action {
            padding: 0.5em 0;
            &:not(:last-child) {
              border-bottom: 1px solid rgba( 0, 0, 0, 0.15 );
            }
          }
        }
      }
    }
  }
}

/** Dashboard **/

#sg-dashboard-widget {
  ul {
    margin: 0;
    padding: 0;
    display: flex;
    flex-flow: row wrap;

    &:after {
      display: table;
      clear: both;
      content: '';
    }

    * {
      box-sizing: border-box;
    }

    li {
      list-style: none;
      text-align: center;
      padding: 1em 0.5em;
      width: 50%;
      margin: 0;
      border-bottom: 1px solid rgba( 0, 0, 0, 0.1 );

      &:nth-child(2n+1) {
        border-right: 1px solid rgba( 0, 0, 0, 0.1 );
      }



      .sg-red {
        color: #bd081c;
      }

      strong {
        display: block;
        height: 30px;
        font-size: 2em;
      }

      i {
        margin-right: 10px;
        color: $purple;

        &.sg-red-icon {
          color: #bd081c;
        }
      }

      em {
        display: block;
        font-size: 0.75em;
      }
    }
  }
}

/** SG Notices **/
.sg-notice {
  background: $purple;
  color: white;
  padding: 1em;
}

/** Forms **/
.sg-admin-form {
  padding: 1em;

  .sg-form-field {
    display: flex;
    align-items: center;
    padding-bottom: 1em;

    label {
      width: 200px;
    }
  }
}

.sg-form-fields-container,
.sg-prizes-field-container {
  .sg-form-field {
    margin-bottom: 15px;

    &:not(.open) {
      .sg-form-field-body { display: none; }
      .sg-form-field-header {
        .sg-field-name {
          &:after {
            border-top-color: rgba( 0,0,0, 0.5 );
            top: 12px;
          }
        }
      }
    }

    &.open {
      .sg-form-field-header {
        .sg-field-name {
          &:after {
            border-bottom-color: rgba( 0,0,0, 0.5 );
            bottom: 12px;
          }
        }
      }
    }

    .sg-form-field-header {
      display: flex;
      height: 40px;
      align-items: center;
      background: white;
      border: 1px solid rgba(0,0,0,0.15);

      .sg-field-name {
        line-height: 30px;
        height: 30px;
        width: calc( 100% - 30px );
        cursor: pointer;
        padding-right: 30px;
        position: relative;

        &:after {
          content: '';
          position: absolute;
          border: 5px solid transparent;
          width: 0px;
          height: 0px;
          right: 10px;
        }
      }

      .handle-column {
        width: 30px;
        height: 30px;
        cursor: pointer;

        .sg-form-row-handle {
          text-align: center;
          line-height: 30px;
        }
      }
    }

    .sg-form-field-body {
      border: 1px solid rgba(0,0,0,0.15);
    }

    .sg-form-table { margin: 0; }
  }
}

/** Entries Table **/
.sg-subscriber-entries-table {
  .column-value {
    img {
      max-width: 100%;
      height: auto;
    }
  }
}

@import '../../node_modules/magnific-popup/dist/magnific-popup.css';

.post-type-giveasap .mfp-container {
  left: 160px;
  width: calc( 100% - 160px );
}

@media only screen and (max-width: 960px) {
  .post-type-giveasap .mfp-container {
    left: 32px;
    width: calc( 100% - 32px );
  }
}

@media only screen and (max-width: 782px) {
  .post-type-giveasap .mfp-container {
    left: 0px;
    width: 100%;
  }
}

/** SG Actions **/
@import 'admin/_actions.scss';


/** SG Reports **/
@import 'admin/_reports.scss';

.sg-loading {
  position: relative;

  &:before,
  &:after {
    content: '';
    position: absolute;
  }

  &:before {
    height: 100%;
    width: 100%;
    background: rgba( 0, 0, 0, 0.45 );
    top: 0;
    left: 0;
    z-index: 10;
  }

  &:after {
    display: block;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 6px solid #fff;
    border-color: #fff $purple #fff $purple;
    animation: sg-dual-ring 1.2s linear infinite;
    z-index: 12;
    position: absolute;
    top: 0;
    left: 0;
    margin: auto;
    bottom: 0;
    right: 0;
  }
}

@keyframes sg-dual-ring {
  0% {
    transform: rotate(0deg);
  }

  100%{
    transform: rotate(360deg);
  }
}