
.w-modal {
    /* disable global scrolling when m1ks are visible */
    overflow: hidden;
    height: 100vh;
}

.modal {
    display: none;

    /* dimensions: spanning the background from edge to edge */
    position:fixed;
    top: 0; right: 0; bottom: 0; left: 0;
    z-index: 1043; /* z-index needs to be >= elements on the site. */

    /* insures that the ::before pseudo element doesn't force wrap with fixed width content; */
    white-space: nowrap;

    /* styling */
    cursor: pointer;
    background: #333;

    background: rgba(0, 0, 0, 0.8);
    will-change: transform;

    /* position: centering content */
    justify-content: center;
    align-items: center;
}

.modal__open {
    display: flex;
}

/* support for nested modals. Does not work in IE8 (use JS to fix) */
.modal:last-of-type {
    background: rgba(0, 0, 0, 0.8);
}

.modal__content {
    /* make content container for positioned elements (close button) */
    position: relative;

    /* position: centering vertical and horizontal */
    text-align: left;
    vertical-align: middle;
    display: inline-block;

    overflow-y: auto;
    /*padding: 25px 25px 0;*/

    /* dimensions: handling large content */
    margin-left: 5%;
    margin-right: 5%;
    max-height: 95%;

    border-radius: 4px;

    box-sizing: border-box;

    /* styling */
    background: #fff;
    cursor: auto;

    /* reset white-space wrapping */
    white-space: normal;
}

@media screen and (max-width: 600px) {
    .modal__content {
        margin-left: 0;
        margin-right: 0;
    }
}

.modal__close {
    /* position: centering vertical and horizontal */
    position: absolute;
    z-index: 1044;
    top: 0;
    right: 0;

    line-height: 28px;
    width: 28px;
    font-size: 25px;

    cursor: pointer;
    text-align: center;
    font-family: Arial, sans-serif;
    color: #000;
    padding: 0;

    background: transparent;
    border: 0;
    opacity: 0.7;
}

.modal__close:before {
    content: "\2715";
}

.modal__close:hover {
    opacity: 1;
}

.modal__close:focus {
    outline: none;
}
.modal__close::-moz-focus-inner {
    border: 0;
    padding: 0;
}


.modal[aria-hidden="false"] {
    animation: tmfadeIn .6s cubic-bezier(0.0, 0.0, 0.2, 1);
}

.modal[aria-hidden="false"] .modal__content {
    animation: tmslideIn .3s cubic-bezier(0, 0, .2, 1);
}

@keyframes tmfadeIn {
    from {
        background: rgba(0, 0, 0, 0.4);
    }
    to {
        background: rgba(0, 0, 0, 0.8);
    }
}

@keyframes tmslideIn {
    from { transform: translateY(15%); }
    to { transform: translateY(0); }
}



/* handling phones and small screens */
@media only screen and (max-width: 1024px) {
    .modal-content {
        /* dimensions: maximize lightbox with for small screens */
        margin-left: 0;
        margin-right: 0;
        max-height: 98%;
        border-bottom: 10px solid transparent;
    }
}
