/**
 * CMB Magnific Builder SCSS
 *
 * @package     Give
 * @subpackage  SCSS/Admin
 * @copyright   Copyright (c) 2015, WordImpress
 * @license     http://opensource.org/licenses/gpl-2.0.php GNU Public License
*/

//Display none things
.magnific-builder #titlediv, .magnific-builder #submitdiv, .magnific-builder #google_maps_preview_metabox .handlediv, .magnific-builder #google_maps_preview_metabox .ui-sortable-handle, .magnific-builder #post-body-content, .magnific-builder .marker-icon-modal, .map-modal-upsell {
  display: none;
}

//Border none things
.magnific-builder #google_maps_preview_metabox {
  border: none;
}

//No margin or padding things
.magnific-builder #google_maps_preview_metabox .inside {
  margin: 0;
  padding: 0;
}

/*-------------------------------------
Magnific Builder
---------------------------------------*/
.magnific-builder#post {
  position: relative;
  margin: 20px;
  padding: 0;
  background: #EEE;
  width: auto;
  overflow: hidden;

  #google-map-wrap {
    border: none;
  }

  #poststuff {
    padding-top: 0;
  }

  #cmb2-metabox-google_maps_preview_metabox {
    > div {
      padding-top: 0;
    }
  }
  .magnific-builder#post .places-loading {
    top: auto;
    right: -175px;
    bottom: 15px;
    left: auto;
  }

  #map-toolbar {
    min-width: 687px;
  }
}

/* Magnific Builder Sidebar */

.magnific-builder#post {

  #postbox-container-1 {
    margin-left: 0;
    padding: 90px 0 50px;
    width: 300px !important;
    background: url('../img/maps-builder-logo-small.png') no-repeat 15px 15px transparent;

    &:after {
      content: ' ';
      position: absolute;
      bottom: 15px;
      right: 130px;
      background: url('../img/powered-by-google-on-white.png') no-repeat 0 0 transparent;
      width: 104px;
      height: 16px;
    }

    #side-sortables {
      border-left: 1px solid #DDD;
      border-bottom: 1px solid #DDD;
      background-color: #F7F7F7;
      overflow-y: auto;
      overflow-x: hidden;
      height: 100%;
      min-height: 100%;
      position: relative;

      //Blue sections
      .ui-sortable-handle {
        background: $blue;
        color: #FFF;

        &:hover {
          background: darken($blue, 10%);
        }
      }
      .handlediv {
        color: #FFF;
      }

    }

    .magnific-submit {
      position: absolute;
      bottom: 10px;
      right: 10px;
      display: block;
    }
    /*-------------------------------------
    Google Places
    ---------------------------------------*/
    #google_maps_search_options {

      .cmb2-id-gmb-places-search {
        margin-top: 15px;
        border-top: none;
      }

      .cmb2-id-gmb-places-search-multicheckbox {
        ul li {
          width: 50%;
          position: relative;
          .cmb2-option {
            position: absolute;
            top: 0;
            left: 0;
          }
          label {
            padding-left: 25px;
            display: block;
            padding-right: 3px;
          }
        }
      }
    }
    //#google_maps_search_options

    /*-------------------------------------
    Map Markers
    ---------------------------------------*/
    a.drop-marker {
      margin-top: 10px;
      display: block;
      width: 120px;
      text-align: center;
    }

    .places-change-message .button {
      margin-bottom: 10px;
      float: left;
    }

  }

  #post-body.columns-2 #side-sortables {
    margin-right: 0;
    width: 300px !important;
  }

  .postbox {
    margin: 0;
    border: none;

    &:last-of-type {
      border-bottom: 1px solid #DDD;
    }
  }

  .toggle-repeater-groups {
    display: block;
    width: 140px;
    text-align: center;
    margin: 10px 0 0;
  }
  button.edit-title {
    display: inline-block;
  }
}

/* No Dragging */
.magnific-builder .postbox .hndle {
  cursor: pointer;
}

.magnific-builder .postbox .hndle:hover {
  color: #23282d;
  background: #f5f5f5;
}

.magnific-builder#post .places-loading {
  top: auto;
  right: auto;
  bottom: 0;
  left: 0;
}

#wpbody-content .magnific-submit {
  display: none;
}

#map-builder {
  margin: 5px 12px 10px;
  display: block;
  text-align: center;

  span.dashicons {
    position: relative;
    top: 2px;
    margin-right: 3px;
  }

}

/*-------------------------------------
Modal within Modal
---------------------------------------*/
.magnific-builder #poststuff .white-popup {
  position: absolute;
  max-width: none;
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  z-index: 100008;
  opacity: 1;
  background: rgba(88, 88, 88, 0.8);
  -webkit-transition: all 0.3s;
  -moz-transition: all 0.3s;
  transition: all 0.3s;
  overflow-y: auto;
  display: table;

  .inner-modal-wrap {
    display: table-cell;
    vertical-align: middle;

    .inner-modal-container {
      overflow-y: auto;
      max-height: 100%;
    }

    .inner-modal {
      max-width: 600px;
      margin: 30px auto;
      background: #FFF;
      padding: 20px;
      box-shadow: 0 0 8px rgba(0, 0, 0, 0.45);
      position: relative;
    }

  }

  .save-marker-icon {
    position: relative;
    border: none;
    margin-top: 15px;
  }

}

.pac-container {
  z-index: 100020 !important;
}

button.gmb-modal-close {
  border: none;
  background-color: transparent;
  color: #333;
  cursor: pointer;
  outline: none;
  padding: 0;
}


//--------------------------
//Pro Version Upsell CSS
//--------------------------
.mfp-container .map-modal-upsell {
  display: block;
  position: absolute;
  top: 35px;
  right: -261px;
  text-align: center;

  p {
    font-size: 11px;
    font-style: italic;
    margin: 0 0 2px;
    color: #AAA;
  }

  a.upsell-button {
    width: 70px;
  }

}

.maps-builder-free .magnific-builder#post #postbox-container-1 {
  background-image: url("../img/maps-builder-logo-small-non-pro.png");
}