/* The Modal (background) */
.modal {
    display: none; /* Hidden by default */
    position: fixed; /* Stay in place */
    z-index: 1; /* Sit on top */
    padding-top: 50px; /* Location of the box */
    padding-bottom: 50px; /* Location of the box */
    left: 0;
    top: 0;
    width: 100%; /* Full width */
    height: 100%; /* Full height */
    overflow: auto; /* Enable scroll if needed */
    background-color: rgb(0,0,0); /* Fallback color */
    background-color: rgba(0,0,0,0.4); /* Black w/ opacity */
    transition: all 0.5s;
}

/* Modal Content */
.modal-content {
    position: relative;
    background-color: #fefefe;
    margin: auto;
    padding: 0;
    border: 1px solid #888;
    width: 600px;
    box-shadow: 0 4px 8px 0 rgba(0,0,0,0.2),0 6px 20px 0 rgba(0,0,0,0.19);
    -webkit-animation-name: animatetopmodal;
    -webkit-animation-duration: 0.4s;
    animation-name: animatetopmodal;
    animation-duration: 0.4s;
    transition: all 0.5s;
}

/* Add Animation */
@-webkit-keyframes animatetopmodal {
    from {top:-300px; opacity:0} 
    to {top:0; opacity:1}
}

@keyframes animatetopmodal {
    from {top:-300px; opacity:0}
    to {top:0; opacity:1}
}

/* The Close Button */
.close {
    color: #000;
    font-size: 38px;
    font-weight: bold;
    transition: all 0.5s;
}

.close:hover,
.close:focus {
    color: rgb(255, 0, 0);
    text-decoration: none;
    cursor: pointer;
}

.modal-header {
    padding-top: 10px;
    padding-bottom: 5px;
    padding-left: 15px;
    padding-right: 15px;
    font-family: 'Raleway', sans-serif;
    text-align:center;
}

.modal-body {
    padding-left: 15px;
    padding-right: 15px;
    padding-bottom: 10px;
    font-family: 'News Cycle', sans-serif;
}

.modal-footer {
    padding-top: 5px;
    padding-bottom: 5px;
    padding-left: 15px;
    padding-right: 15px;
    background-color: #9b9898;
    font-family: 'News Cycle', sans-serif;
    color: #ffffff;
    text-align:center;
}

.format-modal-size { /*UHA logo in modal */
    width: 90px;
    height: 69px;
}

.modal-header-title { /*Title of modal */
    font-family: 'Raleway', sans-serif;
    font-size: 16px;
    letter-spacing: 2px;
    transition: all 0.5s;
}

.tooltip-modal-close { /*Tooltip when hover on 'x' */
    bottom: 140px;
    right: 110px;
    display: inline-block;
    border-bottom: 1px dotted black;
    border: 0;
}

.tooltip-modal-close .tooltip-modal-close-text { /* The property of tooltip */
    visibility: hidden;
    background-color: #5d5a5a;
    color: #fff;
    text-align: center;
    border-radius: 6px;
    padding-top: 5px;
    padding-bottom: 5px;
    padding-right: 10px;
    padding-left: 10px;
    position: absolute;
    top: 55px;
    right: 10px;
    z-index: 1;
    font-size:14px;
    opacity: 0;
    transition: opacity 1s;
}

.tooltip-modal-close:hover .tooltip-modal-close-text { 
    visibility: visible;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
    opacity: 1;
}

/* The Back Button */
.back {
    color: #000;
    font-size: 28px;
    font-weight: bold;
    transition: all 0.5s;
}

.back:hover,
.back:focus {
    color: rgb(55, 255, 0);
    text-decoration: none;
    cursor: pointer;
}

.tooltip-modal-back { /*Tooltip when hover on 'x' */
    bottom: 140px;
    right: 110px;
    display: inline-block;
    border-bottom: 1px dotted black;
    border: 0;
}

.tooltip-modal-back .tooltip-modal-back-text { /* The property of tooltip */
    visibility: hidden;
    background-color: #5d5a5a;
    color: #fff;
    text-align: center;
    border-radius: 6px;
    padding-top: 5px;
    padding-bottom: 5px;
    padding-right: 10px;
    padding-left: 10px;
    position: absolute;
    top: 55px;
    right: 535px;
    z-index: 1;
    font-size:14px;
    opacity: 0;
    transition: opacity 1s;
}

.tooltip-modal-back:hover .tooltip-modal-back-text { 
    visibility: visible;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
    opacity: 1;
}

/* Screen size change Notebook */
@media screen and (min-width: 1024px) and (max-width : 1279px){
    .modal {
        padding-top: 45px; 
        padding-bottom: 45px;
        width: 100%; 
        height: 100%; 
    }

    .modal-content {
        width: 550px;
    }

    .close {
        font-size: 38px;
    }

    .modal-header {
        padding-top: 10px;
        padding-bottom: 5px;
        padding-left: 15px;
        padding-right: 15px;
        font-size: 14px;
    }
    
    .modal-body {
        padding-left: 15px;
        padding-right: 15px;
        padding-bottom: 10px;
        font-size: 14px;
    }
    
    .modal-footer {
        padding-top: 5px;
        padding-bottom: 5px;
        padding-left: 15px;
        padding-right: 15px;
        font-size: 14px;
    }
    
    .tooltip-modal-close .tooltip-modal-close-text {
        border-radius: 6px;
        padding-top: 5px;
        padding-bottom: 5px;
        padding-right: 10px;
        padding-left: 10px;
        top: 55px;
        right: 10px;
        font-size:14px;
    }

    .tooltip-modal-back .tooltip-modal-back-text { /* The property of tooltip */
        border-radius: 6px;
        padding-top: 5px;
        padding-bottom: 5px;
        padding-right: 10px;
        padding-left: 10px;
        top: 55px;
        right: 485px;
        font-size:14px;
    }

    .format-modal-size { 
        width: 85px;
        height: 65px;
    }

    .modal-header-title { 
        font-size: 16px;
    }
}

