.astra-mm-options-wrap,
.ast-popup-wrap {
    -webkit-box-shadow: 0 0 100px rgba(0, 0, 0, 0.5);
    box-shadow: 0 0 100px rgba(0, 0, 0, 0.5);
    display: none;
    -webkit-border-radius: 2px;
    border-radius: 2px;
    position: fixed;
    top: 5%;
    left: 0;
    right: 0;
    bottom: 5%;
    width: 85%;
    max-width: 1100px;
    margin: auto;
    background: #FFF;
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    box-sizing: border-box;
    z-index: 99999;
    flex-direction: column;
    justify-content: center;
    align-items: center;

    .ast-popup-content {
        .spinner {
            z-index: 100000;
            position: relative;
            align-self: center;
        }
        .ast-mm-settings {
            .astra-mm-settings-wrap {
                display: flex;
                justify-content: center;
                align-items: center;
            }
        }
    }

    .spinner.is-active {
      visibility: visible;
    }
}

.astra-mm-modal-overlay {
  width: 100%;
  height: 100%;
  position: fixed;
  z-index: 9999;
  background-color: rgba(0, 0, 0, 0.8);
  top: 0;
  left: 0;
}

.astra-mm-cta-wrap {
  width: 100%;
  border-top: 1px solid #ccc;
  padding: 1em;
  background: #FFF;
  z-index: 9999;
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  box-sizing: border-box;
  text-align: right;
  flex-shrink: 0;
  bottom: 0;
  position: absolute;
  bottom: 0;
  left: 0;

  .alignright {
    display: flex;
  }

  .astra-megamenu-save-opts {
      margin-right: 5px;
  }
}

.astra-mm-title-wrap {
  h2 {
    margin: 0;
  }
  font-size: 18px;
  border-bottom: 1px solid #ddd;
  flex-shrink: 0;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 999999;
}

.astra-option-input-container {
    input[type="text"], select {
        width: 100%;
    }
    .wp-picker-container{
        .wp-color-result{
            &.button { /* Added !important because we have to override the inline css added by colorpicker */
              margin-bottom: 0 !important;
            }
        }
        .color-alpha { /* Added !important because we have to override the inline css added by colorpicker */
            height: 23px !important;
        }
    }
}

.field-mm-enabled,
.field-mm-columns,
.astra-mm-option-container {
  display: none;
}

.field-mm-megamenu-label {
  display: block;
}

.astra-mm-options-wrap .field-mm-width{
    display: none;
}

.menu-item-depth-0 {
  .field-mm-disable-label,
  .field-mm-disable-link,
  .field-mm-megamenu-label{
    display: none;
  }
  .field-mm-enabled,
  .field-mm-width,
  .field-mm-color,
  .field-mm-h-color {
    display: block;
  }
}

.menu-item-depth-0 {
    .field-mm-bg-img,
    .field-mm-bg-size,
    .field-mm-bg-position,
    .field-mm-bg-color,
    .field-mm-divider-color {
        display: block;
    }
}

.menu-item-depth-1 {
    .field-mm-template, 
    .field-mm-content-src, 
    .field-mm-shortcode, 
    .field-mm-custom-text, 
    .field-mm-widget-option, 
    .field-mm-widget-area {
        display: block;
    }
}

.astra-mm-options-wrap {
    .field-mm-highlight-label, 
    .field-mm-highlight-label-color, 
    .field-mm-highlight-label-bg-color,
    .field-mm-megamenu-opts {
        display: block;
    }
}

.menu-item-depth-1 {
    .field-mm-template, 
    .field-mm-content-src, 
    .field-mm-shortcode, 
    .field-mm-custom-text {
        display: block;
    }
}

.menu-item-depth-1 .field-mm-megamenu-opts{
    display: block;
}

.wp-core-ui .button-primary.astra-megamenu-opts-btn {
  display: inline-block;
}

.wp-core-ui .button-secondary.astra-megamenu-opts-btn {
  margin-top: 8px;
  margin-bottom: 8px;
}

.astra-mm-title-wrap h2 {
    display: inline-block;
  padding: 1.1em 1.5% 1.1em 2.5%;
}

.astra-mm-close.dashicons-no-alt {
  position: absolute;
  top: 0;
  right: 0;
  padding: 0.98em 2%;
  font-size: 1.4em;
  vertical-align: middle;
  cursor: pointer;
  border-left: 1px solid #ccc;
  &:hover {
    background: #f6f6f6;
  }
}

.astra-mm-option-container {
  float: left;
  width: 92%;
  padding: 2em 4%;
  margin: 0;
  .astra-mm-option-heading {
    margin-bottom: 1.5em;
  }
}

.ast-mm-settings {
  .astra-mm-option-container:not(:last-child) {
    border-bottom: 1px solid #ddd;
  }
  overflow: auto;
  width: 100%;
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  box-sizing: border-box;
  background-color: #fff;
  position: absolute;
  top: 0;
  left: 0;
  bottom: 2em;
  margin-top: 5.4em;
  margin-bottom: 2.5em;
}

