/* popup */
.popup {
    display: block;
    background: rgba( 13,17,21,.8 );
    position: fixed;
    top: 0;
    left: 0;
    width: 0;
    height: 0;
    z-index: 10000;
    overflow-y: scroll;
    padding-top: 40px;
    text-align: center;
    opacity: 0;
    -webkit-transition: opacity 500ms ease-in-out;
    transition: opacity 500ms ease-in-out;
}
.popup_opened {
    width: 100%;
    height: 100%;
    opacity: 1;
}
.popup_hide {
    width: 100%;
    height: 100%;
    opacity: 0;
}
.popup__wrap {        
    position: relative;
    z-index: 2;    
    height: 50%;   
    margin: 0 auto;        
}
.popup__content {
    display: none;
    text-align: left;    
}

.popup__content p {
    color: red;
    font-size: 1.0em;
}

.popup__close {
    position: absolute;
    right: 30px;
    top: 30px;
    background: url("/assets/img/close.png") no-repeat 0 0;
    width: 20px;
    height: 20px;
    border: none;
    cursor: pointer;
    -webkit-transform: rotate(0deg);
    transform: rotate(0deg);
    -webkit-transition: -webkit-transform 300ms ease-in-out;
    transition: transform 300ms ease-in-out;
}
.popup__close:before,
.popup__close:after {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    content: '';
    background: url("/assets/img/close.png") no-repeat 0 0;
    opacity: 1;
    -webkit-transition: opacity 300ms ease-in-out;
    transition: opacity 300ms ease-in-out;
}
.popup__close:after {
    background-position: 0 bottom;
    opacity: 0;
}
.popup__close:hover {
    -webkit-transform: rotate(180deg);
    transform: rotate(180deg);
}
.popup__close:hover:after{
    opacity: 1;
}
.popup__close:hover:before{
    opacity: 0;
}
.popup__close:active {
    background-position: 0 bottom;
}
.popup__scrollbar-measure {
    width: 100px;
    height: 100px;
    overflow: scroll;
    position: absolute;
    top: -9999px;
}

/*Если размер окна больше 960px вызывается этот css*/
/*@media (max-width: 960px) {
    .popup__wrap {        
        position: relative;
        z-index: 2;
        width: 90%;
        height: 60%;        
        margin: 0 auto;        
    }
}*/

@media (max-width: 640px) {
    .popup__wrap {        
        width: 90%;
    }
}

@media (min-width: 641px) {
    .popup__wrap {        
        width: 50%;
    }
}
