/**
 * Give Magnific Modal Custom SCSS
 *
 * @package     Give
 * @subpackage  SCSS/Frontend
 * @copyright   Copyright (c) 2016, WordImpress
 * @license     http://opensource.org/licenses/gpl-2.0.php GNU Public License
*/

// Wrapper for popup
.give-modal {
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: $mfp-z-index-base + 2147482500;
  position: fixed;
  overflow:hidden;
  outline: none !important;
  -webkit-backface-visibility: hidden; // fixes webkit bug that can cause "false" scrollbar
  -webkit-overflow-scrolling: touch;
  -webkit-transform: translateZ(0);

  form[id*='give-form'] {
	margin-bottom: 0;
	.give-submit {
	  margin-bottom: 0;
	}
	.give-payment-mode-label {
	  margin-top: 0;
	  padding-top: 0;
	}
	@media (max-width: 580px) {
	  .give-input {
		font-size:16px; // Prevents mobile zoom to inputs.
	  }
	}
  }

  // Popup content holder
  .mfp-content {
	box-sizing: border-box;
	position: relative;
	background: #FFF;
	padding: 20px;
	width: auto;
	max-width: 500px;
	margin: 40px auto;
	z-index: $mfp-z-index-base + 2147482600;

	[id*='give-form'] #give-payment-mode-select,
	[id*='give-form'] #give_purchase_form_wrap,
	[id*='give-form'].give-display-button-only .give-donation-amount,
	[id*='give-form'].give-display-button-only .give-donation-levels-wrap {
	  display: block;
	}

	.mfp-close:hover {
	  background-color: transparent;
	}

  }

  form.give-form button.mfp-close {
	position: absolute;
	display: block !important;
  }

  .mfp-container:after {
	display: none;
  }

}

// Move-from-top effect.

.give-modal {

  .mfp-content {
	vertical-align:middle;
	opacity: 0;
	transition: all 0.2s;
	transform: translateY(-100px);
  }

  &.mfp-bg {
	opacity: 0;
	transition: all 0.2s;
  }

  /* animate in */
  &.mfp-ready {
	.mfp-content {
	  opacity: 1;
	  transform: translateY(0);
	}
	&.mfp-bg {
	  opacity: 0.8;
	}
  }

  /* animate out */
  &.mfp-removing {

	.mfp-content {
	  transform: translateY(-50px);
	  opacity: 0;
	}
	&.mfp-bg {
	  opacity: 0;
	}

  }

}