.ast-active.menu-item-settings {
  z-index: 9999;
}

.ast-mm-label-container {
  float: left;
  width: 45%;
  display: inline-block;
  label {
    margin: 1em 0 10px;
    vertical-align: baseline;
  }
}

.astra-option-input-container {
  float: left;
  width: 45%;
  display: inline-block;
  margin-left: 10%;
  .ast-mm-input, .select2-container {
    width: 50% !important;
  }
  .select2-search__field, .select2-search--inline {
    width: 100% !important;
  }
  .wp-picker-holder {
    position: absolute;
    z-index: 999;
  }
}

.astra-builder-upload-preview{
  margin-bottom: 10px;
}

.astra-builder-upload-preview img {
  max-width: 100%;
  display: block;
  height: auto;
}

.wp-core-ui .ast-remove-button, 
.wp-core-ui .astra-builder-upload-button.astra-edit-button {
    display: none;
}

.ast-image-set {
  .ast-remove-button, .astra-builder-upload-button.astra-edit-button {
    display: inline-block;
  }
  .ast-upload-button {
    display: none;
  }
}

.select2-container.select2-container--open {
  z-index: 99999;
}

.astra-mm-cta-wrap .button-large {
  &.astra-megamenu-save-opts, &.astra-megamenu-cancel-btn {
    padding: 15px 25px;
    line-height: 0;
    font-size: 1.1em;
  }
}

.astra-mm-settings-wrap {
    padding: 1em 0;
}

.astra-mm-settings-wrap:after {
    content: " ";
    display: block;
    clear: both;
}

.ast-widget-list{
    min-height: 300px;
    width: 405px;
    margin-left: auto;
    border: 1px solid #aaa;
    display: none;
}

.ast-widget-list:empty {
  display: none !important;
}

.ast-widget-list .widget-top .widget-action{
  padding: 0;
  right: 0; 
}

.astra-option-input-container select.ast-select-widget{
  width: 70%
}

.button-primary.ast-insert-widget{
  margin-left: 5%;
  width: 100px;
  float: right;
}

.astra-mm-settings-wrap .ast-widget-list{
    padding: 20px;
}

.astra-mm-settings-wrap .widget.open .widget-inner{
    display: inline-block;
    padding: 20px;
    box-sizing: border-box;
    width: 100%;
}

.astra-mm-cta-wrap .spinner{
    float: left;
}

.ast-editing-label{
    font-size: 14px;
    color: #999;
}

.wp-picker-input-wrap {
    input {
        font-size: 12px;
        line-height: 15px;
        margin: 0;
        vertical-align: top;
    }
    label {
        display: inline;
    }
}

.ast-popup-wrap {
    .ast-popup-content {
        .ast-mm-settings {
            .astra-mm-settings-wrap {
                &.field-mm-enabled {
                    display: none;
                }
                &.ast-show{
									display: block;
								}
								&.ast-hide{
									display: none;
								}
            }
            .field-mm-text-color,
            .field-mm-text-hover-color,
            .field-mm-column-div-color {
                display: none;
            }
            .astra-mm-option-heading,
            .field-mm-header-sep-color {
                display: block;
                .ast-show {
                    display: block;
                }
                .ast-hide {
                    display: none;
                }
                &.ast-hide {
                    display: none;
                }
            }
            .ast-show{
      				  display: block;
      			}
      			.ast-hide{
      				  display: none;
      			}
        }
    }
}

.ast-popup-wrap {
    .ast-popup-content {
        .menu-item-depth-0 {
            .ast-mm-settings {
                .astra-mm-settings-wrap {
                    &.field-mm-enabled {
                        display: block;
                    }
                }
                .field-mm-color,
                .astra-mm-option-heading,
                .field-mm-text-color,
                .field-mm-text-hover-color,
                .field-mm-column-div-color {
                    display: block;
                }
                .field-mm-megamenu-opts {
                    .field-mm-enabled {
                        display: block;
                    }
                    display: block;
                }
            }
            .ast-show{
      				&.field-mm-enabled-heading,
              &.field-mm-content-src,
              &.field-mm-header-sep-color{
      					display: none;
      				}
			     }
        }
    }
}

/* WP Beta 5.3 compatibility CSS - Start */

.astra-mm-settings-wrap {
  .wp-picker-container {
    .wp-color-result.button,
    .wp-color-picker {
      min-height: 24px;
    }
    input[type="text"] {
      &.wp-color-picker {
        padding: 3px 5px;
        width: 71px;
        line-height: 17px;
        min-height: 24px;        
      }
    }
  }
}

.wp-core-ui {
  .astra-mm-settings-wrap {
    .button {
      &.button-small {
        margin-left: 6px;      
      }
    }
  }
}

/* WP Beta 5.3 compatibility CSS - Start */

