#ddOverlay {
    opacity: 0;
    position: absolute;
    top: 0;
    left: 0;
    background-color: rgba(0,0,0,0.7);
    width: 100%;
    height: 0;
    z-index: 9999;

    transition: all 0.4s ease-in;
}

#ddModal {
    width: 900px;
    background-color: white;
    border-radius: 6px;
    box-sizing: border-box;
    padding: 0 1rem;
    position: fixed;
    top: 0;
    left: 25%;
    max-height: 785px;
    overflow-y: auto;

    margin: 0 auto;
    opacity: 0.5;

    transition: all 0.4s ease-in;
}

#ddOverlay.active {
    opacity: 1;
    height: 99999px; /* Need it to take up the entirety of the screen */
    transition: all 0.4s ease-in;
}

#ddOverlay.active #ddModal {
    top: 10%;
    opacity: 1;
    transition: all 0.4s ease-in;
}

#ddModal #cancelModal {
    text-align: right;
    color: #666;
    font-weight: bold;
    font-size: 1.2rem;
}

#ddModal #cancelModal a:hover {
    cursor: pointer;
    opacity: 0.8;
}

#ddModal img {
    margin: 1rem auto;
    max-width: 700px;
}

@media screen and ( min-width: 100px ) and ( max-width:350px ) {
    #ddModal {
        width: 290px;
        left: 5%;
    }

    #ddModal img {
        max-width: 268px;
    }
}
@media screen and ( min-width: 351px ) and ( max-width:700px ) {
    #ddModal {
        width: 325px;
        left: 7%;
    }

    #ddModal img {
        max-width: 290px;
    }
}
/* ipad vertical */
@media(min-width:768px) and (max-width:1024px)  {
	#ddModal {
		left: 5%;
		width: 690px;
	}
	#ddModal img {
		max-width: 500px;
    }
   
}
/* ipad horizontal */
@media(min-width:770px) and (max-width:1024px)  {
	#ddModal {
		left: 15%;
		width: 700px;
	}
	#ddModal img {
		max-width: 500px;
    }
}
/* ipad pro 10 */
@media only screen and (min-width: 834px) and (orientation: portrait) {
    #ddModal {
		left: 8%!important;
		width: 690px;
	}
	#ddModal img {
		max-width: 500px;
    }
}
@media only screen and (max-width: 1112px) and (orientation: landscape) {
    #ddModal {
		left: 18%!important;
		width: 700px;
	}
	#ddModal img {
		max-width: 500px;
    }
}

/* iPad Pro 12" */ 
@media only screen and (min-width: 1024px) and (orientation: portrait) {
    #ddModal {
		left: 11%!important;
		width: 800px!important;
	}
	#ddModal img {
		max-width: 500px;
    }
}
@media only screen and (max-width: 1366px) and (orientation: landscape) {
    #ddModal {
		left: 25%;
		width: 700px;
	}
	#ddModal img {
		max-width: 500px;
    }
}

/* kindle */
@media only screen and (min-width: 800px) and (orientation: portrait) {
    #ddModal {
		left: 6%;
		width: 700px;
	}
	#ddModal img {
		max-width: 500px;
    }
}