/* Screen size change Tablet */
@media screen and (min-width : 768px) and (max-width : 1023px){
    .modal {
        padding-top: 45px; 
        padding-bottom: 45px;
        width: 100%; 
        height: 100%; 
    }

    .modal-content {
        width: 450px;
    }

    .close {
        font-size: 35px;
    }

    .modal-header {
        padding-top: 10px;
        padding-bottom: 5px;
        padding-left: 15px;
        padding-right: 15px;
        font-size: 14px;
    }
    
    .modal-body {
        padding-left: 15px;
        padding-right: 15px;
        padding-bottom: 10px;
        font-size: 14px;
    }
    
    .modal-footer {
        padding-top: 5px;
        padding-bottom: 5px;
        padding-left: 15px;
        padding-right: 15px;
        font-size: 14px;
    }

    .tooltip-modal-close .tooltip-modal-close-text {
        border-radius: 6px;
        padding-top: 5px;
        padding-bottom: 5px;
        padding-right: 10px;
        padding-left: 10px;
        top: 55px;
        right: 10px;
        font-size:14px;
    }

    .tooltip-modal-back .tooltip-modal-back-text { /* The property of tooltip */
        border-radius: 6px;
        padding-top: 5px;
        padding-bottom: 5px;
        padding-right: 10px;
        padding-left: 10px;
        top: 55px;
        right: 385px;
        font-size:14px;
    }

    .format-modal-size { 
        width: 75px;
        height: 58px;
    }

    .modal-header-title { 
        font-size: 15px;
    }
}

/* Screen size change phone (horizontal) */
@media screen and (min-width : 450px) and (max-width : 767px){
    .modal {
        padding-top: 25px; 
        padding-bottom: 25px;
        width: 100%; 
        height: 100%; 
    }

    .modal-content {
        width: 400px;
    }

    .close {
        font-size: 35px;
    }

    .modal-header {
        padding-top: 10px;
        padding-bottom: 5px;
        padding-left: 15px;
        padding-right: 15px;
        font-size: 13px;
    }
    
    .modal-body {
        padding-left: 15px;
        padding-right: 15px;
        padding-bottom: 10px;
        font-size: 13px;
    }
    
    .modal-footer {
        padding-top: 5px;
        padding-bottom: 5px;
        padding-left: 15px;
        padding-right: 15px;
        font-size: 13px;
    }

    .tooltip-modal-close .tooltip-modal-close-text {
        border-radius: 6px;
        padding-top: 5px;
        padding-bottom: 5px;
        padding-right: 10px;
        padding-left: 10px;
        top: 55px;
        right: 10px;
        font-size:13px;
    }

    .tooltip-modal-back .tooltip-modal-back-text { /* The property of tooltip */
        border-radius: 6px;
        padding-top: 5px;
        padding-bottom: 5px;
        padding-right: 10px;
        padding-left: 10px;
        top: 55px;
        right: 335px;
        font-size:13px;
    }

    .format-modal-size { 
        width: 65px;
        height: 50px;
    }

    .modal-header-title { 
        font-size: 14px;
    }
}

/* Screen size change phone (vertical) */
@media screen and (min-width : 0px) and (max-width : 449px){
    .modal {
        padding-top: 15px; 
        padding-bottom: 15px;
        width: 100%; 
        height: 100%; 
    }

    .modal-content {
        width: 280px;
    }

    .close {
        font-size: 35px;
    }

    .modal-header {
        padding-top: 10px;
        padding-bottom: 5px;
        padding-left: 15px;
        padding-right: 15px;
        font-size: 12px;
    }
    
    .modal-body {
        padding-left: 15px;
        padding-right: 15px;
        padding-bottom: 10px;
        font-size: 12px;
    }
    
    .modal-footer {
        padding-top: 5px;
        padding-bottom: 5px;
        padding-left: 15px;
        padding-right: 15px;
        font-size: 12px;
    }

    .tooltip-modal-close .tooltip-modal-close-text {
        border-radius: 6px;
        padding-top: 5px;
        padding-bottom: 5px;
        padding-right: 10px;
        padding-left: 10px;
        top: 55px;
        right: 10px;
        font-size:12px;
    }

    .tooltip-modal-back .tooltip-modal-back-text { /* The property of tooltip */
        border-radius: 6px;
        padding-top: 5px;
        padding-bottom: 5px;
        padding-right: 10px;
        padding-left: 10px;
        top: 55px;
        right: 215px;
        font-size:12px;
    }

    .format-modal-size { 
        width: 60px;
        height: 46px;
    }

    .modal-header-title { 
        font-size: 14px;
    }
}
