
/* file: bootstrap-dialog-hacks.css */

/* Fix sweetalert spacer when it's in combination with Smarty theme */
.swal2-spacer {
	background-image:none;
}

/*	Bootstrap 3 modal vertical position center
	http://stackoverflow.com/questions/18422223/bootstrap-3-modal-vertical-position-center
*/
.modal {
  text-align: center;
}
.modal-dialog {
  display: inline-block;
  text-align: left;
  vertical-align: middle;
  margin-top: 6px; /* Este pequeño margen para cuando es resolución movil (y no se centra el dialog) */
}

@media screen and (min-width: 768px) {
  .modal:before {
    display: inline-block;
    vertical-align: middle;
    content: " ";
    height: 100%;
  }
  .modal-dialog {
  	  margin-top:0; /* Sin margen superior cuando hay espacio de sobra */
  }
}

@media screen and (min-width: 768px) and (min-device-pixel-ratio: 2) {
  .modal:before {
    vertical-align: inherit !important;
    content: inherit !important;
    height: inherit !important;
  }
}


/* Mis Dialog HACKS para tener full-responsive stuff - Juanga 2016-10-05 */

@media screen and (min-width: 768px) {
	div.modal-dialog.modal-extra {
		width: calc(100vw - 30px) !important;
	}
	div.modal-dialog {
		/* left: 50%; */
		right: auto;
		width: 620px !important; /* 600px; */
		padding-top:0;
		padding-bottom:0;
	}
	div.modal-dialog div.modal-body {
		height:auto !important;
		max-height: 490px !important;
		overflow-y: auto !important;
	}
	div.modal-dialog.modal-lg {
		margin-top:0 !important;
	}
	div.modal-content {
		-webkit-box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
		box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
	}
}

@media screen and (min-width: 1200px) {
    div.modal-dialog.modal-extra {
        width: 1080px !important;
    }
    div.modal-dialog.modal-extra div.modal-content div.modal-body {
        max-height: calc(99vh - 120px) !important;
    }
}

/* Por defecto todos los dialogs ocuparán casi todo el ancho, salvo que el media query superior nos lo corrija */
div.modal-dialog {
    width: calc(100vw - 30px);
}

/* hack: modal-lg is the bootstrap dialog "SIZE_WIDE" / size-wide */
div.modal-dialog.modal-lg {
	/* En dialogs grandes "modal-lg" ocupamos casi todo el ancho por defecto */
	width: 98% !important; /* width: 1100px; /* 960px; */
	/* Margen si queremos */
	margin-top: 5px;
}
/* Por defecto todos los dialogs tienen que ocupar casi todo el alto, salvo que el media query superior nos lo corrija */
div.modal-dialog div.modal-body {
	height: calc( 99vh - 120px); /* Dejamos que se corrija, NO USAR !important */
    overflow-y: auto;
}
div.modal-dialog.modal-lg div.modal-body {
	height: auto !important; /* sobreescribimos max-height del @media screen */
	max-height: calc( 99vh - 120px) !important; /* Este SI tiene que mandar porque es para .modal-lg */
    overflow-y: auto;
}

/* End of file: bootstrap-dialog-hacks.css */
